CN111385261B - Simulation communication method and simulation communication platform - Google Patents

Simulation communication method and simulation communication platform Download PDF

Info

Publication number
CN111385261B
CN111385261B CN201811633558.8A CN201811633558A CN111385261B CN 111385261 B CN111385261 B CN 111385261B CN 201811633558 A CN201811633558 A CN 201811633558A CN 111385261 B CN111385261 B CN 111385261B
Authority
CN
China
Prior art keywords
data
routing device
module
target
client
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.)
Active
Application number
CN201811633558.8A
Other languages
Chinese (zh)
Other versions
CN111385261A (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.)
Changchun Institute of Optics Fine Mechanics and Physics of CAS
Original Assignee
Changchun Institute of Optics Fine Mechanics and Physics of CAS
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 Changchun Institute of Optics Fine Mechanics and Physics of CAS filed Critical Changchun Institute of Optics Fine Mechanics and Physics of CAS
Priority to CN201811633558.8A priority Critical patent/CN111385261B/en
Publication of CN111385261A publication Critical patent/CN111385261A/en
Application granted granted Critical
Publication of CN111385261B publication Critical patent/CN111385261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/165Combined use of TCP and UDP protocols; selection criteria therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Abstract

The invention provides a simulation communication method, which comprises the following steps: step S1, a routing device receives published data information sent by a plurality of data source modules and also receives ordered data information sent by a plurality of target modules; s2, the routing device matches the published data information and the ordered data information based on the same data target; step S3, the routing device sends the demand information generated by the target module which orders the data to the data source module; and S4, the data source module sends the data target to the target module positioned by the routing device. The invention also provides a simulation communication platform for realizing the simulation communication method. Compared with the prior art, the invention has the beneficial effects that: the simulation communication platform does not need to establish simulation networks aiming at different operating systems, thereby simplifying the complexity of establishing the simulation networks. The simulation communication platform works in a mode of ordering and publishing, so that the client node is easy to expand in the network topology.

Description

Simulation communication method and simulation communication platform
Technical Field
The invention belongs to the technical field of simulation communication, and particularly relates to a simulation communication platform and a simulation communication method.
Background
Simulation techniques may be used to simulate a communication network. The information flow and possible problems of the communication network in the actual operation process can be simulated by constructing a simulation model. With the application and development of simulation technology, the volume of simulation models is larger and larger, and the complexity of simulation models is higher and higher, so that in order to meet the increasing demands, the distributed interactive simulation technology comes along, and a distributed interactive simulation system takes a computer network as a support and can interconnect various relatively independent simulators dispersed in different regions. The distributed interactive simulation system creates a large-scale virtual environment through real-time data exchange among simulation entities so as to realize interaction among manned platforms and unmanned platforms and interaction between the platforms and the environment. As such, distributed interactive simulation techniques have also become a focus of research in recent years. Furthermore, since a large amount of data is transmitted during simulation, how to realize simple, efficient and real-time transmission of simulation data among the distributed simulators becomes a core problem of research.
The existing simulation system has a large amount of data transmission in the simulation process, and the existing network data transmission needs to use a transmission control protocol or a user datagram protocol. The english name of the Transmission Control Protocol is Transmission Control Protocol, TCP for short. The User Datagram Protocol is known under the english name User Datagram Protocol, UDP for short. In addition, the network data can be accurately transmitted by using the IP address and the matched port in the transmission process. For this reason, the relevant operator needs to maintain a large amount of transmission address information and reception data information. In conclusion, when the simulation scale becomes large, the complex program of network communication can be rapidly increased, and the complexity of the simulation model is improved, so that the simple, efficient and real-time transmission of data is not facilitated.
Furthermore, each simulation node needs to be deployed on different computer nodes to perform synchronous calculation according to different requirements and other reasons, and if the computer operating systems on each simulation node are different, the complexity of heterogeneous communication programs also improves the complexity of simulation network construction. The computer operating system on each simulation node can be an operating system platform such as Windows, unix, linux or Mac OS and the like, and the network difference among the operating systems is large. There is no solution in the prior art that can solve the problem of high complexity of the simulation network caused by network differences of the computer operating system platforms on each simulation node.
Disclosure of Invention
In view of this, in order to solve the problem that the simulation data cannot be simply and efficiently transmitted due to the high complexity of the simulation network in the prior art, the present invention provides a simulation communication method, which is used for a simulation communication platform, where the simulation communication platform includes a routing device, a plurality of data source modules, and a plurality of target modules, and the simulation communication method includes the following steps:
step S1, the routing device not only receives the published data information sent by a plurality of data source modules, but also receives the ordered data information sent by a plurality of target modules;
s2, the routing device matches the published data information and the ordered data information based on the same data target;
step S3, the routing device sends the demand information generated by the target module subscribed with data to the data source module;
and S4, the data source module sends the data target to the target module positioned by the routing device.
Preferably, the step S2 specifically includes:
step S21, when the routing device receives the information of the published data sent by the data source module, the routing device generates a first published data structure corresponding to a first identification number of the published data, and a first ordering data structure is also initialized in the first published data structure;
step S22, when the routing apparatus receives the subscription data information sent by the target module and used for subscribing the data corresponding to the first identification number, the routing apparatus inserts the address information of the target module into the first subscription data structure.
Corresponding to step S21 and step S22, step S3 specifically includes step S31:
step S31, the data source module traverses the first subscription data structure, and sends a data target corresponding to the first identification number to each target module in the first subscription data structure.
Preferably, on the other hand, the step S2 may further specifically include:
step S26, when the routing device receives the publishing data sent by the target module and used for subscribing the corresponding second identification number and the data corresponding to the second identification number is not published yet by the data source module, the routing device generates a second publishing data structure corresponding to the second identification number, a second subscribing data structure is initialized in the second publishing data structure, and the address information of the target module is inserted in the second subscribing data structure;
step S27, when the routing apparatus receives the distribution data information corresponding to the second identification number in the data source module, the routing apparatus associates the second distribution data structure with the address information of the data source module.
Corresponding to step S26 and step S27, step S3 specifically includes step S36:
step S36, the data source module traverses the second subscription data structure, and sends a data tag corresponding to the second identification number to each target module in the second subscription data structure.
Preferably, the following steps are continuously executed after the step S4 is executed:
s5, each data source module counts the data actually transmitted to each corresponding target module, and each target module counts the data actually acquired from each corresponding data source module;
step S6, sending the actually transmitted data counted by the data source module and the actually acquired data counted by the target module to the routing device;
preferably, the following steps are continuously executed after the step S6 is executed:
step S7, the routing device compares the actually transmitted data counted by the data source module and the actually acquired data counted by the target module with ideal transmission data;
and S8, the routing device judges the data interaction state between each data source module and the target module.
The invention also provides a simulation communication platform which comprises a routing device, a plurality of data source modules and a plurality of target modules, wherein the routing device is used for receiving the published data information sent by the data source modules and receiving the ordered data information sent by the target modules; the routing device is used for matching the published data information and the ordered data information based on the same data target; the routing device is also used for sending the demand information of the target module subscribed with data to the data source module; the data source module can send data objects to the target module positioned by the routing device.
Preferably, the data between the routing device and the data source module is transmitted through a TCP protocol, the data between the routing device and the target module is transmitted through a TCP protocol, and the data between the data source module and the target module is transmitted through a UDP protocol.
Preferably, the data source module, the target module and the routing device are all developed through a Qt platform.
Compared with the prior art, the invention has the following beneficial effects:
the simulation communication platform does not need to establish simulation networks aiming at different operating systems, thereby simplifying the complexity of establishing the simulation networks. The simulation communication platform works in a mode of ordering and publishing, so that the client node is easy to expand in the network topology.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the embodiments or the prior art description will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram of a system architecture of a simulation communication platform according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating data and signal flow of an emulation communication platform according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a first subscription data structure according to an embodiment of the invention;
FIG. 4 is a flowchart illustrating a method of simulating communication according to an embodiment of the invention;
FIG. 5 is a flowchart illustrating a method of simulating communication according to an embodiment of the present invention;
fig. 6 is a flowchart of a simulation communication method according to a fourth embodiment of the present invention.
Detailed Description
The above and further features and advantages of the present invention are described in more detail below with reference to the accompanying drawings.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; may be mechanically coupled, may be electrically coupled or may be in communication with each other; they may be directly connected or indirectly connected through intervening media, or they may be interconnected within two elements or in a relationship where two elements interact with each other unless otherwise specifically limited. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention.
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
In order to illustrate the technical means of the present invention, the following description is given by way of specific examples.
Example one
The first embodiment of the invention provides a simulation communication platform, which comprises a routing device 10, a plurality of data source modules and a plurality of target modules, wherein the data source modules are connected with the target modules, the routing device 10 receives published data information sent by the data source modules and ordered data information sent by the target modules, the routing device 10 is used for matching the published data information and the ordered data information based on the same data object, and the routing device 10 is also used for sending demand information of the target modules ordering data in the data source modules to the data source modules. The data source module sends the data object to the target module located by the routing device 10.
The router 10 serves as a central device of the emulated communication platform in this embodiment, and the router 10 performs signaling exchange processing, relay, control and monitoring on communication status of each client, and the like. Preferably, the function of the routing device 10 may be implemented by a server.
The requirement information of the target module of the data in the data source module can be transmitted through the subscription linked list, that is, the routing device 10 correspondingly sends the subscription linked list to the data source module.
And sending the data to a data source module. The data source module sends the data object to the target module located by the routing device 10.
Preferably, the data source module and the target module are based on different operating systems, respectively.
It should be noted that: the data source module and the target module can also exist independently. The data source module and the target module realize the efficient transmission of data by the routing device 10. On the other hand, the same client may serve as both the data source module and the target module, that is, the data source module and the target module are integrated.
The data source module and the target module for establishing the routing relationship through the routing device 10 should exist in different clients, for example, the data source module exists in the first client 21, and the target module exists in the second client 22. Since the data itself between the data source module and the target module is homologous in the client in which the data source module and the target module are integrated for efficiency purposes, its transmission does not need to be guided by the routing means 10.
Further, the composition and application scenario of the simulation communication platform are explained. The simulation communication platform comprises a routing device 10, a plurality of data source modules and a plurality of target modules, wherein the data source modules and the target modules are communicated with the routing device 10, and the routing device 10 and a client can be realized by a computer or other electronic equipment or equipment set with a communication processing function. Fig. 1 is a system architecture diagram of an emulated communication platform according to an embodiment of the present invention. As shown in fig. 1, in the present embodiment, a routing device 10 located in the central architecture of the emulated communication platform, and a first client 21, a second client 22, and a third client 23 connected thereto are taken as an example.
In the present embodiment, the first client 21, the second client 22 and the third client 23 are used for emulating different network nodes in a communication network, in particular, for emulating computer nodes having different operating systems, for example, the first client 21 may be used for emulating a computer node having a microsoft Windows operating system, the second client 22 may be used for emulating a computer node having a Unix system, and the third client 23 may be used for emulating a computer node having a Linux system. As described in the foregoing prior art, when computer nodes with different operating systems are simulated, due to network differences of different operating system platforms, complexity of heterogeneous communication programs may increase complexity of simulation network construction.
In this embodiment, for a client, on the one hand, it may publish data to other network nodes (clients), and on the other hand, it may subscribe to other network nodes for data required by itself. In the present invention, for the sake of clear description and understanding, the client when publishing data is the data source module, and the client when subscribing data is the target module. The same client can respectively correspond to the data source module and the target module based on different description angles (namely when the client is in different issuing and ordering relations). As described above, the first client 21 can be a client (data source module) that distributes data, the first client 21 includes the first packet, and the first client 21 distributes a signal that owns the first packet to the routing device 10. The first client 21 can also act as a client (target module) for subscription data. The second client 22 can be a client (data source module) for issuing data, the second client 22 includes a second data packet, and the second client 22 issues a signal of owning the second data packet to the routing device 10. The second client 22 can also act as a client (target module) for subscription data. The third client 23 can be a client (data source module) that distributes data, the third client 23 includes a third packet, and the third client 23 distributes a signal of its own third packet to the routing device 10. The third client 23 can also act as a client (target module) for subscription data.
It is only generally the case that the first client 21, when acting as a client for ordering data, does not have to order the first data packet owned by the first client 21 itself via the routing means 10, since this further increases the complexity of the platform. And can be analogized to a second client 22 and a third client 23.
In this embodiment, after a plurality of clients log in the router 10, the data source module may transmit information (distribution data information) corresponding to data (packet) to be distributed to the router 10, and the destination module may transmit information (subscription data information) corresponding to data (packet) to be subscribed to the router 10. Specifically, the distribution data information may include an identification number of the distributed data (packet), and address information of the data source module that distributed the data (packet). More specifically, the address information of the data source module may include a publishing IP address, a port number for specifically publishing the data (packet), and the like. Similarly, the order data information may include an identification number of the data (packet) to be ordered, address information of the target module that requires ordering the data (packet), and more specifically, the address information of the target module may include an order IP address and a port number of the data (packet) to be ordered, etc.
In the present invention, the fact that a plurality of clients transmit the distribution data information and the subscription data information to the routing device 10 means that each client can transmit the distribution data information or the subscription data information to the server individually, or can transmit the distribution data information and the subscription data information to the routing device 10 at the same time.
After the routing device 10 receives the published data information sent by the data source modules and the ordered data information sent by the target modules, based on the supply-demand relationship, the routing device 10 may associate the corresponding data source modules and the corresponding target modules according to the identification numbers in the published data information and the identification numbers in the ordered data information. Thus, the data source module contains specific data, the data source module sends information that the data source module owns the specific data to the routing device 10, and the data source module sends the published data information to the routing device 10, wherein the specific data corresponds to the identification number in the published data information. Similarly, the destination module sends information of its own subscription to the specific data to the router 10, the destination module sends subscription data information to the router 10, and after the supply and demand of the router 10 are matched, the router 10 sends address information of the destination module subscribing to the specific data to the data source module. The specific data may refer to a first data packet in the first client 21 or a second data packet in the second client 22 or a third data packet in the third client 23. The first data packet corresponds to the first data packet issuing identification number in the issuing process, and the first data packet corresponds to the first data packet ordering identification number in the ordering process. The second data packet corresponds to the second data packet issuing identification number in the issuing process, and the second data packet corresponds to the second data packet ordering identification number in the ordering process. The third data packet corresponds to the third data packet issuing identification number in the issuing process, and the third data packet corresponds to the third data packet ordering identification number in the ordering process.
For example, fig. 2 is a schematic diagram illustrating data and signal flow of an emulated communication platform in an embodiment of the present invention. As shown in fig. 2, assuming that the routing device 10 receives the first packet issue identification number from the first client 21, the first client 21 indicates itself as having the first packet to the routing device 10. The first client 21 now belongs to the data source module in the view of sending data. In addition, the routing device 10 receives the second packet subscription identifier and the third packet subscription identifier from the first client 21, and the first client 21 indicates to the routing device 10 that the second packet in the second client 22 and the third packet in the third client 23 are subscribed, when the first client 21 belongs to the target module in the view of the subscribed data. Further, the routing apparatus 10 receives the second packet issue identification number from the second client 22, and the second client 22 indicates to the routing apparatus 10 that the second client 22 owns the second packet, where the second client 22 belongs to the data source module in the view of sending data. In addition, the routing device 10 receives the first packet subscription identifier and the third packet subscription identifier from the second client 22, and the second client 22 indicates to the routing device 10 that the first packet in the first client 21 and the third packet in the third client 23 are subscribed, when the second client 22 belongs to the target module in the view of the subscribed data. Further, the routing device 10 also receives a third packet issue identification number from the third client 23, and the third client 23 indicates to the routing device 10 that it owns the third packet, where the third client 23 belongs to the data source module in the view of sending data. In addition, the routing device 10 receives the first packet subscription identifier from the third client 23, and the third client 23 indicates to the routing device 10 that the first packet in the first client 21 is subscribed, and the second client 22 belongs to the target module in the view of subscription data.
In this way, the routing device 10 defines the supply-demand relationship of each party through the corresponding data identification number, and the first client 21 owns the first data packet and needs to order the second data packet and the third data packet; the second client 22 has a second data packet and needs to order the first data packet and the third data packet; the third client 23 owns the third data package and needs to subscribe to the first data package.
Then, the routing device 10 subscribes to the first client 21 for the first client 21 to know that the second client 22 and the third client 23 subscribe to the first data packet from the first client 21. The routing device 10 transmits the address information of the second client 22 (the destination module in the second client 22) and the third client 23 (the destination module in the third client 23) which subscribe to the first packet, to the first client 21 (the data source module in the first client 21). The routing device 10 learns from the second client 22 that the first client 21 has subscribed to the second client 22 for the second data packet. The routing device 10 sends the address information of the first client 21 (the destination module in the first client 21) that has subscribed to the second packet to the second client 22 (the data source module in the second client 22). The routing device 10 learns from the third client 23 that the second client 22 and the first client 21 subscribe to the third packet from the third client 23. The routing device 10 transmits the address information of the second client 22 (the target module in the second client 22) and the first client 21 (the target module in the first client 21) which have subscribed to the third packet, to the third client 23 (the data source module in the third client 23). The address information here preferably includes an IP address and a port number.
Still taking the above example as an example, the routing device 10 may send the IP address and the port number of the second client 22 (the target module of the second client 22) and the third client 23 (the target module of the third client 23) which subscribe to the first packet to the first client 21 (the data source module of the first client 21) which issued the first packet; it can also be understood that the routing apparatus 10 integrates the supply and demand matching information into the first subscription list, and the routing apparatus 10 sends the first subscription list to the first client 21 (the data source module of the first client 21). The first subscription linked list includes address information of the second client 22 (the target module of the second client 22) and the third client 23 (the target module of the third client 23). In this way, the first client 21 can know the address information of the second client 22 (the target module of the second client 22) and the third client 23 (the target module of the third client 23) which subscribe to the first packet. The routing device 10 may send the IP address and the port number of the first client 21 (the target module of the first client 21) that has subscribed to the second packet to the second client 22 (the data source module of the second client 22) that has issued the second packet, or may understand that the routing device 10 integrates the supply and demand matching information into a second subscription list, and the routing device 10 sends the second subscription list to the second client 22 (the data source module of the second client 22). The second subscription linked list includes address information of the first client 21 (the target module of the first client 21). So that the second client 22 can know the address information of the first client 21 (the target module of the first client 21) that has subscribed to the second data packet. The routing device 10 may transmit the IP addresses and port numbers of the second client 22 (the destination module of the second client 22) and the first client 21 (the destination module of the first client 21) which subscribe to the third packet to the third client 23 (the data source module of the third client 23) which issued the packet having the third packet; it can also be understood that the routing apparatus 10 integrates the supply and demand matching information into a third subscription list, and the routing apparatus 10 sends the third subscription list to the third client 23 (the data source module of the third client 23). The third subscription linked list includes address information of the second client 22 (the target module of the second client 22) and the first client 21 (the target module of the first client 21). In this way, the third client 23 (the data source module of the third client 23) can know the address information of the second client 22 (the target module of the second client 22) and the first client 21 (the target module of the first client 21) which subscribe to the third data packet.
Each data source module receives the address information of each target module subscribing to the data distributed by the data source module, so that each data source module can send specific data (data packets) owned by itself to the target module subscribing to the specific data according to the address of the associated target module. Still taking the above example as an example, the first client 21 (the data source module of the first client 21) may send the first data packet to the second client 22 (the target module of the second client 22) according to the address information of the second client 22 (the target module of the second client 22), and the first client 21 (the data source module of the first client 21) sends the first data packet to the third client 23 (the target module of the third client 23) according to the address information of the third client 23 (the target module of the third client 23). The second client 22 (the data source module of the second client 22) may send the second data packet to the first client 21 (the target module of the first client 21) according to the address information of the first client 21 (the target module of the first client 21). The third client 23 (the data source module of the third client 23) may send the third packet to the second client 22 (the target module of the second client 22) according to the address information of the second client 22 (the target module of the second client 22), and the third client 23 (the data source module of the third client 23) sends the third packet to the first client 21 (the target module of the first client 21) according to the address information of the first client 21 (the target module of the first client 21).
Preferably, the data source module sends specific data from its own port to the port of the target module. Since the same client (IP address) may simultaneously correspond to a plurality of different applications (correspond to a plurality of different ports), data interaction under a plurality of different applications can be realized through the data interaction manner from the specific port of the data source module to the specific port of the target module.
In this way, under the control of the routing device 10, data interaction between clients belonging to different operating systems is achieved. In the invention, the router 10 can make the data source module which issues the specific data know the address information of the target module which orders the specific data only according to the matching of the issued data information and the ordered data information, thereby realizing the data interaction between the clients which belong to different operating systems without constructing the simulation network aiming at different operating systems, and simplifying the complexity of constructing the simulation network.
In other words, the present invention has the following advantageous effects: each communication node in the simulation communication issues and orders data, the complex details of the bottom layer do not need to be managed, and the simulation communication platform is responsible for communication management and data transmission of the bottom layer, so that data interaction is simple. The simulation communication platform works in a mode of ordering and publishing, so that the client nodes are easily expanded in the network topology, particularly the client nodes (namely independent target modules) which only have ordering but not publish are expanded, and other nodes do not need to be changed. When the node (data source module) needing to be released is expanded, the original node only needs to order the data of the release type, and the code change amount is small.
Next, the data source module obtains the address information of the target module through the routing device 1. The description is divided into two cases, the first case is: the routing device 10 first receives the publishing data information sent by the data source module. The routing device 10 then receives the subscription data information sent by the target module. The second case is: the routing device 10 first receives the subscription data information sent by the target module.
Based on the first situation, when the routing device 10 receives the publishing data information sent by the data source module, the routing device 10 generates a first publishing data structure corresponding to the first identifier of the published data, and the first publishing data structure also initializes a first ordering data structure with an empty space. When receiving the distribution data information of the data source module, the routing device 10 determines that the distribution data information is a data distribution type, generates a distribution data structure (first distribution data structure) according to the data distribution type, the first distribution data structure holds an identification number (first identification number) of the specific data (data packet) distribution type, that is, generates the first distribution data structure corresponding to the first identification number of the distributed data, and initializes an empty subscription linked list table or a subscription data structure (subscription data structure). The structure of the first distribution data structure is as follows:
StructpublishNode{
long id; // type of data issued-first identification number
unscented long IP; // publishing node IP Address
A short port; // issuing node port
structsubcribenode is head; // subscription node linked list pointer
structpublishNode next; // publishing node linked list pointer
}
When the routing device 10 receives the order data information sent by the target module for ordering the published data corresponding to the first identification number, the routing device 10 inserts the address information of the target module into the first order data structure to represent that the target module has ordered the published data corresponding to the first identification number. Fig. 3 is a diagram illustrating a first subscription data structure according to an embodiment of the present invention. As shown in fig. 3, when a target module sends subscription data information for subscribing to data corresponding to the first identification number, the routing apparatus 10 inserts the IP address and port number of the target module into a subscription list (first subscription data structure), and sends the list contents to the data source module. The structure of the first subscription data structure is as follows:
StructsubcribleNode{
long id; // subscription data type first identification number
unscented long IP; // subscribing node IP Address
A short port; // subscribing node port
structsubcribenode next; // subscription node linked list
}
In the first case, the data source module traverses the first subscription data structure and sends a data tag corresponding to the first identification number to each target module in the first subscription data structure. Thereby realizing data interaction between clients belonging to different operating systems.
In the second case, the routing device 10 receives the publishing data sent by the target module and used for subscribing the corresponding second identification number, and the publishing data corresponding to the second identification number is not yet published by the data source module, at this time, the routing device 10 generates a second publishing data structure corresponding to the second identification number, a second subscribing data structure is further initialized in the second publishing data structure, and address information of the target module is inserted in the second subscribing data structure to represent that the target module subscribes the publishing data corresponding to the second identification number.
When the routing device 10 receives the second identification number of the subscription type first, no data source module sends the publishing data corresponding to the second identification number to the routing device 10, at this time, the routing device 10 generates a publishing data structure (second publishing data structure) first, the IP address and the port number of the data source module are assigned to-1 (indicating default), and the IP address and the port number of the target module are inserted into the subscription linked list (second subscription data structure). In the second case, the unsigned long IP and short port in structpublisnodel are first assigned to-1 to indicate default, specifically, the IP address and port number of the data source module are not yet present.
Further, when the routing device 10 receives the distribution data information of the data source module corresponding to the second identification number, the routing device 10 associates the second distribution data structure with the address information of the data source module.
When the data source module sends the published data information corresponding to the second identification number to the routing device 10, the routing device 10 sends the generated linked list content (the second published data structure) to the data source module, that is, the signaled long IP and short port in the StructpublishNode are assigned as the IP address and port number of the data source module.
In the second case, similarly, the data source module traverses the second subscription data structure and sends a data tag corresponding to the second identification number to each target module in the second subscription data structure. Thereby realizing data interaction between clients belonging to different operating systems.
In the present invention, the sending of the published data information and the ordered data information to the server by the plurality of clients means that each client may send the published data information or the ordered data information to the server individually, or may send the published data information and the ordered data information to the server at the same time.
Fig. 4 is a flowchart of a simulation communication method according to an embodiment of the present invention, and this embodiment further provides a simulation communication method, as shown in fig. 4, the method includes the following steps:
step S1, a routing device 10 receives published data information sent by a plurality of data source modules and also receives ordered data information sent by a plurality of target modules;
step S2, the routing device 10 matches the published data information and the ordered data information based on the same data label;
step S3, the routing device 10 sends the demand information generated by the target module ordered by the data to the data source module;
and S4, the data source module sends the data target to the target module positioned by the routing device 10.
The requirement information of the target module subscribed with the data in the data source module may be transmitted through the subscription linked list, that is, the routing device 10 correspondingly transmits the subscription linked list to the data source module. The subscription linked list may store the IP address and port number of the data source module, and may also store the data source module of the destination module. Communication is performed according to a subscription chain table.
In step S3, the data source module sends specific data from its own port to the port of the target module.
The step S3 specifically includes the step S31:
step S31, the data source module traverses the first order data structure, and sends a data label corresponding to the first identification number to each target module in the first order data structure.
FIG. 5 is a flowchart illustrating a method of simulating communication according to an embodiment of the present invention; as shown in fig. 5, the specific form of the step S2 is as follows:
when the routing device 10 first receives the published data information sent by the data source module, and then the routing device 10 receives the ordered data information sent by the target module, the step S2 specifically includes:
step S21, when the routing apparatus 10 receives the published data information sent by the data source module, the routing apparatus 10 generates a first published data structure corresponding to the first identifier of the published data, and the first published data structure further initializes an empty first subscription data structure;
when the routing device 10 receives the order data information for ordering the data corresponding to the first identification number, which is transmitted by the target module, the routing device 10 inserts the address information of the target module into the first order data structure at step S22.
Correspondingly, the step S3 specifically includes the step S31:
step S31, the data source module traverses the first order data structure, and sends a data tag corresponding to the first identification number to each target module in the first order data structure.
When the routing device 10 first receives the order data information sent by the target module, the step S2 specifically includes:
step S26, when the routing device 10 receives the publishing data sent by the target module and used for ordering the second identification number and the data corresponding to the second identification number has not been published by the data source module, the routing device 10 generates a second publishing data structure corresponding to the second identification number, a second ordering data structure is also initialized in the second publishing data structure, and the address information of the target module is inserted in the second ordering data structure;
when the routing device 10 receives the distribution data information corresponding to the second identification number in the data source module, the routing device 10 associates the second distribution data structure with the address information of the data source module, step S27.
Correspondingly, the step S3 specifically includes the step S31:
step S36, the data source module traverses the second order data structure, and sends a data label corresponding to the second identification number to each target module in the second order data structure.
Example two
The second embodiment of the present invention is different from the first embodiment in that: the data source module and the routing device 10 adopt a TCP protocol for communication; the destination module communicates with the routing device 10 using the TCP protocol. Data interaction between the data source module and the target module can adopt a UDP protocol, so that the real-time performance of data receiving and sending is ensured.
EXAMPLE III
The third embodiment of the present invention is different from the first embodiment in that:
the data source module, the target module and the routing device 10 are developed by adopting a Qt platform, so that code transplantation among platforms is facilitated, and heterogeneous network communication among different operating systems is ensured.
Example four
The fourth embodiment of the present invention is different from the first embodiment in that:
in the prior art, as the simulation scale becomes larger, the complex programs of network communication will increase rapidly, and the running state of the existing simulation network has no monitoring measures, so that if a client node has network interruption or packet loss and other errors during the simulation process, the simulation network cannot respond in time.
For this purpose, in the present embodiment, each data source module counts the data actually transmitted to the corresponding target module, and sends the first type of statistical data to the routing device 10. The statistical data includes the number of network packets sent or received, the number of bytes, and the like.
Each destination module counts the data it obtains from the corresponding data source module and sends this second type of statistical data to the routing device 10. The statistical data includes the number of transmitted or received network packets, the number of bytes, and the like.
The router 10 can obtain the actual data information sent and received by each data source module and target module, thereby implementing the monitoring of each client.
The routing device 10 can determine the data interaction state between the clients, i.e. the network transmission state of the simulation communication platform, according to the first-type statistical data, the second-type statistical data and each order linked list.
If the network transmits data according to the order linked list formed in the router 10, it indicates that the entire network transmission state is in an ideal state and in a non-abnormal state.
And the network transmission state according to the first type statistical data and the second type statistical data is the actual network transmission state.
The routing device 10 will compare the statistical data with the ordered linked list data, and if some node computers/clients have network interruption or packet loss errors, the interruption or packet loss errors in the actual data interaction process can be discovered in time, so that the simulation network can respond in time. In addition, the routing device 10 can display the network status in time, thereby facilitating troubleshooting of the network.
Fig. 6 is a flowchart of a simulation communication method according to a fourth embodiment of the present invention. The present embodiment provides a simulation communication method, and the simulation communication method in the present embodiment is based on the simulation communication method described in the embodiment. The embodiment provides a simulation communication method, which further includes the following steps:
execution continues after step S4:
s5, each data source module counts the data actually transmitted to each corresponding target module, and each target module counts the data actually acquired from each corresponding data source module;
step S6, sending the actually transmitted data counted by the data source module and the actually acquired data counted by the target module to the routing device 10;
step S7, the router 10 compares the actually transmitted data counted by the data source module and the actually acquired data counted by the target module with the ideal transmission data;
step S8, the routing device 10 determines the data interaction state between each data source module and the target module.
The above-mentioned embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (6)

1. A simulation communication method is applied to a simulation communication platform, the simulation communication platform comprises a routing device, a plurality of data source modules and a plurality of target modules, and the simulation communication method comprises the following steps:
step S1, the routing device receives the published data information sent by a plurality of data source modules and also receives the ordered data information sent by a plurality of target modules;
s2, the routing device matches the published data information and the ordered data information based on the same data target;
step S3, the routing device sends the demand information generated by the target module subscribed with data to the data source module;
s4, the data source module sends a data target to the target module positioned by the routing device;
when the routing device first receives the published data information sent by the data source module, and then the routing device receives the ordered data information sent by the target module, the step S2 specifically includes:
step S21, the routing device generates a first distribution data structure corresponding to a first identification number of the distributed data, and a first ordering data structure is also initialized in the first distribution data structure;
step S22, when the routing device receives the order data information which is sent by the target module and used for ordering the data corresponding to the first identification number, the routing device inserts the address information of the target module into the first order data structure;
correspondingly, the step S3 specifically includes the step S31:
step S31, the data source module traverses the first ordering data structure and sends a data target corresponding to the first identification number to each target module in the first ordering data structure;
when the routing device first receives the order data information sent by the target module, the step S2 specifically includes:
step S26, when the routing device receives the publishing data sent by the target module and used for subscribing the corresponding second identification number and the data corresponding to the second identification number is not published by the data source module yet, the routing device generates a second publishing data structure corresponding to the second identification number, a second subscribing data structure is also initialized in the second publishing data structure, and the address information of the target module is inserted in the second subscribing data structure;
step S27, when the routing device receives the publishing data information corresponding to the second identification number in the data source module, the routing device associates the second publishing data structure with the address information of the data source module;
correspondingly, the step S3 specifically includes the step S36:
step S36, the data source module traverses the second subscription data structure, and sends a data tag corresponding to the second identification number to each target module in the second subscription data structure.
2. The method of claim 1, wherein the following steps are continuously performed after the step S4 is performed:
s5, each data source module counts the data actually transmitted to each corresponding target module, and each target module counts the data actually acquired from each corresponding data source module;
and S6, sending the actually transmitted data counted by the data source module and the actually acquired data counted by the target module to the routing device.
3. The method of claim 2, wherein the following steps are continuously performed after the step S6 is performed:
step S7, the routing device compares the actually transmitted data counted by the data source module and the actually acquired data counted by the target module with ideal transmission data;
and S8, the routing device judges the data interaction state between each data source module and the target module.
4. A simulation communication platform using the simulation communication method of claim 1, wherein the simulation communication platform comprises a routing device, a plurality of data source modules and a plurality of target modules, the routing device is configured to receive both the distribution data information sent by a plurality of the data source modules and the order data information sent by a plurality of the target modules; the routing device is used for matching the published data information and the ordered data information based on the same data target; the routing device is also used for sending the demand information of the target module subscribed with data to the data source module; the data source module can send data objects to the target module positioned by the routing device.
5. The emulated communication platform of claim 4, wherein data between the routing device and the data source module is transported via a TCP protocol, data between the routing device and the destination module is transported via a TCP protocol, and data between the data source module and the destination module is transported via a UDP protocol.
6. The emulated communication platform of claim 5, wherein the data source module, the target module, and the routing device are all developed via a Qt platform.
CN201811633558.8A 2018-12-29 2018-12-29 Simulation communication method and simulation communication platform Active CN111385261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811633558.8A CN111385261B (en) 2018-12-29 2018-12-29 Simulation communication method and simulation communication platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811633558.8A CN111385261B (en) 2018-12-29 2018-12-29 Simulation communication method and simulation communication platform

Publications (2)

Publication Number Publication Date
CN111385261A CN111385261A (en) 2020-07-07
CN111385261B true CN111385261B (en) 2022-10-28

Family

ID=71218228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811633558.8A Active CN111385261B (en) 2018-12-29 2018-12-29 Simulation communication method and simulation communication platform

Country Status (1)

Country Link
CN (1) CN111385261B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438043A (en) * 2011-11-11 2012-05-02 无锡南理工科技发展有限公司 Releasing/subscribing system for credibly supporting multiple subscribing conditions and non-real-time information subscription
CN107111565A (en) * 2014-11-21 2017-08-29 国际商业机器公司 Carry out publish/subscribe message transmission using message structure
CN108282529A (en) * 2018-01-23 2018-07-13 百度在线网络技术(北京)有限公司 Publication and system, the method and apparatus for subscribing to data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7200675B2 (en) * 2003-03-13 2007-04-03 Microsoft Corporation Summary-based routing for content-based event distribution networks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438043A (en) * 2011-11-11 2012-05-02 无锡南理工科技发展有限公司 Releasing/subscribing system for credibly supporting multiple subscribing conditions and non-real-time information subscription
CN107111565A (en) * 2014-11-21 2017-08-29 国际商业机器公司 Carry out publish/subscribe message transmission using message structure
CN108282529A (en) * 2018-01-23 2018-07-13 百度在线网络技术(北京)有限公司 Publication and system, the method and apparatus for subscribing to data

Also Published As

Publication number Publication date
CN111385261A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN104780096B (en) A kind of system controlling virtual network and Virtual Network Controller node
CN102480358B (en) Centralization virtual switch fabric control method and equipment
CN103765833B (en) The method and device of the exchange for enabling GID in for infinite bandwidth woven structure
EP2474131B1 (en) Process and system for an integrated carrier ethernet exchange
CN104734931A (en) Method and device for establishing link between virtual network functions
Legtchenko et al. {XFabric}: A Reconfigurable {In-Rack} Network for {Rack-Scale} Computers
CN103825954A (en) OpenFlow control method and corresponding insert, platform and network thereof
CN103997414A (en) Configuration information generation method and network control unit
CN108768692A (en) A kind of network creation method, relevant device and system
KR20050003346A (en) Network attached storage snmp single system image
CN107211036A (en) A kind of method and data center network of data center network networking
CN112838940B (en) Network controller frame and data processing method
CN103067287B (en) Forwarding and realizing under control separation architecture the method for virtual programmable router
CN114422010B (en) Protocol testing method of satellite communication simulation platform based on network virtualization
US10554497B2 (en) Method for the exchange of data between nodes of a server cluster, and server cluster implementing said method
US20220166715A1 (en) Communication system and communication method
US6738829B1 (en) System and method for implementing a generic enhanced network driver
CN109005080B (en) Distributed packet forwarding implementation method, implementation system and automatic test method
CN111385261B (en) Simulation communication method and simulation communication platform
CN107493254B (en) TCP message forwarding method, device and system
CN102045256A (en) COTS (Commercial Off-The-Shelf) based bandwidth predistribution guarantee network function demonstration system
Li et al. SDN components and OpenFlow
CN116455817A (en) Software-defined cloud network fusion architecture and route implementation method
CN102845042A (en) System and method for aggregating bandwidth of multiple active physical interfaces on application layer
CN113965470A (en) Aviation information network experiment simulation system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant