A method, device and equipment for dynamically editing military simulation deduction supporting running state rule reconstruction and a storage medium

By performing pre-simulation and hierarchical conflict assessment in the shadow space, combined with atomic-level rule replacement and weighted smoothing correction, the crash and state transition problems of the military simulation simulation system during rule replacement were solved, and stable simulation data output was achieved.

CN122173120AActive Publication Date: 2026-06-09XIAMEN YUANTING INFORMATION TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN YUANTING INFORMATION TECH CO LTD
Filing Date
2026-05-11
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing military simulation systems are prone to crashing when running rules are replaced, and entity state vectors undergo a step jump at the moment of switching, affecting the reliability of simulation data.

Method used

By pre-simulating and hierarchically assessing the state snapshots of the affected entity set in the shadow space, a switching enable signal is generated. Atomic rule replacement is performed during the simulation step intervals, and the switching completion timestamp is recorded. Finally, the state data stream is corrected by weighted smoothing to achieve unified closed-loop control of rule replacement.

Benefits of technology

This effectively prevents simulation system crashes, eliminates step jumps in entity state vectors, and ensures the reliability and real-time performance of simulation data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173120A_ABST
    Figure CN122173120A_ABST
Patent Text Reader

Abstract

The application provides a kind of dynamically editable military simulation deduction method, device, equipment and storage medium supporting running state rule reconstruction, by the state snapshot of affected entity set is transmitted to the shadow space isolated from main loop memory, to provide independent verification environment for new rules;In the shadow space, pre-deduce new rules based on the snapshot and perform hierarchical conflict assessment, complete isolated safety verification before loading, and quantify the difference between new and old rules with conflict residual;In the simulation step gap, the behavior rule calculation handle is replaced at atomic level in response to switching enable signal and the switching completion timestamp is recorded, the timing of the replacement action is controlled, and the state data stream is weighted and smoothed based on the conflict residual in the transition period from the switching completion timestamp, eliminating the state vector step jump, thereby integrating the above three links into a unified closed-loop control, solving the problem of step jump.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of military simulation training, and in particular to a dynamically editable military simulation method, apparatus, equipment, and storage medium that supports operational rule reconstruction. Background Technology

[0002] Military simulation systems are core technological support platforms for modern combat experiments, weapon and equipment effectiveness assessments, and command and decision-making training. During simulation exercises, the directing personnel or both the red and blue teams often need to dynamically adjust the behavioral rules of combat entities according to changes in the battle situation, such as modifying missile penetration strategies, changing radar detection models, and introducing new tactical maneuver modes.

[0003] Existing military simulation systems generally adopt a "pause, unload, load, restart" cold refactoring mode when dealing with the aforementioned runtime rule adjustment requirements. This involves first halting the time progression of the main simulation loop, unloading the old rule model from memory, loading the new rule model, and finally restarting the simulation. Although the industry has also attempted to achieve runtime rule updates through methods such as dynamic link library (DLL) hot loading and script virtual machine interpretation execution, most existing solutions only focus on the implementation of the single action of "code replacement," failing to coordinate the design of various stages before and after rule switching from the perspective of the overall simulation system operation process.

[0004] When replacing behavior rules without pausing the main simulation loop, the lack of unified process control over three aspects—isolation and safety verification of the new rules before loading, timing constraints on the replacement actions during simulation step intervals, and transition and connection of the output state vectors of the old and new rules at the moment of replacement—leads to either the main simulation crashing due to potential risks such as numerical overflow, violation of physical limits, or geographical constraints in the new rules, or serious violations of dynamic laws due to step jumps in the entity state vectors at the moment of replacement (such as instantaneous right-angle turns of missiles or sudden changes in aircraft speed). This results in the simulation data losing its scientific credibility and being unusable for equipment performance evaluation and tactical verification.

[0005] In view of the above, this application is hereby submitted. Summary of the Invention

[0006] This invention discloses a dynamically editable military simulation method, apparatus, equipment, and storage medium that supports the reconstruction of runtime rules. It aims to solve the problems of easy crashes in the main simulation when runtime rules are replaced and step jumps in entity state vectors at the moment of switching in existing military simulation systems.

[0007] The first embodiment of the present invention provides a dynamically editable military simulation and deduction method that supports runtime rule reconstruction, comprising: In response to the rule reconstruction command, a state snapshot of the affected entity set is obtained from the battlefield data center, and the state snapshot is passed to the shadow space isolated from the simulation main loop memory; Based on the state snapshot in the shadow space, a pre-deduction of the affected entity set is performed using the new rules to be loaded, with a predetermined number of steps. The pre-deduction results are compared with the security rule base to perform hierarchical conflict assessment, and a switching enable signal is generated based on the assessment results. The switching enable signal carries the conflict residual output by the hierarchical conflict assessment. During the interval between adjacent simulation steps in the main simulation loop, in response to the switching enable signal, the behavior rule calculation handles of each entity in the affected entity set are atomically replaced, and the switching completion timestamp is recorded. Starting from the timestamp, during the transition period, the entity state data stream output by the simulation main loop is weighted and smoothed based on the conflict residual, and the corrected state data is written back to the battlefield data center.

[0008] The second embodiment of the present invention provides a dynamically editable military simulation and deduction device that supports runtime rule reconstruction, comprising: A snapshot acquisition unit is used to acquire a state snapshot of the affected entity set from the battlefield data center in response to a rule reconstruction instruction, and to pass the state snapshot to the shadow space isolated from the simulation main loop memory. The pre-evaluation unit is used to perform a pre-evaluation of the affected entity set in the shadow space based on the state snapshot and using the new rules to be loaded, compare the pre-evaluation results with the security rule base to perform hierarchical conflict evaluation, and generate a switching enable signal based on the evaluation results. The switching enable signal carries the conflict residual output by the hierarchical conflict evaluation. The rule switching unit is used to atomically replace the behavior rule calculation handle of each entity in the affected entity set in response to the switching enable signal during the gap between adjacent simulation steps in the main simulation loop, and record the switching completion timestamp. The state convergence unit is used to perform weighted smoothing correction on the entity state data stream output by the simulation main loop based on the conflict residual during the transition period, starting from the timestamp, and write the corrected state data back to the battlefield data center.

[0009] The third embodiment of the present invention provides a dynamically editable military simulation and deduction device that supports runtime rule reconstruction, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the dynamically editable military simulation and deduction method that supports runtime rule reconstruction as described in any of the above embodiments.

[0010] The fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program, which can be executed by the processor of the device where the computer-readable storage medium is located, to implement a dynamically editable military simulation and deduction method that supports runtime rule reconstruction as described in any of the above embodiments.

[0011] Based on the present invention, a dynamically editable military simulation and deduction method, apparatus, device, and storage medium supporting runtime rule reconstruction is provided. This invention provides an independent verification environment for new rules by transferring a snapshot of the state of the affected entity set to a shadow space isolated from the main loop memory. In this shadow space, the new rules are pre-deduced based on the snapshot, and a hierarchical conflict assessment is performed. Isolation security verification is completed before loading, and the differences between the old and new rules are quantified using conflict residuals. During simulation step intervals, a switching enable signal is used to atomically replace the behavior rule calculation handle and record the switching completion timestamp, achieving time-controlled takeover of the replacement action. From the switching completion timestamp, the state data stream is weighted and smoothed based on the conflict residuals during the transition period, eliminating step jumps in the state vector. This integrates the above three stages into a unified closed-loop management system, solving the problems of main simulation crashes and step jumps in entity state vectors during runtime rule replacement in existing military simulation and deduction systems. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating a dynamically editable military simulation and deduction method that supports runtime rule reconstruction, provided in the first embodiment of the present invention. Figure 2 This is a schematic diagram of a dynamically editable military simulation and deduction device that supports the reconstruction of running rules, provided in the second embodiment of the present invention. Detailed Implementation

[0013] 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 only some embodiments of the present invention, and 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.

[0014] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0015] This invention discloses a dynamically editable military simulation method, apparatus, equipment, and storage medium that supports the reconstruction of runtime rules. It aims to solve the problems of easy crashes in the main simulation when runtime rules are replaced and step jumps in entity state vectors at the moment of switching in existing military simulation systems.

[0016] Please see Figure 1 The first embodiment of the present invention provides a dynamically editable military simulation method that supports runtime rule reconstruction. This method can be executed by a simulation device (or system), specifically by one or more processors within the simulation device, to at least implement the following steps: S101, in response to the rule reconstruction instruction, obtain a state snapshot of the affected entity set from the battlefield data center, and pass the state snapshot to the shadow space isolated from the simulation main loop memory; In this embodiment, when the simulation runs to T=600.00s (simulation step size ΔT=0.02s), the director issues a rule reconstruction command through the human-computer interaction interface, specifying that the flight rules of the two incoming aircraft in the Red Team's air target interception process be changed from uniform linear maneuver to serpentine maneuver. The two aircraft constitute the set of affected entities described in this step.

[0017] During the main simulation cycle, the battlefield data center continuously maintains the operational data of each simulated entity. Its underlying layer is based on a memory area shared among the computing nodes of the simulation server, and a copy-on-write mechanism is used to ensure that the main loop writes and external reads are parallel and interference-free. Specifically, at the beginning of each simulation step, the battlefield data center performs an incremental backup of the key operational parameters of the monitored entity, such as pose, velocity, acceleration, remaining load, and electromagnetic radiation power, and only records the fields that have changed relative to the previous backup, so as to reduce backup overhead and maintain a high refresh rate.

[0018] In response to the aforementioned rule reconstruction instruction, the snapshot acquisition unit initiates a read request to the battlefield data center. The request carries the entity identifiers of the affected entity set and the simulation timestamp of the request time. The battlefield data center does not interrupt the simulation main loop's write operations to the shared memory region. Instead, it uses the copy-on-write mechanism to create read-only copies of the most recent incremental backups corresponding to the two aircraft in the affected entity set at time T=600.00s. The copy content includes position coordinates (x, y, z) and three-dimensional velocity vectors (v...). x , v y , v z The parameters include current overload and remaining fuel. The read-only copy serves as a state snapshot as described in this step. After being encapsulated by the snapshot acquisition unit, it is transmitted along with the affected entity set identifier and the simulation timestamp of the request time to the shadow space isolated from the simulation main loop memory via an internal data channel, so that the new rules can be pre-performed and verified in the shadow space later.

[0019] S102, in the shadow space, based on the state snapshot, a pre-deduction of the affected entity set is performed using the new rules to be loaded, the pre-deduction result is compared with the security rule base to perform hierarchical conflict assessment, and a switching enable signal is generated according to the assessment result, the switching enable signal carrying the conflict residual output by the hierarchical conflict assessment; Upon receiving the state snapshot, the identifier of the affected entity set, and the simulation timestamp of the request time transmitted via the internal data channel, an isolation rehearsal and conflict assessment of the new rule are initiated within the shadow space. The shadow space is a separate computing unit delineated from the simulation server during the simulation server initialization phase using CPU core isolation technology. In this embodiment, the independent computing unit is bound to two CPU cores numbered #6 and #7, and a dedicated memory region physically isolated from the memory occupied by the main simulation loop is allocated to it. The CPU cores numbered #6 and #7 are removed from the main loop scheduling domain through the operating system's isolcpus parameter and cgroup mechanism, preventing them from participating in task dispatching for the main loop thread. A new rule plugin (i.e., a serpentine maneuvering logic plugin) is loaded into this independent computing unit. The transmitted state snapshot is used as the initial pre-deduction value, and the new rule is invoked to continuously deduce the evolution trajectory for the next N simulation steps. In this embodiment, N is 10, corresponding to a pre-deduction duration of 0.2 seconds. The pre-deduction thread and the main deduction thread do not physically compete for CPU computing resources and cache resources.

[0020] After the pre-simulation is completed, the pre-simulation evaluation unit compares the obtained evolution trajectory with the three types of constraints preset in the safety rule base item by item: when the comparison result hits the numerical legality constraint, such as when the position coordinates exceed the simulation domain, the velocity component is not a number (NaN), or the simulation process enters an infinite loop causing a timeout, it is judged as a first-level conflict. The pre-simulation evaluation unit immediately blocks the switching channel, does not generate a switching enable signal, and sends an alarm report back to the command terminal; when the comparison result hits the entity dynamics limit constraint, such as in this embodiment, the pre-simulation detects that the instantaneous centripetal overload of the target aircraft under serpentine maneuver reaches 32G, exceeding the 25G set by the structural envelope of this type of aircraft. If the threshold is exceeded, it is determined to be a Level 2 conflict. The pre-simulation evaluation unit writes the difference between the hit value and the corresponding constraint threshold (i.e., 7G) as the conflict residual ΔR into the switching enable signal. When the comparison result hits the multi-entity cooperative phase constraint, for example, when the phase difference between the pre-simulation trajectories of two aircraft in the affected entity set exceeds the preset threshold at the same simulation step size, it is determined to be a Level 3 conflict. The pre-simulation evaluation unit adds a phase alignment mark to the switching enable signal, which is used to force alignment of the switching timing of each entity in the affected entity set. In this embodiment, the pre-simulation result did not hit the numerical legality constraint or the multi-entity phase difference exceeded the limit, but only hit the entity dynamics limit constraint. Therefore, the switching enable signal finally generated by the pre-simulation evaluation unit carries the conflict residual ΔR=7G, which is sent to the rule switching unit along with the affected entity set identifier and the switching trigger command as the input basis for starting the atomic-level replacement. At the same time, the simulation main loop and the state update process of other unaffected entities within it are not affected by the pre-simulation activity and continue to advance normally at a step size of 0.02 seconds.

[0021] S103, during the gap between adjacent simulation steps in the main simulation loop, in response to the switching enable signal, atomically replace the behavior rule calculation handles of each entity in the affected entity set, and record the switching completion timestamp. In this embodiment, after receiving the sent switching enable signal, conflict residual ΔR, and affected entity set identifier, the system waits for the simulation main loop to reach the gap between the most recent adjacent simulation steps before entering the working state. In this embodiment, the rule switching unit initiates the takeover action within the gap window between the end of the T=600.02s simulation step and the start of the T=600.04s simulation step. The available duration of the gap window depends on the time difference between the state write-back after the step ends and the state read of the next step, which is approximately 50 microseconds in this embodiment.

[0022] For the behavior rule calculation handles of the two aircraft in the affected entity set, the rule switching unit selects one of the following atomic replacement methods based on the current simulation server's runtime environment: In a native compiled runtime environment, the behavior rule function is compiled into a dynamic link library and mounted in the entity behavior table as a function pointer. The rule switching unit uses the Compare-And-Swap atomic instruction to directly replace the entry pointer of the behavior rule function in memory, atomically replacing the original entry pointer pointing to the uniform linear maneuver algorithm with the entry pointer pointing to the serpentine maneuver algorithm; In a script virtual machine runtime environment, the behavior rules are registered in the virtual machine's global object registry as script objects. The rule switching unit uses atomic operations to rewrite the script behavior instance reference bound to the target entity in the registry, completing the seamless switching of behavior rules without restarting the virtual machine instance. In this embodiment, both aircraft run in a native compiled environment, so the first method is used for replacement.

[0023] Considering the possibility of write conflicts in extreme cases where CAS operations fail to complete within a single retry due to contention failure, the rule switching unit uses a spinlock to temporarily suspend the state update thread of the target entity when the CAS operation is unavailable. In this embodiment, the maximum suspension time threshold of the spinlock is set to 0.25% of the single simulation step size ΔT (i.e., 50 microseconds). The actual suspension time of the two aircraft was less than 5 microseconds, which is far below the threshold. During the suspension, the simulation main loop continues to update the state of other unaffected entities as usual.

[0024] After completing the atomic replacement of the behavior rule calculation handle and before recording the switching completion timestamp, the rule switching unit further triggers a memory barrier operation. In this embodiment, this is achieved by inserting an `mfence` instruction, which forces the replaced entry pointer to be visible to all CPU cores of the simulation server, preventing subsequent simulation steps from reading the old entry pointer residing in the local cache on other cores. After the memory barrier operation is completed, the rule switching unit reads the timestamp of the current simulation main loop using the system clock and uses it as the switching completion timestamp. Recording is performed in this embodiment. and will Together with the conflict residual ΔR, it serves as the input for initiating weighted smoothing correction.

[0025] S104, starting from the timestamp, during the transition period, the entity state data stream output by the simulation main loop is weighted and smoothed based on the conflict residual, and the corrected state data is written back to the battlefield data center.

[0026] Upon receiving the switch completion timestamp After the conflict residual ΔR=7G, from The system performs weighted smoothing correction on the entity state data stream output by the main simulation loop. In this embodiment, the affected entity set includes two aircraft, which have been assigned a unified cooperative scheduling identifier and a common timestamp base of 600.00s. Based on the cooperative scheduling identifier, all entities in the set are uniformly taken over, with a common switchover completion timestamp. Recording is performed, therefore the two aircraft share the same transition period in this embodiment. Inner weight function The evolution progress will not result in a situation where one aircraft in the set has fully adopted the new rules while another still partially follows the old rules, creating a disconnect. The state convergence unit first generates a reference transition period based on ΔR=7G according to a preset mapping relationship. The mapping relationship described in this embodiment is as follows: ,in, Taking 0.10 seconds (the default baseline transition period) and k = 0.0114 seconds / G (the conversion factor from conflict residual to transition period extension), substituting these values ​​into ΔR = 7G, we get... 0.18 seconds, the mapping relationship satisfies The larger The longer the monotonic relationship; the longer the transition period. The initial value is taken After entering the transition period, the simulation main loop, within each simulation step, calls in parallel the old rule calculation handle (i.e., uniform linear maneuver algorithm) and the new rule calculation handle (i.e., serpentine maneuver algorithm) for each aircraft in the affected entity set, respectively, to obtain the old rule state vector. With the new rule state vector Both contain three components: position, velocity, and acceleration; the state convergence unit generates the final output state vector according to the following formula: when hour, ;when hour, The weight function In the interval , The value decreases monotonically from 1 to 0 in this embodiment. Take linear form ; The corrected state data is written back to the battlefield data center via a copy-on-write mechanism in shared memory, allowing for direct reading in subsequent simulation steps. Simultaneously, the state convergence unit calculates the dynamic situation vector residual in real time within each simulation step. And based on this, the transition period Make dynamic adjustments: In this embodiment, a preset upper threshold is used. Take 5 m / s (for velocity components) and set a lower threshold. Take 0.1 m / s and extend the step size in one go. Take 0.02 seconds, shorten the step size in one go The timeout is set to 0.02 seconds, and the continuous step trigger number M is set to 3. At t=600.06s, the state convergence unit detects... Reaching 6.2 m / s, exceeding The threshold was then used to adjust the transition period from... Press in 0.18 seconds seconds extended to Seconds, and slow down accordingly. The decay rate causes the weighting function to re-plan its monotonically decreasing path along the extended transition period; thereafter, ΔS(t) always lies between the upper and lower thresholds, and the transition period no longer changes. At t=600.06s, the output position still deviates from the old trajectory, and the aircraft begins to turn slightly. (i.e., at t=600.24s) When the transition period ends, the output has completely followed the new trajectory, and the aircraft smoothly transitions into a serpentine maneuver. Throughout the process, the position, velocity, and acceleration change continuously without any step jumps. After the transition period ends, the state convergence unit automatically stops running and releases the corresponding computing resources. Subsequent state data is directly generated by... The decision was made. Post-event data analysis showed that the velocity vector error of the two aircraft in the affected entity set at the switching point was less than 0.1 m / s, the acceleration error was less than 0.05G, and the maximum instantaneous overload during the transition period was suppressed to within 24.5G, without triggering a structural envelope alarm. During the switching period, the simulation main loop frame rate remained stable at 50 FPS (corresponding to a standard step size of 0.02 seconds), the CPU utilization increased by 2.7%, and the memory copy latency was less than 50 microseconds, meeting the real-time requirements of high-fidelity simulation.

[0027] Please see Figure 2 The second embodiment of the present invention provides a dynamically editable military simulation and deduction device that supports runtime rule reconstruction, comprising: The snapshot acquisition unit 201 is used to acquire a state snapshot of the affected entity set from the battlefield data center in response to the rule reconstruction instruction, and to pass the state snapshot to the shadow space isolated from the simulation main loop memory; The pre-evaluation unit 202 is used to perform a pre-evaluation of the affected entity set in the shadow space based on the state snapshot and using the new rules to be loaded, compare the pre-evaluation results with the security rule base to perform hierarchical conflict evaluation, and generate a switching enable signal based on the evaluation results. The switching enable signal carries the conflict residual output by the hierarchical conflict evaluation. The rule switching unit 203 is used to, in response to the switching enable signal, atomically replace the behavior rule calculation handle of each entity in the affected entity set during the gap between adjacent simulation steps in the main simulation loop, and record the switching completion timestamp. The state convergence unit 204 is used to perform weighted smoothing correction on the entity state data stream output by the simulation main loop based on the conflict residual during the transition period, starting from the timestamp, and write the corrected state data back to the battlefield data center.

[0028] The third embodiment of the present invention provides a dynamically editable military simulation and deduction device that supports runtime rule reconstruction, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the dynamically editable military simulation and deduction method that supports runtime rule reconstruction as described in any of the above embodiments.

[0029] The fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program, which can be executed by the processor of the device where the computer-readable storage medium is located, to implement a dynamically editable military simulation and deduction method that supports runtime rule reconstruction as described in any of the above embodiments.

[0030] Based on the present invention, a dynamically editable military simulation and deduction method, apparatus, device, and storage medium supporting runtime rule reconstruction is provided. This invention provides an independent verification environment for new rules by transferring a snapshot of the state of the affected entity set to a shadow space isolated from the main loop memory. In this shadow space, the new rules are pre-deduced based on the snapshot, and a hierarchical conflict assessment is performed. Isolation security verification is completed before loading, and the differences between the old and new rules are quantified using conflict residuals. During simulation step intervals, a switching enable signal is used to atomically replace the behavior rule calculation handle and record the switching completion timestamp, achieving time-controlled takeover of the replacement action. From the switching completion timestamp, the state data stream is weighted and smoothed based on the conflict residuals during the transition period, eliminating step jumps in the state vector. This integrates the above three stages into a unified closed-loop management system, solving the problems of main simulation crashes and step jumps in entity state vectors during runtime rule replacement in existing military simulation and deduction systems.

[0031] Exemplary examples show that the computer program described in the third and fourth embodiments of the present invention can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in implementing a dynamically editable military simulation and deduction device that supports runtime rule reconstruction. For example, the apparatus described in the second embodiment of the present invention.

[0032] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. This processor is the control center of the dynamically editable military simulation and deduction method that supports runtime rule reconstruction, and it connects various parts of the method using various interfaces and lines to implement the dynamic editing of the military simulation and deduction method that supports runtime rule reconstruction.

[0033] The memory can be used to store the computer programs and / or modules. The processor, by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory, implements various functions of a dynamically editable military simulation and deduction method that supports runtime rule reconstruction. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, text conversion function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, text message data, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0034] If the implemented module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0035] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0036] 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 variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A dynamically editable military simulation and deduction method supporting runtime rule reconstruction, characterized in that, include: In response to the rule reconstruction command, a state snapshot of the affected entity set is obtained from the battlefield data center, and the state snapshot is passed to the shadow space isolated from the simulation main loop memory; Based on the state snapshot in the shadow space, a pre-deduction of the affected entity set is performed using the new rules to be loaded, with a predetermined number of steps. The pre-deduction results are compared with the security rule base to perform hierarchical conflict assessment, and a switching enable signal is generated based on the assessment results. The switching enable signal carries the conflict residual output by the hierarchical conflict assessment. During the interval between adjacent simulation steps in the main simulation loop, in response to the switching enable signal, the behavior rule calculation handles of each entity in the affected entity set are atomically replaced, and the switching completion timestamp is recorded. Starting from the timestamp, during the transition period, the entity state data stream output by the simulation main loop is weighted and smoothed based on the conflict residual, and the corrected state data is written back to the battlefield data center.

2. The dynamically editable military simulation and deduction method supporting runtime rule reconstruction according to claim 1, characterized in that, The process of obtaining a state snapshot of the affected entity set from the battlefield data center specifically involves: The battlefield data center uses a copy-on-write mechanism based on shared memory to continuously maintain the runtime data of each simulated entity, and performs incremental backups of the pose, velocity, acceleration, payload, and electromagnetic radiation power of the monitored entity at the beginning of each simulation step. In response to the rule reconstruction instruction, the simulation main loop does not interrupt the write operation to the shared memory. The copy-on-write mechanism is used to create a read-only copy for each entity in the affected entity set corresponding to the most recent incremental backup at the response time, and the read-only copy is passed to the shadow space as the state snapshot.

3. The dynamically editable military simulation and deduction method supporting runtime rule reconstruction according to claim 1, characterized in that, The graded conflict assessment includes: The pre-deduction results are compared with the pre-set numerical legality constraints, entity dynamics limit constraints, and multi-entity cooperative phase constraints in the safety rule base, and are then processed in a graded manner according to the following rules: When the comparison result hits the numerical validity constraint, it is determined to be a level one conflict, the switching channel is blocked and the switching enable signal is not generated. When the comparison result hits the entity dynamic limit constraint, it is determined to be a level two conflict, and the difference between the hit value and the corresponding constraint threshold is written into the switching enable signal as the conflict residual. When the comparison result matches the multi-entity collaborative phase constraint, it is determined to be a level three conflict. A phase alignment mark is added to the switching enable signal to force alignment of the switching timing of each entity in the affected entity set.

4. The dynamically editable military simulation and deduction method supporting runtime rule reconstruction according to claim 1, characterized in that, The atomic-level replacement of the behavior rule calculation handles for each entity in the affected entity set includes: For native compiled runtime environments, atomic instructions are used to replace the entry pointers of behavioral rule functions in memory; For the script virtual machine runtime environment, atomic operations are used to rewrite the script behavior instance references bound to the target entity in the virtual machine global object registry; In the replacement process, when a write conflict occurs because atomic instruction operations are unavailable, a spinlock is used to briefly suspend the state update thread of the target entity. The suspension duration does not exceed a preset proportional threshold of a single simulation step.

5. The dynamically editable military simulation and deduction method supporting runtime rule reconstruction according to claim 1, characterized in that, Starting from the timestamp, during the transition period, the entity state data stream output by the simulation main loop is weighted and smoothed based on the conflict residuals, specifically as follows: Since the switch completion timestamp From the beginning, during the transition period Within the simulation's main loop, for each entity in the affected entity set, the old rule calculation handle before replacement and the new rule calculation handle after replacement are called in parallel to obtain the old rule state vector. With the new rule state vector The final output state vector is generated according to the following formula. : when hour, ; when hour, ; Where t is the current time of the simulation's main loop; The timestamp indicating when the switch was completed is recorded; The transition period; To calculate the entity situation vector output by the handle based on the old rules before the replacement, To calculate the entity situation vector output by the handle based on the new rules after replacement, the situation vector shall at least include the entity's position, velocity, and acceleration components; To define in the interval , The weight function is monotonically decreasing from 1 to 0. To write back the corrected status data from the battlefield data center.

6. The dynamically editable military simulation and deduction method supporting runtime rule reconstruction according to claim 5, characterized in that, The transition period It is determined by both feedforward and feedback mechanisms, specifically as follows: Feedforward: Based on the conflict residual carried by the switching enable signal Generate a baseline transition period according to a preset mapping relationship. The mapping relationship satisfies The larger The longer; Feedback mechanism: Within each simulation step, the dynamic situation vector residual is calculated in real time. The transition period is adjusted according to the following rules. : when When it exceeds the preset upper threshold, exist Based on this, extend by a preset step size and reduce the weight function. The decay rate; when When the value is less than the preset lower threshold within a consecutive number of simulation steps, The transition period is shortened by a preset step size based on the current value, thus ending the transition period ahead of schedule.

7. The dynamically editable military simulation and deduction method supporting runtime rule reconstruction according to claim 6, characterized in that, Also includes: When the affected entity set contains two or more entities with interactive relationships, a unified collaborative scheduling identifier is assigned to the affected entity set, and state snapshots of each entity in the set are collected based on the same timestamp. The switching enable signal carries the cooperative scheduling identifier, atomically replaces the behavior rule calculation handles of each entity in the affected entity set, and uniformly takes over all entities in the set according to the cooperative scheduling identifier, using a common switching completion timestamp. Recording is performed so that all entities within the set share the same transition period. Inner weight function The evolutionary progress.

8. A dynamically editable military simulation and deduction device that supports runtime rule reconstruction, characterized in that, include: A snapshot acquisition unit is used to acquire a state snapshot of the affected entity set from the battlefield data center in response to a rule reconstruction instruction, and to pass the state snapshot to the shadow space isolated from the simulation main loop memory. The pre-evaluation unit is used to perform a pre-evaluation of the affected entity set in the shadow space based on the state snapshot and using the new rules to be loaded, compare the pre-evaluation results with the security rule base to perform hierarchical conflict evaluation, and generate a switching enable signal based on the evaluation results. The switching enable signal carries the conflict residual output by the hierarchical conflict evaluation. The rule switching unit is used to atomically replace the behavior rule calculation handle of each entity in the affected entity set in response to the switching enable signal during the gap between adjacent simulation steps in the main simulation loop, and record the switching completion timestamp. The state convergence unit is used to perform weighted smoothing correction on the entity state data stream output by the simulation main loop based on the conflict residual during the transition period, starting from the timestamp, and write the corrected state data back to the battlefield data center.

9. A dynamically editable military simulation and deduction device that supports runtime rule reconstruction, characterized in that, The system includes a memory and a processor. The memory stores a computer program that can be executed by the processor to implement a dynamically editable military simulation method that supports runtime rule reconstruction as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device where the computer-readable storage medium is located, to implement a dynamically editable military simulation method that supports runtime rule reconstruction as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Novel emergency computer war game deduction system and method

    CN110694256A

  • Conversion system and conversion method for architecture model and simulation model of underwater combat system

    CN118069859A

  • Wargame deduction round mechanism design method compatible with simulation

    CN118675386A

  • Distributed joint simulation platform based on air-to-air combat scene

    CN118965752A

  • Intelligent war game deduction simulation system based on digital twinborn fusion large model

    CN121031386A