Distributed data blackboard synchronization system based on centerless publishing and subscribing mechanism
By adopting a centerless publishing and subscription mechanism in the distributed simulation training system, an end-to-end publishing and subscription relationship between local nodes and external nodes is established, and efficient synchronous sharing of distributed data blackboards is realized, solving the problems of difficult dispersing computing loads and difficult decoupling of services and data in the existing technology.
Patent Information
- Application Number
- CN202510247186.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-03
AI Technical Summary
The prior art is difficult to achieve efficient and flexible data synchronization and sharing in distributed simulation training systems, resulting in difficult dispersion of computing load, difficult decoupling of services and data, and unable to provide effective communication flow control, resulting in communication bottlenecks.
The centerless publishing and subscription mechanism is adopted, and the end-to-end publishing and subscription relationship between the local node and the external node is established through role publishing and subscription configuration management, a two-way transmission channel is established, and the node reflector and data blackboard are used for data filtering, encoding, packaging, and compression, realizing dynamic update and synchronization of data.
It realizes synchronous sharing of distributed data blackboards, simplifies publish and subscription relationship management between end-to-end nodes, disperses the computing load, decouples services and data, provides effective communication flow control, and solves the communication bottleneck problem.
Smart Images

Figure CN120091023A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulation systems, and in particular to a distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism. Background Art
[0002] In recent years, with the continuous expansion of the scale of simulation training and the increasing complexity of training elements, training processes, and training operations, it is necessary to integrate various simulation training equipment, actual equipment, computer-generated force models, etc. into a distributed training environment. Therefore, large-scale distributed simulation training systems require an efficient and flexible data synchronization and sharing mechanism that can freely configure participating nodes according to training requirements and support dynamic adjustment of training operations.
[0003] The data blackboard mechanism uses shared memory to provide a common space for various business calculations, divides interactive data into entities, entity-owned description sub-elements, and messages, and can provide a completely decoupled technical architecture for business processing. It is an efficient operation framework for distributed multi-agent models. Currently, the methods for solving distributed data blackboard synchronization mainly include: relying on a general-purpose publish-subscribe middleware and implementing it through the publish-subscribe mechanism of a centralized service, but it is extremely inconvenient to manage publish-subscribe relationships and modify data structures, and there are various transformations between data structures; using the broadcast method to propagate all data changes to all nodes, and each node filters the required data according to its needs, resulting in difficulties in effectively separating business processing and data exchange. These above methods are difficult to disperse the computing load, the business and data are difficult to decouple, and it is impossible to provide effective communication traffic control, resulting in communication bottlenecks, and it is very difficult to solve problems such as business function tailoring, computing load balancing, and system scale expansion. Summary of the Invention
[0004] The purpose of the present invention is to provide a distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism to solve the problem of distributed data blackboard synchronization and sharing for the above-mentioned deficiencies of the prior art.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] The present invention provides a distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism, including the following steps:
[0007] S1. Through role-based publish-subscribe configuration management, establish a publish-subscribe relationship between the local node and the external end-to-end node, create a node manager and a publish manager to manage the external end-to-end node, and start a subscription server and a dynamic connection monitoring server to establish a two-way publish-subscribe transmission channel and monitor the CPU utilization rate in real time;
[0008] S2. Connect to the data blackboard through the node reflector, and obtain the dynamic update data of the entity table, entity status table, descriptor table, and message table for each external node in the form of filtering, encoding, packing, and compressing;
[0009] S3. Through the external end-to-end node subscription server, establish a one-to-one unidirectional transmission channel from the local node publishing agent to the external end-to-end node subscription agent. The local node publishing agent regularly pushes data updates and performs traffic control based on CPU utilization and timeout information;
[0010] S4. Establish a wake-up service mechanism through the dynamic connection listening server of the external end-to-end node, the dynamic connection agent of the local node, and the dynamic registration agent of the external end-to-end node to solve the dynamic joining of distributed nodes and the automatic reset of the publishing agent;
[0011] S5. The subscription agent receives the update data packet of the publishing agent of the external end-to-end node, and completes the splitting, decompression, decoding of the subscribed data and the update of the local data blackboard through the data splitter and unpacker.
[0012] Furthermore, in the above S1, the publish-subscribe configuration management includes:
[0013] S101. Read the role-based publish-subscribe configuration information consistent throughout the system, create a node manager, create a dedicated node reflector for each external end-to-end node, and establish a publish-subscribe relationship between the local node and the external end-to-end node;
[0014] S102. Create a subscription server and a dynamic connection listening server, respectively listen to the connection requests of the external node publishing agent and the dynamic connection agent, create corresponding subscription agents and dynamic registration agents, and be responsible for establishing the publish-subscribe transmission channel from the external end-to-end node to this node;
[0015] S103. Create a publish manager, provide connection requests for the publishing agent and the dynamic connection agent for each external end-to-end node, and work in coordination with the subscription server and the dynamic connection listening server to ensure the establishment and maintenance of the two-way publish-subscribe transmission channel.
[0016] Furthermore, in the above S2, the node reflector obtains the dynamic update of the data blackboard, specifically:
[0017] S201. The node reflector creates an entity scanner, an entity status scanner, a descriptor scanner, and a message scanner according to different entity types, descriptor types, and message types respectively. Each scanner obtains the corresponding dynamic update data in the data blackboard according to the concerned publish-subscribe information;
[0018] S202, the filter obtains the updated original data from the data blackboard according to the update interval, publish-subscribe relationship, whether the data is updated, and the update time in the attention table, encodes it according to the type, generates the encoded original data, packages the encoded data, and compresses the large data;
[0019] S203. Each node reflector only provides data update collection for entities, descriptors, and messages generated by the node, and provides push services for entities, descriptors, and messages subscribed by each external end-to-end node.
[0020] Furthermore, in S3, the working process of the publishing manager and the publishing agent is specifically as follows:
[0021] S301, the publishing manager manages a dedicated publishing agent for each external end-to-end node, each publishing agent is configured with a dynamic connection agent, and the publishing agent sends a connection request to the subscription server of the external end-to-end node;
[0022] S302, the subscription server obtains the connection request of the publishing agent, generates the corresponding subscription agent, and allocates a working thread from the thread pool;
[0023] S303, the local node publishing agent establishes a one-way transmission channel with the external end-to-end node subscription agent, and the publishing agent obtains update data through the node reflector;
[0024] S304, the publishing agent publishes entities, entity states, messages, and node connection states without being affected by the transmission state, and controls the communication flow through CPU utilization and timeout when publishing descriptors.
[0025] Furthermore, in S4, the dynamic joining of external nodes and the release of agent reset work are specifically as follows:
[0026] S401, the publishing agent of the dynamically joined node connects to the subscription server of the external end-to-end node, and starts the request connection of the dynamically connected agent to the dynamic connection listening server of the same external end-to-end node;
[0027] S402, the subscription server of the external end-to-end node receives the connection request of the publishing agent of the dynamic joining node, creates a dedicated subscription agent to establish a one-way transmission channel of publishing and subscribing from the dynamic joining node to the external end-to-end node;
[0028] S403, the dynamic connection monitoring server of the external end-to-end node receives the connection of the dynamic connection agent, creates a dedicated dynamic registration agent, and establishes a publish-subscribe control channel between the dynamic joining node and the external end-to-end node;
[0029] S404. The dynamic connection agent of the dynamically added node sends a wake-up request to the dynamic registration agent of the external end-to-end node.
[0030] S405. When the dynamic registration agent of the external end-to-end node receives the wake-up request sent by the dynamic connection agent of the dynamically added node, it starts the wake-up service and resets the publishing agent of the external end-to-end node.
[0031] S406. The publishing agent of the external end-to-end node requests a connection to the subscription server of the dynamically added node, and re-establishes the publish-subscribe unidirectional transmission channel from the external end-to-end node to the dynamically added node.
[0032] Furthermore, in the above S5, the process of the data splitter and decompressor updating the data blackboard is specifically as follows:
[0033] S501. The communication client of the subscription agent receives the updated data from the publishing agent of the external end-to-end node, decompresses it according to the compression flag, and dynamically manages the receive buffer and the decompression buffer.
[0034] S502. The data splitter and decompressor respectively calls the entity status table decompressor, the entity table decompressor, the descriptor decompressor, and the message decompressor by using the type information of the data packet header for classification processing.
[0035] S503. The entity status table decompressor, the entity table decompressor, the descriptor table decompressor, and the message table decompressor respectively synchronously update the entities, descriptors, and messages in the corresponding data blackboard.
[0036] The beneficial effects of the present invention are as follows: From the system design, the conventional centralized publish-subscribe idea is abandoned, and an architecture combining a publishing manager, a subscription server, and a dynamic connection listening server is adopted to establish and maintain an end-to-end two-way publish-subscribe channel for each pair of nodes in the distributed system; based on the consistent configuration file of the entire system, each node establishes attention tables for entities, descriptors, and messages according to the publishing information of its own role and the subscription information of the roles of other end-to-end nodes, simplifying the management of the publish-subscribe relationship between end-to-end nodes; the node reflector obtains the updated content from the data blackboard by using the attention table, and forms updated data packets for classified transmission after filtering, encoding, packaging, and compression; the subscription node passively receives the updated data packets, performs splitting, decompression, and decoding to update the local data blackboard. The above mechanisms such as the management of the centerless publish-subscribe relationship, the maintenance of the end-to-end two-way transmission channel, the collection of published data, and the update of subscribed data solve the problem of distributed data blackboard synchronization and sharing. Description of the Drawings
[0037] Figure 1 It is a block diagram of the software composition of the distributed data blackboard synchronization system;
[0038] Figure 2 Schematic diagram for role - based publish - subscribe relationship management
[0039] Figure 3 Schematic diagram for a node reflector to obtain the published data of this node
[0040] Figure 4 Schematic diagram for the publish - subscribe work process
[0041] Figure 5 Schematic diagram for the maintenance process of the publish - subscribe transmission channel
[0042] Figure 6 Schematic diagram for the data splitting and unpacking work process Detailed implementation manner
[0043] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] The distributed data blackboard synchronization system is implemented by using a decentralized publish - subscribe mechanism. It is necessary to establish end - to - end publish - subscribe relationships between each node and external nodes, maintain the end - to - end two - way publish - subscribe transmission channels. The publishing node collects and updates data from the data blackboard according to the publish - subscribe relationships and actively pushes it to the subscribing nodes. The subscribing nodes parse and update relevant content to achieve the synchronization of the data blackboard.
[0045] In the decentralized publish - subscribe mechanism, the software deployed on each node is exactly the same. It is responsible for reflecting the published data of this node to each external node and also responsible for receiving the subscribed data from each external node. The sending and receiving between end - to - end nodes are separated, and there are two - way publish - subscribe transmission channels. The composition of the entire system includes a publish - subscribe configuration manager, a node manager, a publish manager, a subscription server, a dynamic connection monitoring server, and a data splitting and unpacking device. The system composition block diagram is as Figure 1 shown.
[0046] The establishment and maintenance of a two-way publish-subscribe transmission channel need to handle the following situations: random joining and leaving of nodes; communication interruption and timeout handling of nodes; and adjustment of the publish update interval by nodes according to communication traffic. When each node runs, it starts a subscription server and a dynamic connection listening server. The publish agent and dynamic connection agent of the external end-to-end node can respectively establish connections with the subscription server and the dynamic connection listening server. The subscription server helps establish a publish-subscribe channel from the external end-to-end node to the local node, and the dynamic connection listening server uses the wake-up service to help the local node re-initiate a connection to the subscription server of the external end-to-end node, establishing a publish-subscribe channel from the local node to the external end-to-end node. When a communication interruption occurs, the publish agent of the local node restarts the connection to the subscription server of the external end-to-end node, and the subscription agent thread of the external end-to-end node exits accordingly; when the subscription server of the external end-to-end node receives a connection request, it creates a new subscription agent and re-establishes the publish-subscribe transmission channel. When the publish agent sends data updates, it detects the CPU utilization rate of the local machine. When it exceeds the threshold, it increases the update interval, or when the communication timeouts accumulate to a certain extent, it also increases the update interval.
[0047] The publish-subscribe relationship between each pair of end-to-end nodes is calculated based on the role attributes of the nodes, as Figure 2 shown. The data blackboard consists of entities, descriptors (i.e., entity attributes) to which the entities belong, and messages, and includes four states: idle, internal, publish, and subscribe. Among them, idle means that this node is not in use; internal means that it is only used within this node; publish means that the data is maintained by this node and can be published to other nodes; subscribe means that the data is maintained by other nodes, and this node uses the data and receives updates from external nodes. The publish-subscribe configuration manager reads the publish-subscribe information based on the role template of each node. The role template stipulates the information that the nodes of the selected role need to subscribe to and publish, thereby calculating the publish-subscribe relationship between end-to-end nodes. All nodes have the same data blackboard structure, and the information about the entities, descriptors, and messages that can be published and subscribed belongs to a subset of the data blackboard. Therefore, end-to-end nodes can interact with data on demand according to the smallest granularity.
[0048] The publish-subscribe data is updated according to the types of entities, descriptors, and messages. The node manager generates a dedicated node reflector for each external end-to-end node. The node reflector creates a dedicated scanner for each type of entity, descriptor, and message in the data blackboard. Each scanner contains a watch list that records the publish-subscribe information and filtering conditions of the end-to-end node. The scanner filters, encodes, packages, and compresses to form a publish data packet, which is sent by the publish agent to the subscription agent of the corresponding end-to-end node.
[0049] The subscription data update proceeds in the opposite process of the published data. The subscription agent receives the published data packet, calls the data demultiplexer and unpacker, and demultiplexes the data according to the categories of entities, descriptors, and messages. Since the published data packet contains category information, the unpacker does not need to generate dedicated ones for each type, but only needs to generate four unpackers for entities, entity states, descriptors, and messages. The unpacker is responsible for updating the relevant data to the local data blackboard to achieve the synchronization of the distributed data blackboard.
[0050] The whole system mainly consists of six parts: a publish-subscribe configuration manager, a node manager, a publish manager, a subscription server, a dynamic connection listening server, and a data demultiplexer and unpacker. The data blackboard is updated through a dual-channel centerless publish-subscribe mechanism. The system composition is as Figure 1 shown.
[0051] In the centerless publish-subscribe implementation mechanism, each node contains a publish manager and a subscription server, which are respectively responsible for data publishing and subscription. Publishing adopts an active push mechanism, and subscription adopts a passive reception mechanism. An end-to-end two-way publish-subscribe channel is established between nodes.
[0052] The publish-subscribe configuration manager reads the consistent configuration file of the whole system, parses the role-based publish-subscribe information of all nodes, and establishes an end-to-end two-way publish-subscribe channel for nodes.
[0053] The publish-subscribe configuration manager reads the consistent configuration file of the whole system, parses the role-based publish-subscribe information of all nodes, and provides initialization information for the node manager, publish manager, subscription server, and dynamic connection listening server. Start the subscription server and the dynamic connection listening server, and wait for connection requests from external end-to-end nodes.
[0054] The node manager is used to maintain all node reflectors. According to the publish-subscribe configuration information, it generates a dedicated node reflector for each external end-to-end node, which is responsible for obtaining the data in the data blackboard of this node that can be published and subscribed by external nodes, such as the structure Figure 4 shown. Each node reflector creates independent scanners for each different type of entity, descriptor, and message based on the publish-subscribe relationship between this node and the end-to-end node. The scanner is built-in with filters, encoders, packers, and compressors, which are responsible for converting the original data in the data blackboard into transmitted encoded data. Each filter is configured with a watch list, which contains conditional variables such as the last update time, update interval, and forwarding period to filter the updated data.
[0055] The release manager is used to maintain all release agents and supporting dynamic connection agents, generate a dedicated release agent and a dynamic connection agent for each external end-to-end node, and is responsible for establishing and maintaining a transmission channel with the subscription agent of the external end-to-end node. The release agent sends a connection request to the external end-to-end node subscription server. The subscription server creates a thread pool, which is responsible for processing the connection requests of the external node release agents, generating corresponding subscription agents and allocating threads. After the transmission channel is established, the release agent obtains the updated data from the node reflector and pushes the updated data to the corresponding subscription agent of the external end-to-end node. The subscription agent calls the data demultiplexing and unpacking device, and demultiplexes the received data packets according to the packet types to the entity table status unpacking device, the entity table unpacking device, the descriptor table unpacking device, and the message unpacking device. The unpacking device synchronizes the subscribed data to the local data blackboard. The publish-subscribe workflow is as Figure 4 shown.
[0056] The dynamic connection agent, the dynamic registration agent, and the dynamic connection monitoring server jointly maintain the two-way publish-subscribe transmission channel between the two nodes. When a node dynamically joins, the release manager, the release agent, the subscription server, and the subscription agent establish the publish-subscribe channel 1 from the joining node to the running node. At the same time, the dynamic connection agent of the joining node starts a connection to the dynamic connection monitoring server of the running node. The dynamic connection monitoring server receives the connection request of the dynamic connection agent, generates a corresponding dynamic registration agent. The dynamic connection agent of the joining node and the dynamic registration agent of the running node establish a control channel and start the wake-up service. The release manager of the running node starts the publish-subscribe process and establishes the publish-subscribe channel 2 from the running node to the joining node, thereby establishing and maintaining a two-way publish-subscribe channel. The maintenance process of the publish-subscribe transmission channel is as Figure 5 shown.
[0057] The subscription server generates a dedicated subscription agent for each connected external node. The subscription agent is mainly responsible for receiving the subscribed data of this node and updating the data blackboard. After receiving the updated data packet from the release agent of the external end-to-end node, it completes the decompression of the data, and demultiplexes the decoded data to the entity status table unpacking device, the entity table unpacking device, the descriptor table unpacking device, and the message table unpacking device according to the packet header information. Since the updated data contains the type information of entities, descriptors, or messages, it is not necessary to generate unpacking devices for each type. Only a single unpacking device needs to be maintained. The unpacking device updates the parsed data to the corresponding unit in the subscribed data blackboard. The data demultiplexing and unpacking workflow is as Figure 6 shown.
[0058] The embodiments described above merely represent the implementation modes of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent for the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention shall be subject to the appended claims.
Claims
1. A distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism, characterized in that: The following steps are involved: S1. Through role-based publish-subscribe configuration management, establish the publish-subscribe relationship between the local node and the external end-to-end node, create a node manager and a publishing manager to manage the external end-to-end nodes, start the subscription server and the dynamic connection listening server to establish a two-way publish-subscribe transmission channel, and monitor the CPU utilization in real time; S2. Connect with the data blackboard through the node reflector to obtain the dynamic update data of the entity table, entity status table, descriptor table and message table for each external node by filtering, encoding, packaging and compressing; S3, through the external end-to-end node subscription server, establish a one-to-one unidirectional transmission channel from the local node publishing agent to the external end-to-end node subscription agent. The local node publishing agent regularly pushes data updates and performs traffic control based on CPU utilization and timeout information; S4, establish a wake-up service mechanism through the dynamic connection monitoring server of the external end-to-end node, the dynamic connection agent of the local node and the dynamic registration agent of the external end-to-end node to solve the automatic reset of the dynamic joining and publishing agent of the distributed node; S5. The subscribing agent receives the update data packet of the publishing agent from the external end-to-end node, and completes the decompression, decompression, decoding of the subscription data and the update of the local data blackboard through the data decompression device.
2. A distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism according to claim 1, characterized in that: In S1, publish-subscribe configuration management includes: S101, reading the role-based publish-subscribe configuration information consistent with the entire system, creating a node manager, creating a dedicated node reflector for each external end-to-end node, and establishing a publish-subscribe relationship between the local node and the external end-to-end node; S102, create a subscription server and a dynamic connection monitoring server, respectively monitor the connection requests of the external node publishing agent and the dynamic connection agent, create corresponding subscription agents and dynamic registration agents, and be responsible for establishing the publishing and subscription transmission channel from the external end-to-end node to this node; S103. Create a publishing manager to provide connection requests of publishing agents and dynamic connection agents for each external end-to-end node, and work with the subscription server and the dynamic connection listening server to ensure the establishment and maintenance of a two-way publish-subscribe transmission channel.
3. A distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism according to claim 2, characterized in that: In S2, the node reflector obtains the data blackboard dynamic update, specifically: S201, the node reflector creates entity scanners, entity state scanners, descriptor scanners and message scanners according to different entity types, descriptor types and message types, and each scanner obtains the corresponding dynamic update data in the data blackboard according to the published and subscribed information concerned; S202, the filter obtains the updated original data from the data blackboard according to the update interval, publish-subscribe relationship, whether the data is updated, and the update time in the attention table, encodes it according to the type, generates the encoded original data, packages the encoded data, and compresses the large data; S203. Each node reflector only provides data update collection for entities, descriptors, and messages generated by the node, and provides push services for entities, descriptors, and messages subscribed by each external end-to-end node.
4. A distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism according to claim 3, characterized in that: In S3, the working process of the publishing manager and the publishing agent is specifically as follows: S301, the publishing manager manages a dedicated publishing agent for each external end-to-end node, each publishing agent is configured with a dynamic connection agent, and the publishing agent sends a connection request to the subscription server of the external end-to-end node; S302, the subscription server obtains the connection request of the publishing agent, generates the corresponding subscription agent, and allocates a working thread from the thread pool; S303, the local node publishing agent establishes a one-way transmission channel with the external end-to-end node subscription agent, and the publishing agent obtains update data through the node reflector; S304, the publishing agent publishes entities, entity states, messages, and node connection states without being affected by the transmission state, and controls the communication flow through CPU utilization and timeout when publishing descriptors.
5. A distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism according to claim 4, characterized in that: In S4, the dynamic joining of external nodes and the release of agent reset work are specifically as follows: S401, the publishing agent of the dynamically joined node connects to the subscription server of the external end-to-end node, and starts the request connection of the dynamically connected agent to the dynamic connection listening server of the same external end-to-end node; S402, the subscription server of the external end-to-end node receives the connection request of the publishing agent of the dynamic joining node, creates a dedicated subscription agent to establish a publish-subscribe unidirectional transmission channel from the dynamic joining node to the external end-to-end node; S403, the dynamic connection monitoring server of the external end-to-end node receives the connection of the dynamic connection agent, creates a dedicated dynamic registration agent, and establishes a publish-subscribe control channel between the dynamic joining node and the external end-to-end node; S404, the dynamically connected agent of the dynamically joined node sends a wake-up request to the dynamically registered agent of the external end-to-end node; S405, when the dynamic registration agent of the external end-to-end node receives the wake-up request sent by the dynamic connection agent of the dynamic joining node, the wake-up service is started, and the publishing agent of the external end-to-end node is reset; S406: The publishing agent of the external end-to-end node requests a connection from the subscription server of the dynamically added node, and re-establishes a publish-subscribe unidirectional transmission channel from the external end-to-end node to the dynamically added node.
6. A distributed data blackboard synchronization system based on a decentralized publish-subscribe mechanism according to claim 5, characterized in that: In S5, the data splitter unpacker updates the data blackboard process, specifically: S501, the communication client of the subscribed agent receives the update data of the publishing agent from the external end-to-end node, decompresses it according to the compression flag, and dynamically manages the receiving buffer area and the decompression buffer area; S502, the data decompressor uses the type information of the data packet header to call the entity state table decompressor, the entity table decompressor, the descriptor decompressor, and the message decompressor respectively to perform classification processing; S503, the entity state table unpacker, the entity table unpacker, the descriptor table unpacker, and the message table unpacker synchronously update the entities, descriptors, and messages in the corresponding data blackboards respectively.