A multi-task discrete event parallel simulation and time synchronization method
Patent Information
- Application Number
- CN202610750551.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-10-16
AI Technical Summary
在时统信息由于网络或其它原因丢失时,仿真引擎将无法接收最新时间同步信息
[0038] This application adds a unified instruction execution time structure to the instruction issuance results and performs unified scheduling based on instruction time, using the most recently executed instruction as the benchmark for simulation step size control; it can be done manually; combined with an accurate instruction execution solution, it provides an automatic simulation multiplier adjustment strategy within the simulation engine, which can accurately reduce or increase the simulation multiplier within a specified time interval. Operators only need to configure the parameters for deceleration and acceleration, without needing to accurately judge and issue the timing; the strategy trigger is configured and triggered by the user; it designs two modes: automatic maximum multiplier alignment simulation and preset multiplier autonomous simulation, to solve the problems of timing information loss and rapid alignment after reconnection, and uses timed monitoring to alarm and prompt reconnection for timing information loss, while requiring the simulation engine to guide the scheduling control. The maximum allowable simulation multiple is fed back to ensure that the simulation multiple issued by the guidance and control is within an effective range, avoiding the problem that the simulation engine's simulation time is always lagging behind the time synchronization information. In the distributed operation mode of the simulation engine, each node receives the time synchronization information separately, consistent with the centralized operation mode. After the time synchronization information is lost, each node independently issues a loss alarm and reconnection prompt, and autonomously simulates and runs at a preset multiple within the lost time interval. After reconnection, it aligns with the latest time synchronization time at the maximum multiple. By pre-analyzing the state of each key point in the action process through task design and task planning, the current simulation operation state can be directly modified through scenario retransmission or state guidance, realizing rapid situational transitions. This scheme has a fast response speed, high execution efficiency, and is suitable for rapid time jump response under non-intervention conditions.
Smart Images

Figure CN122924914A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation training technology, and in particular to a method for parallel simulation and time synchronization of multi-task discrete events. Background Technology
[0002] The number of models and entities involved in the simulation training process is large, and the related command, instruction, timing, and time-skip instructions are executed concurrently. How to process a large number of instructions in parallel and accurately control the execution of time poses a huge challenge.
[0003] During training, it's impossible to guarantee that all command execution times are integer multiples of the preset simulation step size. Without accurate capture processing, command omissions or inaccurate execution times will occur, ultimately leading to incorrect and inaccurate simulation results. For example, if the simulation step size is fixed at 1 second, and the calculated trajectory change execution time is accurate to within 1 second, the maneuver trajectory change cannot be executed accurately, resulting in the failure to achieve the expected trajectory change state after the maneuver. When there are no critical actions, it's desirable for the simulation system to run quickly, automatically reducing the speed (the reduction speed can be set) within the command execution time interval, operating in real-time, at a specified low speed, or even in a sub-real-time mode. However, operators cannot accurately control the execution speed at precise time points, and dedicated personnel are required for monitoring. Currently, the simulation system's operation and control are all manually controlled by operators, often resulting in excessively long running times, frequent control, and missed critical events due to the speed reduction throughout to capture critical events, hindering the viewing of the situation and process analysis of critical events. The simulation system uses external time synchronization information for unified time control. Under conditions of no adaptive speed reduction and no loss of time synchronization information, the simulation engine can run according to the latest time issued by the time synchronization system. When time synchronization information is lost due to network or other reasons, the simulation engine will be unable to receive the latest time synchronization information. Summary of the Invention
[0004] Purpose of the invention: The technical problem to be solved by the present invention is to provide a method for parallel simulation and time synchronization of multi-task discrete events, which addresses the shortcomings of the existing technology.
[0005] To address the aforementioned technical problems, this invention discloses a method for parallel simulation and time synchronization of multi-task discrete events, applied to a simulation system. The simulation system includes a planning module and a simulation engine, and the simulation engine includes an instruction time management and scheduling unit and a simulation step size automatic adjustment unit. The method includes:
[0006] Step 1: Start the simulation;
[0007] Step 2: The planning module generates and issues instruction information with a standard instruction execution time structure, including command and control, directing, timing, and time-skip instruction information;
[0008] Step 3: The simulation engine parses the instructions issued by the planning module and obtains the execution time of the instructions;
[0009] Step 4: Manage instructions through the instruction time management and scheduling unit, and issue instructions before execution;
[0010] Step 5: The simulation step size of the model is managed by the simulation step size automatic adjustment unit during the simulation. Based on the instruction execution timestamp and the current simulation step size, the simulation step size is dynamically adjusted with the most recent instruction time as the reference. Instructions of different models are executed in parallel at the same time to ensure that no instruction is missed.
[0011] Step 6: Based on the simulation engine configuration, set the multiplier control strategy and time synchronization mode;
[0012] Step 7: During the simulation process, listen for time jump instructions. If a time jump instruction is received, proceed to step 8; otherwise, proceed to step 1.
[0013] Step 8: Modify the simulation time and current situation data directly through scenario retransmission or state-guided mode to perform system time jump, and then execute Step 1.
[0014] Furthermore, in step 6, a multiplier control strategy is set according to the simulation engine configuration, including whether to enable the autonomous multiplier control strategy. If the autonomous multiplier control strategy is enabled, the desired multiplier configuration is set for a specified time period, and the simulation engine running speed is autonomously controlled during the simulation operation without the need for manual multiplier control operation.
[0015] If the autonomous multiplier control strategy is not enabled, the operation of the simulation system is controlled manually. The simulation will run according to the multiplier control command sent, and adaptive control information will be released to the guidance control synchronously through the network interface to prompt the operator to confirm whether to perform multiplier control.
[0016] Furthermore, in step 6, the time synchronization mode is set according to the simulation engine configuration, including: setting time alignment priority or time synchronization mode with specified multiple time advance;
[0017] If the time alignment priority time synchronization mode is adopted, the external time system information is received, and the simulation engine performs autonomous multiplier control operation according to the latest time issued by the time system and the simulation run multiplier most recently received, and aligns with the latest time.
[0018] If the time synchronization mode with a specified multiple is used, the preset simulation multiple information is obtained, and the simulation multiple is controlled according to the multiple control command according to the maximum multiple that can be supported.
[0019] Furthermore, let the current simulation step size be... The current simulation time is The instruction execution timestamp is The adjusted simulation step size is The instruction execution time threshold is , This is the minimum value, used to avoid floating-point errors; the dynamic adjustment formula is:
[0020] .
[0021] Furthermore, step 6, after setting the time synchronization mode according to the simulation engine configuration, also includes: constructing a simulation runtime and maximum multiple feedback channel, and using reverse constraint guidance control to issue the maximum multiple that can be issued, so as to avoid the problem that the simulation multiple cannot reach the issuance multiple and ensure bidirectional time synchronization.
[0022] Furthermore, the step of controlling the simulation multiplier according to the multiplier control command, based on the maximum supported multiplier, includes: comparing the maximum supported multiplier of the current simulation with the multiplier required by the multiplier control command, performing multiplier control based on the comparison result, and providing feedback to the control interface.
[0023] Let the maximum multiplier supported by the current simulation be... The multiplier control command requires the multiplier to be... The actual execution multiple is The formula for controlling the multiple is:
[0024] .
[0025] Furthermore, step 8 includes: during the time jump process of the simulation system, the aircraft state is calculated through continuous integration.
[0026] Furthermore, the aircraft state in step 8 is calculated through continuous integration, including:
[0027] Let the simulation time before the jump be... The target time after the jump is The aircraft state vector is ,in Represents the position component at time t. (represents the velocity component at time t, with a state integration step size of ) The formula for continuous integrals is:
[0028]
[0029] in:
[0030]
[0031]
[0032]
[0033]
[0034] This is the state transition function of the spacecraft, determined by the orbital dynamics equations.
[0035] Further, in step 1, the simulation runs and the planning instructions are monitored; in step 2, the planning module generates planning instructions containing a unified instruction execution time structure, and sends the planning instructions to the simulation engine via network transmission. The simulation engine then parses the execution time, duration, and standard time description results in the instructions.
[0036] Furthermore, after executing step 2, the process also includes: the simulation engine receiving planning instructions and providing feedback to the planning module through an instruction issuance and response mechanism. This prevents instruction loss or response errors during the instruction issuance and reception process, triggering alarms and prompting the planning module to resend the instructions.
[0037] Beneficial effects:
[0038] This application adds a unified instruction execution time structure to the instruction issuance results and performs unified scheduling based on instruction time, using the most recently executed instruction as the benchmark for simulation step size control; it can be done manually; combined with an accurate instruction execution solution, it provides an automatic simulation multiplier adjustment strategy within the simulation engine, which can accurately reduce or increase the simulation multiplier within a specified time interval. Operators only need to configure the parameters for deceleration and acceleration, without needing to accurately judge and issue the timing; the strategy trigger is configured and triggered by the user; it designs two modes: automatic maximum multiplier alignment simulation and preset multiplier autonomous simulation, to solve the problems of timing information loss and rapid alignment after reconnection, and uses timed monitoring to alarm and prompt reconnection for timing information loss, while requiring the simulation engine to guide the scheduling control. The maximum allowable simulation multiple is fed back to ensure that the simulation multiple issued by the guidance and control is within an effective range, avoiding the problem that the simulation engine's simulation time is always lagging behind the time synchronization information. In the distributed operation mode of the simulation engine, each node receives the time synchronization information separately, consistent with the centralized operation mode. After the time synchronization information is lost, each node independently issues a loss alarm and reconnection prompt, and autonomously simulates and runs at a preset multiple within the lost time interval. After reconnection, it aligns with the latest time synchronization time at the maximum multiple. By pre-analyzing the state of each key point in the action process through task design and task planning, the current simulation operation state can be directly modified through scenario retransmission or state guidance, realizing rapid situational transitions. This scheme has a fast response speed, high execution efficiency, and is suitable for rapid time jump response under non-intervention conditions. Attached Figure Description
[0039] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0040] Figure 1 This application provides an architecture diagram for a multi-task discrete event parallel simulation and time synchronization method.
[0041] Figure 2 This is a flowchart illustrating a method for parallel simulation and time synchronization of multi-task discrete events provided in an embodiment of this application. Detailed Implementation
[0042] The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0043] The parallel simulation and time synchronization method for multi-task discrete events provided in this application can be applied to multi-task simulation scenarios in aerospace simulation training.
[0044] In one embodiment, such as Figure 1 and Figure 2 As shown, a method for parallel simulation and time synchronization of multi-task discrete events is provided, including the following steps:
[0045] Step 1: Start the simulation and listen for external planning instructions.
[0046] Step 2: The planning module generates and issues instruction information with a standard instruction execution time structure; in practice, the planning instructions are sent to the simulation engine via network transmission.
[0047] The standard instruction execution time structure includes an instruction identifier, instruction execution time, and instruction duration. The instruction identifier is used to distinguish different instructions.
[0048] Instruction execution time: The simulation time point at which the instruction is executed;
[0049] Command duration: The duration for which the command action is performed.
[0050] Step 3: The simulation engine provides feedback to the planning module through the instruction issuance and response mechanism to avoid instruction loss during the instruction issuance and reception process; when the response fails, an alarm is triggered and the planning module resends the instruction.
[0051] Step 4: Parse the instructions issued by the planning module to obtain the execution time of the instructions;
[0052] It also parses the duration and standard time description results in the instructions.
[0053] Step 5: Manage instructions through the instruction time management and scheduling unit, and issue instructions before execution;
[0054] Step 6: The simulation step size of the model is managed by the simulation step size automatic adjustment unit during the simulation. Based on the instruction execution timestamp and the current simulation step size, the simulation step size is dynamically adjusted with the most recent instruction time as the benchmark. Instructions of different models are executed in parallel at the same time to ensure that no instruction is missed.
[0055] Specifically, first, define the core parameters: Let the current simulation step size be... The current simulation time is The instruction execution timestamp is The adjusted simulation step size is The instruction execution time threshold is ( This is a minimum value used to avoid floating-point errors and satisfies... ).
[0056] The dynamic adjustment formula is:
[0057]
[0058] This formula determines whether to adjust the step size by checking if the difference between the current simulation step size and the instruction execution timestamp exceeds a threshold. When the difference is large, the step size is adjusted to the interval from the current simulation time to the instruction execution timestamp, ensuring that the instruction is executed at a precise time. When the difference is within the threshold range, the current step size remains unchanged to avoid simulation stuttering caused by frequent adjustments. This calculation method balances instruction execution accuracy and simulation smoothness, adapting to simulation training scenarios with different accuracy requirements, ensuring that no instructions are missed and that execution time is accurate. Under the conditions of no adaptive multiplier and no loss of timing information, the simulation engine can run according to the latest time issued by the timing system. When time synchronization information is lost due to network or other reasons, the simulation engine will be unable to receive the latest time synchronization information. In this case, the simulation engine needs to autonomously control its operation based on the most recently received simulation run multiple, and quickly align with the latest time after the time synchronization is reconnected. After the simulation engine finishes adaptive multiple control, the simulation time is generally behind the time synchronization information. At this time, it needs to quickly align with the latest time synchronization information using the maximum multiple. When the time synchronization multiple issued exceeds the maximum simulation run multiple, the simulation engine will be unable to align with the time synchronization information. In this case, it is necessary to constrain the issued simulation multiple based on the maximum feasible simulation run multiple. Specifically:
[0059] Step 7: Determine whether to enable the autonomous multiplier control strategy based on the simulation engine configuration. If enabled, proceed to step 8; otherwise, proceed to step 9.
[0060] Step 8: If the autonomous speed control strategy is enabled, the desired speed configuration can be set for a specified time period. During the simulation, the simulation engine's running speed can be controlled autonomously without manual speed control.
[0061] Step 9: If the autonomous speed control strategy is not enabled, the system operation is controlled manually. Adaptive control information is synchronously released to the dispatch control via the network interface to prompt the operator to confirm whether to perform speed control.
[0062] Step 10: Determine whether to use time alignment priority or time synchronization mode with specified speed based on the simulation engine configuration. If time alignment priority time synchronization mode is used, proceed to step 11. If specified speed autonomous advancement mode is used, proceed to step 12.
[0063] Step 11: Receive external time synchronization information, quickly align with the latest time issued by the time synchronization system, and at the same time build a simulation running time and maximum multiple feedback channel. Use reverse constraint guidance to control the maximum multiple that can be issued to avoid the problem that the simulation multiple cannot reach the issued multiple and ensure bidirectional time synchronization.
[0064] Step 12: Obtain the preset simulation multiplier information and control the simulation multiplier according to its preset content; during the simulation process, the simulation running time and maximum multiplier information can be fed back to the time system, and the maximum multiplier issued can be constrained in reverse to avoid the problem that the simulation multiplier cannot reach the issued multiplier and ensure two-way time synchronization.
[0065] Specifically, let the maximum multiplier supported by the current simulation be... The multiplier control command requires the multiplier to be... The actual execution multiple is .
[0066] The formula for controlling the multiple is:
[0067]
[0068] This formula clearly defines the rules for determining the actual execution multiplier. When the required multiplier is within the supported range, it is executed according to the required multiplier; when the required multiplier exceeds the supported range, it is executed according to the maximum supported multiplier, and feedback information is provided to the command and control page to inform the operator of the current maximum supported multiplier, preventing the operator from blindly issuing multiplier commands that exceed the range. This mechanism ensures both the stability of the simulation operation and improves the ease of operation, meeting the precise multiplier control requirements in simulation training.
[0069] In the Earth-Moon space, the transition period is relatively long and involves virtually no critical actions, making it a tedious and uninteresting process. Therefore, it's necessary to directly jump to the next state point to achieve a rapid status transition and conduct the next stage of simulation or training. Due to the unique motion of space targets, the spacecraft's state cannot be directly changed; continuous integration is required to obtain the state at a specified time point. Specifically:
[0070] Step 13: During the simulation process, listen for time-skip instructions. If a debugging instruction is received, proceed to step 14; otherwise, proceed to step 1.
[0071] Step 14: Modify the simulation time and current situation data directly through scenario retransmission or state-guided mode to perform system time jump, achieve rapid situation transition, and then execute Step 1;
[0072] During time hops in the simulation system, the aircraft state is calculated through continuous integration, including:
[0073] Define core parameters: Let the simulation time before the time jump be... The target time after the jump is The aircraft state vector is (Position and velocity components), state integration step size is .
[0074] The formula for continuous integration (using the Runge-Kutta method) is as follows:
[0075]
[0076] in:
[0077]
[0078]
[0079]
[0080]
[0081] This is the state transition function of the spacecraft, determined by the orbital dynamics equations.
[0082] Specifically, continuous integration is performed using the Runge-Kutta method to ensure that the spacecraft's state changes from the time before the time jump. Smooth transition to time jump after time jump To avoid simulation distortion caused by state transitions. Integral step size. It can be dynamically adjusted according to the jump time interval. When the jump time interval is large, the step size is increased to improve efficiency, and when the interval is small, the step size is decreased to ensure accuracy. It takes into account both jump speed and state accuracy, and solves the problem that the motion state of space targets cannot be directly changed.
[0083] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order in which these steps are executed, and they can be performed in other orders. Furthermore, Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0084] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] In its specific implementation, this application provides a computer storage medium and a corresponding data processing unit. The computer storage medium is capable of storing a computer program, which, when executed by the data processing unit, can run the invention's content regarding a multi-task discrete event parallel simulation and time synchronization method, as well as some or all of the steps in various embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0086] Those skilled in the art will clearly understand that the technical solutions in the embodiments of the present invention can be implemented using computer programs and their corresponding general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of computer programs, i.e., software products. These computer program software products can be stored in a storage medium and include several instructions to cause a device containing a data processing unit (which may be a personal computer, server, microcontroller, MUU, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0087] This invention provides a method for parallel simulation and time synchronization of multi-task discrete events. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A method for parallel simulation and time synchronization of multi-task discrete events, characterized in that, The method is applied to a simulation system, which includes a planning module and a simulation engine, the simulation engine including an instruction time management and scheduling unit and a simulation step size automatic adjustment unit; the method includes: Step 1: Start the simulation; Step 2: The planning module generates and issues instruction information with a standard instruction execution time structure, including command and control, directing, timing, and time-skip instruction information; Step 3: The simulation engine parses the instructions issued by the planning module and obtains the execution time of the instructions; Step 4: Manage instructions through the instruction time management and scheduling unit, and issue instructions before execution; Step 5: The simulation step size of the model is managed by the simulation step size automatic adjustment unit during simulation. Based on the instruction execution timestamp and the current simulation step size, the simulation step size is dynamically adjusted with the most recent instruction time as the reference, so that different model instructions are executed in parallel at the same time. Step 6: Based on the simulation engine configuration, set the multiplier control strategy and time synchronization mode; Step 7: During the simulation process, listen for time jump instructions. If a time jump instruction is received, proceed to step 8; otherwise, proceed to step 1. Step 8: Modify the simulation time and current situation data directly through scenario retransmission or state-guided mode to perform system time jump, and then execute Step 1.
2. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 1, characterized in that, In step 6, the multiplier control strategy is set according to the simulation engine configuration, including whether to enable the autonomous multiplier control strategy. If the autonomous multiplier control strategy is enabled, the desired multiplier configuration is set for the specified time period, and the simulation engine running speed is controlled autonomously during the simulation operation without the need for manual multiplier control operation. If the autonomous multiplier control strategy is not enabled, the operation of the simulation system is controlled manually. The simulation will run according to the multiplier control command sent, and adaptive control information will be released to the guidance control synchronously through the network interface to prompt the operator to confirm whether to perform multiplier control.
3. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 2, characterized in that, In step 6, the time synchronization mode is set according to the simulation engine configuration, including: setting time alignment priority or time synchronization mode with specified multiple time advance; If the time alignment priority time synchronization mode is adopted, the external time system information is received, and the simulation engine performs autonomous multiplier control operation according to the latest time issued by the time system and the simulation run multiplier most recently received, and aligns with the latest time. If the time synchronization mode with a specified multiple is used, the preset simulation multiple information is obtained, and the simulation multiple is controlled according to the multiple control command according to the maximum multiple that can be supported.
4. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 3, characterized in that, Step 5 includes: Let the current simulation step size be The current simulation time is The instruction execution timestamp is The adjusted simulation step size is The instruction execution time threshold is The dynamic adjustment formula is: 。 5. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 3, characterized in that, Step 6, after setting the time synchronization mode according to the simulation engine configuration, also includes: constructing the simulation runtime, the maximum multiple feedback channel, and the maximum multiple that the reverse constraint guidance control can issue.
6. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 5, characterized in that, The step of controlling the simulation multiplication factor according to the multiplication factor control command, based on the maximum supported multiplication factor, includes: comparing the maximum supported multiplication factor of the current simulation with the multiplication factor required by the multiplication factor control command, performing multiplication factor control based on the comparison result, and providing feedback to the control interface. Let the maximum multiplier supported by the current simulation be... The multiplier control command requires the multiplier to be... The actual execution multiple is The formula for controlling the multiple is: 。 7. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 6, characterized in that, Step 8 includes: during the time jump process of the simulation system, the aircraft state is calculated through continuous integration.
8. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 7, characterized in that, In step 8, the aircraft state is calculated through continuous integration, including: Let the simulation time before the jump be... The target time after the jump is The aircraft state vector is ,in Represents the position component at time t. (represents the velocity component at time t, with a state integration step size of ) The formula for continuous integrals is: , in: , , , , This is the state transition function of the spacecraft, determined by the orbital dynamics equations.
9. The method for parallel simulation and time synchronization of multi-task discrete events according to claim 8, characterized in that, Step 1: Start the simulation and listen for the planning instructions; Step 2: The planning module generates planning instructions with a unified instruction execution time structure, and sends the planning instructions to the simulation engine via network transmission. The simulation engine then parses the execution time, duration, and standard time description results in the instructions.
10. A method for parallel simulation and time synchronization of multi-task discrete events according to claim 9, characterized in that, After step 2, the process also includes: the simulation engine receiving planning instructions and providing feedback to the planning module through an instruction issuance and response mechanism.