CN103257930A - Data reading and writing method and system based on data distribute service (DDS) - Google Patents

Data reading and writing method and system based on data distribute service (DDS) Download PDF

Info

Publication number
CN103257930A
CN103257930A CN2013101776814A CN201310177681A CN103257930A CN 103257930 A CN103257930 A CN 103257930A CN 2013101776814 A CN2013101776814 A CN 2013101776814A CN 201310177681 A CN201310177681 A CN 201310177681A CN 103257930 A CN103257930 A CN 103257930A
Authority
CN
China
Prior art keywords
dds
data
read
module
current data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013101776814A
Other languages
Chinese (zh)
Other versions
CN103257930B (en
Inventor
陈志华
刘向
余江森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201310177681.4A priority Critical patent/CN103257930B/en
Publication of CN103257930A publication Critical patent/CN103257930A/en
Application granted granted Critical
Publication of CN103257930B publication Critical patent/CN103257930B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a data reading and writing method and system based on data distribute service (DDS). The data reading and writing method based on the DDS comprises the following steps that the corresponding relations between DDS identities (IDs) and data to be written in are packaged in an S-Function module of a Simulink in advance to form a DDS writing module, the DDS writing module is used for carrying out configuration of the DDS IDs of the data to be written in, and the DDS IDs correspond to scheduled cache blocks of a storage area; the matching relation between current data to be written in and the DDS writing module is built, and the DDS writing module is configured with the DDS IDs of the current data to be written in; the current data to be writing in are written in the cache blocks corresponding to the configured DDS IDs. The data reading and writing method and system based on the DDS improves flexibility of data writing under application of the DDS, improves efficiency of data writing-in, and improves communication speed of the whole system.

Description

A kind of data reading and writing method and system based on DDS
Technical field
The present invention relates to DDS (DataDistribute Service, data distribution services) applied technical field, more particularly, relate to a kind of data reading and writing method and system based on DDS.
Background technology
OpenSplice/DDS is that leading real-time event drives middleware, and DDS can support maximum information management demands in low delay, high-throughput, determinacy, fault tolerant, service-oriented system; The characteristic of its plug and play, identification automatically has powerful extensibility in distributed system; The information transmission mechanism of its publish/subscribe makes between the different sub-systems to have very strong fault-tolerance by the state that keeps loose coupling, and its data retention characteristics can make that subsystem can drop-out when losing efficacy yet, and has strengthened the retentivity of information; Its real-time transport property can guarantee to carry out the transmission of data in the network that various real-times require.
Existing DDS uses the distribution procedure that relates to data, mainly is the read-write process of data; In the data distribution procedure that existing DDS uses, when corresponding use DDS carries out the data distribution in different operating system, must develop different application programs, namely only write a series of adapting applications programs could realize DDS in this system data transmit-receive in relative operation system, this has limited DDS Application Expansion and dirigibility; Thereby the data distribution that simultaneously existing DDS uses need be searched the data that needing to obtain distribution by all variablees, and this has limited the efficient of data distributions.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of data reading and writing method and system based on DDS, has limited DDS Application Expansion and dirigibility with the data ways of distribution that solves existing DDS application, has limited the problem of the efficient of data distributions simultaneously.
For achieving the above object, the embodiment of the invention provides following technical scheme:
A kind of data write method based on data distribution services DDS, corresponding relation with DDS ID and data to be written is encapsulated in the S-Function module of Simulink in advance, form the DDS writing module, described DDS writing module is for the configuration of the DDS ID that carries out data to be written, and described DDS ID is to there being the cache blocks of predetermined storage area; Described method comprises:
Set up the matching relationship of current data to be written and described DDS writing module, at the DDS ID of the described current data to be written of described DDS writing module configuration;
Described current data to be written are write in the DDS ID corresponding cache piece that disposes.
Wherein, described realization DDS ID comprises the process of cache blocks that predetermined storage area should be arranged:
Set up DDS ID tabulation, described DDS ID tabulation has at least one DDS ID;
For each DDS ID opens up corresponding cache blocks in storage area, set up the corresponding relation of each DDS ID and respective cache piece, corresponding at least one cache blocks of DDS ID.
Wherein, described method also comprises:
When the write state of DDS is effective, data in buffer in the DDS ID corresponding cache piece is used transmission by DDS.
The embodiment of the invention also provides a kind of data based on data distribution services DDS to read method, corresponding relation with the feature of DDS ID and data to be read is encapsulated in the S-Function module of Simulink in advance, form the DDS read through model, described DDS read through model is used for carrying out the feature of data to be read, the configuration of the DDS ID corresponding with data to be read, described DDS ID is cached with data to the cache blocks of predetermined storage area should be arranged in this cache blocks; Described method comprises:
The feature of the current data to be read of configuration in described DDS read through model, the DDS ID corresponding with described current data to be read;
Read out from the DDS ID corresponding cache piece of described current data correspondence to be read, have the data of the feature of described current data to be read.
Wherein, described realization DDS ID comprises the process of cache blocks that predetermined storage area should be arranged:
Set up DDS ID tabulation, described DDS ID tabulation has at least one DDS ID;
For each DDS ID opens up corresponding cache blocks in storage area, set up the corresponding relation of each DDS ID and respective cache piece, corresponding at least one cache blocks of DDS ID.
Wherein, the length that is characterized as data to be read of described data to be read;
Described DDS ID corresponding cache piece from described current data correspondence to be read reads out, the process of data with feature of described current data to be read comprises: according to predetermined deposit data order, read out the data of the length with current data to be read from the DDS ID corresponding cache piece of described current data correspondence to be read.
Wherein, the data type that is characterized as data to be read of described data to be read;
Described DDS ID corresponding cache piece from described current data correspondence to be read reads out, the process of data with feature of described current data to be read comprises: from the DDS ID corresponding cache piece of described current data correspondence to be read, read out the data corresponding with the data type of current data to be read.
The embodiment of the invention also provides a kind of data one-writing system based on data distribution services DDS, comprising:
Write package module, be used for the corresponding relation of DDS ID and data to be written is encapsulated into the S-Function module of Simulink, form the DDS writing module, described DDS writing module is for the configuration of the DDS ID that carries out data to be written, and described DDS ID is to there being the cache blocks of predetermined storage area;
Relation is set up module, is used for setting up the relation of current data to be written and described DDS writing module;
The ID configuration module is used for the DDSID in the described current data to be written of described DDS writing module configuration;
Writing module is used for described current data to be written are write the DDS ID corresponding cache piece that disposes.
The embodiment of the invention also provides a kind of data read apparatus based on data distribution services DDS, comprising:
Read package module, be used for the corresponding relation of the feature of DDS ID and data to be read is encapsulated into the S-Function module of Simulink, form the DDS read through model, described DDS read through model is used for carrying out the feature of data to be read, the configuration of the DDS ID corresponding with data to be read, described DDS ID is cached with in this cache blocks and writes data the cache blocks of predetermined storage area should be arranged;
Feature and ID configuration module are used for the feature in the current data to be read of described DDS read through model configuration, the DDS ID corresponding with described current data to be read;
Read module is used for reading out from the DDS ID corresponding cache piece of described current data correspondence to be read, has the data of the feature of described current data to be read.
Wherein, the length that is characterized as data to be read of described data to be read; Described read module comprises: first reading unit, be used for DDS ID corresponding cache piece from described current data correspondence to be read according to predetermined deposit data order, and read out the data of the length with current data to be read;
Or, the data type that is characterized as data to be read of described data to be read; Described read module comprises: second reading unit, be used for the DDS ID corresponding cache piece from described current data correspondence to be read, and read out the data corresponding with the data type of current data to be read.
Based on technique scheme, the data write method based on DDS that the embodiment of the invention provides, the corresponding relation of DDS ID and data to be written is encapsulated in the S-Function module of Simulink, form the DDS writing module, realized the modularization encapsulation of writing function of DDS by the S-Function module of Simulink, can on writing module, directly dispose the DDS ID of current data to be written, thereby current data to be written are write in the DDS ID corresponding cache piece that disposes, this has reduced complicacy and redundancy that model is built, improve DDS and used the dirigibility of writing data down, solved the data ways of distribution restriction DDS Application Expansion of existing DDS application and the problem of dirigibility; Simultaneously, the embodiment of the invention adopts internal memory piecemeal technology, cache blocks by the corresponding storage area of being scheduled to of DDS ID, realize the correspondence one by one of the packet that DDS is to be written, make data polling speed be greatly improved, thereby improved the efficient that data write, improved the communication speed of total system.
The data based on DDS that the embodiment of the invention provides are read method, the corresponding relation of the feature of DDS ID and data to be read is encapsulated in the S-Function module of Simulink, form the DDS read through model, realized the modularization encapsulation of reading function of DDS by the S-Function module of Simulink, can on read through model, directly dispose the feature of current data to be read and the DDS ID of current data correspondence to be read, thereby data to be read are read out from the DDS ID of correspondence, this has reduced complicacy and redundancy that model is built, improve DDS and used the dirigibility of read data down, solved the data ways of distribution restriction DDS Application Expansion of existing DDS application and the problem of dirigibility; Simultaneously, the embodiment of the invention adopts internal memory piecemeal technology, cache blocks by the corresponding storage area of being scheduled to of DDS ID, realize the correspondence one by one of the packet that DDS is to be read, make data polling speed be greatly improved, thereby improved the efficient of data read, improved the communication speed of total system.
The data reading and writing method and system based on DDS that the embodiment of the invention provides, the data ways of distribution restriction DDS Application Expansion of existing DDS application and the problem of dirigibility have been solved, improve DDS and used the dirigibility of reading and writing data down, improve DDS and used the efficient of data reading and writing down, improved the communication speed of total system.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The process flow diagram based on the data write method of DDS that Fig. 1 provides for the embodiment of the invention;
The process flow diagram that hews out cache blocks that Fig. 2 provides for the embodiment of the invention;
The data based on DDS that Fig. 3 provides for the embodiment of the invention are read the process flow diagram of method;
The structured flowchart based on the data one-writing system of DDS that Fig. 4 provides for the embodiment of the invention;
Another structured flowchart based on the data one-writing system of DDS that Fig. 5 provides for the embodiment of the invention;
The another structured flowchart based on the data one-writing system of DDS that Fig. 6 provides for the embodiment of the invention;
The structured flowchart based on the data read apparatus of DDS that Fig. 7 provides for the embodiment of the invention;
The structured flowchart of the read module that Fig. 8 provides for the embodiment of the invention;
Another structured flowchart of the read module that Fig. 9 provides for the embodiment of the invention.
Embodiment
The main core technology thought based on the data reading and writing method and system of DDS that the embodiment of the invention provides is: the S-Function by Simulink respectively with the read-write capability of DDS, be packaged into read through model and writing module with Simulink characteristic, carry out data to be read and be cached with the configuration of the buffer zone of data to be read at read through model, thereby in the buffer zone, read out data; Carry out the configuration of the buffer zone of data to be written and data to be written at writing module, thereby in the buffer zone, write data.
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
The process flow diagram based on the data write method of DDS that Fig. 1 provides for the embodiment of the invention, before this method of implementation, need in storage area, hew out cache blocks, so that the writing area of data to be provided, specific implementation can be as shown in Figure 2, the process flow diagram that hews out cache blocks that Fig. 2 provides for the embodiment of the invention, with reference to Fig. 2, this flow process can comprise:
Step S01, set up DDS ID(Identity, identify label) tabulation;
Can have at least one DDS ID in the DDS ID tabulation.
Step S02, in storage area, open up corresponding cache blocks for each DDS ID, set up the corresponding relation of each DDS ID and respective cache piece;
Wherein, DDS ID can corresponding at least one cache blocks, and each DDS ID corresponding cache number of blocks can be according to the practical situations setting changing.
With reference to Fig. 1, the data write method based on DDS that the embodiment of the invention provides can comprise:
Step S100, the corresponding relation with DDS ID and data to be written is encapsulated in the S-Function module of Simulink in advance, forms the DDS writing module;
Wherein, the DDS writing module is for the configuration of the DDS ID that carries out data to be written, and DDS ID is to there being the cache blocks of predetermined storage area; The function package of writing of DDS can be become the Simulink module by step S100, make the DDS writing module have the Simulink characteristic.Formed DDS writing module can only carry out the configuration of DDS ID in embodiments of the present invention.
Optionally, in the implementation procedure of DDS writing module, can set the S-Function that DDS writes the function correspondence in the S-Function attribute item on the Simulink module, and fill the parameter information that the DDS that need be delivered among the S-Function writes function, set parameter and the attribute thereof of writing module, parameter is chosen as DDS ID, and the corresponding relation of finishing DDS ID and data to be written is encapsulated into the process of the S-Function module of Simulink.
It should be noted that, the DDS ID that sets up corresponding relation of indication and data to be written are not refered in particular to a certain DDS ID and data to be written among the step S100, DDS ID among the step S100 and data to be written only represent to set up two objective attribute target attributes of corresponding relation, an objective attribute target attribute that is corresponding relation is DDS ID, and another is data to be written.
Step S110, set up the matching relationship of current data to be written and described DDS writing module, at the DDS ID of the described current data to be written of described DDS writing module configuration;
Set up the matching relationship of current data to be written and described DDS writing module, being intended to the clear and definite current data to be written of DDS writing module is exactly the data that need write in the cache blocks, can (this port be virtual port with the port of current data to be written input DDS writing module, be used to indicate the data that the data of this port correspondence need be handled for the DDS writing module), realize the foundation of the matching relationship of current data to be written and DDS writing module.After the foundation of finishing matching relationship, the concrete storage area that needs clear and definite current data to be written to write, can be before the enterprising trade of DDS writing module the configuration of the DDS ID of data to be written, from DDS ID tabulation, select or import DDS ID, on this DDS ID and DDS writing module coupling, set up the corresponding relation of current data to be written and this DDS ID, finish the DDS ID in the described current data to be written of described DDS writing module configuration.
Step S120, described current data to be written are write in the DDS ID corresponding cache piece that disposes.
It should be noted that step S110 and step S120 are the concrete implementation of writing data, after executing step S100, can carry out repeatedly step S110 and step S120 by the DDS writing module that forms among the step S100.
The data write method based on DDS that the embodiment of the invention provides, the corresponding relation of DDS ID and data to be written is encapsulated in the S-Function module of Simulink, form the DDS writing module, realized the modularization encapsulation of writing function of DDS by the S-Function module of Simulink, can on writing module, directly dispose the DDS ID of current data to be written, thereby current data to be written are write in the DDS ID corresponding cache piece that disposes, this has reduced complicacy and redundancy that model is built, improve DDS and used the dirigibility of writing data down, solved the data ways of distribution restriction DDS Application Expansion of existing DDS application and the problem of dirigibility; Simultaneously, the embodiment of the invention adopts internal memory piecemeal technology, cache blocks by the corresponding storage area of being scheduled to of DDS ID, realize the correspondence one by one of the packet that DDS is to be written, make data polling speed be greatly improved, thereby improved the efficient that data write, improved the communication speed of total system.
Optionally, after data to be written write cache blocks, if when the DDS write state reaches effective, DDS used and will directly send the data that write cache blocks by DDS, thereby realizes the data distribution services.
The data based on DDS that Fig. 3 provides for the embodiment of the invention are read the process flow diagram of method, it is corresponding with data write method shown in Figure 1 that these data are read method, optionally, method shown in Figure 3 can be in cache blocks under the situation of data, from cache blocks, read out the process of data.With reference to Fig. 3, this method can comprise:
Step S200, the corresponding relation with the feature of DDS ID and data to be read is encapsulated in the S-Function module of Simulink in advance, forms the DDS read through model;
Wherein, the DDS read through model is used for carrying out the feature of data to be read, the configuration of the DDS ID corresponding with data to be read; The function package of reading of DDS can be become the Simulink module by step S200, make the DDS read through model have the Simulink characteristic.Formed DDS read through model can carry out the configuration of the DDS ID of the feature of data to be read and data to be read in embodiments of the present invention.
Wherein, described DDS ID is cached with data to the cache blocks of predetermined storage area should be arranged in this cache blocks, and DDS ID can repeat no more with reference to shown in Figure 2 the implementation of cache blocks that predetermined storage area should be arranged herein.
Optionally, in the implementation procedure of DDS read through model, can set the S-Function that DDS reads the function correspondence in the S-Function attribute item on the Simulink module, and fill the parameter information that the DDS that need be delivered among the S-Function reads function, set parameter and the attribute thereof of read through model, parameter is chosen as the DDS ID of feature and the data correspondence to be read of data to be read, and the corresponding relation of finishing the feature of DDS ID and data to be read is encapsulated into the process of the S-Function module of Simulink.
It should be noted that, the feature of the DDS ID that sets up corresponding relation of indication and data to be read is not refered in particular to the feature of a certain DDS ID and data to be read among the step S200, DDS ID among the step S200 and the feature of data to be read only represent to set up two objective attribute target attributes of corresponding relation, an objective attribute target attribute that is corresponding relation is DDS ID, and another is the feature of data to be read.
Step S210, in described DDS read through model the configuration current data to be read feature, the DDS ID corresponding with described current data to be read;
The feature of data to be read can be the length of data to be read, the type of data to be read, and the capacity of data to be read etc. can characterize the characteristic of data to be read in corresponding cache blocks, thereby clearly goes out the information of data to be read from cache blocks.
Different with writing module, read through model is to read out data from cache blocks, therefore needs the DDS ID of the current data to be read of configuration, thereby determines to read the cache blocks of data, dispose the feature of current data to be read simultaneously, thereby from this cache blocks, clearly go out the data that will read.
Step S220, read out from the DDS ID corresponding cache piece of described current data correspondence to be read, have the data of the feature of described data to be read.
Optionally, if the length that is characterized as data to be read of data to be read, then the implementation of step S220 can for: from the DDS ID corresponding cache piece of described current data correspondence to be read, according to predetermined deposit data order, read out the data of the length with current data to be read.Predetermined deposit data order can be the sequencing that cache blocks deposits data in, namely read deposit in earlier or after the data of the length with current data to be read that deposits in, predetermined deposit data order can also be according to the actual conditions change setting.
Optionally, if the data type that is characterized as data to be read of data to be read, then the implementation of step S220 can for: from the DDS ID corresponding cache piece of described current data correspondence to be read, read out the data corresponding with the data type of current data to be read.Can be different data layouts as the data type, for example the data type of current data to be read be the data of picture format, then needs to read out from cache blocks the data of picture format correspondence.
Obvious method shown in Figure 3 also can be not limited in the cache blocks with the situation of data, does not write in cache blocks under the situation of data, and method shown in Figure 3 is also practicable, is that final no datat reads.It should be noted that when method shown in Figure 3 is carried out the configuration of DDS ID in read through model, can be from the DDS ID of the cache blocks correspondence of data, choosing the DDS ID that needs configuration, with the cache blocks of data, read out data from this DDS ID correspondence; Obviously also can carry out the configuration of DDS at read through model by the mode of input DDS ID, the DDS ID that imports can be the DDS ID with the cache blocks correspondence of data, also can be not with the DDS ID of the cache blocks correspondence of data.
It should be noted that step S210 and step S220 are the concrete implementation of read data, after executing step S200, can carry out repeatedly step S210 and step S220 by the DDS read through model that forms among the step S200.
The data based on DDS that the embodiment of the invention provides are read method, the corresponding relation of the feature of DDS ID and data to be read is encapsulated in the S-Function module of Simulink, form the DDS read through model, realized the modularization encapsulation of reading function of DDS by the S-Function module of Simulink, can on read through model, directly dispose the feature of current data to be read and the DDS ID of current data correspondence to be read, thereby data to be read are read out from the DDS ID of correspondence, this has reduced complicacy and redundancy that model is built, improve DDS and used the dirigibility of read data down, solved the data ways of distribution restriction DDS Application Expansion of existing DDS application and the problem of dirigibility; Simultaneously, the embodiment of the invention adopts internal memory piecemeal technology, cache blocks by the corresponding storage area of being scheduled to of DDS ID, realize the correspondence one by one of the packet that DDS is to be read, make data polling speed be greatly improved, thereby improved the efficient of data read, improved the communication speed of total system.
The data one-writing system based on DDS that the embodiment of the invention is provided is introduced below, and the data one-writing system of introducing based on DDS is corresponding with above-described data write method based on DDS, but both cross-references.
The structured flowchart based on the data one-writing system of DDS that Fig. 4 provides for the embodiment of the invention, with reference to Fig. 4, this system can comprise:
Write package module 100, be used for the corresponding relation of DDS ID and data to be written is encapsulated into the S-Function module of Simulink, form the DDS writing module;
Described DDS writing module is for the configuration of the DDS ID that carries out data to be written, and described DDS ID is to there being the cache blocks of predetermined storage area;
Relation is set up module 110, is used for setting up the relation of current data to be written and described DDS writing module;
ID configuration module 120 is used for the DDS ID in the described current data to be written of described DDS writing module configuration;
Writing module 130 is used for described current data to be written are write the DDS ID corresponding cache piece that disposes.
Another structured flowchart based on the data one-writing system of DDS that Fig. 5 provides for the embodiment of the invention, in conjunction with Fig. 4 and shown in Figure 5, this system can also comprise:
Module 140 is set up in tabulation, is used for setting up DDS ID tabulation, and described DDS ID tabulation has at least one DDS ID;
Cache blocks is opened up module 150, is used to each DDS ID to open up corresponding cache blocks in storage area, sets up the corresponding relation of each DDS ID and respective cache piece, corresponding at least one cache blocks of DDS ID.
Setting up module 140 and cache blocks by tabulation opens up module 150 and can realize that DDS ID is to the result of cache blocks that predetermined storage area should be arranged.
The another structured flowchart based on the data one-writing system of DDS that Fig. 6 provides for the embodiment of the invention, in conjunction with Fig. 4 and shown in Figure 6, this system can also comprise:
Sending module 160 is used for when the write state of DDS is effective, data in buffer in the DDS ID corresponding cache piece is used by DDS send.
Obviously, system shown in Figure 5 also can have sending module 160.
The data read apparatus based on DDS that the embodiment of the invention is provided is introduced below, introduce to read method based on the data read apparatus of DDS and above-described data based on DDS corresponding, but both cross-references.
The structured flowchart based on the data read apparatus of DDS that Fig. 7 provides for the embodiment of the invention, with reference to Fig. 7, this system can comprise:
Read package module 200, be used for the corresponding relation of the feature of DDS ID and data to be read is encapsulated into the S-Function module of Simulink, formation DDS read through model;
Described DDS read through model is used for carrying out the feature of data to be read, the configuration of the DDS ID corresponding with data to be read, and described DDS ID is cached with in this cache blocks and writes data the cache blocks of predetermined storage area should be arranged;
Feature and ID configuration module 210 are used for the feature in the current data to be read of described DDS read through model configuration, the DDS ID corresponding with described current data to be read;
Read module 220 is used for reading out from the DDS ID corresponding cache piece of described current data correspondence to be read, has the data of the feature of described current data to be read.
Optionally, the feature of data to be read can be the length of data to be read, the data type of data to be read, or the information such as capacity of data to be read.
When data to be read be characterized as the length of data to be read the time, Fig. 8 shows the structure of the read module 220 that the embodiment of the invention provides, with reference to Fig. 8, this read module 220 can comprise: first reading unit 221, be used for DDS ID corresponding cache piece from described current data correspondence to be read according to predetermined deposit data order, read out the data of the length with current data to be read.
When data to be read be characterized as the data type of data to be read the time, Fig. 9 shows the structure of the read module 220 that the embodiment of the invention provides, with reference to Fig. 9, this read module 220 can comprise: second reading unit 222, be used for the DDS ID corresponding cache piece from described current data correspondence to be read, read out the data corresponding with the data type of current data to be read.
The data reading and writing method and system based on DDS that the embodiment of the invention provides, the data ways of distribution restriction DDS Application Expansion of existing DDS application and the problem of dirigibility have been solved, improve DDS and used the dirigibility of reading and writing data down, improve DDS and used the efficient of data reading and writing down, improved the communication speed of total system.
Each embodiment adopts the mode of going forward one by one to describe in this instructions, and what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For the disclosed device of embodiment, because it is corresponding with the embodiment disclosed method, so description is fairly simple, relevant part partly illustrates referring to method and gets final product.
The professional can also further recognize, unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software clearly is described, composition and the step of each example described in general manner according to function in the above description.These functions still are that software mode is carried out with hardware actually, depend on application-specific and the design constraint of technical scheme.The professional and technical personnel can specifically should be used for using distinct methods to realize described function to each, but this realization should not thought and exceeds scope of the present invention.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can directly use the software module of hardware, processor execution, and perhaps the combination of the two is implemented.Software module can place the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the technical field.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. data write method based on data distribution services DDS, it is characterized in that, corresponding relation with DDS ID and data to be written is encapsulated in the S-Function module of Simulink in advance, form the DDS writing module, described DDS writing module is for the configuration of the DDS ID that carries out data to be written, and described DDS ID is to there being the cache blocks of predetermined storage area; Described method comprises:
Set up the matching relationship of current data to be written and described DDS writing module, at the DDS ID of the described current data to be written of described DDS writing module configuration;
Described current data to be written are write in the DDS ID corresponding cache piece that disposes.
2. method according to claim 1 is characterized in that, described realization DDS ID comprises the process of cache blocks that predetermined storage area should be arranged:
Set up DDS ID tabulation, described DDS ID tabulation has at least one DDS ID;
For each DDS ID opens up corresponding cache blocks in storage area, set up the corresponding relation of each DDS ID and respective cache piece, corresponding at least one cache blocks of DDS ID.
3. method according to claim 1 and 2 is characterized in that, also comprises:
When the write state of DDS is effective, data in buffer in the DDS ID corresponding cache piece is used transmission by DDS.
4. the data based on data distribution services DDS are read method, it is characterized in that, corresponding relation with the feature of DDS ID and data to be read is encapsulated in the S-Function module of Simulink in advance, form the DDS read through model, described DDS read through model is used for carrying out the feature of data to be read, the configuration of the DDS ID corresponding with data to be read, described DDS ID is cached with data to the cache blocks of predetermined storage area should be arranged in this cache blocks; Described method comprises:
The feature of the current data to be read of configuration in described DDS read through model, the DDS ID corresponding with described current data to be read;
Read out from the DDS ID corresponding cache piece of described current data correspondence to be read, have the data of the feature of described current data to be read.
5. method according to claim 4 is characterized in that, described realization DDS ID comprises the process of cache blocks that predetermined storage area should be arranged:
Set up DDS ID tabulation, described DDS ID tabulation has at least one DDS ID;
For each DDS ID opens up corresponding cache blocks in storage area, set up the corresponding relation of each DDS ID and respective cache piece, corresponding at least one cache blocks of DDS ID.
6. according to claim 4 or 5 described methods, it is characterized in that the length that is characterized as data to be read of described data to be read;
Described DDS ID corresponding cache piece from described current data correspondence to be read reads out, the process of data with feature of described current data to be read comprises: according to predetermined deposit data order, read out the data of the length with current data to be read from the DDS ID corresponding cache piece of described current data correspondence to be read.
7. according to claim 4 or 5 described methods, it is characterized in that the data type that is characterized as data to be read of described data to be read;
Described DDS ID corresponding cache piece from described current data correspondence to be read reads out, the process of data with feature of described current data to be read comprises: from the DDS ID corresponding cache piece of described current data correspondence to be read, read out the data corresponding with the data type of current data to be read.
8. the data one-writing system based on data distribution services DDS is characterized in that, comprising:
Write package module, be used for the corresponding relation of DDS ID and data to be written is encapsulated into the S-Function module of Simulink, form the DDS writing module, described DDS writing module is for the configuration of the DDS ID that carries out data to be written, and described DDS ID is to there being the cache blocks of predetermined storage area;
Relation is set up module, is used for setting up the relation of current data to be written and described DDS writing module;
The ID configuration module is used for the DDS ID in the described current data to be written of described DDS writing module configuration;
Writing module is used for described current data to be written are write the DDS ID corresponding cache piece that disposes.
9. the data read apparatus based on data distribution services DDS is characterized in that, comprising:
Read package module, be used for the corresponding relation of the feature of DDS ID and data to be read is encapsulated into the S-Function module of Simulink, form the DDS read through model, described DDS read through model is used for carrying out the feature of data to be read, the configuration of the DDS ID corresponding with data to be read, described DDS ID is cached with in this cache blocks and writes data the cache blocks of predetermined storage area should be arranged;
Feature and ID configuration module are used for the feature in the current data to be read of described DDS read through model configuration, the DDS ID corresponding with described current data to be read;
Read module is used for reading out from the DDS ID corresponding cache piece of described current data correspondence to be read, has the data of the feature of described current data to be read.
10. system according to claim 9 is characterized in that, the length that is characterized as data to be read of described data to be read; Described read module comprises: first reading unit, be used for DDS ID corresponding cache piece from described current data correspondence to be read according to predetermined deposit data order, and read out the data of the length with current data to be read;
Or, the data type that is characterized as data to be read of described data to be read; Described read module comprises: second reading unit, be used for the DDS ID corresponding cache piece from described current data correspondence to be read, and read out the data corresponding with the data type of current data to be read.
CN201310177681.4A 2013-05-14 2013-05-14 A kind of data read-write method based on DDS and system Active CN103257930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310177681.4A CN103257930B (en) 2013-05-14 2013-05-14 A kind of data read-write method based on DDS and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310177681.4A CN103257930B (en) 2013-05-14 2013-05-14 A kind of data read-write method based on DDS and system

Publications (2)

Publication Number Publication Date
CN103257930A true CN103257930A (en) 2013-08-21
CN103257930B CN103257930B (en) 2016-04-06

Family

ID=48961863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310177681.4A Active CN103257930B (en) 2013-05-14 2013-05-14 A kind of data read-write method based on DDS and system

Country Status (1)

Country Link
CN (1) CN103257930B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202842A (en) * 2016-08-30 2016-12-07 北京经纬恒润科技有限公司 A kind of modeling method based on S function and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100316158A1 (en) * 2006-11-20 2010-12-16 Lawrence Arne Active signal processing personal health signal receivers
CN101969475A (en) * 2010-11-15 2011-02-09 张军 Business data controllable distribution and fusion application system based on cloud computing
CN102413156A (en) * 2010-09-21 2012-04-11 腾讯科技(深圳)有限公司 Distributed data storage system and method
CN102982197A (en) * 2012-10-30 2013-03-20 北京华力创通科技股份有限公司 Multi-domain collaborative distribution type simulation system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100316158A1 (en) * 2006-11-20 2010-12-16 Lawrence Arne Active signal processing personal health signal receivers
CN102413156A (en) * 2010-09-21 2012-04-11 腾讯科技(深圳)有限公司 Distributed data storage system and method
CN101969475A (en) * 2010-11-15 2011-02-09 张军 Business data controllable distribution and fusion application system based on cloud computing
CN102982197A (en) * 2012-10-30 2013-03-20 北京华力创通科技股份有限公司 Multi-domain collaborative distribution type simulation system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202842A (en) * 2016-08-30 2016-12-07 北京经纬恒润科技有限公司 A kind of modeling method based on S function and system

Also Published As

Publication number Publication date
CN103257930B (en) 2016-04-06

Similar Documents

Publication Publication Date Title
CN102467408B (en) Method and device for accessing data of virtual machine
CN102841931A (en) Storage method and storage device of distributive-type file system
CN102867035B (en) A kind of distributed file system cluster high availability method and device
CN102609466A (en) Method and system for controlling shared memory
CN103678149A (en) Data processing method and device
CN109558457A (en) A kind of method for writing data, device, equipment and storage medium
CN106657356A (en) Data writing method and device for cloud storage system, and cloud storage system
CN103399823A (en) Method, equipment and system for storing service data
CN103647850A (en) Data processing method, device and system of distributed version control system
CN106126374A (en) Method for writing data, method for reading data and device
CN107632780A (en) A kind of roll of strip implementation method and its storage architecture based on distributed memory system
CN105373487A (en) Defragmentation method and system for storage operation system
CN103049224A (en) Method, device and system for importing data into physical tape
CN105653209A (en) Object storage data transmitting method and device
CN103136215A (en) Data read-write method and device of storage system
JP6060276B2 (en) Monitoring record management method and device
CN112559476A (en) Log storage method for improving performance of target system and related equipment thereof
CN103733184B (en) There is device programming system and the operational approach thereof of data broadcast
CN108062235A (en) Data processing method and device
CN107301021B (en) Method and device for accelerating LUN (logical Unit number) by utilizing SSD (solid State disk) cache
CN109375868B (en) Data storage method, scheduling device, system, equipment and storage medium
CN108958950A (en) Task management method, host and the storage device of electronic storage device
CN102880467A (en) Method for verifying Cache coherence protocol and multi-core processor system
CN109213745A (en) A kind of distributed document storage method, device, processor and storage medium
CN107193693A (en) A kind of online data storage optimization method based on storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Patentee after: Beijing Jingwei Hengrun Technology Co., Ltd

Address before: 100101 Beijing city Chaoyang District Anxiang Beili 11 B block 8 layer

Patentee before: Beijing Jingwei HiRain Technologies Co.,Ltd.