CN117729121A - Collaborative simulation system based on optical fiber ad hoc network - Google Patents

Collaborative simulation system based on optical fiber ad hoc network Download PDF

Info

Publication number
CN117729121A
CN117729121A CN202311729289.6A CN202311729289A CN117729121A CN 117729121 A CN117729121 A CN 117729121A CN 202311729289 A CN202311729289 A CN 202311729289A CN 117729121 A CN117729121 A CN 117729121A
Authority
CN
China
Prior art keywords
optical fiber
simulation
data
card
address
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.)
Pending
Application number
CN202311729289.6A
Other languages
Chinese (zh)
Inventor
韩健
董晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Electromechanical Engineering Research Institute
Original Assignee
Beijing Electromechanical Engineering Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Electromechanical Engineering Research Institute filed Critical Beijing Electromechanical Engineering Research Institute
Priority to CN202311729289.6A priority Critical patent/CN117729121A/en
Publication of CN117729121A publication Critical patent/CN117729121A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a collaborative simulation system based on an optical fiber ad hoc network, belongs to the field of aircraft simulation, and solves the problem that an address allocation error is easy to generate in a networking mode of the existing simulation system, so that the simulation system operates data errors in a real-time data interaction process. The system comprises N simulation nodes communicated through optical fibers, wherein the simulation nodes consist of simulation computers and optical fiber reflecting plate cards; the simulation computer includes: the task planning module is used for analyzing and planning the simulation task; the calculation and control module is used for calculating the simulation model and generating decision information according to a calculation result; the data management module is used for generating external interaction data of the simulation node; the networking communication module is used for realizing optical fiber ad hoc network and providing a real-time data interaction channel for the simulation system; the optical fiber reflecting board card is connected with the reflecting memory hub. Frequent setting and maintenance of the fiber address are avoided in the simulation process, and real-time data interaction of the simulation system is guaranteed.

Description

Collaborative simulation system based on optical fiber ad hoc network
Technical Field
The invention relates to the field of aircraft simulation, in particular to a collaborative simulation system based on an optical fiber ad hoc network.
Background
The aircraft clusters have the advantages of flexible organization, low cost and high toughness, are widely applied to various fields including air traffic management, search and rescue, tactical operations, logistics transportation and the like, and a plurality of aircrafts are necessary to cooperate with each other when the aircraft clusters perform the tasks. The advantage of the cooperative work of a plurality of aircrafts is that: the system can improve the efficiency and speed of task execution, improve the flexibility of an execution mode to adapt to different task demands, avoid mutual interference and collision to improve the safety and efficiency of air traffic, cover a larger area to execute wider tasks, and the like. The actual aircraft cooperative control system mainly comprises the functions of pre-shooting cooperative task planning, cooperative detection and interference resistance, online situation cognition, online cooperative decision and planning, cooperative guidance control, networking communication, intelligent calculation, cooperative efficiency evaluation and the like. Before the application of the aircraft control system, the performance of the constructed aircraft cooperative control system can be verified by adopting a cooperative simulation system, and compared with an experimental simulation method, the cooperative simulation system can replace key equipment such as a data chain, a satellite and the like in an actual system, and has low cost and easy realization. The optical fiber reflection memory network is formed by connecting a plurality of optical fiber reflection board cards through transmission media such as optical fibers, has the advantages of high-speed transmission, high broadband, low delay, strong anti-interference capability, suitability for long-distance transmission, energy conservation, environmental protection and the like, and is very suitable for an aircraft collaborative simulation system which needs to perform a large amount of data interaction and has high real-time requirements.
In order to ensure that a large amount of data are interacted and shared in real time in the operation process of the collaborative simulation system, the address of the optical fiber reflection board card in each simulation node is firstly required to be planned. At present, address planning of the optical fiber reflecting plate cards is generally carried out in two ways, namely, addresses are manually allocated, namely, occupation addresses are allocated in advance for each optical fiber reflecting plate card, but the defects of the mode are that: when the number of the optical fiber reflecting board cards in the network is large or the structural composition of the semi-physical simulation system is changeable, the manual address allocation is extremely easy to produce misoperation under the condition that the data structure is changeable, so that irreversible errors are caused; secondly, addresses are automatically allocated, namely, according to the sequence of adding all the optical fiber reflecting plate cards into a network, all the optical fiber reflecting plate cards are enabled to orderly preempt the addresses, but the following problems still exist in the mode: because the starting interval of each optical fiber reflecting plate card is extremely short, the situation that different optical fiber reflecting plate cards are electrified simultaneously exists, and the electrified optical fiber reflecting plate cards possibly occupy the same address, and the subsequent data operation process still can be caused to be wrong.
In a word, the existing optical fiber reflection board card address planning method is low in feasibility and small in application range, and the method is not preferable especially for a collaborative simulation system with large-scale distributed simulation nodes. Therefore, it is necessary to explore an optical fiber ad hoc network method, which can adapt to the requirements of the co-simulation system.
Disclosure of Invention
In view of the above analysis, the present invention aims to provide a collaborative simulation system based on optical fiber ad hoc network, which is used for solving the problem that address allocation errors are easy to occur in a networking mode of the existing simulation system, so that data errors are caused in the operation of the simulation system in the process of real-time data interaction.
In one aspect, the embodiment of the invention provides a collaborative simulation system based on an optical fiber ad hoc network, which comprises N simulation nodes communicated through optical fibers, wherein each simulation node consists of a simulation computer and an optical fiber reflection board card arranged in the simulation computer;
the simulation computer includes: the task planning module is used for analyzing and planning the simulation task; the calculation and control module is used for calculating the model of the simulation task and generating decision information according to the calculation result; the data management module is used for generating external interaction data of the simulation node; the networking communication module is used for realizing optical fiber ad hoc network and providing a real-time data interaction channel for the simulation system so as to complete the communication of interaction data among the simulation nodes;
the optical fiber reflecting board card is connected with the reflecting memory hub, and the reflecting memory hub is used as a data relay system and is used for receiving interactive data of the simulation nodes and forwarding the interactive data to other simulation nodes.
Further, the simulation computer further comprises an information acquisition unit, wherein the information acquisition unit is used for acquiring the attribute of each simulation node and transmitting the attribute to the task planning module, the attribute of each simulation node comprises the type and the number of executable tasks and the maximum concurrency number, and the task planning module distributes corresponding tasks for each simulation node based on the attribute of each simulation node.
Specifically, the co-simulation system has two control modes, namely: centralized control and distributed control;
in the centralized control mode, 1 simulation node is used as a control node, the rest N-1 simulation nodes are used as calculation nodes, and the control node is used for fusing and analyzing information of a plurality of calculation nodes, generating global decision information based on analysis results and transmitting the global decision information to each calculation node;
in the distributed control mode, N simulation nodes autonomously control a simulation process and generate decision information according to the model resolving state of the N simulation nodes.
Specifically, the networking communication module adopts the following ad hoc network method, which comprises the following steps:
setting the length l of the interaction data required by each optical fiber reflection board card i The method comprises the steps of carrying out a first treatment on the surface of the The interaction data required by the optical fiber reflection board card is the interaction data of the simulation node where the optical fiber reflection board card is positioned;
different delay starting time T is respectively set for each optical fiber reflecting plate card i
The starting time of the optical fiber reflecting plate card i reaches the delayed starting time T i After that, the following operations are performed:
searching the self occupying address A in the area with the head address A in the optical fiber address i Write its occupation mark a i The method comprises the steps of carrying out a first treatment on the surface of the Occupying address A based on optical fiber reflecting board card i i Obtain its occupying sequence number Z i The method comprises the steps of carrying out a first treatment on the surface of the Space occupying serial number Z based on optical fiber reflecting plate card i i Acquiring own data operation address B i Write its data operation flag b i The method comprises the steps of carrying out a first treatment on the surface of the The data operation mark b i From the following componentsAnd l i Composition, l i Interactive data length of optical fiber reflection board card i, < >>Representing interaction data d required by optical fiber reflection board card i i Storage ofA first address of the address;
all the optical fiber reflecting plate cards finish the operation and finish optical fiber ad hoc network;
the data length of any optical fiber reflecting plate card is monitored to change, the data operation marks of all the optical fiber reflecting plate cards are emptied, and updated data operation marks are written in the data operation addresses of all the optical fiber reflecting plate cards according to the original occupation sequence to update the ad hoc network.
Specifically, the setting delay start time for each optical fiber reflection board card is different, including:
step S101, setting GUIDs for all the optical fiber reflecting plate cards, wherein the GUID of any optical fiber reflecting plate card is different from the GUIDs of other optical fiber reflecting plate cards;
step S102, using GUIDs of the optical fiber reflecting plate cards as random number seeds respectively, and generating different random positive integers R for the optical fiber reflecting plate cards respectively i The method comprises the steps of carrying out a first treatment on the surface of the Random positive integer R of any optical fiber reflector plate card i i The method meets the following conditions:
1≤R i ≤10N;
wherein i=1, 2,., N is the number of fiber reflector cards;
step S103, random positive integer R based on each optical fiber reflector plate card i Setting delay starting time T of each optical fiber reflecting plate card i =t 0 ×R i
Specifically, the optical fiber reflection board card i searches its own occupation address A i Write its occupation mark a i Comprising:
step S201, sequentially reading the occupied area A with A as the head address 1 ~A N′ Data a stored therein 1 ~a N′ Will be any address A X Data a at X Comparing with the occupied mark of any optical fiber reflecting plate card to judge whether the position is occupied;
step S202, when finding an unoccupied address A i The occupation mark a of the optical fiber reflector card i is marked i Writing here;
the optical fiber reflecting plate card i occupiesBy the mark a i From data a 1 And GUID of the optical fiber reflector card i, wherein the data a 1 4 bytes, a in all optical fiber reflector card occupation marks 1 All the same.
Specifically, the occupation address A based on the optical fiber reflector board card i i Obtain its occupying sequence number Z i Comprising:
step S301, calculating the occupation address A of the optical fiber reflection board card i i Offset p relative to the head address A i
Step S302, based on offset p i Setting the occupying serial number Z of the optical fiber reflecting board card i i
Z i =0x1<<p i
I.e. 0x1 offset to the left by p i Bits.
Specifically, the occupation sequence number Z based on the optical fiber reflector card i i Acquiring own data operation address B i Write its data operation flag b i Comprising:
step S401, occupying sequence number Z based on optical fiber reflecting plate card i i Determining a data operation address B of the optical fiber reflection board card i i The method comprises the following steps: head address B offset Z i X 8 bits;
step S402, acquiring a data operation mark b of the optical fiber reflection board card i i Comprising: setting the length l of the interactive data of the optical fiber reflecting board card i i And calculating the head address of the interactive data storage address of the optical fiber reflecting board card iWherein->Calculated according to the following formula:
representing the reflection of the optical fiber with the minimum occupying number for the optical fiber reflection board card 1Board card, data operation sign thereofA first address D of the area D for storing the interaction data of the optical fiber reflector plate card; while for other fiber reflector cards i (i=2, 3, n.), in the data manipulation flag thereof>Is the +.>And l k The sum of the optical fiber reflection plate cards k is obtained according to the following way: ordering the occupation sequence numbers of all the optical fiber reflecting plate cards according to the sequence from small to large, and searching the occupation sequence number Z of the optical fiber reflecting plate card i i Is the previous space sequence number Z k The space occupying number corresponds to the optical fiber reflecting plate card k.
Specifically, the length l of the interaction data of the optical fiber reflection board card i i Set as the interaction data d required by the optical fiber reflection board card i Length l_d of (2) i Or set as:
l i =l_d i +l′_d i ×20%
wherein l' _d i Representing data d i The length of the valid data in (a).
Specifically, the data length of any one optical fiber reflecting plate card is monitored to change, data operation marks of all the optical fiber reflecting plate cards are emptied, updated data operation marks are written in the data operation addresses of all the optical fiber reflecting plate cards according to the original occupation sequence, and the updating ad hoc network comprises the following steps:
step S501, a reassignment flag c is set, and the initial value is c 0 The method comprises the steps of carrying out a first treatment on the surface of the All the optical fiber reflecting board cards can read the reassignment mark C, and the storage address is C;
step S502, data operation length l of any one of the optical fiber reflection cards j in the optical fiber reflection memory network j When the change occurs, the initial reassignment flag c is changed 0 C is 1
Step S503, the redistribution mark is c after the optical fiber reflection board card is read 1 When the optical fiber reflection board card is used, the data operation marks of all the optical fiber reflection board cards are emptied, updated data operation marks are written in the data operation addresses of the optical fiber reflection board cards according to the original occupying order, the ad hoc network is updated, and the reassignment marks c are distributed 1 Is restored to its initial value c 0
Compared with the prior art, the invention has at least one of the following beneficial effects:
1. the collaborative simulation system provided by the invention provides a channel for real-time data interaction in the simulation process by adopting the networking communication module, so that the accuracy of data operation is ensured, and the reliability of the simulation result of the system is improved;
2. the optical fiber ad hoc network method can automatically allocate addresses for the optical fiber reflection board cards without conflict based on the length of the interactive data of each simulation node, and update the ad hoc network based on updated data when the length of the interactive data of the nodes changes, so that complicated setting and maintenance of the optical fiber addresses are not needed, and real-time data interaction of a simulation system in the simulation process is ensured;
3. the data can be managed in a segmented way by storing various data of the optical fiber reflecting board card into different sections, so that a compiling program is simplified, data confusion is avoided, and data sharing in a network is easier to realize;
4. compared with a mode of manually pre-distributing addresses for the optical fiber reflecting plate cards, the self-networking mode of the invention ensures that the optical fiber reflecting plate cards in the optical fiber network have the capability of autonomously determining the addresses, thereby avoiding human errors;
5. compared with the existing automatic address allocation mode, the method sets different delay starting time for each optical fiber reflecting plate card, and avoids the situation that the optical fiber reflecting plate cards started by power on simultaneously occupy the same address, so that data conflict is caused.
In the invention, the technical schemes can be mutually combined to realize more preferable combination schemes. Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the invention, like reference numerals being used to designate like parts throughout the drawings;
FIG. 1 is a schematic diagram of a co-simulation system based on an optical fiber ad hoc network according to the present invention;
FIG. 2 is a flow chart of the optical fiber ad hoc network method according to the present invention;
FIG. 3 is a schematic diagram of the composition and memory address of a data operation flag.
Detailed Description
Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form a part hereof, and together with the description serve to explain the principles of the invention, and are not intended to limit the scope of the invention.
In one embodiment of the invention, a collaborative simulation system based on optical fiber ad hoc network is disclosed, as shown in fig. 1, the collaborative simulation system comprises N simulation nodes communicated through optical fibers, wherein each simulation node consists of a simulation computer and an optical fiber reflection board card arranged in the simulation computer;
the simulation computer includes: the task planning module is used for analyzing and planning the simulation task; the calculation and control module is used for calculating the model of the simulation task and generating decision information according to the calculation result; the data management module is used for generating external interaction data of the simulation node; the networking communication module is used for realizing optical fiber ad hoc network and providing a real-time data interaction channel for the simulation system so as to complete the communication of interaction data among the simulation nodes;
the optical fiber reflecting board card is connected with the reflecting memory hub, and the reflecting memory hub is used as a data relay system and is used for receiving interactive data of the simulation nodes and forwarding the interactive data to other simulation nodes.
Further, the simulation computer further comprises an information acquisition unit, wherein the information acquisition unit is used for acquiring the attribute of each simulation node and transmitting the attribute to the task planning module, the attribute of each simulation node comprises the type and the number of executable tasks and the maximum concurrency number, and the task planning module distributes corresponding tasks for each simulation node based on the attribute of each simulation node.
Specifically, the co-simulation system has two control modes, namely: centralized control and distributed control;
in the centralized control mode, 1 simulation node is used as a control node, the rest N-1 simulation nodes are used as calculation nodes, the control node has the capabilities of uniform decision and centralized command, is used for monitoring information of a plurality of calculation nodes in the simulation process, carrying out multi-source information fusion and analysis, and rapidly generating global decision information capable of enabling global to achieve the best effect based on an analysis result, and is used as external interaction data to be issued to each calculation node; each computing node obtains global decision information based on the optical fiber network, and a computing and control module of the computing node executes corresponding simulation tasks based on the global decision information; the centralized control mode has the advantages that: the aircraft cluster can be planned in a unified mode and managed in a centralized mode, and the decision efficiency of the system is improved.
In the distributed control mode, N simulation nodes execute tasks in parallel, each simulation node has the capability of autonomous decision making and control, and the respective calculation and control module can autonomously control the simulation process and generate decision information according to the calculation result of the self model; in this control mode, the external interaction data of the simulation node includes: the node sequence number, the resolving result of the model, decision information generated by the node and the like; in the distributed control mode, the faults of part of nodes do not influence the operation of the whole system, so that the system has strong robustness and interference resistance and high flexibility.
When the method is implemented, the optical fiber reflection board card of each simulation node is connected to an optical fiber reflection memory HUB (HUB) through optical fibers, and the HUB is used as an interface and a relay for data interaction of each simulation node; then determining the running mode of the simulation system and the number of the fight nodes according to the simulation tasks and the requirements, wherein the running mode of the simulation system can be set into a centralized control mode, a distributed control mode or a mode combining centralized control and distributed control; collecting the attribute of each simulation node by a data acquisition unit, wherein the attribute comprises a simulation mode (semi-physical simulation or mathematical simulation), the type and the number of executable tasks, the maximum concurrency number and the like of the simulation node; the task planning module analyzes self-executable subtasks from the simulation tasks based on the attribute of the self-simulation nodes, comprehensively considers the load condition of the nodes and distributes the executable subtasks for the simulation nodes; the calculation and control module starts to execute the simulation task and calculates the simulation model; the task information and the data generated in the model resolving process form the state information of the simulation node, and the data management module acquires external interaction data of the simulation node from the state information; the external interaction data are typically task information, position, speed and posture information, environment situation information or decision information of the simulation node; the networking communication module completes optical fiber ad hoc network based on the length of the external interaction data; based on the optical fiber network, the simulation system completes data interaction.
Before the data interaction between the simulation nodes, a storage address is required to be designated for the data which needs to be interacted with by each optical fiber reflecting plate card in advance, and the data is written into the address, and the data which needs to be interacted with by each optical fiber reflecting plate card (namely, the interaction data of each simulation node), the storage address of the data and the length of the data are shown in a table 1. Because the existing manual address assignment mode has the problems of large workload, easy error and the like, the invention provides an optical fiber ad hoc network method, which aims to enable a network to automatically find a storage address for interaction data without conflict according to the length of the interaction data of each optical fiber reflector card, and write the interaction data into the storage address so as to carry out subsequent data interaction; in addition, the ad hoc network method can automatically redistribute the data storage addresses of the optical fiber reflection board cards when the interactive data of the optical fiber reflection board cards are changed, and avoid the conflict of the interactive data of adjacent optical fiber reflection board cards.
Table 1 interaction data, memory address and data length of each optical fiber reflection card
Storing content Storage address (head address D) Data length
Interaction data d of board card 1 1 Address D 1 l_d 1
Interaction data d of board card 2 2 Address D 2 l_d 2
... ... ...
Interaction data d of board card N N Address D N l_d N
Specifically, as shown in fig. 2, the optical fiber ad hoc network method includes:
different delay starting time T is respectively set for each optical fiber reflection board card in optical fiber reflection memory network i The method comprises the steps of carrying out a first treatment on the surface of the Where i=1, 2,..n, N is the emulated nodeI.e. the number of fiber optic reflector cards;
the starting time of the optical fiber reflecting plate card i reaches the delayed starting time T i After that, the following operations are performed:
searching the self occupying address A in the area with the head address A in the optical fiber address i Write its occupation mark a i The method comprises the steps of carrying out a first treatment on the surface of the Occupying address A based on optical fiber reflecting board card i i Obtain its occupying sequence number Z i The method comprises the steps of carrying out a first treatment on the surface of the Space occupying serial number Z based on optical fiber reflecting plate card i i Acquiring own data operation address B i Write its data operation flag b i The method comprises the steps of carrying out a first treatment on the surface of the The data operation mark b i From the following componentsAnd l i Composition, l i Setting the +.A according to the length of the interactive data of the optical fiber reflector card i>The head address of the interactive data storage address of the optical fiber reflecting board card i is represented;
all the optical fiber reflecting plate cards finish the operation and finish optical fiber ad hoc network;
and the data length of any optical fiber reflecting plate card is monitored to change, namely, the length of the interactive data of any simulation node is changed, the data operation marks of all the optical fiber reflecting plate cards are emptied, and according to the original occupying sequence, the updated data operation marks are written in the data operation addresses of all the optical fiber reflecting plate cards, so that the ad hoc network is updated, and the specific operation comprises the following steps:
step S501, a reassignment flag c is set, and the initial value is c 0 The method comprises the steps of carrying out a first treatment on the surface of the All the optical fiber reflecting board cards can read the reassignment mark C, and the storage address is C;
illustratively, the initial value c of the reassignment flag 0 Can be set to a number with 1 for all continuous N bits, for example, the access number of the optical fiber reflection board card is 8, c can be set 0 =0xff, the number of fiber reflection cards accessed is 10, then c 0 =0x3FF;
Step S502, optical fiber reflection innerData operation length l of any optical fiber reflection board card j in storage network j When the change occurs, the initial reassignment flag c is changed 0 C is 1
For example, when the data operation length of any one optical fiber reflection board card is changed, which means that the data content required to be transferred by the optical fiber reflection board card is changed, if the data transferred by the optical fiber reflection board card is still stored according to the storage address specified by the original data operation mark, a collision with the data of other optical fiber reflection board cards may be caused, and at this time, the reassignment mark may be actively changed to c 1 =0x1;
Step S503, the redistribution mark is c after the optical fiber reflection board card is read 1 When the optical fiber reflection board card is used, the data operation marks of all the optical fiber reflection board cards are emptied, updated data operation marks are written in the data operation addresses of all the optical fiber reflection board cards according to the original occupying sequence numbers, the ad hoc network is updated, and the reassignment marks c are carried out 1 Is restored to its initial value c 0
Specifically, different delay starting times are set for each optical fiber reflection board card in the optical fiber reflection memory network respectively, and the operation is as follows:
step S101, setting GUID for each optical fiber reflecting plate card, wherein the GUID of any optical fiber reflecting plate card is different from the GUID of other optical fiber reflecting plate cards as a unique identifier for distinguishing each optical fiber reflecting plate card; specifically, each GUID is 16 bytes;
step S102, using GUIDs of the optical fiber reflector plates as random number seeds respectively to generate different random positive integers R for each optical fiber reflector plate i The method comprises the steps of carrying out a first treatment on the surface of the Random positive integer R of any optical fiber reflector plate card i i The method meets the following conditions:
1≤R i ≤10N,
where i=1, 2..n, N is the number of fiber reflector cards that can be accommodated in the network;
step S103, random positive integer R based on each optical fiber reflector plate card i Setting delay starting time T of each optical fiber reflecting plate card i =t 0 ×R i
Specifically, the random number seed is selected as the low 32 bits of the GUID of the optical fiber reflector plate card, preferably t 0 The delay start time set according to the above steps is set to 10 ms: 1) The interval of the delay starting time of any two optical fiber reflecting plate cards is not less than 10ms; 2) The delay starting time of the optical fiber reflecting plate card is T i ∈[10,1000]ms。
Specifically, the start time of the optical fiber reflection board card i reaches the delayed start time T i Then, find the own address A i Write its occupation mark a i Comprising:
step S201, sequentially reading the occupied area A with A as the head address 1 ~A N′ Data a stored therein 1 ~a N′ Will be any address A X Data a at X Comparing with the occupied mark of any optical fiber reflecting plate card to judge whether the position is occupied;
specifically, as shown in Table 2, the occupancy sign of the optical fiber reflector card is represented by data a 1 And GUID of the optical fiber reflector card, the data a 1 4 bytes, a in all optical fiber reflector card occupation marks 1 Are all the same; exemplary, a 1 Can be set to 0x03070307;
further, in judgment A X When the address is occupied, only the data a is observed X Whether the first 4 bytes in (a) are a 1 The preparation method is finished; if so, then the occupied space is here; further according to data a X The identity information of the address optical fiber reflection board card occupied at the position can be determined by the GUID which is the last 16 bytes;
step S202, when finding an unoccupied address A i The occupation mark a of the optical fiber reflector card i is marked i Writing here;
in other words, the first empty address found in step S201 is used as the occupying address of the optical fiber reflection board i, and the occupying mark is written therein, which is represented by a 1 And the GUID of the optical fiber reflecting plate card i.
Table 2 composition of occupancy flags and memory addresses
Specifically, the occupation address A based on the optical fiber reflector board card i i Obtain its occupying sequence number Z i Comprising:
step S301, calculating the occupation address A of the optical fiber reflection board card i i Offset p relative to the head address A i
Step S302, based on offset p i Setting the occupying serial number Z of the optical fiber reflecting board card i i
Z i =0x1<<p i
I.e. 0x1 offset to the left by p i Bits.
Further, the occupied serial number Z based on the optical fiber reflection board card i i Acquiring own data operation address B i Write its data operation flag b i Comprising:
step S401, occupying sequence number Z based on optical fiber reflecting plate card i i Determining a data operation address B of the optical fiber reflection board card i i The method comprises the steps of carrying out a first treatment on the surface of the Specifically, the data operation address B of the optical fiber reflection board card i i The method comprises the following steps: head address B offset Z i X 8 bits;
step S402, at data operation Address B i Data operation mark b written in optical fiber reflecting board card i i
Specifically, as shown in Table 3, the data operation flag b i From the following componentsAnd l i Composition, l i For the length of the interactive data of the set optical fiber reflection board card i, < ->The head address of the interactive data storage address of the optical fiber reflecting board card i is represented;
wherein,the calculation is based on the following rules:
representing the data operation mark of the optical fiber reflecting plate card 1, namely the optical fiber reflecting plate card with the minimum occupying serial numberA first address D of the area D for storing the interaction data of the optical fiber reflector plate card; while for other fiber reflector cards i (i=2, 3, n.), in the data manipulation flag thereof>Is the +.>And l k The sum of the optical fiber reflection plate cards k is obtained according to the following way: ordering the occupation sequence numbers of all the optical fiber reflecting plate cards according to the sequence from small to large, and searching the occupation sequence number Z of the optical fiber reflecting plate card i i Is the previous space sequence number Z k The space occupying number corresponds to the optical fiber reflecting plate card k;
setting the length l of the interactive data of the optical fiber reflecting board card i i The following rules are followed: will l i Set as the data d of the interaction required by the optical fiber reflection board card i Length l_d of (2) i Or, preferably, l i Set to be larger than the data d of the interaction required by the optical fiber reflection board card i Length l_d of (2) i Specific:
wherein l' _d i Representing data d i The length of the effective data in the optical fiber reflecting board card is set as the data length l i And reserving a certain allowance for standby. Number of optical fiber reflection board cardsThe operation flag and its memory address are shown in fig. 3.
TABLE 3 composition of data manipulation flags and memory addresses
Waiting for all the optical fiber reflecting board cards to finish 1) searching the occupation address in the area A and writing the occupation mark a i 2) obtaining the occupying sequence number Z based on the occupying address i And 3) searching the address of the data operation flag in the area B and writing the data operation flag B i And then, completing the optical fiber ad hoc network.
In practice, the read operation is: when the optical fiber reflection board card i reads the data of the optical fiber reflection board card j, the occupation address of the optical fiber reflection board card j is obtained according to the GUID of the optical fiber reflection board card j, and then the occupation sequence number Z of the optical fiber reflection board card j is obtained j And address B of data operation flag j Reading the data operation flag b j The interaction data d of the optical fiber reflection board card j can be obtained j Storage space D of (2) j Reading the interactive data; the write operation is: when the reflecting board card i writes data into the optical fiber address, the occupied address and the occupied serial number Z of the reflecting board card i are sequentially obtained according to the GUID of the reflecting board card i i And address B of data operation flag i Read B i Data operation flag b at j The interaction data d of the optical fiber reflecting board card i can be obtained i Storage address D of (2) i Where d is written i And (3) obtaining the product.
Compared with the prior art, the collaborative simulation system based on the optical fiber ad hoc network, provided by the embodiment, has at least one of the following beneficial effects: 1. the collaborative simulation system provided by the invention provides a channel for real-time data interaction in the simulation process by adopting the networking communication module, so that the accuracy of data operation is ensured, and the reliability of the simulation result of the system is improved; 2. the optical fiber ad hoc network method can automatically allocate addresses for the optical fiber reflection board cards without conflict based on the length of the interactive data of each simulation node, and update the ad hoc network based on updated data when the length of the interactive data of the nodes changes, so that complicated setting and maintenance of the optical fiber addresses are not needed, and real-time data interaction of a simulation system in the simulation process is ensured; 3. the data can be managed in a segmented way by storing various data of the optical fiber reflecting board card into different sections, so that a compiling program is simplified, data confusion is avoided, and data sharing in a network is easier to realize; 4. compared with a mode of manually pre-distributing addresses for the optical fiber reflecting plate cards, the self-networking mode of the invention ensures that the optical fiber reflecting plate cards in the optical fiber network have the capability of autonomously determining the addresses, thereby avoiding human errors; 5. compared with the existing automatic address allocation mode, the method sets different delay starting time for each optical fiber reflecting plate card, and avoids the situation that the optical fiber reflecting plate cards started by power on simultaneously occupy the same address, so that data conflict is caused.
Those skilled in the art will appreciate that all or part of the flow of the methods of the embodiments described above may be accomplished by way of a computer program to instruct associated hardware, where the program may be stored on a computer readable storage medium. Wherein the computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. The collaborative simulation system based on the optical fiber ad hoc network is characterized by comprising N simulation nodes communicated through optical fibers, wherein each simulation node consists of a simulation computer and an optical fiber reflecting board card arranged in the simulation computer;
the simulation computer includes: the task planning module is used for analyzing and planning the simulation task; the calculation and control module is used for calculating the simulation model and generating decision information according to a calculation result; the data management module is used for generating external interaction data of the simulation node; the networking communication module is used for realizing optical fiber ad hoc network and providing a real-time data interaction channel for the simulation system so as to complete the communication of interaction data among the simulation nodes;
the optical fiber reflecting board card is connected with the reflecting memory hub, and the reflecting memory hub is used as a data relay system and is used for receiving interactive data of the simulation nodes and forwarding the interactive data to other simulation nodes.
2. The fiber ad hoc network-based collaborative simulation system according to claim 1, wherein the simulation computer further comprises an information collection unit for collecting attributes of each simulation node and transmitting the attributes to a task planning module, wherein the attributes of the simulation nodes include types and numbers of executable tasks and maximum concurrency numbers, and the task planning module assigns corresponding tasks to each simulation node based on the attributes of the simulation nodes.
3. The co-simulation system based on the optical fiber ad hoc network according to claim 2, wherein the co-simulation system has two control modes, namely: centralized control and distributed control;
in the centralized control mode, 1 simulation node is used as a control node, the rest N-1 simulation nodes are used as calculation nodes, and the control node is used for fusing and analyzing information of a plurality of calculation nodes, generating global decision information based on analysis results and transmitting the global decision information to each calculation node;
in the distributed control mode, the calculation and control modules of the N simulation nodes independently control the simulation process and generate decision information according to the model calculation states of the N simulation nodes.
4. A co-simulation system based on optical fiber ad hoc network according to any one of claims 1-3, wherein the networking communication module adopts the following ad hoc network method, which comprises:
setting the length l of the interaction data required by each optical fiber reflection board card i The method comprises the steps of carrying out a first treatment on the surface of the The interaction data required by the optical fiber reflection board card is the interaction data of the simulation node where the optical fiber reflection board card is located;
Different delay starting time T is respectively set for each optical fiber reflecting plate card i
The starting time of the optical fiber reflecting plate card i reaches the delayed starting time T i After that, the following operations are performed:
searching the self occupying address A in the area with the head address A in the optical fiber address i Write its occupation mark a i The method comprises the steps of carrying out a first treatment on the surface of the Occupying address A based on optical fiber reflecting board card i i Obtain its occupying sequence number Z i The method comprises the steps of carrying out a first treatment on the surface of the Space occupying serial number Z based on optical fiber reflecting plate card i i Acquiring own data operation address B i Write its data operation flag b i The method comprises the steps of carrying out a first treatment on the surface of the The data operation mark b i From the following componentsAnd l i Composition, l i Interactive data length of optical fiber reflection board card i, < >>Representing interaction data d required by optical fiber reflection board card i i Storing a first address of the address;
all the optical fiber reflecting plate cards finish the operation and finish optical fiber ad hoc network;
the data length of any optical fiber reflecting plate card is monitored to change, the data operation marks of all the optical fiber reflecting plate cards are emptied, and updated data operation marks are written in the data operation addresses of all the optical fiber reflecting plate cards according to the original occupation sequence to update the ad hoc network.
5. The co-simulation system based on the optical fiber ad hoc network according to claim 4, wherein the setting delay start time for each optical fiber reflection board card is respectively different, comprises:
step S101, setting GUIDs for all the optical fiber reflecting plate cards, wherein the GUID of any optical fiber reflecting plate card is different from the GUIDs of other optical fiber reflecting plate cards;
step S102, using GUIDs of the optical fiber reflecting plate cards as follow-up functions respectivelyThe mechanical number seed respectively generates different random positive integers R for each optical fiber reflecting plate card i The method comprises the steps of carrying out a first treatment on the surface of the Random positive integer R of any optical fiber reflector plate card i i The method meets the following conditions:
1≤R i ≤10N;
wherein i=1, 2, …, N is the number of optical fiber reflection plate cards;
step S103, random positive integer R based on each optical fiber reflector plate card i Setting delay starting time T of each optical fiber reflecting plate card i =t 0 ×R i
6. The collaborative simulation system based on the optical fiber ad hoc network according to claim 5, wherein the optical fiber reflection board card i searches for its own occupation address a i Write its occupation mark a i Comprising:
step S201, sequentially reading the occupied area A with A as the head address 1 ~A N′ Data a stored therein 1 ~a N′ Will be any address A X Data a at X Comparing with the occupied mark of any optical fiber reflecting plate card to judge whether the position is occupied;
step S202, when finding an unoccupied address A i The occupation mark a of the optical fiber reflector card i is marked i Writing here;
occupancy sign a of the optical fiber reflection board card i i From data a 1 And GUID of the optical fiber reflector card i, wherein the data a 1 4 bytes, a in all optical fiber reflector card occupation marks 1 All the same.
7. The co-simulation system based on the optical fiber ad hoc network according to claim 6, wherein the occupation address a based on the optical fiber reflection board card i i Obtain its occupying sequence number Z i Comprising:
step S301, calculating the occupation address A of the optical fiber reflection board card i i Offset p relative to the head address A i
Step S302, based on offset p i Setting the occupying serial number Z of the optical fiber reflecting board card i i
Z i =0x1<<p i
I.e. 0x1 offset to the left by p i Bits.
8. The collaborative simulation system based on the optical fiber ad hoc network according to claim 7, wherein the occupation sequence number Z based on the optical fiber reflection board card i i Acquiring own data operation address B i Write its data operation flag b i Comprising:
step S401, occupying sequence number Z based on optical fiber reflecting plate card i i Determining a data operation address B of the optical fiber reflection board card i i The method comprises the following steps: head address B offset Z i X 8 bits;
step S402, acquiring a data operation mark b of the optical fiber reflection board card i i Comprising: setting the length l of the interactive data of the optical fiber reflecting board card i i And calculating the head address of the interactive data storage address of the optical fiber reflecting board card iWherein->Calculated according to the following formula:
representing the data operation mark of the optical fiber reflecting plate card 1, namely the optical fiber reflecting plate card with the minimum occupying serial numberA first address D of the area D for storing the interaction data of the optical fiber reflector plate card; whereas for other fiber reflector cards i (i=2, 3, …, N), the +.>Is the +.>And l k The sum of the optical fiber reflection plate cards k is obtained according to the following way: ordering the occupation sequence numbers of all the optical fiber reflecting plate cards according to the sequence from small to large, and searching the occupation sequence number Z of the optical fiber reflecting plate card i i Is the previous space sequence number Z k The space occupying number corresponds to the optical fiber reflecting plate card l.
9. The collaborative simulation system based on the optical fiber ad hoc network according to claim 4, wherein the length l of the interaction data of the optical fiber reflection board card i is i Set as the interaction data d required by the optical fiber reflection board card i Length l_d of (2) i Or set as:
l i =l_d i +l′_d i ×20%
wherein l' _d i Representing data d i The length of the valid data in (a).
10. The collaborative simulation system based on optical fiber ad hoc network according to claim 4, wherein the data length of any one optical fiber reflection board card is monitored to change, the data operation marks of all the optical fiber reflection board cards are emptied, and updated data operation marks are written in the data operation addresses of the optical fiber reflection board cards according to the original occupation sequence, and the update ad hoc network comprises:
step S501, a reassignment flag c is set, and the initial value is c 0 The method comprises the steps of carrying out a first treatment on the surface of the All the optical fiber reflecting board cards can read the reassignment mark C, and the storage address is C;
step S502, data operation length l of any one of the optical fiber reflection cards j in the optical fiber reflection memory network j When the change occurs, the initial reassignment flag c is changed 0 C is 1
Step S503, the redistribution mark is c after the optical fiber reflection board card is read 1 At the time, all the optical fibers are emptiedWriting updated data operation marks into the data operation addresses of the optical fiber reflecting plate cards according to the original occupation sequence, updating the ad hoc network, and reassigning the marks c 1 Is restored to its initial value c 0
CN202311729289.6A 2023-12-15 2023-12-15 Collaborative simulation system based on optical fiber ad hoc network Pending CN117729121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311729289.6A CN117729121A (en) 2023-12-15 2023-12-15 Collaborative simulation system based on optical fiber ad hoc network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311729289.6A CN117729121A (en) 2023-12-15 2023-12-15 Collaborative simulation system based on optical fiber ad hoc network

Publications (1)

Publication Number Publication Date
CN117729121A true CN117729121A (en) 2024-03-19

Family

ID=90210126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311729289.6A Pending CN117729121A (en) 2023-12-15 2023-12-15 Collaborative simulation system based on optical fiber ad hoc network

Country Status (1)

Country Link
CN (1) CN117729121A (en)

Similar Documents

Publication Publication Date Title
EP0234803B1 (en) Method for the dynamic partitioning of parallel processors
CN101788890B (en) Method for generating virtual volume in storage system architecture and data access method
CN111885550B (en) Distributed autonomous mobile robot scheduling system
Fraigniaud et al. Collective tree exploration
WO2017072933A1 (en) Management system and management method for computer system
EP3660806B1 (en) Linear column transit system and linear column transit control method
CN105589754A (en) Mechanism and method for accessing data in a shared memory
CN103475704B (en) A kind of method for virtual node configuration of Virtual group of planes application
JP6571376B2 (en) Resource operation plan support apparatus and resource operation plan support method
JP2015026372A (en) Computer-implemented method, storage medium and computer system for parallel tree based prediction
Yang et al. A distributed task reassignment method in dynamic environment for multi-UAV system
CN114089755B (en) Multi-robot task allocation method based on consistency packet algorithm
CN102937918A (en) Data block balancing method in operation process of HDFS (Hadoop Distributed File System)
CN103914556A (en) Large-scale graph data processing method
CN101369934B (en) Network analogue method and system
CN107329801A (en) A kind of node administration method and device, many component servers
CN117785490A (en) Training architecture, method, system and server of graph neural network model
CN109783199A (en) A kind of virtual machine migration method and device
CN109739684A (en) The copy restorative procedure and device of distributed key value database based on vector clock
CN103678001A (en) Multi-node automatic memory allocation method based on reflective memory network
CN117729121A (en) Collaborative simulation system based on optical fiber ad hoc network
US20230308510A1 (en) Dynamic storage sharing across network devices
US6704319B1 (en) Up-tree topology trace for network route tracing
CN117938810A (en) Collaborative simulation data interaction method based on optical fiber ad hoc network
CN111949570B (en) Method and system for automatically allocating reflective memory addresses based on XML format

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