Storage method and device for digital twin platform distributed simulation and medium

By using communication relay stations and load balancing strategies in the distributed simulation of the digital twin platform, the problems of single storage method and high CPU overhead are solved, realizing high real-time, universal, and scalable multi-level storage, which is suitable for distributed simulation of the digital twin platform.

CN116208626BActive Publication Date: 2026-03-24GUANGZHOU UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies lack a general distributed storage architecture that caters to diverse needs. Storage methods are limited, and storage operations require individual client responses, resulting in significant time overhead. There is also a lack of readily available storage solutions suitable for distributed simulation in digital twin platforms.

Method used

By using a communication relay station as a bridge and combining it with a load balancing strategy, data is distributed to multiple storage nodes for processing through a command system, thereby achieving a multi-level directory structure and flexible storage, and reducing the dependence of storage operations on the client.

Benefits of technology

It provides a high real-time, universal, and scalable storage solution, reduces CPU overhead, improves storage performance and real-time performance, supports multiple storage formats and directory structures, and is suitable for distributed simulation of digital twin platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116208626B_ABST
    Figure CN116208626B_ABST
Patent Text Reader

Abstract

The application discloses a storage method and device for digital twin platform distributed simulation and a medium, and the method comprises the following steps: generating data through a digital twin platform distributed simulation system; recording the data of communication through a communication transfer station, and opening a communication library data consumption port to a database storage process for consumption; binding a subscriber and a publisher of a command system to a network port specified by the communication transfer station; binding a database storage node to a transfer port of the communication transfer station; connecting the publisher of the communication transfer station through the subscription of a specified network address and a network port by a dynamics calculation storage node and an agent calculation storage node; and issuing a storage command through the command system, so that the database storage node, the dynamics calculation storage node and the agent calculation storage node perform storage operations according to respective storage logics after receiving the command. The application has the advantages of high real-time, universality, scalability, diversified storage forms, multi-level directory structure and small time cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a storage method, apparatus, computer equipment, and storage medium for distributed simulation of digital twin platforms, belonging to the field of software application technology. Background Technology

[0002] Currently, most methods in this field involve storing the data users need to store on different storage servers, using multiple servers to distribute the storage load. These dispersed storage spaces are treated as a virtual data storage device. When a user wants to retrieve data, it is retrieved from the corresponding disk space according to rules. Simply put, it can be understood as a large number of PCs interconnected via a network, providing storage services as a whole. The disadvantage of this method is:

[0003] 1) The requirements for distributed simulation in digital twin platforms are diverse, but there is still no universal distributed storage architecture to meet various needs. For example, different platforms often require writing corresponding storage architectures one-to-one, and then carrying out the corresponding development, which is time-consuming and labor-intensive.

[0004] 2) Limited data storage methods. For example, the data is uniformly stored in a database, and data needs to be exported from the database or application for analysis, which is too cumbersome and lacks a multi-level directory structure.

[0005] 3) Each storage operation requires a separate response from the client, which incurs time overhead. For digital twin platforms, the virtual and physical twins generate massive amounts of data. If each storage operation is initiated by the application, the CPU overhead will be significant, impacting application performance. Furthermore, the client needs to receive a response before proceeding with the next storage operation, which also incurs considerable time overhead.

[0006] 4) There is no readily available storage solution for distributed simulation of digital twin platforms. Summary of the Invention

[0007] In view of this, the present invention provides a storage method, device, computer equipment and storage medium for distributed simulation of digital twin platforms, which has the advantages of high real-time performance, universality, scalability, diverse storage formats, multi-level directory structure and low time overhead.

[0008] The first objective of this invention is to provide a storage method for distributed simulation of digital twin platforms.

[0009] The second objective of this invention is to provide a storage device for distributed simulation of digital twin platforms.

[0010] A third objective of this invention is to provide a computer device.

[0011] A fourth objective of this invention is to provide a storage medium.

[0012] The first objective of this invention can be achieved by adopting the following technical solution:

[0013] A storage method for distributed simulation of a digital twin platform, the method comprising:

[0014] Bind the subscribers and publishers of the command system to the network ports specified by the communication relay station;

[0015] Bind the database storage node to the relay port of the communication relay station, wherein the relay port is the communication database data consumption port;

[0016] Connect the dynamic computing storage node and the intelligent agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port;

[0017] The command system issues storage commands, enabling the database storage node, dynamics calculation storage node, and agent calculation storage node to perform storage operations according to their respective storage logics upon receiving the commands.

[0018] Furthermore, before binding the subscriber and publisher of the command system to the network port specified by the communication relay station, the process also includes:

[0019] Data is generated through a distributed simulation system on a digital twin platform. The data includes the agent's position, attitude data, state data, terrain data, environmental data, and sensor data.

[0020] The communication relay station records the communication data and opens the communication library data consumption port for the database storage process to consume.

[0021] Furthermore, the agent's position, attitude data, state data, and sensor data are data that needs to be stored, while the terrain data and environment data are data that does not need to be stored.

[0022] Furthermore, the step of binding the database storage node to the relay port of the communication relay station specifically includes:

[0023] Bind the database storage process of the database storage node to the open communication library's data consumption port, so that the communication library can allocate data to each database storage process in round-robin using a built-in load balancing strategy based on the number of bound database storage processes.

[0024] Furthermore, after binding the database storage process of the database storage node to the open communication library data consumption port, and enabling the communication library to allocate data to each database storage process in round-robin using a built-in load balancing strategy based on the number of bound database storage processes, the method further includes:

[0025] When the amount of data in memory of each database storage process reaches a set peak or exceeds a set time, data is loaded into the database in batches.

[0026] Furthermore, the step of issuing storage commands through the command system, causing the database storage node, dynamics computation storage node, and agent computation storage node to perform storage operations according to their respective storage logics after receiving the commands, specifically includes:

[0027] The command system sends the storage command message body to the storage command topic, enabling the database storage node, dynamics computing storage node, and intelligent agent computing storage node to subscribe to the storage command topic.

[0028] When the dynamics computation storage node and the agent computation storage node receive the storage command message, they read the environment name as the first-level directory. If the directory does not exist, it is created. The second-level directory is generated according to the number of agents. Each directory is named after an agent. If the directory does not exist, it is created. The flag is read. If flag = 0, it means that storage is required for this exercise. If flag = 1, it means that storage is ended. If flag = 2, it means that no storage is required.

[0029] When the database storage node receives the storage command message body, it reads the storage command message body and generates a storage record in the database according to each field in the storage command message body; it reads the flag, and if flag=0, it stores all topics that have passed through the communication library into the corresponding topic table.

[0030] Furthermore, the method is implemented through a distributed storage structure, which includes a storage module, a playback module, a command system, and a communication module.

[0031] The storage module is used to collect data generated by the distributed simulation system of the digital twin platform, including database storage nodes, dynamics calculation storage nodes, and intelligent agent calculation storage nodes;

[0032] The playback module is used to retrieve and replay the stored data;

[0033] The command system can perform functions such as querying the storage list, simulating opening and closing the storage, and selecting storage list items for playback by issuing different commands.

[0034] The communication module is used to coordinate the communication of commands and data acquisition between different nodes, thereby realizing the storage technology for distributed simulation of digital twin platforms, including a communication relay station.

[0035] The second objective of this invention can be achieved by adopting the following technical solution:

[0036] A storage device for distributed simulation of a digital twin platform, the device comprising:

[0037] The first binding unit is used to bind the subscriber and publisher of the command system to the network port specified by the communication relay station;

[0038] The second binding unit is used to bind the database storage node to the relay port of the communication relay station, wherein the relay port is the communication database data consumption port;

[0039] The connection unit is used to connect the dynamic computing storage node and the intelligent agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port;

[0040] The command sending unit is used to issue storage commands through the command system, so that the database storage node, dynamics calculation storage node, and agent calculation storage node can perform storage operations according to their respective storage logic after receiving the command.

[0041] Furthermore, prior to the first binding unit, it also includes:

[0042] The data generation unit is used to generate data through the distributed simulation system of the digital twin platform. The data includes agent position data, attitude data, state data, terrain data, environmental data, and sensor data.

[0043] The recording unit is used to record communication data through the communication relay station and open the communication library data consumption port to the database storage process for consumption.

[0044] The third objective of this invention can be achieved by adopting the following technical solution:

[0045] A computer device includes a processor and a memory for storing a processor-executable program, characterized in that the processor implements the above-described storage method when executing the program stored in the memory.

[0046] The fourth objective of this invention can be achieved by adopting the following technical solution:

[0047] A storage medium storing a program, which, when executed by a processor, implements the above-described storage method.

[0048] The present invention has the following advantages over the prior art:

[0049] 1. This invention supports universal applications with a general distributed storage architecture: the communication library of the communication relay station is selected as the bridge between the digital twin platform and the distributed storage, the data to be stored is recorded in real time, and the load balancing strategy is used to distribute the data to multiple storage processes for consumption, which solves the problems of high CPU overhead and performance degradation of the digital twin platform caused by storage, and can be used as a ready-made storage solution for distributed simulation of digital twin platforms.

[0050] 2. This invention has high scalability: the storage process can be horizontally expanded on the same node or different nodes as needed, thereby improving the device's storage capacity and handling higher traffic and concurrency.

[0051] 3. The present invention offers diverse and multi-layered storage methods: In addition to database storage, the distributed storage cluster also features visual file storage, which can be used for machine learning and deep learning analysis without the need to export from the database. The dynamic computing storage node and the intelligent agent computing storage node can flexibly generate multi-layered storage directories on the local node according to the command content, and generate storage files in the storage directory.

[0052] 4. This invention eliminates the need for individual client responses for each storage operation: This invention addresses the issue that requiring individual client responses for each storage operation would result in significant storage time overhead. It enables unidirectional data flow, meaning that no response is required from the other end after data storage, thereby improving the real-time performance of distributed storage. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0054] Figure 1 This is a simplified flowchart of the storage method for distributed simulation of a digital twin platform according to Embodiment 1 of the present invention.

[0055] Figure 2 This is a detailed flowchart of the storage method for distributed simulation of a digital twin platform according to Embodiment 1 of the present invention.

[0056] Figure 3 This is a schematic diagram of the start of storage exercise in Embodiment 2 of the present invention.

[0057] Figure 4 This is a schematic representation of the database collector in Embodiment 2 of the present invention.

[0058] Figure 5This is a schematic diagram of the storage directory of the dynamic storage node and the intelligent agent storage node in Embodiment 2 of the present invention.

[0059] Figure 6 This is a schematic diagram of the actual directory and files generated by the dynamic storage node in Embodiment 2 of the present invention.

[0060] Figure 7 This is a schematic diagram of the actual directory and files generated by the intelligent agent storage node in Embodiment 2 of the present invention.

[0061] Figure 8 This is a newly added topic table diagram in the database of Embodiment 2 of the present invention.

[0062] Figure 9 This is a schematic diagram of a storage simulation exercise according to Embodiment 2 of the present invention.

[0063] Figure 10 This is a schematic diagram of exercise record query in Embodiment 2 of the present invention.

[0064] Figure 11 This is a schematic diagram of the command system playback operation in Embodiment 3 of the present invention.

[0065] Figure 12 This is a schematic diagram of the agent state variables in Embodiment 3 of the present invention.

[0066] Figure 13 This is a schematic diagram of the playback trajectory in Embodiment 3 of the present invention.

[0067] Figure 14 This is a structural block diagram of a storage device for distributed simulation of a digital twin platform according to Embodiment 4 of the present invention.

[0068] Figure 15 This is a structural block diagram of the computer device according to Embodiment 5 of the present invention. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0070] Example 1:

[0071] The distributed simulation system of the digital twin platform only needs to consider its own business logic and functions, without needing to consider the distributed storage cluster. Its perception of storage is transparent, and all storage logic is handled by the storage process. If a request is initiated for each storage operation, it will lead to high CPU overhead. Therefore, this embodiment provides a storage method for distributed simulation of digital twin platforms to address the problems of high CPU overhead and performance degradation caused by storage issues.

[0072] like Figure 1 and Figure 2 As shown, the storage method in this embodiment is implemented through a distributed storage structure, which includes a storage module, a playback module, a command system, and a communication module. The storage module is mainly used to collect data generated by the distributed simulation system of the digital twin platform. The storage module includes database storage nodes, dynamics calculation storage nodes, and intelligent agent calculation storage nodes. The playback module is mainly used to retrieve and play back the stored data. The command system can issue different commands to query the storage list, enable and disable simulation storage, and select storage list items for playback. The communication module is mainly used to coordinate the communication of commands and data acquisition between different nodes, thereby realizing the storage technology for distributed simulation of the digital twin platform. The communication module includes a communication relay station, which includes an input port, an output port, and a relay port. The input port is the communication library entry point, used to receive messages sent by the publisher. The output port is the communication library exit point, used to send messages to the corresponding subscribers. The relay port is the communication library data consumption port, used to forward messages to multiple data storage processes for consumption. The storage method includes the following steps:

[0073] S101. Data is generated through a distributed simulation system on a digital twin platform.

[0074] Specifically, the distributed simulation system of the digital twin platform generates massive amounts of data, including agent position, attitude data, state data, terrain data, environmental data, sensor data, etc. The state data includes wheel and propeller speed and wheel angle, the terrain data includes terrain height and friction coefficient, and the sensor data includes color maps, depth maps, point cloud information, etc.

[0075] According to the playback requirements, the agent's position, attitude data, state data, sensor data, etc. are the data that need to be stored, while the terrain data and environment data are the data that do not need to be stored. This is because the environment, terrain and other data are on the original node and do not need to be stored. They can be read directly when rendering is started.

[0076] S102. Record the communication data through the communication relay station and open the communication library data consumption port for the database storage process to consume.

[0077] S103. Bind the subscriber and publisher of the command system to the network port specified by the communication relay station. The network port bound to the subscriber is the output port, i.e. the communication library exit, and the network port bound to the publisher is the input port, i.e. the communication library entry.

[0078] S104. Bind the database storage node to the relay port of the communication relay station.

[0079] Specifically, the database storage process of the database storage node is bound to the data consumption port of the open communication library. The communication library allocates data to each database storage process in a round-robin manner based on the number of bound database storage processes using a built-in load balancing strategy.

[0080] Furthermore, when the amount of data in memory for each database storage process reaches a set peak or exceeds a set time, data is loaded into the database in batches.

[0081] S105. Connect the dynamics computing storage node and the agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port.

[0082] S106. Issue a storage command through the command system, so that the database storage node, dynamics calculation storage node, and agent calculation storage node perform storage operations according to their respective storage logic after receiving the command.

[0083] Specifically, the command system sends the storage command (collector) message body to the storage command topic: / collector. Database storage nodes, dynamics computation storage nodes, and agent computation storage nodes subscribe to this topic. Upon receiving the storage command message body, the dynamics computation storage node and the agent computation storage node read the environment name (env) as the first-level directory. If the directory does not exist, it is created. A second-level directory is generated based on the number of agents, with each directory named after an agent. If the directory does not exist, it is created. The flag is read: if flag = 0, storage is required for this exercise; if flag = 1, storage ends; if flag = 2, no storage is required. Finally, a storage file is generated locally named: start timestamp_end timestamp_filename. Upon receiving the storage command message body, the database storage node reads the message body and generates a storage record in the database based on each field. The flag is also read; if flag = 0, all topics that have passed through the communication library are stored in the corresponding topic table.

[0084] The collector message body is described as follows:

[0085]

[0086] It should be noted that although the method operations of the above embodiments are described in a specific order, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the described steps may be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0087] Example 2:

[0088] This embodiment takes a certain reconnaissance quadcopter loop penetration as an example. First, the simulator of the distributed simulation system of the digital twin platform is started. Then, the dynamics calculation and storage node process, the intelligent agent calculation and storage node process, the database storage node process, the command system process, and the self-developed communication relay station process are run. The subsequent verification work is carried out according to the following steps:

[0089] (1) As Figure 3 As shown, in the command system process interface, enter "1" and select "1. Start Exercise (Open Storage)", then enter "y" to start the exercise and storage. The command system will send a collector message body to the topic: / collector. The dynamics computation storage node, database storage node, and agent computation storage node simultaneously subscribe to the topic: / collector. When the dynamics computation and agent computation storage nodes receive the collector message: they read the flag; when flag = 0, storage begins; when flag = 1, storage ends. Since this exercise requires opening storage, the received flag is 0. The dynamics computation and agent computation storage node processes read the variable env (environment name) from the collector message body as the first-level directory; if the directory does not exist, it is created. Then, based on the names and number of agents, second-level directories are created; if the directory does not exist, it is created. At this point, the dynamics computation and agent computation storage node processes begin storing data. When a MongoDB database storage node receives a collector, it generates a storage record in the database's collector storage directory table. This record includes the storage environment (env), start time (start_time), end time (end_time), agent (id, multiple separated by semicolons), and topic name (topics, multiple separated by semicolons). Figure 4 As shown, a topic table is then created with the topic name. The topic table is named the same as the topic name. Each topic table stores topic messages with the same topic name after passing through the communication relay station.

[0090] (2) Figure 3As shown, enter "y" to confirm the end of the exercise and storage. The command system will send a collector message to the topic: / collector. At this time, flag = 1, the dynamics storage node and the agent storage node stop storing, and the final file is generated. The final generated storage file is named: start timestamp_end timestamp_name, and the generated storage directory structure and file format are designed as follows. Figure 5 As shown; the actual directories and files generated by the dynamic calculation storage node are as follows. Figure 6 As shown, the actual directories and files generated by the intelligent agent's computing and storage nodes are as follows: Figure 7 As shown, the newly added topic table in the database is as follows: Figure 8 As shown.

[0091] (3) Figure 9 As shown, in the command system process interface, enter "0" and select "0. Start Exercise (Disable Storage)", then enter "y" to start the exercise. The command system will send a collector message body to the topic: / collector. After the exercise is complete, enter "y" to confirm and end the exercise. The command system will send a collector message body to the topic: / collector. The database will record the time of this exercise. Querying exercise records is as follows: Figure 10 As shown, the time difference between running simulations with and without storage can be compared to determine the extent to which storage affects the performance of the simulator during normal simulations.

[0092] Example 3:

[0093] This embodiment takes a single intelligent agent for reconnaissance as an example, requiring only the UE, database playback process, command system process, and self-developed communication relay station process to run. Then, the command system initiates a query for stored list records, selects the stored list to be played back, and selects the number, such as... Figure 11 As shown. The database replay process retrieves and replays data based on the time-series data of the agent's state. The state variables are described as follows: Figure 12 As shown. The database data playback function can be verified by observing whether the agent on the UE interface can replay the previous flight trajectory according to the retrieved state information. Figure 13 As shown.

[0094] Example 4:

[0095] like Figure 14 As shown, this embodiment provides a storage device for distributed simulation of a digital twin platform. The device includes a data generation unit 1401, a recording unit 1402, a first binding unit 1403, a second binding unit 1404, a connection unit 1405, and a command sending unit 1406. The specific functions of each unit are as follows:

[0096] The data generation unit 1401 is used to generate data through the distributed simulation system of the digital twin platform. The data includes agent position data, attitude data, state data, terrain data, environmental data, and sensor data.

[0097] The recording unit 1402 is used to record communication data through the communication relay station and open the communication library data consumption port to the database storage process for consumption.

[0098] The first binding unit 1403 is used to bind the subscriber and publisher of the command system to the network port specified by the communication relay station.

[0099] The second binding unit 1404 is used to bind the database storage node to the relay port of the communication relay station, wherein the relay port is the communication database data consumption port.

[0100] The connection unit 1405 is used to connect the dynamic computing storage node and the intelligent agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port.

[0101] The command sending unit 1406 is used to issue storage commands through the command system, so that the database storage node, dynamics calculation storage node, and intelligent agent calculation storage node perform storage operations according to their respective storage logic after receiving the command.

[0102] It should be noted that the device provided in this embodiment is only an example of the above-described division of functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure can be divided into different functional units to complete all or part of the functions described above.

[0103] Example 5:

[0104] This embodiment provides a computer device, such as... Figure 15 As shown, it includes a processor 1502, a memory, an input device 1503, a display 1504, and a network interface 1505 connected via a device bus 1501. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium 1506 and internal memory 1507. The non-volatile storage medium 1506 stores operating devices, computer programs, and a database. The internal memory 1507 provides an environment for the operation of the operating devices and computer programs in the non-volatile storage medium. When the processor 1502 executes the computer program stored in the memory, it implements the storage method of Embodiment 1 described above, as follows:

[0105] Bind the subscribers and publishers of the command system to the network ports specified by the communication relay station;

[0106] Bind the database storage node to the relay port of the communication relay station, wherein the relay port is the communication database data consumption port;

[0107] Connect the dynamic computing storage node and the intelligent agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port;

[0108] The command system issues storage commands, enabling the database storage node, dynamics calculation storage node, and agent calculation storage node to perform storage operations according to their respective storage logics upon receiving the commands.

[0109] Furthermore, before binding the subscriber and publisher of the command system to the network port specified by the communication relay station, the process also includes:

[0110] Data is generated through a distributed simulation system on a digital twin platform. The data includes the agent's position, attitude data, state data, terrain data, environmental data, and sensor data.

[0111] The communication relay station records the communication data and opens the communication library data consumption port for the database storage process to consume.

[0112] Example 6:

[0113] This embodiment provides a storage medium, which is a computer-readable storage medium, storing a computer program. When the computer program is executed by a processor, it implements the storage method of Embodiment 1 described above, as follows:

[0114] Bind the subscribers and publishers of the command system to the network ports specified by the communication relay station;

[0115] Bind the database storage node to the relay port of the communication relay station, wherein the relay port is the communication database data consumption port;

[0116] Connect the dynamic computing storage node and the intelligent agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port;

[0117] The command system issues storage commands, enabling the database storage node, dynamics calculation storage node, and agent calculation storage node to perform storage operations according to their respective storage logics upon receiving the commands.

[0118] Furthermore, before binding the subscriber and publisher of the command system to the network port specified by the communication relay station, the process also includes:

[0119] Data is generated through a distributed simulation system on a digital twin platform. The data includes the agent's position, attitude data, state data, terrain data, environmental data, and sensor data.

[0120] The communication relay station records the communication data and opens the communication library data consumption port for the database storage process to consume.

[0121] It should be noted that the computer-readable storage medium in this embodiment can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0122] In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used or combined with an instruction execution device, apparatus, or device. In this embodiment, the computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use or combined with an instruction execution device, apparatus, or device. The computer program contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0123] The computer-readable storage medium described above can be used to write computer programs for executing this embodiment in one or more programming languages ​​or combinations thereof. These programming languages ​​include object-oriented programming languages—such as Java, Python, and C++—and conventional procedural programming languages—such as C or similar programming languages. The program can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0124] In summary, this invention selects the communication library of the communication relay station as a bridge between the digital twin platform and the distributed storage, records the data to be stored in real time, and uses a load balancing strategy to distribute the data to multiple storage processes for consumption. This solves the problems of high CPU overhead and performance degradation in the digital twin platform caused by storage, and can serve as a ready-made storage solution for distributed simulation of digital twin platforms. In addition to database storage, the distributed storage cluster also has visual file storage, which can be used for machine learning and deep learning analysis without exporting from the database. The dynamic computing storage node and the intelligent agent computing storage node can flexibly generate multi-level structured storage directories on the local node according to the command content, and generate storage files in the storage directory.

[0125] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, shall fall within the scope of protection of the present invention.

Claims

1. A storage method for digital twin platform distributed simulation, characterized in that, The method includes: Bind the subscribers and publishers of the command system to the network ports specified by the communication relay station; Bind the database storage node to the relay port of the communication relay station, wherein the relay port is the communication database data consumption port; Connect the dynamic computing storage node and the intelligent agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port; The command system issues storage commands, enabling the database storage node, dynamics calculation storage node, and agent calculation storage node to perform storage operations according to their respective storage logic after receiving the commands. The process of issuing storage commands through the command system, causing the database storage node, dynamics computation storage node, and agent computation storage node to perform storage operations according to their respective storage logics upon receiving the commands, specifically includes: The command system sends the storage command message body to the storage command topic, enabling the database storage node, dynamics computing storage node, and intelligent agent computing storage node to subscribe to the storage command topic. When the dynamics computation storage node and the agent computation storage node receive the storage command message, they read the environment name as the first-level directory. If the directory does not exist, it is created. The second-level directory is generated according to the number of agents. Each directory is named after an agent. If the directory does not exist, it is created. The flag is read. If flag = 0, it means that storage is required for this exercise. If flag = 1, it means that storage is ended. If flag = 2, it means that no storage is required. When the database storage node receives the storage command message body, it reads the storage command message body and generates a storage record in the database according to each field in the storage command message body; it reads the flag, and if flag=0, it stores all topics that have passed through the communication library into the corresponding topic table.

2. The storage method according to claim 1, wherein, Before binding the subscriber and publisher of the command system to the network port specified by the communication relay station, the process also includes: Data is generated through a distributed simulation system on a digital twin platform. The data includes the agent's position, attitude data, state data, terrain data, environmental data, and sensor data. The communication relay station records the communication data and opens the communication library data consumption port for the database storage process to consume.

3. The storage method according to claim 2, wherein, The agent's position, attitude, state, and sensor data are data that needs to be stored, while the terrain and environmental data are data that does not need to be stored.

4. The storage method of claim 1, wherein, The step of binding the database storage node to the relay port of the communication relay station specifically includes: Bind the database storage process of the database storage node to the open communication library's data consumption port, so that the communication library can allocate data to each database storage process in round-robin using a built-in load balancing strategy based on the number of bound database storage processes.

5. The storage method according to claim 4, wherein, The step of binding the database storage process of the database storage node to the open communication library data consumption port, so that the communication library allocates data to each database storage process in round-robin using a built-in load balancing strategy based on the number of bound database storage processes, further includes: When the amount of data in memory of each database storage process reaches a set peak or exceeds a set time, data is loaded into the database in batches.

6. The storage method according to any one of claims 1 to 5, characterized by, The method is implemented through a distributed storage structure, which includes a storage module, a playback module, a command system, and a communication module. The storage module is used to collect data generated by the distributed simulation system of the digital twin platform, including database storage nodes, dynamics calculation storage nodes, and intelligent agent calculation storage nodes; The playback module is used to retrieve and replay the stored data; The command system can perform functions such as querying the storage list, simulating opening and closing the storage, and selecting storage list items for playback by issuing different commands. The communication module is used to coordinate the communication of commands and data acquisition between different nodes, thereby realizing the storage technology for distributed simulation of digital twin platforms, including a communication relay station.

7. A storage device for distributed simulation of a digital twin platform, characterized in that, The device includes: The first binding unit is used to bind the subscriber and publisher of the command system to the network port specified by the communication relay station; The second binding unit is used to bind the database storage node to the relay port of the communication relay station, wherein the relay port is the communication database data consumption port; The connection unit is used to connect the dynamic computing storage node and the intelligent agent computing storage node to the publisher of the communication relay station by subscribing to the specified network address and network port; The command sending unit is used to issue storage commands through the command system, so that the database storage node, dynamics calculation storage node, and intelligent agent calculation storage node can perform storage operations according to their respective storage logic after receiving the command. The process of issuing storage commands through the command system, causing the database storage node, dynamics computation storage node, and agent computation storage node to perform storage operations according to their respective storage logics upon receiving the commands, specifically includes: The command system sends the storage command message body to the storage command topic, enabling the database storage node, dynamics computing storage node, and intelligent agent computing storage node to subscribe to the storage command topic. When the dynamics computation storage node and the agent computation storage node receive the storage command message, they read the environment name as the first-level directory. If the directory does not exist, it is created. The second-level directory is generated according to the number of agents. Each directory is named after an agent. If the directory does not exist, it is created. The flag is read. If flag = 0, it means that storage is required for this exercise. If flag = 1, it means that storage is ended. If flag = 2, it means that no storage is required. When the database storage node receives the storage command message body, it reads the storage command message body and generates a storage record in the database according to each field in the storage command message body; it reads the flag, and if flag=0, it stores all topics that have passed through the communication library into the corresponding topic table.

8. A computer device comprising a processor and a memory for storing a processor-executable program, characterized in that, When the processor executes the program stored in the memory, it implements the storage method according to any one of claims 1-6.

9. A storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the storage method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Energy Internet of Things data acquisition method based on non-blocking input and output model and software gateway

    CN111277672A