CN106899645A - A kind of DDS data interactive methods under unstable network environment - Google Patents
A kind of DDS data interactive methods under unstable network environment Download PDFInfo
- Publication number
- CN106899645A CN106899645A CN201510968696.1A CN201510968696A CN106899645A CN 106899645 A CN106899645 A CN 106899645A CN 201510968696 A CN201510968696 A CN 201510968696A CN 106899645 A CN106899645 A CN 106899645A
- Authority
- CN
- China
- Prior art keywords
- dds
- network
- network state
- state
- entity
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/2895—Intermediate processing functionally located close to the data provider application, e.g. reverse proxies
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention proposes DDS data interactive methods under a kind of unstable network environment, when aiming to solve the problem that use DDS middlewares transmit data in unstable network, registers entities in DDS middlewares unsuccessfully cause using the problem that cannot normally run, and the problem that data cannot be interacted normally between the entity created under heterogeneous networks state, by real-time detection network state, the attribute of the entity object of DDS middlewares is changed according to current network state, data proper communication is realized.During the real time execution of monitoring network state, timely feedback network state, the state of DDS entities will be adjusted according to the network state of feedback, the final stable operation for ensureing DDS, side maintains subscription status of the DDS entity objects when network state changes simultaneously, upper-layer user can both experience network state and change, and the normal subscription of current data is not interfered with again, so as to ensure the stability of data communication.
Description
Technical field
The invention belongs to communication engineering technical field, DDS data interactive methods under particularly a kind of unstable network environment.
Background technology
What the information-based world faced is mass data information complicated and changeable, and the data interaction that carries out of real-time high-efficiency high speed has
Vital effect, and real time information system shows network-centric development trend.As the high speed of network is sent out
Send, distributed application system has very important status in multiple fields such as finance, traffic, military affairs.
Different communications platforms, different user has wanting for different service quality (QOS) when carrying out data transmission
Ask, the communication of current nodes mainly there are following three kinds:Point-to-point communication, client/server (C/S) leads to
Letter, publish/subscribe communication.
Point-to-point communication is a kind of simplest communication mode, and phone and TCP transmission are typical point-to-point communications, electricity
Communicated while words cannot be competent between multiple spot, TCP can tend to complicating for the communication between multiple nodes.
Client/server (C/S) communicates, and is a kind of many-to-one communication mode, i.e., one central server is to multiple
Client, client must first bind and can just obtain data message on the server, between the two with coupling high.
This communication mode is more applicable in the case where data distribution is concentrated or requires to focus on, such as database and file system
System.But when information is generated on multiple nodes, C/S model requirement by information full backup to server end, to
The follow-up client for sending request of data sends data, and thus caused data interaction efficiency is low, poor real.
International OMG (OMG) be proposed Data distributing (DDS) based on publish/subscribe communication party
The new specification of formula.Data publication, transmission and the interface subscribed to and behavior in distributed real-time systems retouch in DDS
State, independently of plateform system, distributed data transmission network can be processed, complete data efficient, the interaction of high speed.
The content of the invention
It is an object of the invention to provide DDS data interactive methods, profit under a kind of present invention unstable network environment of proposition
In this way can real-time detection network state, the category of the entity object according to current network state change DDS middlewares
Property, so as to ensure the DDS inter-entity proper communications under heterogeneous networks state.
The technical scheme for realizing the object of the invention is:
DDS data interactive methods under a kind of unstable network environment, comprise the following steps:
The first step:Calling the registration function interface of DDS carries out the establishment of DDS entity objects;
Second step:The ioctl functions of equipment I/O channel in the management equipment driver of LINUX bottoms are called to be worked as
The all-network interface message of preceding system, the all-network interface message that will be obtained is saved in ifconf structures, traversal
Ifconf structures, each interface message is saved in ifreq structures, rejects the network interface of local winding, again
Call ioctl interfaces to obtain the state of network interface in each ifreq structure, whether just thus judge current network connection
Often;
3rd step:The entity object of DDS middlewares is created according to current network conditions, if the network operation is normal, then
The entity object based on network interface with the DDS middlewares of shared drive is created, this DDS entity objects both can be with this
The DDS entity objects that terminal subject matches with QOS communicate, it is also possible to the DDS realities matched with other-end
Body object communication;If without network connection, then creating the DDS entities based on this terminal loopback address, this DDS
The DDS entity objects that entity object may only match with this terminal communicate, it is not possible to it is any on other-end
DDS entity objects communicate;
4th step:The thread of monitor in real time network state is opened, calls the method in second step to obtain real-time network in thread
State;
5th step:The initial value of current record DDS entity object subscription status is set;
6th step:If subscription end, the current subscription status of the entity object of DDS middlewares are recorded, if entity object
Abandon the subscription to certain policy data, record also can real-time update, current record keeps entity object newest forever
Subscription status;
7th step:When the thread for monitoring network state provides the information that network state changes, cancellation is currently transported
The entity object of capable DDS middlewares, creates the entity object of the new DDS middlewares based on current network state,
With the 3rd step;
8th step:According to the subscription information of the DDS entity objects recorded before network state changes, order again
Read, it is ensured that the data that upper layer application needs will not be no longer subscribed to because network state changes:Reset current record
DDS entity objects subscription status are the initial value in second step;
9th step:The 4th step is gone to, current network state is monitored.
During the thread real time execution of foregoing monitoring network state, timely feedback network state, the scheme of proposition is by root
The state of DDS entities is adjusted according to the network state of feedback, the final stable operation for ensureing DDS is maintained simultaneously in scheme
Subscription status of the DDS entity objects when network state changes, upper-layer user can both experience network state
Change, the normal subscription of current data is not interfered with again, so as to ensure the stability of data communication.
Compared with prior art, its remarkable advantage is the present invention:
(1) by the present invention, DDS data interactive methods under a kind of unstable network environment are realized;
(2) by the present invention, the method for establishing monitor in real time network state;
(3) by the present invention, solve the DDS entity objects set up under heterogeneous networks state cannot proper communication ask
Topic;
(4) by the present invention, improve the robustness communicated using DDS under unstable network.
The present invention is described in further detail below in conjunction with the accompanying drawings.
Brief description of the drawings
Fig. 1 is based on the processing procedure schematic diagram of the sender of DDS middlewares.
Fig. 2 is based on the processing procedure schematic diagram of the subscriber of DDS middlewares.
Fig. 3 is based on the time diagram that the same terminal receiving-transmitting sides of DDS middlewares work.
Fig. 4 is based on the time diagram that the different terminals receiving-transmitting sides of DDS middlewares work.
Specific embodiment
A kind of embodiments in accordance with the present invention, DDS data interactive methods under unstable network environment, comprise the following steps:
The first step:Calling the registration function interface of DDS carries out the establishment of DDS entity objects;
Second step:The ioctl functions of equipment I/O channel in the management equipment driver of LINUX bottoms are called to be worked as
The all-network interface message of preceding system, the all-network interface message that will be obtained is saved in ifconf structures, traversal
Ifconf structures, each interface message is saved in ifreq structures, rejects the network interface of local winding, again
Call ioctl interfaces to obtain the state of network interface in each ifreq structure, whether just thus judge current network connection
Often;
3rd step:The entity object of DDS middlewares is created according to current network conditions, if the network operation is normal, then
The entity object based on network interface with the DDS middlewares of shared drive is created, this DDS entity objects both can be with this
The DDS entity objects that terminal subject matches with QOS communicate, it is also possible to the DDS realities matched with other-end
Body object communication;If without network connection, then creating the DDS entities based on this terminal loopback address, this DDS
The DDS entity objects that entity object may only match with this terminal communicate, it is not possible to it is any on other-end
DDS entity objects communicate;
4th step:The thread of monitor in real time network state is opened, calls the method in second step to obtain real-time network in thread
State;
5th step:The initial value of current record DDS entity object subscription status is set;
6th step:If subscription end, the current subscription status of the entity object of DDS middlewares are recorded, if entity object
Abandon the subscription to certain policy data, record also can real-time update, current record keeps entity object newest forever
Subscription status;
7th step:When the thread for monitoring network state provides the information that network state changes, cancellation is currently transported
The entity object of capable DDS middlewares, creates the entity object of the new DDS middlewares based on current network state,
With the 3rd step;
8th step:According to the subscription information of the DDS entity objects recorded before network state changes, order again
Read, it is ensured that the data that upper layer application needs will not be no longer subscribed to because network state changes:Reset current record
DDS entity objects subscription status are the initial value in second step;
9th step:The 4th step is gone to, current network state is monitored.
During the thread real time execution of foregoing monitoring network state, timely feedback network state, the scheme of proposition is by root
The state of DDS entities is adjusted according to the network state of feedback, the final stable operation for ensureing DDS is maintained simultaneously in scheme
Subscription status of the DDS entity objects when network state changes, upper-layer user can both experience network state
Change, the normal subscription of current data is not interfered with again, so as to ensure the stability of data communication.
Present invention seek to address that when transmitting data in unstable network using DDS middlewares, the reality in DDS middlewares
Body registration failure causes using the problem that cannot normally run, and data between the entity created under heterogeneous networks state
A kind of problem that cannot normally interact, it is proposed that real-time detection network state, changes in DDS according to current network state
Between part entity object attribute, the method for realizing data proper communication.
With reference to shown in Fig. 1-Fig. 4, according to an exemplary realization for specifically describing aforementioned schemes.
The treatment logic chart of the sender based on DDS middlewares with reference to shown in Fig. 1 in startup and running.
Specific step is as follows:
The first step:Sender starts.
Second step:The bottom-layer network interface of LINUX is accessed, the network interface of non-local loopback address is then traveled through successively
Determine whether that network interface is currently running.
3rd step:The entity object of DDS middlewares is created according to current network conditions.If the network operation is normal, then
Create the entity object based on network interface with the DDS middlewares of shared drive;If without network connection, then creating
DDS entities based on this terminal loopback address, and record current network state.
4th step:The thread of monitor in real time network state is opened, calls the method in second step to obtain real-time network in thread
State, judges whether network condition changes.
5th step:The initial value for setting current record DDS entity object subscription status is nothing, and transmitting terminal sends number of users
According to.
6th step:If network state is different from the network state of record in program operation process, transmitting terminal enters DDS
Entity switching state in, in handoff procedure, transmitting terminal send all data return " just in handover network state,
Please send after a while " transmission miscue information.
7th step:In network state handoff procedure, the entity object of the DDS middlewares that cancellation is currently running, wound
The entity object of the new DDS middlewares based on current network state is built, with the 3rd step.
8th step:Close current network and judge thread, update current network state, into the 4th step, continue to monitor
Current network change.
Accompanying drawing 2 is treatment logic chart of the subscriber based on DDS middlewares in startup and running.Specifically
Step is as follows:
Preceding four step of subscriber is with four steps before sender, and remaining step is as follows:
5th step:Current record DDS entity object subscription status are set, if the subscription status of subscription end change afterwards
Become, then the value for changing current record DDS entity object subscription status is the subscription status at current subscription end.
6th step:If network state is different from the network state of record in program operation process, subscription end enters DDS
In the state of entity switching.
7th step:In network state handoff procedure, the entity object of the DDS middlewares that cancellation is currently running, wound
The entity object of the new DDS middlewares based on current network state is built, with the 3rd step, if subscription end is in network switching
There is the subscription of data before, then the subscription status according to record are subscribed to again
8th step:Close current network and judge thread, update current network state, into the 4th step, continue to monitor
Current network change.
Fig. 3 is the time diagram of the same terminal receiving-transmitting sides work based on DDS middlewares.When transmitting terminal and subscription
When end starts, corresponding DDS entity objects are created all in accordance with current network condition, publishing side and subscription end QOS,
Data type and theme match in the case of proper communication;When networking changes, the thread of transmitting terminal and subscription end
The change of network condition can be in time monitored, the switching of DDS entity objects, after handover success, transmitting terminal is carried out
Can proper communication again with subscription end.
Fig. 4 is the time diagram of the different terminals receiving-transmitting sides work based on DDS middlewares.In the feelings of network connection
Under condition, when transmitting terminal starts with subscription end, the situation that publishing side matches with subscription end in QOS, data type and theme
Lower proper communication;When the network of transmitting terminal is interrupted, the DDS entity objects of transmitting terminal can be based on local loopback address
Create again, publishing side now can carry out ordering for DDS entity objects switching with as shown in Figure 3 with locally same
Read end to be communicated, but cannot be communicated with the subscription end of other-end.Until the network of publishing side is reconnected, enter
Go after the switching of DDS entity objects, just can again have been communicated with the subscription end of other-end.If the net of subscription end
There is terminal in network, the subscription end that have switched DDS entity objects same with this terminal can only have switched DDS entity objects
Publishing side communicates, it is not possible to communicated with the publishing side of other-end, until the network recovery of subscription end normally can be just
Normal open is believed.
As can be seen that when scheme proposed by the present invention solves network state and changes from Fig. 3 and Fig. 4, this terminal
With the publishing side on other-end and the signal intelligence of subscription end.Experimental data shows the switching time of DDS entity objects
Can be completed in 2 seconds, in the case where user data transmission rate is not less than 2 seconds, the packet that transmitting terminal is lost only has
One bag.
Above-described specific descriptions, purpose, technical scheme and beneficial effect to inventing are further described,
Should be understood that and the foregoing is only specific embodiment of the invention, the protection model being not intended to limit the present invention
Enclose, all any modification, equivalent substitution and improvements within the spirit and principles in the present invention, done etc. should be included in
Within protection scope of the present invention.
Claims (2)
1. DDS data interactive methods under a kind of unstable network environment, it is characterised in that comprise the following steps:
The first step:Calling the registration function interface of DDS carries out the establishment of DDS entity objects;
Second step:The ioctl functions of equipment I/O channel in the management equipment driver of LINUX bottoms are called to be worked as
The all-network interface message of preceding system, the all-network interface message that will be obtained is saved in ifconf structures, traversal
Ifconf structures, each interface message is saved in ifreq structures, rejects the network interface of local winding, again
Call ioctl interfaces to obtain the state of network interface in each ifreq structure, whether just thus judge current network connection
Often;
3rd step:The entity object of DDS middlewares is created according to current network conditions, if the network operation is normal, then
The entity object based on network interface with the DDS middlewares of shared drive is created, this DDS entity objects have so
Attribute:Both the DDS entity objects that can have matched with QOS with this terminal subject communicate, also can be with other-end phase
The DDS entity objects communication of matching;If without network connection, then creating the DDS realities based on this terminal loopback address
Body, this DDS entity objects have the property that:The DDS entity objects for only matching with this terminal communicate,
Cannot be communicated with any DDS entity objects on other-end;
4th step:The thread of monitor in real time network state is opened, calls the method in second step to obtain real-time network in thread
State;
5th step:The initial value of current record DDS entity object subscription status is set;
6th step:If subscription end, the current subscription status of the entity object of DDS middlewares are recorded, if entity object
Abandon the subscription to certain policy data, record data real-time update, it is newest that current record is always maintained at entity object
Subscription status;
7th step:When the thread for monitoring network state provides the information that network state changes, cancellation is currently transported
The entity object of capable DDS middlewares, creates the entity object of the new DDS middlewares based on current network state,
Creation method is identical with the 3rd step;
8th step:According to the subscription information of the DDS entity objects recorded before network state changes, order again
Read, it is ensured that the data that upper layer application needs will not be no longer subscribed to because network state changes:Reset current record
DDS entity objects subscription status are the initial value in second step;
9th step:The 4th step is gone to, current network state is monitored.
2. DDS data interactive methods under unstable network environment according to claim 1, it is characterised in that
During the thread real time execution of foregoing monitoring network state, timely feedback network state, the network state according to feedback is adjusted
The state of whole DDS entities, the final stable operation for ensureing DDS, while maintaining DDS entity objects in network state
Subscription status when changing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510968696.1A CN106899645B (en) | 2015-12-21 | 2015-12-21 | A kind of DDS data interactive method under unstable network environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510968696.1A CN106899645B (en) | 2015-12-21 | 2015-12-21 | A kind of DDS data interactive method under unstable network environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106899645A true CN106899645A (en) | 2017-06-27 |
CN106899645B CN106899645B (en) | 2019-10-18 |
Family
ID=59190287
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510968696.1A Active CN106899645B (en) | 2015-12-21 | 2015-12-21 | A kind of DDS data interactive method under unstable network environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106899645B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109884915A (en) * | 2018-12-04 | 2019-06-14 | 中国航空无线电电子研究所 | A kind of embedded software running platform designing method and its emulation platform based on DDS |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103166975A (en) * | 2013-04-03 | 2013-06-19 | 上海航天测控通信研究所 | Data distribution service (DDS) communication system |
US20140115153A1 (en) * | 2012-10-23 | 2014-04-24 | Electronics And Telecommunications Research Institute | Apparatus for monitoring data distribution service (dds) and method thereof |
CN104243606A (en) * | 2014-09-29 | 2014-12-24 | 浙江大学 | C/S-mode DDS communication system and method |
CN104506416A (en) * | 2014-12-17 | 2015-04-08 | 东软集团股份有限公司 | Method, device and system for implementing stable message forwarding |
-
2015
- 2015-12-21 CN CN201510968696.1A patent/CN106899645B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140115153A1 (en) * | 2012-10-23 | 2014-04-24 | Electronics And Telecommunications Research Institute | Apparatus for monitoring data distribution service (dds) and method thereof |
CN103166975A (en) * | 2013-04-03 | 2013-06-19 | 上海航天测控通信研究所 | Data distribution service (DDS) communication system |
CN104243606A (en) * | 2014-09-29 | 2014-12-24 | 浙江大学 | C/S-mode DDS communication system and method |
CN104506416A (en) * | 2014-12-17 | 2015-04-08 | 东软集团股份有限公司 | Method, device and system for implementing stable message forwarding |
Non-Patent Citations (2)
Title |
---|
张玲等: "Websocket服务器推送技术的研究", 《河北省科学院学报》 * |
汪剑: "数据分发服务及其应用", 《通信与信息技术》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109884915A (en) * | 2018-12-04 | 2019-06-14 | 中国航空无线电电子研究所 | A kind of embedded software running platform designing method and its emulation platform based on DDS |
Also Published As
Publication number | Publication date |
---|---|
CN106899645B (en) | 2019-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102823205B (en) | Aggregating data traffic from access domains | |
US6170009B1 (en) | Controlling devices on a network through policies | |
US20020138459A1 (en) | Database for executing policies for controlling devices on a network | |
CN105765921A (en) | Methods, systems, and computer readable media for DIAMETER routing using software defined network (SDN) functionality | |
CN104468358A (en) | Message forwarding method and device of distributive virtual switch system | |
WO2021063129A1 (en) | Core network capability calling method and system | |
CN110022456A (en) | The method and apparatus for inviting terminals joining the conference | |
CN108632234B (en) | A kind of user login method and device | |
CN109787992A (en) | A kind of method and apparatus by view networking access private network | |
CN108964962A (en) | A kind of method and system of control view networked terminals | |
CN109714527A (en) | A kind of method and apparatus of the control view networking camera in internet | |
CN108810581A (en) | A kind of update method and device of menu | |
CN108880851A (en) | A kind of method and interactive system that configuration updates | |
EP3229413A1 (en) | Cross-domain cooperative method, cooperative device and control device for network as a service business | |
WO2021129754A1 (en) | Message processing method and device, and storage medium | |
CN112822108A (en) | Method, server and router for establishing LSP | |
CN111787349A (en) | Data caching method, device, equipment and medium | |
CN109729388A (en) | Depending on networked server switching method and apparatus | |
CN109743250A (en) | Transmission method, first network equipment and second network equipment of multicast message | |
CN105721346A (en) | Application bandwidth configuring method and controller based on software defined network | |
CN109787873A (en) | A kind of method and apparatus of multi-to-multi incoming communication | |
CN106899645A (en) | A kind of DDS data interactive methods under unstable network environment | |
CN107707546B (en) | Message copying method and novel network adapter supporting message copying function | |
JP2003244204A (en) | Communication connection establishing method, communication controller, recording medium and control program | |
CN106972973A (en) | A kind of control method, controller and interchanger |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |