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

A 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
address
reflective board
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

一种基于光纤自组网的协同仿真系统A collaborative simulation system based on optical fiber ad hoc network

技术领域Technical field

本发明涉及飞行器仿真领域,尤其涉及一种基于光纤自组网的协同仿真系统。The invention relates to the field of aircraft simulation, and in particular to a collaborative simulation system based on optical fiber ad hoc network.

背景技术Background technique

飞行器集群具有组织灵活、低成本、高韧性的优势,广泛应用于多个领域,包括空中交通管理、搜索救援、战术作战、物流运输等,飞行器集群在执行这些任务时,多架飞行器相互之间协同工作是必要的。多架飞行器协同工作的优势在于:可提高任务执行的效率和速度、提高执行方式的灵活性以适应不同的任务需求、避免相互干扰和碰撞以提高空中交通的安全性和效率、可覆盖更大的区域以执行更广泛的任务等。实际的飞行器协同控制系统主要包括射前协同任务规划、协同探测和抗干扰、在线态势认知、在线协同决策和规划、协同制导控制、组网通信、智能计算、协同效能评估等功能。在飞行器控制系统应用之前,可采用协同仿真系统对构建的飞行器协同控制系统的性能进行验证,相对于实验仿真方法,协同仿真系统可替代实际系统中的数据链、卫星等关键设备,成本低且易于实现。光纤反射内存网络由若干光纤反射板卡通过光纤等传输介质连接形成,其具有高速传输、高宽带、低延迟、抗干扰能力强、适合长距离传输和节能环保等优势,十分适用于需要进行大量数据交互且对实时性要求很高的飞行器协同仿真系统。Aircraft clusters have the advantages of flexible organization, low cost, and high resilience. They are widely used in many fields, including air traffic management, search and rescue, tactical operations, logistics and transportation, etc. When aircraft clusters perform these tasks, multiple aircraft interact with each other. Collaborative work is necessary. The advantages of multiple aircraft working together are: it can improve the efficiency and speed of mission execution, increase the flexibility of execution methods to adapt to different mission requirements, avoid mutual interference and collision to improve the safety and efficiency of air traffic, and can cover a larger area area to perform a wider range of tasks, etc. The actual aircraft collaborative control system mainly includes functions such as pre-launch collaborative mission planning, collaborative detection and anti-interference, online situation awareness, online collaborative decision-making and planning, collaborative guidance control, networking communications, intelligent computing, and collaborative effectiveness evaluation. Before the aircraft control system is applied, the collaborative simulation system can be used to verify the performance of the constructed aircraft collaborative control system. Compared with the experimental simulation method, the collaborative simulation system can replace key equipment such as data links and satellites in the actual system, and is low-cost and Easy to implement. The optical fiber reflective memory network is formed by connecting several optical fiber reflective boards through optical fiber and other transmission media. It has the advantages of high-speed transmission, high bandwidth, low delay, strong anti-interference ability, suitable for long-distance transmission, energy saving and environmental protection. It is very suitable for applications that require a large number of An aircraft collaborative simulation system with data interaction and high real-time requirements.

为保障协同仿真系统运行过程大量数据实现交互和实时共享,首先需要对每个仿真节点中的光纤反射板卡的地址进行规划。目前,通常采用两种方式进行光纤反射板卡的地址规划,一是人工分配地址,即为每个光纤反射板卡预先分配占位地址,但该方式的缺陷在于:当网络中光纤反射板卡数量较大,或者半实物仿真系统结构组成多变、数据结构多变的情况下,人为分配地址极易产生操作失误,从而造成不可逆的错误;二是自动分配地址,即,根据各个光纤反射板卡加入网络的顺序,使各个光纤反射板卡依次抢占地址,但该方式仍存在以下问题:由于各个光纤反射板卡的启动间隔极短,存在不同光纤反射板卡同时上电的情况,同时上电的光纤反射板卡有可能抢占同一地址,依旧会导致后续的数据操作过程出现错误。In order to ensure the interaction and real-time sharing of large amounts of data during the operation of the collaborative simulation system, it is first necessary to plan the address of the optical fiber reflective board in each simulation node. At present, two methods are usually used for address planning of optical fiber reflective boards. One is manual address allocation, that is, pre-allocating a placeholder address for each optical fiber reflective board. However, the disadvantage of this method is that when the optical fiber reflective board is used in the network, When the quantity is large, or the structure and data structure of the semi-physical simulation system are changeable, manual address allocation can easily lead to operational errors, resulting in irreversible errors; the second is automatic address allocation, that is, according to each optical fiber reflector The order in which the cards are added to the network enables each fiber optic reflective board to seize the address in turn. However, this method still has the following problems: Since the startup interval of each fiber optic reflective board is extremely short, there are situations where different fiber optic reflective boards are powered on at the same time. Electrical fiber optic reflective boards may seize the same address, which may still cause errors in subsequent data operations.

总之,由于现有的光纤反射板卡地址规划方式可行性低、适用范围小,尤其是面对存在大规模、分布式仿真节点的协同仿真系统来说,以上方法均不可取。因此亟须探索一种光纤的自组网方法,能够适应协同仿真系统的要求。In short, due to the low feasibility and small scope of application of the existing optical fiber reflective board address planning methods, especially in the face of collaborative simulation systems with large-scale and distributed simulation nodes, the above methods are not advisable. Therefore, it is urgent to explore an optical fiber self-organizing network method that can adapt to the requirements of collaborative simulation systems.

发明内容Contents of the invention

鉴于上述的分析,本发明实施例旨在提供一种基于光纤自组网的协同仿真系统,用以解决现有仿真系统的组网方式容易产生地址分配失误,导致仿真系统在实时数据交互的过程中操作数据错误的问题。In view of the above analysis, embodiments of the present invention aim to provide a collaborative simulation system based on optical fiber self-organizing network to solve the problem that the existing simulation system's networking method is prone to address allocation errors, resulting in the simulation system's real-time data interaction process. The problem of incorrect operation data.

一方面,本发明实施例提供了一种基于光纤自组网的协同仿真系统,包括通过光纤联通的N个仿真节点,其中,每个仿真节点均由仿真计算机和安装在其内的光纤反射板卡组成;On the one hand, embodiments of the present invention provide a collaborative simulation system based on an optical fiber self-organizing network, including N simulation nodes connected through optical fibers. Each simulation node is composed of a simulation computer and an optical fiber reflection plate installed therein. card composition;

所述仿真计算机包括:任务规划模块,用于对仿真任务进行解析和规划;计算和控制模块,用于对仿真任务的模型进行解算并根据解算结果生成决策信息;数据管理模块,用于生成仿真节点的对外交互数据;以及组网通信模块,用于实现光纤自组网,为仿真系统提供实时的数据交互通道,以完成各仿真节点之间交互数据的通信;The simulation computer includes: a task planning module, used to analyze and plan the simulation task; a calculation and control module, used to solve the model of the simulation task and generate decision information based on the solution results; a data management module, used to Generate external interaction data of simulation nodes; and a networking communication module, which is used to implement optical fiber self-organizing network and provide a real-time data interaction channel for the simulation system to complete the communication of interactive data between simulation nodes;

所述光纤反射板卡与反射内存集线器连接,反射内存集线器作为数据中继系统,用于接收仿真节点的交互数据并转发至其他仿真节点。The optical fiber reflective board is connected to a reflective memory hub. The reflective memory hub serves as a data relay system for receiving interactive data from simulation nodes and forwarding it to other simulation nodes.

进一步的,所述仿真计算机还包括信息采集单元,用于采集各仿真节点的属性传输至任务规划模块,所述仿真节点的属性包括可执行任务的类型和数量以及最大并发数,任务规划模块基于各仿真节点的属性,为其分配相应的任务。Further, the simulation computer also includes an information collection unit for collecting the attributes of each simulation node and transmitting them to the task planning module. The attributes of the simulation node include the type and number of executable tasks and the maximum number of concurrencies. The task planning module is based on The attributes of each simulation node are assigned corresponding tasks.

具体的,所述协同仿真系统具有两种控制模式,分别为:集权式控制和分布式控制;Specifically, the collaborative simulation system has two control modes, namely: centralized control and distributed control;

所述集权式控制模式下,1个仿真节点作为管控节点,其余N-1个仿真节点作为计算节点,所述管控节点,用于将多个计算节点的信息进行融合和分析,基于分析结果生成全局决策信息,下发至各计算节点;In the centralized control mode, one simulation node serves as the management node, and the remaining N-1 simulation nodes serve as computing nodes. The management and control nodes are used to fuse and analyze the information of multiple computing nodes, and generate based on the analysis results. Global decision-making information is distributed to each computing node;

所述分布式控制模式下,N个仿真节点分别根据自身的模型解算状态,自主控制仿真进程和生成决策信息。In the distributed control mode, N simulation nodes independently control the simulation process and generate decision information according to their own model solution status.

具体的,所述组网通信模块,采用如下自组网方法,包括:Specifically, the networking communication module adopts the following self-organizing network method, including:

设定各光纤反射板卡所需交互数据的长度li;所述光纤反射板卡所需交互数据为其所在的仿真节点的交互数据;Set the length l i of the interactive data required by each optical fiber reflective board; the interactive data required by the optical fiber reflective board is the interactive data of the simulation node where it is located;

为各光纤反射板卡分别设定不同的延迟启动时间TiSet different delayed start times Ti for each optical fiber reflective board card;

光纤反射板卡i启动时间达到其延迟启动时间Ti后,执行以下操作:After the start-up time of optical fiber reflective board card i reaches its delayed start-up time T i , perform the following operations:

在光纤地址中首地址为A的区域,寻找自身的占位地址Ai,写入其占用标志ai;基于光纤反射板卡i的占位地址Ai,获取其占位序号Zi;基于光纤反射板卡i的占位序号Zi,获取自身的数据操作地址Bi,写入其数据操作标志bi;所述数据操作标志bi和li组成,li为光纤反射板卡i的交互数据长度,/>表示光纤反射板卡i所需交互数据di存储地址的首地址;In the area where the first address of the optical fiber address is A, find its own placeholder address Ai , and write its occupancy mark ai ; based on the placeholder address Ai of the optical fiber reflection board card i, obtain its placeholder serial number Zi ; based on The occupancy sequence number Z i of the optical fiber reflection board card i obtains its own data operation address B i and writes its data operation flag b i ; the data operation flag bi is determined by It is composed of l i , l i is the interactive data length of optical fiber reflection board card i,/> Represents the first address of the storage address of the interactive data di required by the optical fiber reflective board card i;

所有光纤反射板卡完成上述操作,完成光纤自组网;All optical fiber reflective boards complete the above operations and complete the optical fiber self-organizing network;

监测到任一光纤反射板卡的数据长度发生变化,清空所有光纤反射板卡的数据操作标志,按照原占位顺序,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网。Detect the change in the data length of any optical fiber reflective board, clear the data operation flags of all optical fiber reflective boards, and write the updated data operation flags in the data operation addresses of each optical fiber reflective board according to the original occupancy sequence. Update ad hoc network.

具体的,所述为各光纤反射板卡分别不同的设定延迟启动时间,包括:Specifically, the delay start time is set differently for each optical fiber reflective board card, including:

步骤S101、为各光纤反射板卡设定GUID,所述任一光纤反射板卡的GUID与其他光纤反射板卡的GUID均不相同;Step S101: Set a GUID for each optical fiber reflective board card. The GUID of any optical fiber reflective board card is different from the GUID of other optical fiber reflective board cards;

步骤S102、以各光纤反射板卡的GUID分别作为随机数种子,为各光纤反射板卡分别产生各不相同的随机正整数Ri;所述任一光纤反射板卡i的随机正整数Ri满足:Step S102: Use the GUID of each optical fiber reflective board card as a random number seed to generate a different random positive integer R i for each optical fiber reflective board card; the random positive integer R i of any optical fiber reflective board card i satisfy:

1≤Ri≤10N;1≤R i ≤10N;

其中,i=1,2,...,N,N为光纤反射板卡的数量;Among them, i=1, 2,...,N, N is the number of optical fiber reflection boards;

步骤S103、基于各光纤反射板卡的随机正整数Ri,设定各光纤反射板卡的延迟启动时间Ti=t0×RiStep S103: Based on the random positive integer R i of each optical fiber reflective plate card, set the delayed start time Ti = t 0 ×R i of each optical fiber reflective plate card.

具体的,所述光纤反射板卡i寻找自身的占位地址Ai,写入其占用标志ai,包括:Specifically, the optical fiber reflective board card i looks for its own occupancy address A i and writes its occupancy mark a i , including:

步骤S201、顺序读取以A为首地址的占用区域A1~AN′中存储的数据a1~aN′,将任一地址AX处的数据aX与任一光纤反射板卡的占用标志对比,判断该处是否被占用;Step S201: Sequentially read the data a 1 to a N′ stored in the occupied areas A 1 to A N with addresses starting with A , and combine the data a X at any address A Compare the signs to determine whether the place is occupied;

步骤S202、当寻找到一个未被占用的地址Ai,则将光纤反射板卡i的占用标志ai写入此处;Step S202: When an unoccupied address A i is found, write the occupation flag a i of the optical fiber reflection plate card i here;

所述光纤反射板卡i的占用标志ai由数据a1和光纤反射板卡i的GUID组成,所述数据a1为4个字节,所有光纤反射板卡占用标志中的a1均相同。The occupancy flag a i of the optical fiber reflective board card i consists of data a 1 and the GUID of the optical fiber reflective board card i. The data a 1 is 4 bytes, and a 1 in the occupancy flags of all optical fiber reflective board cards is the same. .

具体的,所述基于光纤反射板卡i的占位地址Ai,获取其占位序号Zi,包括:Specifically, based on the occupancy address A i of the optical fiber reflective board card i, the occupancy sequence number Zi is obtained, including:

步骤S301、计算光纤反射板卡i的占位地址Ai相对于首地址A的偏移量piStep S301: Calculate the offset p i of the placeholder address A i of the optical fiber reflective plate card i relative to the first address A;

步骤S302、基于偏移量pi,设定光纤反射板卡i的占位序号ZiStep S302: Based on the offset p i , set the occupancy number Zi of the optical fiber reflection plate card i:

Zi=0x1<<piZ i =0x1<<p i ,

即为0x1向左偏移pi位。That is, 0x1 is shifted to the left by p i bits.

具体的,所述基于光纤反射板卡i的占位序号Zi,获取自身的数据操作地址Bi,写入其数据操作标志bi,包括:Specifically, based on the occupancy sequence number Zi of the optical fiber reflective board card i , obtain its own data operation address Bi , and write its data operation flag bi , including:

步骤S401、基于光纤反射板卡i的占位序号Zi,确定光纤反射板卡i的数据操作地址Bi为:首地址B偏移Zi×8位;Step S401: Based on the occupancy sequence number Zi of the optical fiber reflective board card i , determine the data operation address B i of the optical fiber reflective board card i as: the first address B is offset by Z i × 8 bits;

步骤S402、获取光纤反射板卡i的数据操作标志bi,包括:设定光纤反射板卡i交互数据的长度li,以及计算光纤反射板卡i交互数据存储地址的首地址其中/>根据以下公式计算:Step S402: Obtain the data operation flag b i of the optical fiber reflective board card i, including: setting the length l i of the interactive data of the optical fiber reflective board card i, and calculating the first address of the interactive data storage address of the optical fiber reflective board card i. Among them/> Calculated according to the following formula:

表示对于光纤反射板卡1,即占位序号最小的光纤反射板卡,其数据操作标志中的为光纤反射板卡交互数据所存储区域D的首地址D;而对于其他光纤反射板卡i(i=2,3,...,N),其数据操作标志中的/>为光纤反射板卡k的/>和lk之和,光纤反射板卡k根据以下方式获取:将所有光纤反射板卡的占位序号按照从小到大的顺序进行排序,寻找光纤反射板卡i占位序号Zi的前一占位序号Zk,该占位序号即对应于光纤反射板卡k。Indicates that for optical fiber reflective board 1, that is, the optical fiber reflective board with the smallest occupancy number, the data operation flag is the first address D of the area D where the interactive data of the optical fiber reflective board is stored; and for other optical fiber reflective board cards i (i=2, 3,...,N), the /> in their data operation flags For fiber optic reflective plate card k/> The sum of l k and l k, the optical fiber reflective board card k is obtained in the following way: sort the occupancy numbers of all optical fiber reflective board cards in ascending order, and find the previous occupancy of the optical fiber reflective board card i occupancy number Z i The bit sequence number Z k corresponds to the optical fiber reflection board card k.

具体的,所述光纤反射板卡i交互数据的长度li设定为该光纤反射板卡所需交互数据di的长度l_di,或者设定为:Specifically, the length l i of the interactive data of the optical fiber reflective board card i is set to the length l_d i of the interactive data di required by the optical fiber reflective board card, or is set to:

li=l_di+l′_di×20%l i =l_d i +l′_d i ×20%

其中,l′_di表示数据di中有效数据的长度。Among them, l′_d i represents the length of valid data in data di .

具体的,监测到任一光纤反射板卡的数据长度发生变化,清空所有光纤反射板卡的数据操作标志,按照原占位顺序,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网,包括:Specifically, it is detected that the data length of any optical fiber reflective board changes, clear the data operation flags of all optical fiber reflective boards, and write updated data in the data operation address of each optical fiber reflective board according to the original occupancy order. Operation flags to update the ad hoc network, including:

步骤S501、设定重新分配标志c,初始值为c0;所有光纤反射板卡均可读取重新分配标志c,存储地址为C;Step S501: Set the redistribution flag c, the initial value is c 0 ; all optical fiber reflective board cards can read the redistribution flag c, and the storage address is C;

步骤S502、光纤反射内存网络中任一光纤反射板卡j的数据操作长度lj发生变化时,更改初始重新分配标志c0为c1Step S502: When the data operation length l j of any optical fiber reflective card j in the optical fiber reflective memory network changes, change the initial redistribution flag c 0 to c 1 ;

步骤S503、光纤反射板卡读取到重新分配标志为c1时,清空所有光纤反射板卡的数据操作标志,按照原占位顺序,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网,并将重新分配标志c1还原为其初始值c0Step S503: When the optical fiber reflective board card reads that the reassignment flag is c 1 , it clears the data operation flags of all optical fiber reflective board cards, and writes the updated data operation address in the data operation address of each optical fiber reflective board card according to the original occupation sequence. The data operation flag updates the ad hoc network and restores the reassignment flag c 1 to its initial value c 0 .

与现有技术相比,本发明至少可实现如下有益效果之一:Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

1、本发明所述的协同仿真系统,通过采用组网通信模块,为仿真过程中的实时数据交互提供通道,保障了数据操作的正确性,提高了系统仿真结果的可靠性;1. The collaborative simulation system of the present invention uses a network communication module to provide a channel for real-time data interaction during the simulation process, ensuring the correctness of data operations and improving the reliability of system simulation results;

2、本发明所述的光纤自组网方法,能够基于各仿真节点的交互数据的长度为各光纤反射板卡自动地、无冲突地分配地址,同时在节点交互数据长度发生变化时,基于更新的数据,更新自组网,无需对光纤地址进行繁琐的设置和维护,保障了仿真系统在仿真过程中的实时数据交互;2. The optical fiber self-organizing network method of the present invention can automatically and conflict-freely allocate addresses to each optical fiber reflective board based on the length of the interactive data of each simulated node. At the same time, when the length of the node interactive data changes, based on the update The data updates the self-organizing network, eliminating the need for cumbersome setting and maintenance of fiber addresses, ensuring real-time data interaction of the simulation system during the simulation process;

3、通过将光纤反射板卡的各类数据存储至不同的区间,可以对数据进行分段管理,简化了编译程序,避免了数据混乱,更容易实现网络内的数据共享;3. By storing various types of data on the optical fiber reflective board in different intervals, the data can be managed in segments, simplifying the compilation process, avoiding data confusion, and making it easier to share data within the network;

4、相对于人工为光纤反射板卡预分配地址的方式,本发明的自组网方式,使光纤网络中的光纤反射板卡具有自主确定地址的能力,避免了人为失误;4. Compared with the method of manually pre-allocating addresses for optical fiber reflective boards, the self-organizing network method of the present invention enables the optical fiber reflective boards in the optical fiber network to have the ability to independently determine addresses, avoiding human errors;

5、相对于现有的自动地址分配方式,本方法为各个光纤反射板卡设定了不同的延迟启动时间,避免了同时上电启动的光纤反射板卡占据同一地址,造成数据冲突的情况。5. Compared with the existing automatic address allocation method, this method sets different delayed start times for each optical fiber reflective board, which avoids the situation where optical fiber reflective boards that are powered on at the same time occupy the same address and cause data conflicts.

本发明中,上述各技术方案之间还可以相互组合,以实现更多的优选组合方案。本发明的其他特征和优点将在随后的说明书中阐述,并且,部分优点可从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过说明书以及附图中所特别指出的内容中来实现和获得。In the present invention, the above technical solutions can also be combined with each other to achieve more preferred combination solutions. Additional features and advantages of the invention will be set forth in the description which follows, and in part, some advantages will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and obtained by the disclosure particularly pointed out in the description and drawings.

附图说明Description of the drawings

附图仅用于示出具体实施例的目的,而并不认为是对本发明的限制,在整个附图中,相同的参考符号表示相同的部件;The drawings are only for the purpose of illustrating specific embodiments and are not considered to be limitations of the present invention. Throughout the drawings, the same reference symbols represent the same components;

图1为本发明所述基于光纤自组网的协同仿真系统示意图;Figure 1 is a schematic diagram of the cooperative simulation system based on optical fiber ad hoc network according to the present invention;

图2为本发明所述光纤自组网方法的流程图;Figure 2 is a flow chart of the optical fiber self-organizing network method of the present invention;

图3为数据操作标志的组成和存储地址示意图。Figure 3 is a schematic diagram of the composition and storage address of data operation flags.

具体实施方式Detailed ways

下面结合附图来具体描述本发明的优选实施例,其中,附图构成本申请一部分,并与本发明的实施例一起用于阐释本发明的原理,并非用于限定本发明的范围。The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

本发明的一个具体实施例,公开了一种基于光纤自组网的协同仿真系统,如图1所示,包括通过光纤联通的N个仿真节点,其中,每个仿真节点均由仿真计算机和安装在其内的光纤反射板卡组成;A specific embodiment of the present invention discloses a collaborative simulation system based on optical fiber self-organizing network. As shown in Figure 1, it includes N simulation nodes connected through optical fiber. Each simulation node is composed of a simulation computer and an installation device. It consists of fiber optic reflective boards;

所述仿真计算机包括:任务规划模块,用于对仿真任务进行解析和规划;计算和控制模块,用于对仿真任务的模型进行解算并根据解算结果生成决策信息;数据管理模块,用于生成仿真节点的对外交互数据;以及组网通信模块,用于实现光纤自组网,为仿真系统提供实时的数据交互通道,以完成各仿真节点之间交互数据的通信;The simulation computer includes: a task planning module, used to analyze and plan the simulation task; a calculation and control module, used to solve the model of the simulation task and generate decision information based on the solution results; a data management module, used to Generate external interaction data of simulation nodes; and a networking communication module, which is used to implement optical fiber self-organizing network and provide a real-time data interaction channel for the simulation system to complete the communication of interactive data between simulation nodes;

所述光纤反射板卡与反射内存集线器连接,反射内存集线器作为数据中继系统,用于接收仿真节点的交互数据并转发至其他仿真节点。The optical fiber reflective board is connected to a reflective memory hub. The reflective memory hub serves as a data relay system for receiving interactive data from simulation nodes and forwarding it to other simulation nodes.

进一步的,所述仿真计算机还包括信息采集单元,用于采集各仿真节点的属性传输至任务规划模块,所述仿真节点的属性包括可执行任务的类型和数量以及最大并发数,任务规划模块基于各仿真节点的属性,为其分配相应的任务。Further, the simulation computer also includes an information collection unit for collecting the attributes of each simulation node and transmitting them to the task planning module. The attributes of the simulation node include the type and number of executable tasks and the maximum number of concurrencies. The task planning module is based on The attributes of each simulation node are assigned corresponding tasks.

具体的,所述协同仿真系统具有两种控制模式,分别为:集权式控制和分布式控制;Specifically, the collaborative simulation system has two control modes, namely: centralized control and distributed control;

所述集权式控制模式下,1个仿真节点作为管控节点,其余N-1个仿真节点作为计算节点,所述管控节点,具有统一决策和集中指挥的能力,用于在仿真过程中对多个计算节点的信息进行监控、并进行多源信息融合和分析,基于分析结果快速生成能使全局达到最佳效果的全局决策信息,作为对外交互数据下发至各计算节点;各计算节点基于光纤网络获取全局决策信息,其计算和控制模块基于该全局决策信息执行相应的仿真任务;集权式控制模式的优势在于:可以对飞行器集群统一规划、集中管理,提高了系统的决策效率。In the centralized control mode, one simulation node serves as the management and control node, and the remaining N-1 simulation nodes serve as computing nodes. The management and control node has the ability to make unified decisions and centralized command, and is used to control multiple systems during the simulation process. Monitor the information of computing nodes, conduct multi-source information fusion and analysis, and quickly generate global decision-making information that can achieve the best results based on the analysis results, and send it to each computing node as external interactive data; each computing node is based on the optical fiber network Global decision-making information is obtained, and its calculation and control modules perform corresponding simulation tasks based on the global decision-making information; the advantage of the centralized control mode is that it can uniformly plan and centrally manage the aircraft cluster, which improves the decision-making efficiency of the system.

所述分布式控制模式下,N个仿真节点并行地执行任务,每一仿真节点均具有自主决策和控制的能力,其各自的计算和控制模块可根据自身模型的解算结果,自主地控制仿真进程并生成决策信息;示例性的,该控制模式下,仿真节点的对外交互数据包括:该节点序号、模型的解算结果以及该节点生成的决策信息等;分布式控制模式下,部分节点的故障并不会影响整个系统的运行,因此系统鲁棒性和抗干扰能力强,且具有很高的灵活性。In the distributed control mode, N simulation nodes execute tasks in parallel. Each simulation node has the ability to make independent decisions and control. Its respective calculation and control modules can independently control the simulation based on the solution results of its own model. process and generate decision information; for example, in this control mode, the external interaction data of the simulation node includes: the node serial number, the solution result of the model, and the decision information generated by the node, etc.; in the distributed control mode, the external interaction data of some nodes Failure will not affect the operation of the entire system, so the system has strong robustness, anti-interference capabilities, and high flexibility.

实施时,先通过光纤将各仿真节点的光纤反射板卡连接至光纤反射内存集线器(HUB),HUB作为各仿真节点交互数据的接口和中继;接着根据仿真任务和需求,确定仿真系统的运行模式和参战节点的数目,其中,仿真系统的运行模式,可设为集权控制模式、分布式控制模式、亦或集权控制和分布式控制相结合的模式;由数据采集单元收集各仿真节点的属性,所述属性包括仿真节点的仿真模式(半实物仿真或数学仿真)、可执行的任务类型和数量、最大并发数等;任务规划模块基于自身仿真节点的属性,从仿真任务中解析出自身可执行的子任务,并综合考虑该节点的负载状况,为该仿真节点分配其可执行的子任务;计算和控制模块开启执行仿真任务,对仿真模型进行解算;以上涉及到的任务信息和模型解算过程中产生的数据均构成仿真节点的状态信息,数据管理模块从所述状态信息中获取该仿真节点的对外交互数据;示例性的,对外交互数据通常为仿真节点的任务信息、模型的位置、速度以及姿态信息、环境态势信息或者决策信息等;组网通信模块基于对外交互数据的长度,完成光纤自组网;基于该光纤网络,仿真系统完成数据交互。During implementation, first connect the optical fiber reflection board of each simulation node to the optical fiber reflection memory hub (HUB) through optical fiber. The HUB serves as the interface and relay for interactive data of each simulation node; then, determine the operation of the simulation system based on the simulation tasks and needs. mode and the number of participating nodes. Among them, the operating mode of the simulation system can be set to centralized control mode, distributed control mode, or a combination of centralized control and distributed control; the data acquisition unit collects the attributes of each simulation node , the properties include the simulation mode of the simulation node (semi-physical simulation or mathematical simulation), the type and number of executable tasks, the maximum number of concurrencies, etc.; the task planning module parses its own executable tasks from the simulation tasks based on the properties of its own simulation node. The subtasks to be executed, and the load status of the node is comprehensively considered, and the executable subtasks are assigned to the simulation node; the calculation and control module starts to execute the simulation task and solves the simulation model; the task information and model involved above The data generated during the solution process all constitute the status information of the simulation node, and the data management module obtains the external interaction data of the simulation node from the status information; exemplarily, the external interaction data is usually the task information of the simulation node, the model's Position, speed and attitude information, environmental situation information or decision-making information, etc.; the network communication module completes an optical fiber self-organizing network based on the length of external interaction data; based on this optical fiber network, the simulation system completes data interaction.

在仿真节点之间进行数据交互之前,需提前为各光纤反射板卡需要交互的数据指定存储地址,并将该数据写入该地址,如表1所示为各光纤反射板卡需要交互的数据(也即各仿真节点的交互数据)、该数据的存储地址以及该数据的长度。由于现有的人工指定地址的方式存在工作量大、容易失误等问题,本发明提出一种光纤自组网方法,目的是使网络根据各光纤反射板卡交互数据的长度,自动地、无冲突地为交互数据寻找存储地址,将交互数据写入其中,以便进行后续的数据交互;除此之外,该自组网方法能够在光纤反射板卡交互数据发生变化时,自动地为光纤反射板卡的数据存储地址进行重新分配,避免相邻光纤反射板卡的交互数据产生冲突。Before data interaction between simulation nodes, it is necessary to specify the storage address for the data that each fiber reflective board card needs to interact with in advance, and write the data to this address. Table 1 shows the data that each fiber optic reflective board card needs to interact with. (that is, the interactive data of each simulation node), the storage address of the data and the length of the data. Since the existing method of manually specifying addresses has problems such as heavy workload and easy error, the present invention proposes an optical fiber self-organizing network method. The purpose is to enable the network to automatically and conflict-free based on the length of interactive data of each optical fiber reflection board. In addition, the self-organizing network method can automatically find the storage address for the interactive data and write the interactive data into it for subsequent data interaction. In addition, this self-organizing network method can automatically provide the optical fiber reflective board with a new storage address when the interactive data of the optical fiber reflective board changes. The card's data storage address is reassigned to avoid conflicts in interactive data between adjacent optical fiber reflection boards.

表1各光纤反射板卡的交互数据、存储地址以及数据长度Table 1 Interaction data, storage address and data length of each optical fiber reflective board

存储内容Store content 存储地址(首地址D)Storage address (first address D) 数据长度Data length 板卡1的交互数据d1 Interaction data d 1 of board 1 地址D1 Address D 1 l_d1 l_d 1 板卡2的交互数据d2 Interaction data d 2 of board 2 地址D2 Address D 2 l_d2 l_d 2 ...... ...... ...... 板卡N的交互数据dN Interaction data d N of board N 地址DN Address D N l_dN l_d N

具体的,所述光纤自组网方法,如图2所示,包括:Specifically, the fiber self-organizing network method, as shown in Figure 2, includes:

为光纤反射内存网络内各个光纤反射板卡分别设定不同的延迟启动时间Ti;其中i=1,2,...,N,N是仿真节点的数目,也即光纤反射板卡的数目;Set different delayed start times T i for each optical fiber reflective board in the optical fiber reflective memory network; where i=1, 2,...,N, N is the number of simulation nodes, that is, the number of optical fiber reflective boards ;

光纤反射板卡i启动时间达到其延迟启动时间Ti后,执行以下操作:After the start-up time of optical fiber reflective board card i reaches its delayed start-up time T i , perform the following operations:

在光纤地址中首地址为A的区域,寻找自身的占位地址Ai,写入其占用标志ai;基于光纤反射板卡i的占位地址Ai,获取其占位序号Zi;基于光纤反射板卡i的占位序号Zi,获取自身的数据操作地址Bi,写入其数据操作标志bi;所述数据操作标志bi和li组成,li根据光纤反射板卡i交互数据的长度所设定,/>表示光纤反射板卡i交互数据存储地址的首地址;In the area where the first address of the optical fiber address is A, find its own placeholder address Ai , and write its occupancy mark ai ; based on the placeholder address Ai of the optical fiber reflection board card i, obtain its placeholder serial number Zi ; based on The occupancy sequence number Z i of the optical fiber reflection board card i obtains its own data operation address B i and writes its data operation flag b i ; the data operation flag bi is determined by It is composed of l i , l i is set according to the length of the interactive data of fiber reflection board card i,/> Indicates the first address of the interactive data storage address of the optical fiber reflective board card i;

所有光纤反射板卡完成上述操作,完成光纤自组网;All optical fiber reflective boards complete the above operations and complete the optical fiber self-organizing network;

并在监测到任一光纤反射板卡的数据长度发生变化,也即,任一仿真节点的交互数据的长度发生变化,清空所有光纤反射板卡的数据操作标志,按照原占位顺序,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网,具体操作包括:And when it is detected that the data length of any optical fiber reflective board changes, that is, the length of the interactive data of any simulation node changes, clear the data operation flags of all optical fiber reflective boards, and follow the original occupancy order. Write the updated data operation flag in the data operation address of the optical fiber reflection board card to update the ad hoc network. Specific operations include:

步骤S501、设定重新分配标志c,初始值为c0;所有光纤反射板卡均可读取重新分配标志c,存储地址为C;Step S501: Set the redistribution flag c, the initial value is c 0 ; all optical fiber reflective board cards can read the redistribution flag c, and the storage address is C;

示例性的,重新分配标志的初始值c0可设定为连续N位都为1的数,比如光纤反射板卡的接入数目为8,则可设c0=0xFF,光纤反射板卡的接入数目为10,则c0=0x3FF;For example, the initial value c 0 of the reassignment flag can be set to a number in which N consecutive bits are all 1. For example, if the number of optical fiber reflection boards connected is 8, then c 0 =0xFF can be set. The number of accesses is 10, then c 0 =0x3FF;

步骤S502、光纤反射内存网络中任一光纤反射板卡j的数据操作长度lj发生变化时,更改初始重新分配标志c0为c1Step S502: When the data operation length l j of any optical fiber reflective card j in the optical fiber reflective memory network changes, change the initial redistribution flag c 0 to c 1 ;

示例性的,当任一光纤反射板卡的数据操作长度发生变化,意味着光纤反射板卡所需传递的数据内容发生变化,若仍按照原数据操作标志指定的存储地址存储光纤反射板卡传递的数据,可能会造成与其他光纤反射板卡的数据发生冲突,此时可主动将重新分配标志更改为c1=0x1;For example, when the data operation length of any optical fiber reflective board changes, it means that the data content to be transmitted by the optical fiber reflective board changes. If the optical fiber reflective board is still stored according to the storage address specified by the original data operation flag for transmission, The data may conflict with the data of other optical fiber reflective boards. At this time, you can actively change the redistribution flag to c 1 = 0x1;

步骤S503、光纤反射板卡读取到重新分配标志为c1时,清空所有光纤反射板卡的数据操作标志,按照原占位序号,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网,并将重新分配标志c1还原为其初始值c0Step S503: When the optical fiber reflective board card reads that the reassignment flag is c 1 , it clears the data operation flags of all optical fiber reflective board cards, and writes the updated data operation address in the data operation address of each optical fiber reflective board card according to the original occupancy sequence number. The data operation flag updates the ad hoc network and restores the reassignment flag c 1 to its initial value c 0 .

具体的,为光纤反射内存网络内各个光纤反射板卡分别设定不同的延迟启动时间,操作如下:Specifically, set different delayed start times for each optical fiber reflective board in the optical fiber reflective memory network. The operation is as follows:

步骤S101、为各光纤反射板卡设定GUID,作为区分各个光纤反射板卡的唯一标识符,所述任一光纤反射板卡的GUID与其他光纤反射板卡的GUID均不相同;具体的,每个GUID均为16字节;Step S101: Set a GUID for each optical fiber reflective board card as a unique identifier to distinguish each optical fiber reflective board card. The GUID of any optical fiber reflective board card is different from the GUID of other optical fiber reflective board cards; specifically, Each GUID is 16 bytes;

步骤S102、以各光纤反射板卡的GUID分别作为随机数种子,为每一光纤反射板块产生各不相同的随机正整数Ri;所述任一光纤反射板卡i的随机正整数Ri满足:Step S102: Use the GUID of each optical fiber reflective board card as a random number seed to generate a different random positive integer Ri for each optical fiber reflective board card; the random positive integer Ri of any optical fiber reflective board card i satisfies :

1≤Ri≤10N,1≤R i ≤10N,

其中,i=1,2,...,N,N为网络中可容纳的光纤反射板卡的数目;Among them, i=1, 2,...,N, N is the number of optical fiber reflective boards that can be accommodated in the network;

步骤S103、基于各光纤反射板卡的随机正整数Ri,设定各光纤反射板卡的延迟启动时间Ti=t0×RiStep S103: Based on the random positive integer R i of each optical fiber reflective board card, set the delayed start time Ti =t 0 ×R i of each optical fiber reflective board card;

具体的,随机数种子选为光纤反射板卡GUID的低32位,优选的,t0可取为10ms,按照以上步骤所设定的延迟启动时间满足:1)、任意两光纤反射板卡的延迟启动时间的间隔不小于10ms;2)、光纤反射板卡的延迟启动时间处于Ti∈[10,1000]ms。Specifically, the random number seed is selected as the lower 32 bits of the GUID of the optical fiber reflective board. Preferably, t 0 can be taken as 10ms. The delayed start time set according to the above steps satisfies: 1), the delay of any two optical fiber reflective boards The interval between start-up times is not less than 10ms; 2) The delayed start-up time of the optical fiber reflection board is Ti ∈ [10, 1000]ms.

具体的,光纤反射板卡i的启动时间达到其延迟启动时间Ti后,寻找自身的占位地址Ai,写入其占用标志ai,包括:Specifically, after the start-up time of the optical fiber reflective board card i reaches its delayed start-up time T i , it searches for its own occupancy address A i and writes its occupancy flag a i , including:

步骤S201、顺序读取以A为首地址的占用区域A1~AN′中存储的数据a1~aN′,将任一地址AX处的数据aX与任一光纤反射板卡的占用标志对比,判断该处是否被占用;Step S201: Sequentially read the data a 1 to a N′ stored in the occupied areas A 1 to A N with addresses starting with A , and combine the data a X at any address A Compare the signs to determine whether the place is occupied;

具体的,如表2所示,光纤反射板卡的占用标志由数据a1和光纤反射板卡的GUID组成,所述数据a1为4个字节,所有光纤反射板卡占用标志中的a1均相同;示例性的,a1可设为0x03070307;Specifically, as shown in Table 2, the occupancy flag of the optical fiber reflective board card is composed of data a 1 and the GUID of the optical fiber reflective board card. The data a 1 is 4 bytes. The occupancy flag of all optical fiber reflective board cards is a 1 are the same; for example, a 1 can be set to 0x03070307;

进一步的,在判断AX处地址是否被占用时,只需观察该处数据aX中的前4个字节是否为a1即可;若是,则此处已被占用;进一步根据数据aX中的后16个字节,即GUID,便可确定占用该处地址光纤反射板卡的身份信息;Furthermore , when judging whether the address at A The last 16 bytes, that is, the GUID, can determine the identity information of the optical fiber reflective board card occupying that address;

步骤S202、当寻找到一个未被占用的地址Ai,则将光纤反射板卡i的占用标志ai写入此处;Step S202: When an unoccupied address A i is found, write the occupation flag a i of the optical fiber reflection plate card i here;

换句话说,将依据步骤S201搜寻到的第一个空地址作为光纤反射板卡i的占位地址,在此处写入其占用标志,由a1与光纤反射板卡i的GUID组成。In other words, the first empty address searched according to step S201 is used as the placeholder address of the optical fiber reflective board card i, and its occupancy flag is written here, which is composed of a 1 and the GUID of the optical fiber reflective board card i.

表2占用标志的组成与存储地址Table 2 The composition and storage address of the occupancy flag

具体的,基于光纤反射板卡i的占位地址Ai,获取其占位序号Zi,包括:Specifically, based on the occupancy address A i of the optical fiber reflection board card i, its occupancy sequence number Z i is obtained, including:

步骤S301、计算光纤反射板卡i的占位地址Ai相对于首地址A的偏移量piStep S301: Calculate the offset p i of the placeholder address A i of the optical fiber reflective plate card i relative to the first address A;

步骤S302、基于偏移量pi,设定光纤反射板卡i的占位序号ZiStep S302: Based on the offset p i , set the occupancy number Zi of the optical fiber reflection plate card i:

Zi=0x1<<piZ i =0x1<<p i ,

即为0x1向左偏移pi位。That is, 0x1 is shifted to the left by p i bits.

进一步的,基于光纤反射板卡i的占位序号Zi,获取自身的数据操作地址Bi,写入其数据操作标志bi,包括:Further, based on the occupancy sequence number Zi of the optical fiber reflective board card i , obtain its own data operation address B i and write its data operation flag b i , including:

步骤S401、基于光纤反射板卡i的占位序号Zi,确定光纤反射板卡i的数据操作地址Bi;具体的,光纤反射板卡i的数据操作地址Bi为:首地址B偏移Zi×8位;Step S401: Based on the occupancy sequence number Zi of the optical fiber reflective board card i, determine the data operation address B i of the optical fiber reflective board card i; specifically, the data operation address B i of the optical fiber reflective board card i is: offset of the first address B Z i ×8 bits;

步骤S402、在数据操作地址Bi处,写入光纤反射板卡i的数据操作标志biStep S402: Write the data operation flag bi of the optical fiber reflection board card i at the data operation address Bi ;

具体的,如表3所示,所述数据操作标志bi和li组成,li为设定的光纤反射板卡i交互数据的长度,/>表示光纤反射板卡i交互数据存储地址的首地址;Specifically, as shown in Table 3, the data operation flag b i is composed of It is composed of l i , l i is the length of the set interactive data of optical fiber reflection board card i,/> Indicates the first address of the interactive data storage address of the optical fiber reflective board card i;

其中,根据以下规则计算:in, Calculated according to the following rules:

表示对于光纤反射板卡1,即占位序号最小的光纤反射板卡,其数据操作标志中的为光纤反射板卡交互数据所存储区域D的首地址D;而对于其他光纤反射板卡i(i=2,3,...,N),其数据操作标志中的/>为光纤反射板卡k的/>和lk之和,光纤反射板卡k根据以下方式获取:将所有光纤反射板卡的占位序号按照从小到大的顺序进行排序,寻找光纤反射板卡i占位序号Zi的前一占位序号Zk,该占位序号则对应于光纤反射板卡k;Indicates that for optical fiber reflective board 1, that is, the optical fiber reflective board with the smallest occupancy number, the data operation flag is the first address D of the area D where the interactive data of the optical fiber reflective board is stored; and for other optical fiber reflective board cards i (i=2, 3,...,N), the /> in their data operation flags For fiber optic reflective plate card k/> The sum of l k and l k, the optical fiber reflective board card k is obtained according to the following method: sort the occupancy serial numbers of all optical fiber reflective board cards in ascending order, and find the previous occupancy of the optical fiber reflective board card i occupancy serial number Z i Bit sequence number Z k , which corresponds to the optical fiber reflective plate card k;

设定光纤反射板卡i交互数据的长度li时遵循以下规则:将li设定为该光纤反射板卡所需交互的数据di的长度l_di,或者优选的,将li设定为大于该光纤反射板卡所需交互的数据di的长度l_di,具体的:When setting the length l i of the interactive data of the optical fiber reflective board card i , follow the following rules: set l i to the length l_d i of the data di required for the optical fiber reflective board card to interact, or preferably, set l i It is the length l_d i that is greater than the data di required for interaction with the optical fiber reflective board, specifically:

其中,l′_di表示数据di中有效数据的长度,即在设定光纤反射板卡数据长度li时预留一定的余量,作为备用。各光纤反射板卡的数据操作标志与其存储地址如图3所示。Among them, l'_d i represents the length of the valid data in the data d i , that is, a certain margin is reserved as a backup when setting the data length li of the optical fiber reflection board card. The data operation flags and storage addresses of each optical fiber reflection board are shown in Figure 3.

表3数据操作标志的组成与存储地址Table 3 Composition and storage address of data operation flags

等待所有光纤反射板卡完成上述1)在区域A寻找占位地址写入占位标志ai,2)基于占位地址获取其占位序号Zi,以及3)在区域B寻找数据操作标志的地址并写入数据操作标志bi后,完成光纤自组网。Wait for all fiber optic reflective boards to complete the above 1) Find the placeholder address in area A and write the placeholder flag a i , 2) Obtain its placeholder serial number Z i based on the placeholder address, and 3) Find the data operation flag in area B After entering the address and writing the data operation flag b i , the optical fiber self-organizing network is completed.

实施时,读取操作为:光纤反射板卡i读取光纤反射板卡j的数据时,根据光纤反射板卡j的GUID获取其占位地址,继而得到其占位序号Zj和数据操作标志的地址Bj,读取其数据操作标志bj,即可得知光纤反射板卡j的交互数据dj的存储空间Dj,读取此处的交互数据即可;写入操作为:反射板卡i向光纤地址中写入数据时,根据自身的GUID依次获取其占位地址、占位序号Zi和数据操作标志的地址Bi,读取Bi处的数据操作标志bj,即可得知光纤反射板卡i交互数据di的存储地址Di,在此处写入di即可。When implemented, the reading operation is: when the optical fiber reflective board card i reads the data of the optical fiber reflective board card j, it obtains its placeholder address according to the GUID of the optical fiber reflection board card j, and then obtains its placeholder serial number Z j and data operation flag Address B j , read its data operation flag b j , you can know the storage space D j of interactive data d j of optical fiber reflection board j, just read the interactive data here; the writing operation is: reflection When board i writes data to the optical fiber address, it obtains its placeholder address, placeholder serial number Z i and the address B i of the data operation flag in sequence according to its own GUID, and reads the data operation flag b j at B i , that is It can be known that the storage address D i of the interactive data di of the optical fiber reflective plate card i is simply written here.

与现有技术相比,本实施例提供的基于光纤自组网的协同仿真系统,至少具备以下有益效果之一:1、本发明所述的协同仿真系统,通过采用组网通信模块,为仿真过程中的实时数据交互提供通道,保障了数据操作的正确性,提高了系统仿真结果的可靠性;2、本发明所述的光纤自组网方法,能够基于各仿真节点的交互数据的长度为各光纤反射板卡自动地、无冲突地分配地址,同时在节点交互数据长度发生变化时,基于更新的数据,更新自组网,无需对光纤地址进行繁琐的设置和维护,保障了仿真系统在仿真过程中的实时数据交互;3、通过将光纤反射板卡的各类数据存储至不同的区间,可以对数据进行分段管理,简化了编译程序,避免了数据混乱,更容易实现网络内的数据共享;4、相对于人工为光纤反射板卡预分配地址的方式,本发明的自组网方式,使光纤网络中的光纤反射板卡具有自主确定地址的能力,避免了人为失误;5、相对于现有的自动地址分配方式,本方法为各个光纤反射板卡设定了不同的延迟启动时间,避免了同时上电启动的光纤反射板卡占据同一地址,造成数据冲突的情况。Compared with the existing technology, the collaborative simulation system based on the optical fiber self-organizing network provided by this embodiment has at least one of the following beneficial effects: 1. The collaborative simulation system of the present invention adopts a network communication module to provide simulation Real-time data interaction in the process provides a channel, ensuring the correctness of data operations and improving the reliability of system simulation results; 2. The optical fiber self-organizing network method of the present invention can be based on the length of the interactive data of each simulation node. Each optical fiber reflective board automatically assigns an address without conflict. At the same time, when the length of node interaction data changes, the self-organizing network is updated based on the updated data, eliminating the need for cumbersome setting and maintenance of optical fiber addresses, ensuring that the simulation system is in good condition. Real-time data interaction during the simulation process; 3. By storing various data of the optical fiber reflection board in different intervals, the data can be managed in segments, which simplifies the compilation program, avoids data confusion, and makes it easier to implement within the network Data sharing; 4. Compared with the method of manually pre-allocating addresses for optical fiber reflective boards, the self-organizing network method of the present invention enables the optical fiber reflective boards in the optical fiber network to have the ability to independently determine addresses, avoiding human errors; 5. Compared with the existing automatic address allocation method, this method sets different delayed start times for each optical fiber reflective board, which avoids the situation where optical fiber reflective boards that are powered on at the same time occupy the same address and cause data conflicts.

本领域技术人员可以理解,实现上述实施例方法的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读存储介质中。其中,所述计算机可读存储介质为磁盘、光盘、只读存储记忆体或随机存储记忆体等。Those skilled in the art can understand that all or part of the process of implementing the method of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in 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 above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of changes or modifications within the technical scope disclosed in the present invention. All substitutions are within the scope of the present invention.

Claims (10)

1.一种基于光纤自组网的协同仿真系统,其特征在于,包括通过光纤联通的N个仿真节点,其中,每个仿真节点均由仿真计算机和安装在其内的光纤反射板卡组成;1. A collaborative simulation system based on optical fiber self-organizing network, characterized by including N simulation nodes connected through optical fiber, wherein each simulation node is composed of a simulation computer and an optical fiber reflective board installed therein; 所述仿真计算机包括:任务规划模块,用于对仿真任务进行解析和规划;计算和控制模块,用于对仿真模型进行解算并根据解算结果生成决策信息;数据管理模块,用于生成仿真节点的对外交互数据;以及组网通信模块,用于实现光纤自组网,为仿真系统提供实时的数据交互通道,以完成各仿真节点之间交互数据的通信;The simulation computer includes: a task planning module, used to analyze and plan simulation tasks; a calculation and control module, used to solve the simulation model and generate decision-making information based on the solution results; a data management module, used to generate simulation The external interaction data of the nodes; and the network communication module, which is used to realize the optical fiber self-organizing network and provide a real-time data interaction channel for the simulation system to complete the communication of interactive data between the simulation nodes; 所述光纤反射板卡与反射内存集线器连接,反射内存集线器作为数据中继系统,用于接收仿真节点的交互数据并转发至其他仿真节点。The optical fiber reflective board is connected to a reflective memory hub. The reflective memory hub serves as a data relay system for receiving interactive data from simulation nodes and forwarding it to other simulation nodes. 2.根据权利要求1所述的基于光纤自组网的协同仿真系统,其特征在于,所述仿真计算机还包括信息采集单元,用于采集各仿真节点的属性传输至任务规划模块,所述仿真节点的属性包括可执行任务的类型和数量以及最大并发数,任务规划模块基于各仿真节点的属性,为其分配相应的任务。2. The collaborative simulation system based on optical fiber ad hoc network according to claim 1, characterized in that the simulation computer also includes an information collection unit for collecting attributes of each simulation node and transmitting them to the task planning module. The attributes of the nodes include the type and number of executable tasks and the maximum number of concurrencies. The task planning module allocates corresponding tasks to each simulation node based on its attributes. 3.根据权利要求2所述的基于光纤自组网的协同仿真系统,其特征在于,所述协同仿真系统具有两种控制模式,分别为:集权式控制和分布式控制;3. The collaborative simulation system based on optical fiber ad hoc network according to claim 2, characterized in that the collaborative simulation system has two control modes, namely: centralized control and distributed control; 所述集权式控制模式下,1个仿真节点作为管控节点,其余N-1个仿真节点作为计算节点,所述管控节点,用于将多个计算节点的信息进行融合和分析,基于分析结果生成全局决策信息,下发至各计算节点;In the centralized control mode, one simulation node serves as the management node, and the remaining N-1 simulation nodes serve as computing nodes. The management and control nodes are used to fuse and analyze the information of multiple computing nodes, and generate based on the analysis results. Global decision-making information is distributed to each computing node; 所述分布式控制模式下,N个仿真节点的计算和控制模块分别根据自身的模型解算状态,自主控制仿真进程和生成决策信息。In the distributed control mode, the calculation and control modules of N simulation nodes independently control the simulation process and generate decision information according to their own model solution status. 4.根据权利要求1-3任一项所述的基于光纤自组网的协同仿真系统,其特征在于,所述组网通信模块,采用如下自组网方法,包括:4. The cooperative simulation system based on optical fiber ad hoc network according to any one of claims 1 to 3, characterized in that the network communication module adopts the following ad hoc network method, including: 设定各光纤反射板卡所需交互数据的长度li;所述光纤反射板卡所需交互数据为其所在的仿真节点的交互数据;Set the length l i of the interactive data required by each optical fiber reflective board; the interactive data required by the optical fiber reflective board is the interactive data of the simulation node where it is located; 为各光纤反射板卡分别设定不同的延迟启动时间TiSet different delayed start times Ti for each optical fiber reflective board card; 光纤反射板卡i启动时间达到其延迟启动时间Ti后,执行以下操作:After the start-up time of optical fiber reflective board card i reaches its delayed start-up time T i , perform the following operations: 在光纤地址中首地址为A的区域,寻找自身的占位地址Ai,写入其占用标志ai;基于光纤反射板卡i的占位地址Ai,获取其占位序号Zi;基于光纤反射板卡i的占位序号Zi,获取自身的数据操作地址Bi,写入其数据操作标志bi;所述数据操作标志bi和li组成,li为光纤反射板卡i的交互数据长度,/>表示光纤反射板卡i所需交互数据di存储地址的首地址;In the area where the first address of the optical fiber address is A, find its own placeholder address Ai , and write its occupancy mark ai ; based on the placeholder address Ai of the optical fiber reflection board card i, obtain its placeholder serial number Zi ; based on The occupancy sequence number Z i of the optical fiber reflection board card i obtains its own data operation address B i and writes its data operation flag b i ; the data operation flag bi is determined by It is composed of l i , l i is the interactive data length of optical fiber reflection board card i,/> Represents the first address of the storage address of the interactive data di required by the optical fiber reflective board card i; 所有光纤反射板卡完成上述操作,完成光纤自组网;All optical fiber reflective boards complete the above operations and complete the optical fiber self-organizing network; 监测到任一光纤反射板卡的数据长度发生变化,清空所有光纤反射板卡的数据操作标志,按照原占位顺序,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网。Detect the change in the data length of any optical fiber reflective board, clear the data operation flags of all optical fiber reflective boards, and write the updated data operation flags in the data operation addresses of each optical fiber reflective board according to the original occupancy sequence. Update ad hoc network. 5.根据权利要求4所述的基于光纤自组网的协同仿真系统,其特征在于,所述为各光纤反射板卡分别不同的设定延迟启动时间,包括:5. The cooperative simulation system based on optical fiber self-organizing network according to claim 4, characterized in that the delay start time is set differently for each optical fiber reflection board, including: 步骤S101、为各光纤反射板卡设定GUID,所述任一光纤反射板卡的GUID与其他光纤反射板卡的GUID均不相同;Step S101: Set a GUID for each optical fiber reflective board card. The GUID of any optical fiber reflective board card is different from the GUID of other optical fiber reflective board cards; 步骤S102、以各光纤反射板卡的GUID分别作为随机数种子,为各光纤反射板卡分别产生各不相同的随机正整数Ri;所述任一光纤反射板卡i的随机正整数Ri满足:Step S102: Use the GUID of each optical fiber reflective board card as a random number seed to generate a different random positive integer R i for each optical fiber reflective board card; the random positive integer R i of any optical fiber reflective board card i satisfy: 1≤Ri≤10N;1≤R i ≤10N; 其中,i=1,2,…,N,N为光纤反射板卡的数量;Among them, i=1,2,...,N, N is the number of optical fiber reflective boards; 步骤S103、基于各光纤反射板卡的随机正整数Ri,设定各光纤反射板卡的延迟启动时间Ti=t0×RiStep S103: Based on the random positive integer R i of each optical fiber reflective plate card, set the delayed start time Ti = t 0 ×R i of each optical fiber reflective plate card. 6.根据权利要求5所述的基于光纤自组网的协同仿真系统,其特征在于,所述光纤反射板卡i寻找自身的占位地址Ai,写入其占用标志ai,包括:6. The collaborative simulation system based on optical fiber ad hoc network according to claim 5, characterized in that the optical fiber reflective board card i looks for its own occupancy address A i and writes its occupancy mark a i , including: 步骤S201、顺序读取以A为首地址的占用区域A1~AN′中存储的数据a1~aN′,将任一地址AX处的数据aX与任一光纤反射板卡的占用标志对比,判断该处是否被占用;Step S201: Sequentially read the data a 1 to a N′ stored in the occupied areas A 1 to A N with addresses starting with A , and combine the data a X at any address A Compare the signs to determine whether the place is occupied; 步骤S202、当寻找到一个未被占用的地址Ai,则将光纤反射板卡i的占用标志ai写入此处;Step S202: When an unoccupied address A i is found, write the occupation flag a i of the optical fiber reflection plate card i here; 所述光纤反射板卡i的占用标志ai由数据a1和光纤反射板卡i的GUID组成,所述数据a1为4个字节,所有光纤反射板卡占用标志中的a1均相同。The occupancy flag a i of the optical fiber reflective board card i consists of data a 1 and the GUID of the optical fiber reflective board card i. The data a 1 is 4 bytes, and a 1 in the occupancy flags of all optical fiber reflective board cards is the same. . 7.根据权利要求6所述的基于光纤自组网的协同仿真系统,其特征在于,所述基于光纤反射板卡i的占位地址Ai,获取其占位序号Zi,包括:7. The cooperative simulation system based on optical fiber self-organizing network according to claim 6, characterized in that, based on the placeholder address Ai of the fiber reflection board i, obtaining its placeholder serial number Zi includes: 步骤S301、计算光纤反射板卡i的占位地址Ai相对于首地址A的偏移量piStep S301: Calculate the offset p i of the placeholder address A i of the optical fiber reflective plate card i relative to the first address A; 步骤S302、基于偏移量pi,设定光纤反射板卡i的占位序号ZiStep S302: Based on the offset p i , set the occupancy number Zi of the optical fiber reflection plate card i: Zi=0x1<<piZ i =0x1<<p i , 即为0x1向左偏移pi位。That is, 0x1 is shifted to the left by p i bits. 8.根据权利要求7所述的基于光纤自组网的协同仿真系统,其特征在于,所述基于光纤反射板卡i的占位序号Zi,获取自身的数据操作地址Bi,写入其数据操作标志bi,包括:8. The collaborative simulation system based on optical fiber self-organizing network according to claim 7, characterized in that, based on the occupancy serial number Zi of the optical fiber reflective board i, obtain its own data operation address Bi, and write it Data operation flags bi , including: 步骤S401、基于光纤反射板卡i的占位序号Zi,确定光纤反射板卡i的数据操作地址Bi为:首地址B偏移Zi×8位;Step S401: Based on the occupancy sequence number Zi of the optical fiber reflective board card i , determine the data operation address B i of the optical fiber reflective board card i as: the first address B is offset by Z i × 8 bits; 步骤S402、获取光纤反射板卡i的数据操作标志bi,包括:设定光纤反射板卡i交互数据的长度li,以及计算光纤反射板卡i交互数据存储地址的首地址其中/>根据以下公式计算:Step S402: Obtain the data operation flag b i of the optical fiber reflective board card i, including: setting the length l i of the interactive data of the optical fiber reflective board card i, and calculating the first address of the interactive data storage address of the optical fiber reflective board card i. Among them/> Calculated according to the following formula: 表示对于光纤反射板卡1,即占位序号最小的光纤反射板卡,其数据操作标志中的为光纤反射板卡交互数据所存储区域D的首地址D;而对于其他光纤反射板卡i(i=2,3,…,N),其数据操作标志中的/>为光纤反射板卡k的/>和lk之和,光纤反射板卡k根据以下方式获取:将所有光纤反射板卡的占位序号按照从小到大的顺序进行排序,寻找光纤反射板卡i占位序号Zi的前一占位序号Zk,该占位序号即对应于光纤反射板卡l。Indicates that for optical fiber reflective board 1, that is, the optical fiber reflective board with the smallest occupancy number, the data operation flag is the first address D of the area D where the interactive data of the optical fiber reflective board card is stored; and for other optical fiber reflective board cards i (i=2,3,...,N), the /> in its data operation flag For fiber optic reflective plate card k/> The sum of l k and l k, the optical fiber reflective board card k is obtained in the following way: sort the occupancy numbers of all optical fiber reflective board cards in ascending order, and find the previous occupancy of the optical fiber reflective board card i occupancy number Z i The bit sequence number Z k corresponds to the optical fiber reflective plate card l. 9.根据权利要求4所述的基于光纤自组网的协同仿真系统,其特征在于,所述光纤反射板卡i交互数据的长度li设定为该光纤反射板卡所需交互数据di的长度l_di,或者设定为:9. The cooperative simulation system based on the optical fiber self-organizing network according to claim 4, characterized in that the length l i of the interactive data of the optical fiber reflective board i is set to the required interactive data d i of the optical fiber reflective board The length l_d i , or set to: li=l_di+l′_di×20%l i =l_d i +l′_d i ×20% 其中,l′_di表示数据di中有效数据的长度。Among them, l′_d i represents the length of valid data in data di . 10.根据权利要求4所述的基于光纤自组网的协同仿真系统,其特征在于,监测到任一光纤反射板卡的数据长度发生变化,清空所有光纤反射板卡的数据操作标志,按照原占位顺序,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网,包括:10. The cooperative simulation system based on the optical fiber self-organizing network according to claim 4, characterized in that when the data length of any optical fiber reflective board is detected to change, the data operation flags of all optical fiber reflective boards are cleared, and the data operation flags are cleared according to the original In the order of occupancy, write the updated data operation flag in the data operation address of each optical fiber reflection board card to update the ad hoc network, including: 步骤S501、设定重新分配标志c,初始值为c0;所有光纤反射板卡均可读取重新分配标志c,存储地址为C;Step S501: Set the redistribution flag c, the initial value is c 0 ; all optical fiber reflective board cards can read the redistribution flag c, and the storage address is C; 步骤S502、光纤反射内存网络中任一光纤反射板卡j的数据操作长度lj发生变化时,更改初始重新分配标志c0为c1Step S502: When the data operation length l j of any optical fiber reflective card j in the optical fiber reflective memory network changes, change the initial redistribution flag c 0 to c 1 ; 步骤S503、光纤反射板卡读取到重新分配标志为c1时,清空所有光纤反射板卡的数据操作标志,按照原占位顺序,在各光纤反射板卡的数据操作地址中写入更新的数据操作标志,更新自组网,并将重新分配标志c1还原为其初始值c0Step S503: When the optical fiber reflective board card reads that the reassignment flag is c 1 , it clears the data operation flags of all optical fiber reflective board cards, and writes the updated data operation address in the data operation address of each optical fiber reflective board card according to the original occupation sequence. The data operation flag updates the ad hoc network and restores the reassignment flag c 1 to its initial value c 0 .
CN202311729289.6A 2023-12-15 2023-12-15 A 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 A 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 A 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 A 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
CN101819506B (en) Storage subsystem and storage system architecture and method for implementing storage virtualization
JP4394624B2 (en) Computer system and I / O bridge
CN105589754A (en) Mechanism and method for accessing data in a shared memory
US7240135B2 (en) Method of balancing work load with prioritized tasks across a multitude of communication ports
CN109451540B (en) Resource allocation method and equipment for network slices
US20180189109A1 (en) Management system and management method for computer system
CN111885550B (en) Distributed autonomous mobile robot scheduling system
CN111490948B (en) Route configuration method, device and medium for SIRO switching system
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
CN103827803A (en) Computer system and management system for performance optimisation in a storage network
Yang et al. A distributed task reassignment method in dynamic environment for multi-UAV system
Zeng et al. The simpler the better: An indexing approach for shared-route planning queries
CN114650223B (en) Network configuration method and device of Kubernetes cluster and electronic equipment
CN112052100B (en) Virtual machine communication method and device based on shared memory
CN101369934B (en) Network analogue method and system
CN116016162A (en) Node scheduling method, device, equipment and medium
JP4452023B2 (en) Apparatus and method for transferring data from one partition of a partitioned computer system to another
CN117729121A (en) A collaborative simulation system based on optical fiber ad hoc network
CN118612156A (en) A traffic scheduling system and method for data center
CN111796932A (en) GPU resource scheduling method
CN117880281A (en) Data transmission method and computing device
CN111949570B (en) Method and system for automatically allocating reflective memory addresses based on XML format
CN116389414A (en) Address allocation method, multi-device system and storage medium
CN117938810A (en) A collaborative simulation data interaction method based on optical fiber ad hoc network
CN108694102A (en) A kind of data manipulation method, equipment, system and medium based on Nexus services

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