CN117938810A - Collaborative simulation data interaction method based on optical fiber ad hoc network - Google Patents

Collaborative simulation data interaction method based on optical fiber ad hoc network Download PDF

Info

Publication number
CN117938810A
CN117938810A CN202311729287.7A CN202311729287A CN117938810A CN 117938810 A CN117938810 A CN 117938810A CN 202311729287 A CN202311729287 A CN 202311729287A CN 117938810 A CN117938810 A CN 117938810A
Authority
CN
China
Prior art keywords
optical fiber
data
simulation
address
interaction
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
CN202311729287.7A
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 CN202311729287.7A priority Critical patent/CN117938810A/en
Publication of CN117938810A publication Critical patent/CN117938810A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/25Arrangements specific to fibre transmission
    • H04B10/2589Bidirectional transmission
    • H04B10/25891Transmission components
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a collaborative simulation data interaction method based on an optical fiber ad hoc network, belongs to the technical field of simulation, and solves the problem that an existing optical fiber networking mode is easy to cause address allocation errors, so that an operation data error of a simulation system is caused in a real-time data interaction process. Comprising the following steps: acquiring interaction data from the simulation node state information; adopting an optical fiber ad hoc network method to plan a storage address of the interactive data for each node, and completing the optical fiber ad hoc network; writing the interaction data of each node into a storage address; each node determines the interested node based on the interaction data of other nodes; acquiring a storage address of interaction data of the interested node, and reading the interaction data; each node updates own state information and acquires new interaction data; and (5) based on the new interaction data, the optical fiber ad hoc network is carried out again, and then the subsequent data interaction is carried out. The method avoids frequent setting and maintenance of the fiber address in the data interaction process, and ensures that each simulation node completes real-time data interaction.

Description

Collaborative simulation data interaction method based on optical fiber ad hoc network
Technical Field
The invention relates to the technical field of simulation, in particular to a collaborative simulation data interaction method based on an optical fiber ad hoc network.
Background
Simulation of complex systems is often characterized by model diversity, multiple sources of data, real-time interaction of large amounts of data, and the like. The collaborative simulation method refers to a simulation method that a plurality of simulation systems or simulation models perform collaborative work to obtain more comprehensive and comprehensive simulation results, and the method has the advantages that: the multi-source data integration, multi-level simulation, multi-model cooperation, real-time interaction, diversity evaluation on the system and the like are performed, and in a word, comprehensive and comprehensive simulation analysis on a complex system can be realized. 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 the semi-physical simulation field which needs to carry out a large amount of data interaction and has high requirement on real-time performance.
Distributed simulation systems based on fiber reflection memory networks typically include several simulation nodes, each comprising a computer and a fiber reflection board card installed within the computer. Before the distributed simulation system is adopted for simulation, 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 has low feasibility and small application range, and is not preferable especially for collaborative simulation with large-scale distributed simulation nodes. Therefore, it is necessary to explore an optical fiber ad hoc network method as a support and guarantee for realizing real-time interaction and sharing of a large amount of data in the simulation process.
Disclosure of Invention
In view of the above analysis, the present invention aims to provide a collaborative simulation data interaction method based on optical fiber ad hoc network, so as to solve the problem that the existing optical fiber networking mode is easy to generate address allocation errors, resulting in data errors of operation of a simulation system in the process of real-time data interaction.
In one aspect, an embodiment of the present invention provides a collaborative simulation data interaction method based on an optical fiber ad hoc network, including: acquiring interaction data of each simulation node from state information of each simulation node in a simulation system;
Based on the optical fiber ad hoc network method, the storage address of the interactive data of each simulation node is planned, the optical fiber ad hoc network is completed, and a real-time data interaction channel is provided for a simulation system;
Writing the interactive data of each simulation node into the corresponding storage address;
Each simulation node determines the interested node based on the interaction data of other simulation nodes;
Acquiring a storage address of interaction data of the interested node, and reading the interaction data of the interested node from the storage address;
Each simulation node updates own state information based on the state information and the interaction data of the interested node, and obtains new interaction data from the state information; and (3) based on the new interaction data, re-performing optical fiber ad hoc network, and based on the updated ad hoc network, performing subsequent data interaction.
Specifically, the state information of the simulation node includes: planning conditions of simulation tasks, occupation sequence numbers of simulation nodes, tasks executed by the nodes, simulation model numbers required to run the executed tasks, model state information, environment situation information and decision information; the interaction data of the simulation nodes are one or more of state information.
Specifically, each simulation node determines the node of interest based on the interaction data of other simulation nodes, specifically: and polling the model numbers of other simulation nodes, and determining the interested node of the simulation node based on the model numbers.
Specifically, the optical fiber ad hoc network method includes:
Setting the length l i of interaction data required by each optical fiber reflection board card; 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 i is set for each optical fiber reflecting plate card respectively;
After the start time of the optical fiber reflection board card i reaches the delay start time T i, the following operations are executed:
Searching a self occupation address A i in a region with a head address A in the optical fiber address, and writing an occupation mark a i; based on the occupation address A i of the optical fiber reflector plate card i, acquiring the occupation sequence number Z i of the optical fiber reflector plate card i; based on the occupying sequence number Z i of the optical fiber reflecting plate card i, acquiring the data operation address B i of the optical fiber reflecting plate card i and writing the data operation mark B i of the optical fiber reflecting plate card i; the data operation mark b i is composed of And l i, wherein l i is the interactive data length of the optical fiber reflection board card i,/>The first address of the storage address of the interaction data d i required by the optical fiber reflection board card i is represented;
All the optical fiber reflecting plate cards finish the operation and finish optical fiber 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, respectively taking GUIDs of the optical fiber reflecting plate cards as random number seeds, and respectively generating different random positive integers R i for the optical fiber reflecting plate cards; the random positive integer R i of any one optical fiber reflector plate card i meets the following conditions:
1≤Ri≤10N;
Wherein i=1, 2,., N is the number of fiber reflector cards;
Step S103, setting delay starting time T i=t0×Ri of each optical fiber reflecting plate card based on random positive integer R i of each optical fiber reflecting plate card.
Specifically, the optical fiber reflection board card i searches its own occupation address a i, writes its occupation mark a i, and includes:
Step S201, sequentially reading data a 1~aN′ stored in an occupied area A 1~AN′ with A as a first address, comparing data a X at any address A X with an occupied mark of any optical fiber reflector plate card, and judging whether the occupied area is occupied;
Step S202, when an unoccupied address A i is found, writing an occupancy flag a i of the optical fiber reflection board card i into the unoccupied address A i;
The occupation mark a i of the optical fiber reflector plate card i consists of data a 1 and GUID of the optical fiber reflector plate card i, wherein the data a 1 is 4 bytes, and a 1 of all the optical fiber reflector plate card occupation marks are the same.
Specifically, the obtaining the occupation sequence number Z i based on the occupation address a i of the optical fiber reflection board card i includes:
step S301, calculating the offset p i of the occupation address A i of the optical fiber reflection board card i relative to the first address A;
Step S302, setting a space occupying number Z i of the optical fiber reflection board card i based on the offset p i:
Zi=0x1<<pi
I.e. 0x1 offset to the left by p i bits.
Further, the obtaining the data operation address B i of the optical fiber reflection board card i based on the occupation sequence Z i, writing the data operation mark B i thereof, includes:
Step S401, determining, based on the occupation sequence number Z i of the optical fiber reflection board card i, the data operation address B i of the optical fiber reflection board card i as: the first address B is offset by Z i x 8 bits;
step S402, acquiring the data operation flag b i of the optical fiber reflection board card i, including: setting the length l i of the interactive data of the optical fiber reflecting board card i and calculating the first address of the storage address of the interactive data of the optical fiber reflecting board card i Wherein/>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 number A 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 its data manipulation flag/>For the optical fiber reflection plate card k-And l k, the optical fiber reflection board k is obtained according to the following mode: and ordering the occupation sequence numbers of all the optical fiber reflecting plate cards according to the sequence from small to large, and searching the previous occupation sequence number Z k of the occupation sequence number Z i of the optical fiber reflecting plate card i, wherein the occupation sequence number corresponds to the optical fiber reflecting plate card k.
Specifically, the length l i of the interaction data of the optical fiber reflection board card i is set to be the length l_d i of the interaction data d i required by the optical fiber reflection board card, or is set to be:
li=l_di+l′_di×20%
Where l' _d i denotes the length of valid data in the data d i.
Further, the obtaining the storage address of the interaction data of the interested node includes: and acquiring the GUID of the optical fiber reflecting board card in the node, sequentially acquiring the occupying address, the occupying sequence number and the storage address of the data operation mark through the GUID, reading the data operation mark and acquiring the storage address of the interactive data.
Compared with the prior art, the invention has at least one of the following beneficial effects:
1. 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;
2. 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;
3. 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;
4. 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 flow chart of a data interaction method based on an optical fiber ad hoc network according to the present invention;
FIG. 2 is a flow chart of a method for optical fiber ad hoc network according to the present invention;
FIG. 3 is a schematic diagram of the composition and memory address of a data operation flag.
Detailed Description
The following detailed description of preferred embodiments of the application is made in connection with the accompanying drawings, which form a part hereof, and together with the description of the embodiments of the application, are used to explain the principles of the application and are not intended to limit the scope of the application.
The invention discloses a collaborative simulation data interaction method based on an optical fiber ad hoc network, which is shown in fig. 1 and comprises the following steps:
Acquiring interaction data of each simulation node from state information of each simulation node in a simulation system;
Based on the optical fiber ad hoc network method, the storage address of the interactive data of each simulation node is planned, the optical fiber ad hoc network is completed, and a real-time data interaction channel is provided for a simulation system;
Writing the interactive data of each simulation node into the corresponding storage address;
Each simulation node determines the interested node based on the interaction data of other simulation nodes;
Acquiring a storage address of interaction data of the interested node, and reading the interaction data of the interested node from the storage address;
Each simulation node updates own state information based on the state information and the interaction data of the interested node, and obtains new interaction data from the state information; and (3) based on the new interaction data, re-performing optical fiber ad hoc network, and based on the updated ad hoc network, performing subsequent data interaction.
Specifically, the state information of the simulation node includes: planning conditions of simulation tasks, occupation sequence numbers of simulation nodes, tasks executed by the nodes, simulation model numbers required to run the execution tasks, calculation information of models, environment situation information, decision information and the like; for example, for simulation of an aircraft cluster, the tasks include simulation of motion characteristics of the aircraft, simulation of physical characteristics of an aircraft detection target or environment, simulation of force and moment, and the like, and the solution information of the model includes: position, speed, attitude, etc. of the model; the decision information is obtained by the simulation node according to the calculation information of the model, and the aircraft event, such as failure, damage, target hit, or hit failure, is obtained, and the subsequent decision is made based on the event. The interaction data of the simulation node is obtained from its state information, including one or more of them.
Specifically, each simulation node determines the node of interest based on the interaction data of other simulation nodes, specifically: and polling simulation model numbers of other simulation nodes, and determining the interested node of the simulation node based on the model numbers.
Each simulation node in the optical fiber reflection memory network is composed of a simulation computer and an optical fiber reflection board card arranged in the simulation computer, before data interaction is carried out between the simulation nodes, a storage address is required to be appointed for data which needs to be interacted with each optical fiber reflection board card in advance, the data is written into the address, and the data which needs to be interacted with each optical fiber reflection board card (namely 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_d1
Interaction data d of board card 2 2 Address D 2 l_d2
... ... ...
Interaction data d of board card N N Address D N l_dN
Specifically, as shown in fig. 2, the optical fiber ad hoc network method includes:
Different delay starting time T i is set for each optical fiber reflecting plate card in the optical fiber reflecting memory network respectively; where i=1, 2,..n, N is the number of fiber optic reflector cards;
After the start time of the optical fiber reflection board card i reaches the delay start time T i, the following operations are executed:
Searching a self occupation address A i in a region with a head address A in the optical fiber address, and writing an occupation mark a i; based on the occupation address A i of the optical fiber reflector plate card i, acquiring the occupation sequence number Z i of the optical fiber reflector plate card i; based on the occupying sequence number Z i of the optical fiber reflecting plate card i, acquiring the data operation address B i of the optical fiber reflecting plate card i and writing the data operation mark B i of the optical fiber reflecting plate card i; the data operation mark b i is composed of And l i, wherein l i is set according to the length of the interaction data of the 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;
All the optical fiber reflecting plate cards finish the operation and finish optical fiber ad hoc network.
Further, the data length of any one optical fiber reflecting plate card is monitored to change, namely, the length of interaction data of any simulation node is changed, 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 ad hoc network is updated, wherein the specific operation comprises the following steps:
Step S501, a reassignment flag c is set, and the initial value is c 0; all the optical fiber reflecting board cards can read the reassignment mark C, and the storage address is C;
For example, the initial value c 0 of the reassignment flag may be set to a number with 1 for all N consecutive bits, for example, if the number of accesses to the optical fiber reflection board card is 8, then c 0 =0xff may be set, and if the number of accesses to the optical fiber reflection board card is 10, then c 0 =0x3ff;
step S502, when the data operation length l j of any one of the optical fiber reflection board cards j in the optical fiber reflection memory network is changed, changing the initial reassignment mark c 0 to c 1;
For example, when the data operation length of any 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, the data may collide with the data of other optical fiber reflection board cards, and at this time, the reassignment mark may be actively changed to c 1 =0x1;
And step S503, when the optical fiber reflecting plate card reads that the reassignment mark is c 1, all the data operation marks of the optical fiber reflecting plate cards are cleared, updated data operation marks are written in the data operation addresses of the optical fiber reflecting plate cards according to the original occupying sequence numbers, the ad hoc network is updated, and the reassignment mark c 1 is restored to an initial value c 0 thereof.
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, and generating different random positive integers R i for each optical fiber reflector plate; the random positive integer R i of any one optical fiber reflector plate card i meets the following conditions:
1≤Ri≤10N,
where i=1, 2..n, N is the number of fiber reflector cards that can be accommodated in the network;
Step S103, setting delay starting time T i=t0×Ri of each optical fiber reflecting plate card based on random positive integer R i of each optical fiber reflecting plate card;
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 can be 10ms, and the delay starting time set according to the steps is as follows: 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 epsilon [10, 1000] ms.
Specifically, after the start time of the optical fiber reflection board card i reaches the delayed start time T i, searching the occupation address a i of the optical fiber reflection board card i, and writing the occupation mark a i of the optical fiber reflection board card i, including:
Step S201, sequentially reading data a 1~aN′ stored in an occupied area A 1~AN′ with A as a first address, comparing data a X at any address A X with an occupied mark of any optical fiber reflector plate card, and judging whether the occupied area is occupied;
Specifically, as shown in table 2, the occupation mark of the optical fiber reflection board card consists of data a 1 and GUID of the optical fiber reflection board card, wherein the data a 1 is 4 bytes, and a 1 in the occupation marks of all the optical fiber reflection board cards are the same; by way of example, a 1 may be set to 0x03070307;
Further, when judging whether the address at the position a X is occupied, only need to observe whether the first 4 bytes in the data a X at the position are a 1; if so, then the occupied space is here; the identity information of the address optical fiber reflection board card occupying the place can be determined according to the last 16 bytes in the data a X, namely GUID;
Step S202, when an unoccupied address A i is found, writing an occupancy flag a i of the optical fiber reflection board card i into the unoccupied address A i;
in other words, the first empty address searched in step S201 is used as the occupying address of the optical fiber reflection board card i, and the occupying mark is written therein, and consists of a 1 and the GUID of the optical fiber reflection board card i.
Table 2 composition of occupancy flags and memory addresses
Specifically, based on the occupation address a i of the optical fiber reflection board card i, the occupation sequence number Z i is obtained, which includes:
step S301, calculating the offset p i of the occupation address A i of the optical fiber reflection board card i relative to the first address A;
Step S302, setting a space occupying number Z i of the optical fiber reflection board card i based on the offset p i:
Zi=0x1<<pi
I.e. 0x1 offset to the left by p i bits.
Further, based on the occupation sequence number Z i of the optical fiber reflection board card i, the data operation address B i of the optical fiber reflection board card i is obtained, and the data operation mark B i is written, which includes:
Step S401, determining a data operation address B i of the optical fiber reflection board card i based on the occupation sequence number Z i of the optical fiber reflection board card i; specifically, the data operation address B i of the optical fiber reflection board i is: the first address B is offset by Z i x 8 bits;
Step S402, writing a data operation mark B i of the optical fiber reflection board card i at a data operation address B i;
Specifically, as shown in Table 3, the data operation flag b i is composed of And l i, wherein l i is the set length of the interaction 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;
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 number A 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 its data manipulation flag/>For the optical fiber reflection plate card k-And l k, the optical fiber reflection board k is obtained according to the following mode: sorting the occupation sequence numbers of all the optical fiber reflecting plate cards according to the sequence from small to large, and searching the previous occupation sequence number Z k of the occupation sequence number Z i of the optical fiber reflecting plate card i, wherein the occupation sequence number corresponds to the optical fiber reflecting plate card k;
When the length l i of the interaction data of the optical fiber reflection board card i is set, the following rule is followed: setting l i to be the length l_d i of the data d i required to be interacted with by the optical fiber reflection board card, or preferably setting l i to be greater than the length l_d i of the data d i required to be interacted with by the optical fiber reflection board card, specifically:
wherein l' _d i represents the length of the effective data in the data d i, i.e. a certain margin is reserved for standby when the data length l i of the optical fiber reflection board card is set. The data operation mark and the storage address of each optical fiber reflection board card 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 the optical fiber ad hoc network after 1) searching the occupation address in the area A and writing the occupation mark a i, 2) acquiring the occupation sequence number Z i based on the occupation address, and 3) searching the address of the data operation mark in the area B and writing the data operation mark B i.
In practice, the read operation is: when the optical fiber reflecting plate card i reads the data of the optical fiber reflecting plate card j, the occupation address of the optical fiber reflecting plate card j is obtained according to the GUID of the optical fiber reflecting plate card j, then the occupation sequence number Z j and the address B j of the data operation mark are obtained, the data operation mark B j is read, the storage space D j of the interaction data D j of the optical fiber reflecting plate card j can be obtained, and the interaction data at the storage space D j can be read; the write operation is: when the reflecting plate card i writes data into the optical fiber address, the occupying sequence number Z i and the address B i of the data operation mark are sequentially obtained according to the GUID of the reflecting plate card i, the data operation mark B j at the position B i is read, the storage address D i of the interaction data D i of the optical fiber reflecting plate card i can be obtained, and D i is written in the storage address.
Further, the obtaining the storage address of the interaction data of the interested node includes: and acquiring the GUID of the optical fiber reflecting board card in the node, sequentially acquiring the occupying address, the occupying sequence number and the storage address of the data operation mark through the GUID, reading the data operation mark and acquiring the storage address of the interactive data.
Compared with the prior art, the data interaction method based on the optical fiber ad hoc network has the following advantages: 1. 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; 2. 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; 3. 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; 4. 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 to cause data conflict; 5. when the data operation length of the optical fiber reflecting plate card is changed to cause conflict with other optical fiber reflecting plate cards, the invention automatically resets the optical fiber reflecting plate card by setting the reassignment mark when the optical fiber reflecting plate card is in conflict, can prompt a system in time, empty the information of the optical fiber reflecting plate card and automatically re-networking, thereby solving the conflict.
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 data interaction method based on the optical fiber ad hoc network is characterized by comprising the following steps of: acquiring interaction data of each simulation node from state information of each simulation node in a simulation system;
adopting an optical fiber ad hoc network method to plan the storage address of the interactive data for each simulation node, completing the optical fiber ad hoc network, and providing a real-time data interaction channel for a simulation system;
Writing the interactive data of each simulation node into the corresponding storage address;
Each simulation node determines the interested node based on the interaction data of other simulation nodes;
Acquiring a storage address of interaction data of the interested node, and reading the interaction data of the interested node from the storage address;
Each simulation node updates own state information based on the state information and the interaction data of the interested node, and obtains new interaction data from the state information; and (3) based on the new interaction data, re-performing optical fiber ad hoc network, and based on the updated ad hoc network, performing subsequent data interaction.
2. The fiber-ad hoc-network-based collaborative simulation data interaction method according to claim 1, wherein the state information of the simulation node comprises: planning conditions of simulation tasks, occupation sequence numbers of simulation nodes, tasks executed by the nodes, simulation model numbers required to run the execution tasks, calculation information of models, environment situation information and decision information; the interaction data of the simulation nodes are one or more of state information.
3. The collaborative simulation data interaction method based on the optical fiber ad hoc network according to claim 2, wherein each simulation node determines the interested node based on the interaction data of other simulation nodes, specifically: and polling simulation model numbers of other simulation nodes, and determining the interested node of the simulation node based on the model numbers.
4. The fiber-ad hoc network-based co-simulation data interaction method according to claim 1, wherein the fiber-ad hoc network method comprises:
Setting the length l i of interaction data required by each optical fiber reflection board card; 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 i is set for each optical fiber reflecting plate card respectively;
After the start time of the optical fiber reflection board card i reaches the delay start time T i, the following operations are executed:
Searching a self occupation address A i in a region with a head address A in the optical fiber address, and writing an occupation mark a i; based on the occupation address A i of the optical fiber reflector plate card i, acquiring the occupation sequence number Z i of the optical fiber reflector plate card i; based on the occupying sequence number Z i of the optical fiber reflecting plate card i, acquiring the data operation address B i of the optical fiber reflecting plate card i and writing the data operation mark B i of the optical fiber reflecting plate card i; the data operation mark b i is composed of And l i, wherein l i is the interactive data length of the optical fiber reflection board card i,/>The first address of the storage address of the interaction data d i required by the optical fiber reflection board card i is represented;
All the optical fiber reflecting plate cards finish the operation and finish optical fiber ad hoc network.
5. The collaborative simulation data interaction method 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 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, respectively taking GUIDs of the optical fiber reflecting plate cards as random number seeds, and respectively generating different random positive integers R i for the optical fiber reflecting plate cards; the random positive integer R i of any one optical fiber reflector plate card i meets the following conditions:
1≤Ri≤10N;
wherein i=1, 2, …, N is the number of optical fiber reflection board cards;
Step S103, setting delay starting time T i=t0×Ri of each optical fiber reflecting plate card based on random positive integer R i of each optical fiber reflecting plate card.
6. The collaborative simulation data interaction method based on the optical fiber ad hoc network according to claim 5, wherein the optical fiber reflection board card i searches its own occupation address a i, writes its occupation mark a i, and comprises:
Step S201, sequentially reading data a 1~aN′ stored in an occupied area A 1~AN′ with A as a first address, comparing data a X at any address A X with an occupied mark of any optical fiber reflector plate card, and judging whether the occupied area is occupied;
Step S202, when an unoccupied address A i is found, writing an occupancy flag a i of the optical fiber reflection board card i into the unoccupied address A i;
The occupation mark a i of the optical fiber reflector plate card i consists of data a 1 and GUID of the optical fiber reflector plate card i, wherein the data a 1 is 4 bytes, and a 1 of all the optical fiber reflector plate card occupation marks are the same.
7. The collaborative simulation data interaction method based on the optical fiber ad hoc network according to claim 5, wherein the obtaining the occupation sequence number Z i based on the occupation address a i of the optical fiber reflection board card i comprises:
step S301, calculating the offset p i of the occupation address A i of the optical fiber reflection board card i relative to the first address A;
Step S302, setting a space occupying number Z i of the optical fiber reflection board card i based on the offset p i:
Zi=0x1<<pi
I.e. 0x1 offset to the left by p i bits.
8. The collaborative simulation data interaction method based on the optical fiber ad hoc network according to claim 7, wherein the obtaining the data operation address B i of the optical fiber reflector card i based on the occupying sequence number Z i, writing the data operation mark B i thereof, comprises:
Step S401, determining, based on the occupation sequence number Z i of the optical fiber reflection board card i, the data operation address B i of the optical fiber reflection board card i as: the first address B is offset by Z i x 8 bits;
step S402, acquiring the data operation flag b i of the optical fiber reflection board card i, including: setting the length l i of the interactive data of the optical fiber reflecting board card i and calculating the first address of the storage address of the interactive data of the optical fiber reflecting board card i Wherein/>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 number A 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/>, in the data manipulation flagsFor the optical fiber reflection plate card k-And l k, the optical fiber reflection board k is obtained according to the following mode: and ordering the occupation sequence numbers of all the optical fiber reflecting plate cards according to the sequence from small to large, and searching the previous occupation sequence number Z k of the occupation sequence number Z i of the optical fiber reflecting plate card i, wherein the occupation sequence number corresponds to the optical fiber reflecting plate card k.
9. The collaborative simulation data interaction method based on the optical fiber ad hoc network according to any one of claims 1-8, wherein the length l i of the interaction data of the optical fiber reflection board card i is set to be the length l_d i of the interaction data d i required by the optical fiber reflection board card, or set to be:
li=l_di+l′_di×20%
Where l' _d i denotes the length of valid data in the data d i.
10. The method for collaborative simulation data interaction based on optical fiber ad hoc network according to claim 9, wherein the obtaining the storage address of the interaction data of the interested node comprises: and acquiring the GUID of the optical fiber reflecting board card in the node, sequentially acquiring the occupying address, the occupying sequence number and the storage address of the data operation mark through the GUID, reading the data operation mark and acquiring the storage address of the interactive data.
CN202311729287.7A 2023-12-15 2023-12-15 Collaborative simulation data interaction method based on optical fiber ad hoc network Pending CN117938810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311729287.7A CN117938810A (en) 2023-12-15 2023-12-15 Collaborative simulation data interaction method based on optical fiber ad hoc network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311729287.7A CN117938810A (en) 2023-12-15 2023-12-15 Collaborative simulation data interaction method based on optical fiber ad hoc network

Publications (1)

Publication Number Publication Date
CN117938810A true CN117938810A (en) 2024-04-26

Family

ID=90760309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311729287.7A Pending CN117938810A (en) 2023-12-15 2023-12-15 Collaborative simulation data interaction method based on optical fiber ad hoc network

Country Status (1)

Country Link
CN (1) CN117938810A (en)

Similar Documents

Publication Publication Date Title
CN107533438B (en) Data replication in a memory system
CN101819506B (en) Storage subsystem and storage system architecture performing storage virtualization and method thereof
CN101655813B (en) Storage system
US7249152B2 (en) Dynamic disk space management by multiple database server instances in a cluster configuration
CN110120915A (en) The three-level cost-effectiveness of high-performance calculation is decomposed and the high capacity memory with online extension flexibility
CN101470667A (en) Method for physical internal memory allocation in assigned address range on Linux system platform
CA2436517A1 (en) Method and apparatus for data processing
JP2000112814A (en) Method and device for allocating memory
CN104426770A (en) Routing lookup method, routing lookup device and method for constructing B-Tree tree structure
CN104090897A (en) Method, server and system for accessing metadata
CN109408590A (en) Expansion method, device, equipment and the storage medium of distributed data base
CN109739684B (en) Vector clock-based copy repair method and device for distributed key value database
CN109359063A (en) Caching replacement method, storage equipment and storage medium towards storage system software
CN110347338A (en) Mix internal storage data exchange and processing method, system and readable storage medium storing program for executing
CN101706760A (en) Matrix transposition automatic control circuit system and matrix transposition method
CN102024051B (en) Data updating method for distributed memory database
US6745257B2 (en) Method, system, and program for providing status in a multi-processing node system
CN102724301B (en) Cloud database system and method and equipment for reading and writing cloud data
CN117785490A (en) Training architecture, method, system and server of graph neural network model
CN117938810A (en) Collaborative simulation data interaction method based on optical fiber ad hoc network
CN104426774A (en) High-speed routing lookup method and device simultaneously supporting IPv4 and IPv6
CN101547209A (en) Method and device for updating information table
CN114281242B (en) Memory load balancing method, device and equipment
CN117729121A (en) Collaborative simulation system based on optical fiber ad hoc network
CN105095105A (en) Cache partitioning method and device

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