Combat simulation operation state archiving and recovering method and system and medium
By adopting container virtualization technology and CRIU technology in combat simulation systems, the complete archive and recovery of the simulation operation state is achieved, solving the problem that the existing technology cannot fully save or restore the simulation operation state, and reducing the implementation cost.
Patent Information
- Application Number
- CN202411642719.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-18
AI Technical Summary
The existing technology cannot completely save or restore the simulation running state, especially in applications such as multi-branch simulation that require high accuracy, resulting in inconsistent with the restored simulation state and the pre-archive state.
Using container virtualization technology, the simulation engine and simulation model are run in the virtualized container. Through the freezing and thawing functions of the container, the overall storage and recovery of the simulation operation environment is achieved, and the simulation engine status data, simulation model status data and container status are generated. Data simulation engine container archive file.
The simulation operation state is realized, ensuring the storage and recovery of the simulation operation state, including data running in memory, and reducing the additional modification cost of the simulation engine and simulation model.
Smart Images

Figure CN119477113A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of combat simulation storage technology, and in particular to a combat simulation running state archiving and recovery method and system. Background Art
[0002] Traditional combat simulation generally adopts a predefined simulation system state set for the simulation running state archiving and recovery function, and only saves and restores these state data; or the simulation system state saving work is handed over to the simulation model, and the simulation engine is only responsible for scheduling the model to save and restore the state. The first type of method requires the use of additional data collection and recovery mechanisms to complete the simulation running state archiving and recovery; the second type of method requires all models to additionally implement model state archiving and recovery logic. These methods can only save and restore part of the state of the simulation system, which inevitably causes the problem that the restored simulation state is inconsistent with the state before archiving. In simulation applications with high precision requirements such as multi-branch simulation, incomplete simulation running states cannot meet usage needs.
[0003] In addition, in order to realize the archiving and recovery of simulation running status, the existing technology can be divided according to the module for collecting simulation running status, including simulation engine collection scheme and simulation model collection scheme. The simulation engine collection scheme is to collect the simulation running status through the simulation engine, convert the status data into simulation assumption files for storage; and when recovery is needed, the simulation engine loads the stored simulation assumption files to complete the simulation initialization and approximately restore the previous simulation running state, but it is impossible to realize the collection, storage and recovery of all state data; for example, the temporary calculation process data inside the simulation model will inevitably be lost. The simulation model collection scheme is to let the simulation model realize the function of collecting simulation running status data, each simulation model customizes its own simulation running status collection work, and uses the collected data to restore its own running state when restoring; although in theory, the complete archiving and recovery of the overall running state of the simulation system can be realized, but in actual application, all simulation models need to realize the logic of data collection and state recovery respectively, and the corresponding model transformation cost is high; the integrity of the collected and archived simulation running status data depends on hundreds of simulation models, which also greatly reduces the reliability of this function. Summary of the invention
[0004] The purpose of the present invention is to provide a combat simulation running status archiving and recovery method and system to improve the above technical problems.
[0005] In order to achieve the above-mentioned object of the invention, the embodiment of the present invention provides the following technical solutions:
[0006] A combat simulation operation status archiving method, comprising:
[0007] S1. Start the simulation container and connect the front-end interface to the simulation engine by running the control module;
[0008] S2. Selecting corresponding simulation assumptions through the operation control module and transmitting them to the simulation engine;
[0009] S3, based on the simulation assumption conditions, the simulation engine calls the simulation model to determine the simulation combat entity, the simulation combat behavior and the simulation battlefield environment, and performs simulation operation;
[0010] S4, obtaining an archive operation instruction through the archive management module, and transmitting it to the simulation engine, and suspending the simulation operation;
[0011] S5, freezing the simulation engine and the simulation model through the container, and using the archive management module to generate and store a simulation engine container archive file;
[0012] S6. Based on the simulation engine container archive file, the archive management module collects and stores the description information of the operation control module to obtain the archive status;
[0013] S7. Determine the archiving completion status based on the archiving status, and transmit it to the simulation engine to continue the simulation operation.
[0014] Furthermore, the simulation assumption conditions are the initial state and initial parameters of the simulation operation.
[0015] Furthermore, freezing the simulation engine and the simulation model through the container, and using the operation control module to generate and store a simulation engine container archive file includes:
[0016] Freezing the simulation engine and the simulation model using a freezing function of the container;
[0017] Using the CRIU method in the operation control module to collect the state information of the container, simulation engine and simulation model in the frozen state, generate a corresponding binary file, that is, generate a simulation engine container archive file, and store it in the archive management module;
[0018] The generated simulation engine container archive file includes simulation running status and container status data; the simulation running status includes simulation engine status data and simulation model status data; the simulation model status data includes simulation model external status data and simulation model internal status data.
[0019] Furthermore, based on the simulation engine container archive file, the description information of the operation control module is collected and stored by the archive management module to obtain the archive status, including:
[0020] The description information of the operation control module is collected through the archive management module; the description information is associated with the simulation engine container archive file to obtain associated information; the description information and its corresponding associated information are stored in the archive management module.
[0021] A method for restoring a combat simulation running state, comprising:
[0022] A1. Loading description information through the archive management module; using the description information as archive and generating an archive list;
[0023] A2. Based on operational requirements, select an archive in the archive list as the archive to be restored, and generate an archive restoration instruction;
[0024] A3. Based on the archive to be restored, obtain corresponding associated information;
[0025] A4. Based on the archive recovery instruction and the associated information, the corresponding simulation engine container archive file is loaded through the archive management module, the simulation engine connection configuration information is determined, and the simulation engine container archive file is displayed by running the control module; the simulation engine container archive file includes simulation engine status data, simulation model status data and container status data;
[0026] A5. Based on the simulation engine connection configuration information, the simulation engine status data, the simulation model status data and the container status data are applied to the simulation engine, the simulation model and the container by running the management and control module to obtain the recovery status information;
[0027] A6. Based on the recovery status information, confirm the recovery status of the combat simulation and perform simulation operation through the simulation engine.
[0028] A combat simulation operation status archiving and recovery system, comprising an operation control module, an archive management module and a simulation engine container module; the simulation engine container module comprises a simulation container, a simulation engine and a plurality of simulation models; wherein:
[0029] The operation control module is used to connect the front-end interface and the simulation engine through the operation control module to provide a user-oriented operation interface; select simulation assumptions and transmit them to the simulation engine; display the simulation engine container archive file; and provide control functions for simulation operation;
[0030] An archive management module, used to manage and store simulation engine container archive files, description information and corresponding associated information;
[0031] The simulation container is used to provide a corresponding software operating environment for the simulation engine and simulation function submodules;
[0032] The simulation engine is used to manage the start and end of the simulation run, and provides model management, time management, and event management functions during the simulation run, and calls the simulation model to drive the simulation run;
[0033] The simulation model is used to provide combat simulation environment and its processes, entities, and behaviors for different types of simulation objects.
[0034] A readable storage medium stores executable instructions, which, when executed by a processor, implement any of the methods or systems described above.
[0035] The beneficial effects of the present invention are:
[0036] The present invention is based on container virtualization technology and provides a simulation running status archiving and recovery method and system thereof. The environment when the simulation system is running is regarded as a whole, and the simulation engine is allowed to run in a virtualized container. When archiving is required, the overall preservation of the simulation running environment is realized through the container, and complete archiving and recovery of the simulation running status is realized at a higher level. The complete simulation running status including the data running in the memory can be ensured, which solves the problem that the prior art cannot completely save or restore the simulation running status, and realizes complete archiving and recovery of the simulation running status; no additional modification of the simulation engine and the simulation model is required, which can effectively reduce the implementation cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 It is a flow chart of a method for archiving the operation status of a combat simulation in an embodiment of the present invention;
[0039] Figure 2 It is a flow chart of a method for restoring a combat simulation running state in an embodiment of the present invention;
[0040] Figure 3 The diagram is a schematic diagram of the combat simulation operation status archiving and recovery system in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0042] In the field of combat simulation, the simulation operation is driven by the simulation engine and schedules multiple simulation models to simulate the combat entities, combat behaviors and battlefield environment in the battlefield environment, and construct a virtual battlefield environment similar to the real battlefield, so as to carry out tasks such as virtual testing of equipment performance / effectiveness and tactical simulation exercises.
[0043] The process of the simulation engine scheduling the simulation model to simulate the battlefield is generally carried out in the order of simulation time. When conducting multi-branch simulation, or because the simulation lasts for a long time, it is necessary to save the simulation state at a certain moment so that it can be restored as needed later. Taking multi-branch simulation as an example, during the simulation process, when facing a certain key decision point, different decisions will have different impacts on the subsequent development of the virtual battlefield. To compare the pros and cons of different decisions, it is best to establish the decision on the same initial state, and then analyze and evaluate the decision effect according to the subsequent state changes. In addition, in some long-term simulation scenarios, the simulation time is too long to be completed in one go, and it is necessary to save the simulation running state and interrupt the simulation so that the unfinished simulation task can be continued next time. To achieve the above process, it is necessary to have the support of the simulation running state archiving and recovery function.
[0044] Combat simulation refers to a research method that uses computer simulation technology to simulate and deduce the combat process, combat results, and things directly related to the combat. It is widely used for training or analysis purposes, and imitates the combat process through known or assumed situations and data, including live-fire exercises, sandbox operations, combat games, computer combat simulations and other forms. A simulation system refers to a system that uses computer technology and software models to simulate behaviors and processes in the real world or hypothetical systems. By creating an artificial environment, users can conduct experiments, tests and training without actual risks or costs. In the present invention, the simulation model is a simulation engine container, that is, it includes a simulation engine, a simulation container and multiple simulation models.
[0045] See also Figure 1 , this embodiment provides a combat simulation running status archiving method, which includes:
[0046] S1. Start the simulation container and connect the front-end interface to the simulation engine by running the control module;
[0047] S2. According to operational requirements, the operation control module selects corresponding simulation assumption conditions and transmits them to the simulation engine; the operational requirements include simulation tasks;
[0048] The simulation assumption conditions are the initial input of the simulation engine and are used to describe the simulation task information, which includes the initial state and initial parameters of the simulation operation.
[0049] S3, based on the simulation assumption conditions, calling the simulation model through the simulation engine, and inputting the simulation assumption conditions into the called simulation model, determining the simulated combat entity, simulated combat behavior and simulated battlefield environment, and performing simulation operation;
[0050] S4, obtaining an archive operation instruction through the archive management module, and transmitting it to the simulation engine, and suspending the simulation operation;
[0051] When obtaining the archive operation instruction, the archive operation can be further triggered based on typical application requirements. Typical application requirements can be to set key decision points.
[0052] S5, freezing the simulation engine and the simulation model through the container, and using the archive management module to generate and store a simulation engine container archive file;
[0053] The freezing of the simulation engine and the simulation model by the container, and generating and storing a simulation engine container archive file by the operation control module include:
[0054] Freezing the simulation engine and the simulation model using a freezing function of the container;
[0055] As a virtualization technology, containers have the functions of thawing and freezing. Containers use the namespaces and control groups (Cgroups) technology of the Linux operating system to freeze processes. Linux namespace is a kernel technology that provides isolated views for processes so that different containers running on the same host machine do not interfere with each other. Each container is like running on an independent machine with a complete operating system. Namespaces can provide containers with an isolated environment including PID (process ID), network, IPC (inter-process communication), mount points, UTS (host name and domain name), etc. In the PID namespace, the process ID of each container is independent, and the process inside the container cannot obtain the processes of the host machine and other containers. Control groups provide resource restrictions, monitoring and recording for a group of processes. Control groups control the limits of CPU, memory, disk I / O and other resources used by containers to ensure the isolation of container resource usage. In addition, control groups also allow all processes in the container to be suspended and resumed, which is beneficial to the pause and resume operations of the container. Containers provide operations to pause and resume containers. When a container is suspended, all processes in the container are frozen, and the corresponding execution state (container state data) is saved in memory, but no cleanup is performed, which means that the container can be temporarily suspended without losing any state information. When the container needs to be restored, the restore command can be used to unfreeze all processes and the container will be restored to its previous state.
[0056] Using the CRIU method in the operation control module to collect the state information of the container, simulation engine and simulation model in the frozen state, generate a corresponding binary file, that is, generate a simulation engine container archive file, and store it in the archive management module;
[0057] CRIU (Checkpoint / Restore in Userspace) is a tool provided based on containers. It allows users to freeze running containers or applications, save their status to disk, and then restore them to the original status at any time. It is particularly suitable for scenarios that require container or application migration, snapshots, etc.
[0058] At this time, the running process of the simulation system is taken as a whole, and the process memory is completely saved, so that no matter what type of model is contained in the simulation system, its external state and internal state can be archived at the same time, which can ensure the complete preservation of the running state of the simulation model and is more adaptable.
[0059] The generated simulation engine container archive file includes simulation running status and container status data; the simulation running status includes simulation engine status data and simulation model status data; the simulation model status data includes simulation model external status data and simulation model internal status data.
[0060] The simulation running state is an intermediate state of the simulation engine and simulation model during the simulation running process, including the simulation engine state and the simulation model state. The simulation engine running state generally includes data such as simulation start / pause, simulation time, simulation speed, simulation entity queue, event queue, message queue, etc. The simulation model running state includes the running state of all simulation models. The running state of each simulation model includes external state data that can be accessed and read, as well as internal state data used for internal solution.
[0061] S6. Based on the simulation engine container archive file, the archive management module collects and stores the description information of the operation control module to obtain the archive status;
[0062] The archiving file based on the simulation engine container collects and stores the description information of the operation control module through the archive management module to obtain the archive status, including:
[0063] The description information of the operation control module is collected through the archive management module; the description information is associated with the simulation engine container archive file to obtain associated information; the description information and its corresponding associated information are stored in the archive management module.
[0064] S7. Determine the archiving completion status based on the archiving status, and transmit it to the simulation engine to continue the simulation operation.
[0065] Compared with the prior art, the archiving method of the present invention additionally saves the internal state data of the simulation model, such as variables and intermediate states in the simulation model operation process; since the internal state data of a typical simulation model is usually only calculated and maintained inside the simulation model and exists in the simulation model running memory, but the prior art can only save the external state data of the simulation model, when restoring, the simulation model does not use the internal state data, and the simulation model is initialized with default values, resulting in the recovery state being inconsistent with the original state, further resulting in the simulation process, simulation environment and simulation results being deviated from expectations or actual conditions, so the present invention simultaneously saves the internal state data and external state data of the simulation model, which can ensure that in the process of combat simulation, it is closer to expectations or actual conditions, which helps trainers to formulate training plans or combat plans and reduce combat error rates and combat damage rates.
[0066] like Figure 2 As shown, a method for restoring the operation state of a combat simulation includes:
[0067] A1. Before the simulation engine controls the simulation, the description information is loaded through the archive management module; the description information is used as an archive to generate an archive list;
[0068] A2. Based on operational requirements, select an archive in the archive list as the archive to be restored, and generate an archive restoration instruction;
[0069] A3. Based on the archive to be restored, obtain corresponding associated information;
[0070] A4. Based on the archive recovery instruction and the associated information, the corresponding simulation engine container archive file is loaded through the CRIU technology in the archive management module, the simulation engine connection configuration information is determined, and the simulation engine container archive file is displayed by running the control module; the simulation engine container archive file includes simulation engine status data, simulation model status data and container status data;
[0071] A5. Based on the simulation engine connection configuration information, the simulation engine status data, the simulation model status data and the container status data are applied to the simulation engine, the simulation model and the container by running the management and control module to obtain the recovery status information;
[0072] A6. Based on the recovery status information, confirm the recovery status of the combat simulation and perform simulation operation through the simulation engine.
[0073] Introducing a simulation container for simulation operation can provide a safe operating environment for the simulation engine and simulation model, reducing direct interference to the host system; and the freezing and thawing functions of the simulation container itself can be used to freeze or thaw the simulation engine, simulation model and simulation container as a whole, thereby improving resource utilization and flexibility, and facilitating the complete preservation of the running status data of the simulation engine and simulation model and the status data of the simulation container. During recovery, it is beneficial to data migration and improves data recovery capabilities.
[0074] like Figure 3 As shown, a combat simulation operation status archiving and recovery system includes an operation control module, an archive management module and a simulation engine container module; the simulation engine container module includes a simulation container, a simulation engine and multiple simulation models;
[0075] in:
[0076] The operation control module is used to connect the front-end interface and the simulation engine through the operation control module to provide a user-oriented operation interface; select simulation assumptions and transmit them to the simulation engine; display the simulation engine container archive file; and provide control functions for simulation operation;
[0077] The operation control module runs on the client computer and includes a front-end interface and back-end services. The front-end interface supports control operations such as simulation scenario loading, operation initialization, start, stop, etc.; it can browse archive files when it is necessary to restore the simulation operation status, and send archive and restore instructions to the archive management module.
[0078] An archive management module, used to manage and store simulation engine container archive files, description information and corresponding associated information;
[0079] The archive management module is in the form of a backend service and can run on the same or different client computers as the operation control module.
[0080] The simulation container is used to provide a corresponding software operating environment for the simulation engine and simulation function submodules;
[0081] The simulation engine is used to manage the start and end of the simulation run, and provides model management, time management, and event management functions during the simulation run, and calls the simulation model to drive the simulation run;
[0082] As the core component of the combat simulation operation status archiving and recovery system, the simulation engine provides the environment and tools for the operation of the simulation model, is responsible for scheduling the operation of the simulation model, and manages various calculations and logics in the simulation process.
[0083] The simulation model is used to provide combat simulation environment and its processes, entities, and behaviors for different types of simulation objects.
[0084] A simulation model refers to a software module used to simulate systems, processes or phenomena in the real world (especially battlefields); in the field of combat simulation, a simulation model specifically refers to a software module that simulates systems and processes related to virtual battlefields, which is generally divided into three categories: physical models, behavioral models and environmental models. In the present invention, models such as aircraft operation models and radar detection models can be selected as simulation models according to combat requirements.
[0085] Both the simulation model and the simulation engine run in the simulation container and, together with the simulation container, serve as objects for archiving and restoring the operational simulation running status.
[0086] Different types of simulation objects include different types of aircraft, ships, satellites, radars, etc., and can also be classified according to land, sea and air. These simulation objects run under the same simulation task (or simulation scenario) to simulate the battlefield situation.
[0087] A readable storage medium stores executable instructions, which implement the method or system when executed by a processor.
[0088] In summary, the present invention provides a simulation running status archiving and recovery method and system based on container virtualization technology and CRIU technology, which regards the environment when the simulation system is running as a whole, allows the simulation engine to run in a virtualized container, and realizes the overall preservation of the simulation running environment through the container when archiving is needed, and realizes complete archiving and recovery of the simulation running status at a higher level, which can ensure the complete simulation running status including the data running in the memory, and solves the problem that the prior art cannot completely save or restore the simulation running status, and realizes complete archiving and recovery of the simulation running status; no additional modifications are required to the simulation engine and the simulation model, which can effectively reduce the implementation cost.
[0089] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for archiving the operation status of a combat simulation, characterized in that: include: S1. Start the simulation container and connect the front-end interface to the simulation engine by running the control module; S2. Selecting corresponding simulation assumptions through the operation control module and transmitting them to the simulation engine; S3, based on the simulation assumption conditions, the simulation engine calls the simulation model to determine the simulation combat entity, the simulation combat behavior and the simulation battlefield environment, and performs simulation operation; S4, obtaining an archive operation instruction through the archive management module, and transmitting it to the simulation engine, and suspending the simulation operation; S5, freezing the simulation engine and the simulation model through the container, and using the archive management module to generate and store a simulation engine container archive file; S6. Based on the simulation engine container archive file, the archive management module collects and stores the description information of the operation control module to obtain the archive status; S7. Determine the archiving completion status based on the archiving status, and transmit it to the simulation engine to continue the simulation operation.
2. A combat simulation operation status archiving method based on claim 1, characterized in that: The simulation assumption conditions are the initial state and initial parameters of the simulation operation.
3. A combat simulation operation status archiving method based on claim 1, characterized in that: The freezing of the simulation engine and the simulation model by the container, and generating and storing a simulation engine container archive file by the operation control module include: Freezing the simulation engine and the simulation model using a freezing function of the container; Using the CRIU method in the operation control module to collect the state information of the container, simulation engine and simulation model in the frozen state, generate a corresponding binary file, that is, generate a simulation engine container archive file, and store it in the archive management module; The generated simulation engine container archive file includes simulation running status and container status data; the simulation running status includes simulation engine status data and simulation model status data; the simulation model status data includes simulation model external status data and simulation model internal status data.
4. A combat simulation operation status archiving method based on claim 1, characterized in that: The archiving file based on the simulation engine container collects and stores the description information of the operation control module through the archive management module to obtain the archive status, including: The description information of the operation control module is collected through the archive management module; the description information is associated with the simulation engine container archive file to obtain associated information; the description information and its corresponding associated information are stored in the archive management module.
5. A combat simulation running state recovery method, used to implement a combat simulation running state archiving and recovery method as claimed in any one of claims 1 to 4, characterized in that: include: A1. Loading description information through the archive management module; using the description information as archive and generating an archive list; A2. Based on operational requirements, select an archive in the archive list as the archive to be restored, and generate an archive restoration instruction; A3. Based on the archive to be restored, obtain corresponding associated information; A4. Based on the archive recovery instruction and the associated information, the corresponding simulation engine container archive file is loaded through the archive management module, the simulation engine connection configuration information is determined, and the simulation engine container archive file is displayed by running the management and control module; The simulation engine container archive file includes simulation engine state data, simulation model state data and container state data; A5. Based on the simulation engine connection configuration information, the simulation engine status data, the simulation model status data and the container status data are applied to the simulation engine, the simulation model and the container by running the management and control module to obtain the recovery status information; A6. Based on the recovery status information, confirm the recovery status of the combat simulation and perform simulation operation through the simulation engine.
6. A combat simulation running status archiving and recovery system, used to implement a combat simulation running status archiving and recovery method according to any one of claims 1 to 5, characterized in that: It includes an operation control module, an archive management module and a simulation engine container module; the simulation engine container module includes a simulation container, a simulation engine and multiple simulation models; wherein: The operation control module is used to connect the front-end interface and the simulation engine through the operation control module to provide a user-oriented operation interface; select simulation assumptions and transmit them to the simulation engine; display the simulation engine container archive file; and provide control functions for simulation operation; An archive management module, used to manage and store simulation engine container archive files, description information and corresponding associated information; The simulation container is used to provide a corresponding software operating environment for the simulation engine and simulation function submodules; The simulation engine is used to manage the start and end of the simulation run, and provides model management, time management, and event management functions during the simulation run, and calls the simulation model to drive the simulation run; The simulation model is used to provide combat simulation environment and its processes, entities, and behaviors for different types of simulation objects.
7. A readable storage medium having executable instructions stored thereon, characterized in that: When the executable instructions are executed by a processor, the method or system according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Container cloud technology-based parallel simulation method and device, equipment and storage medium
CN120743424A