Distributed simulation time consistency implementation method and system

By correcting the local clock in the distributed simulation system and using interpolation method and data buffering technology, the problem of time inconsistency in distributed simulation is solved, real-time and accuracy improvement of time synchronization is achieved, and it is suitable for complex distributed simulation environments.

CN120342534APending Publication Date: 2025-07-18ARMOR ACADEMY OF CHINESE PEOPLES LIBERATION ARMY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510409474.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In distributed simulation of multi-training nodes, prior art such as NTP protocols have problems of slow convergence or inaccuracy in complex distributed systems, resulting in time inconsistency. Especially when interacting between subsystems with different time granularity, it is difficult to maintain real-time and accuracy of time synchronization.

Method used

The NTP algorithm is used to correct the local clocks of each distributed simulation subsystem, and combined with interpolation, estimation method and data buffering technology, the simulation data is processed through a hierarchical time propulsion mechanism to ensure the consistency of the interactive data in time.

Benefits of technology

It improves the real-time and accuracy of time synchronization, supports flexible coordination of heterogeneous time granularity, and dynamic adaptive adjustment to quickly converge to a consistent state, which is suitable for complex distributed simulation environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342534A_ABST
    Figure CN120342534A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed simulation time consistency implementation method and system, and relates to the technical field of distributed simulation interaction.In the method, distributed simulation subsystems firstly utilize an NTP algorithm to correct respective local clocks, a simulation model is promoted to conduct simulation according to the corrected local clocks and the time granularity of the distributed simulation subsystems, and when interaction is conducted, the time consistency of the distributed simulation subsystems is achieved. Simulation time differences of distributed simulation subsystems of two interaction parties are judged, and simulation data are processed by adopting an interpolation method, a pre-estimation method and / or a data buffering technology, so that interaction data are kept consistent in time. Therefore, the method is suitable for a complex distributed simulation environment in which subsystems have different time granularities, and can improve the real-time performance and precision of time synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of distributed simulation interaction technology, and particularly to a method and system for realizing distributed simulation time consistency. Background Art

[0002] In the distributed simulation of multiple training nodes, each training node will have its own clock. If the server sends a message to other servers and multiple clients, the content of this message is: at time t, the trainee P will reach a specific point. Due to the different times of the server and the clients, and more due to the different times among the clients, if corresponding operations are simply based on this message, the clients closer to the time of the server sending the message will be more in line with the actual game state, which will also lead to time inconsistency. Sometimes this inconsistency is more serious than the network transmission delay. Therefore, for a distributed simulation system, time consistency is very important.

[0003] Existing technologies such as the NTP (Network Time Protocol) protocol can synchronize time, but there are problems of slow convergence or inaccuracy in complex distributed systems. Summary of the Invention

[0004] The purpose of this application is to provide a method and system for realizing distributed simulation time consistency, which can synchronize the times of different nodes in a complex distributed system to avoid time inconsistency problems and improve the real-time performance and accuracy of time synchronization.

[0005] To achieve the above purpose, this application provides the following solutions:

[0006] In the first aspect, this application provides a method for realizing distributed simulation time consistency, including:

[0007] Each distributed simulation subsystem corrects its local clock using the NTP algorithm to obtain its corrected local clock;

[0008] According to the simulation task requirements, each distributed simulation subsystem advances the simulation model for simulation according to the corrected local clock and its own time granularity;

[0009] When the first simulation time is greater than the second simulation time, the data providing subsystem generates predicted data through interpolation or prediction methods, and caches the predicted data using data buffering technology to obtain first buffered data. Herein, the first simulation time and the second simulation time are respectively the current simulation times of the simulation models of the data demanding subsystem and the data providing subsystem. The data demanding subsystem is one of the two distributed simulation subsystems that interact with each other and acts as the data demanding party, and the data providing subsystem is the other distributed simulation subsystem that acts as the data providing party among the two interacting distributed simulation subsystems. The time of the predicted data is consistent with the current simulation time of the data demanding subsystem.

[0010] When the first simulation time is less than the second simulation time, the data providing subsystem caches all simulation data at the current simulation time using data buffering technology to obtain second buffered data;

[0011] The data demanding subsystem performs simulation based on the buffered data, where the buffered data is the first buffered data or the second buffered data.

[0012] In a second aspect, the present application provides a distributed simulation time consistency implementation system, including:

[0013] A number of distributed simulation subsystems; the distributed simulation subsystems are communicatively connected to each other;

[0014] The distributed simulation subsystem is used for:

[0015] Calibrating its local clock using the NTP algorithm to obtain a calibrated local clock;

[0016] Advancing the simulation model for simulation according to the simulation task requirements, based on the calibrated local clock and its own time granularity;

[0017] And during the interaction process, when the first simulation time is greater than the second simulation time, one of the distributed simulation subsystems acts as the data providing party, and is used to generate predicted data through interpolation or prediction methods, and cache the predicted data using data buffering technology to obtain first buffered data. The other distributed simulation subsystem acts as the data demanding party and is used to perform simulation based on the first buffered data. Herein, the first simulation time and the second simulation time are respectively the current simulation times of the simulation models of the data demanding party and the data providing party. The time of the predicted data is consistent with the current simulation time of the data demanding subsystem.

[0018] When the first simulation time is less than the second simulation time, the data provider is used to cache all simulation data at the current simulation time by using data buffering technology to obtain second buffered data; the data requester is used to perform simulation according to the second buffered data.

[0019] According to the specific embodiments provided by the present application, the present application has the following technical effects:

[0020] The present application provides a method and system for realizing distributed simulation time consistency. In this method, each distributed simulation subsystem first corrects its local clock by using the NTP algorithm, and then advances the simulation model according to the corrected local clock and its own time granularity for simulation. When interacting, by judging the simulation time difference between the two distributed simulation subsystems of the interaction parties, interpolation method, prediction method and / or data buffering technology are used to process the simulation data, so that the interaction data is consistent in time. Therefore, the NTP synchronization of the present application first ensures that each distributed simulation subsystem has a unified time reference, and then adopts a hierarchical time advancement mechanism to further process the time advancement and interaction problems of specific simulation models, overcoming the time inconsistency problem caused by different step lengths. Therefore, the present application is applicable to complex distributed simulation environments where subsystems have different time granularities, and can improve the real-time performance and accuracy of time synchronization. Description of the Drawings

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0022] Figure 1 It is a schematic flowchart of a method for realizing distributed simulation time consistency in Embodiment 1 of the present application;

[0023] Figure 2 It is a schematic diagram of the simplified NTP synchronization principle in Embodiment 1 of the present application;

[0024] Figure 3 It is a schematic diagram of buffering and matching output in Embodiment 1 of the present application;

[0025] Figure 4 It is a schematic diagram of the structure of a client in a system for realizing distributed simulation time consistency in Embodiment 2 of the present application. Detailed Embodiments

[0026] Next, in combination with the accompanying drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0027] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0028] Embodiment 1

[0029] Refer to Figure 1 , this embodiment provides a method for realizing distributed simulation time consistency, including:

[0030] S1. Each distributed simulation subsystem corrects its own local clock using the NTP algorithm to obtain its own corrected local clock;

[0031] S2. According to the simulation task requirements, each distributed simulation subsystem advances the simulation model for simulation according to the corrected local clock and its own time granularity;

[0032] S3. When the first simulation time is greater than the second simulation time, the data providing subsystem generates predicted data by interpolation or prediction method, and caches the predicted data using the data buffering technology to obtain the first cached data, where the first simulation time and the second simulation time are respectively the current simulation times of the simulation models of the data demanding subsystem and the data providing subsystem, the data demanding subsystem is one of the two distributed simulation subsystems that interact as the data demanding party, the data providing subsystem is the other distributed simulation subsystem that interacts as the data providing party among any two interacting distributed simulation subsystems, and the time of the predicted data is the same as the current simulation time of the data demanding subsystem;

[0033] S4. When the first simulation time is less than the second simulation time, the data providing subsystem caches all the simulation data at the current simulation time using the data buffering technology to obtain the second cached data;

[0034] S5. The data demanding subsystem performs simulation according to the cached data, where the cached data is the first cached data or the second cached data.

[0035] S6. When the number of interactions reaches the preset number of interactions, and the time difference between the first simulation time and the second simulation time is greater than the time difference threshold, adjust the time granularity of the data demanding subsystem and the data providing subsystem;

[0036] S7. The data requirement subsystem and the data provision subsystem advance the simulation model for simulation according to the corrected local clock and the adjusted time granularity, and return to S3.

[0037] In the above S1 - S7 of this embodiment, NTP synchronization is the basic step to ensure that each subsystem has a unified time reference. After that, the hierarchical time advancement mechanism runs on this basis to handle the time advancement and interaction problems of specific models. The corrected local clock provides a reliable time reference for the hierarchical mechanism, ensuring that the time advancement and interaction of each subsystem are based on a consistent clock. In the hierarchical time advancement mechanism, each subsystem advances the model according to its own time granularity (step size), and solves the time inconsistency problem caused by different step sizes through dynamic adjustment of the time step size, data buffering, and prediction algorithms.

[0038] There are mainly three working modes of NTP for selection. The first one is the client - server mode. In this mode, the client continuously sends time information requests to the server, and the server synchronizes the client according to the request, but the server will not be synchronized. The second one is the master - passive symmetric mode. In this mode, the client still continuously sends time requests to the server, and the server can synchronize the client according to the request, but at the same time the server can also be synchronized. The third way is the broadcast mode. In this mode, the server periodically broadcasts messages containing its own timestamp. After receiving the message packet, the message receiver adjusts its own time according to the timestamp. Since this mode requires periodic broadcasting, it is applicable to local area networks with relatively small network delays or situations where the accuracy requirement is not very strict.

[0039] This embodiment uses the client - server mode to unify the time. A server is used as the reference time provider. If there are multiple servers, first synchronize the time of the servers. The synchronization method is still to use one server as the standard time provider, and other servers are treated as clients. After the server synchronization is completed, continue to use the server to synchronize its own clients (i.e., the client machines).

[0040] Therefore, S1 specifically includes:

[0041] S11. The servers in each distributed simulation subsystem correct the local clocks of their local servers according to the reference time to obtain their respective first corrected local clocks, where the reference time is the local clock of a server in any distributed simulation subsystem.

[0042] S12. Each distributed simulation subsystem, based on the client-server mode, corrects the local clock of the local client according to the first corrected local clock to obtain its respective second corrected local clock, where the second corrected local clock is the corrected local clock.

[0043] S12-1. The client calculates the network latency according to the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp, where the first timestamp is the time when the client sends a request message to the server, the second timestamp is the first corrected local clock, the third timestamp is the time when the server sends the processed request message to the client, and the fourth timestamp is the time when the client receives the processed request message.

[0044] S12-2. The client calculates the clock offset according to the network latency.

[0045] S12-3. The client corrects its own local clock according to the clock offset to obtain the corresponding second corrected local clock.

[0046] As Figure 2 shown, the process of S12 is simply described in the way of one server and one client: draw two time axes, one belonging to the server S and the other belonging to the client C1. The server is the standard time of NTP, and the client C1 needs to synchronize its time according to the server. Assume that at the beginning, the local clock of the client Cl is 01:00:00 and the clock of the server S is 02:00:00, and the time required for the message packet to be transmitted from C1 to S is 1 second. Then the specific analysis is as follows:

[0047] (1) The client C1 first sends a time request to the server S, and the sent message will contain the timestamp T1 when the message leaves C1 (i.e., the first timestamp, assumed to be 01:00:00).

[0048] (2) After receiving the message packet, the server S first adds its own timestamp T2 (i.e., the second timestamp). Because of the 1-second transmission time, here it will be 02:00:01.

[0049] (3) After processing, the server returns the message to the client Cl and adds the timestamp T3 (i.e., the third timestamp, assumed to be 02:00:02) when the message leaves S.

[0050] (4) After receiving the message packet, the client C1 first adds its own timestamp T4 (i.e., the fourth timestamp. Because of the 1-second transmission time, here it will be 02:00:03).

[0051] In this way, four timestamps are collected. According to these four timestamps, the following formulas for calculating network delay (Delay, a round trip) and clock offset (Offset) can be easily obtained:

[0052] Delay = (T4 - T1) - (T3 - T2).

[0053] To calculate the time difference, assume that when the client time is T4, the corresponding server time is Tx. Then obviously the following formula holds: T x - T3 = Delay / 2, and the time difference is T x - T4 = T3 + Delay / 2 - T4, that is, the time difference is:

[0054]

[0055] The NTP algorithm mainly includes four algorithms: time filtering, time selection, clustering, and clock adjustment. These four algorithms are all extremely complex algorithms, and the correction results are not flexible enough, so there will be a phenomenon of slow convergence or inaccuracy when used specifically.

[0056] In this regard, this embodiment combines a hierarchical time advancement mechanism, and each subsystem (i.e., the distributed simulation subsystem) can advance according to its respective time granularity. When models (i.e., simulation models) need to interact data between different subsystems, a problem of time asynchronization may occur. Especially in the models of subsystems, there will be situations of super real-time or under real-time, so that data interaction between systems cannot be carried out correctly.

[0057] Assume that the step size of the model in client C1 is m, the step size of the model in client C2 is n, and m = k × n, where k > 1, that is, the model granularity of client C1 is coarser, while that of C2 is finer. At a certain moment, the model in client C1 advances to time ta, and the model in client C2 advances to time tb.

[0058] a) When ta = tb, that is, the time of client C1 is synchronized and consistent with the time of client C2. In this case, the models in client C1 and client C2 can successfully complete the interaction.

[0059] b) When ta > tb, that is, the time of client C1 is greater than the time of client C2. Since the model in client C2 cannot immediately provide the data required by the model in client C1, in order to ensure the normal operation of the system, it is necessary for the model in client C2 to use an appropriate prediction algorithm to provide the data required by the model in client C1. At the same time, since the model advancement in client C1 is ahead of the model in client C2, after the model in client C1 continues to advance, the previous states or data may be overwritten, and when the model in client C2 advances, it may not obtain the correct states or data of the model in C1. At this time, the system still cannot operate correctly. This embodiment adopts a data buffering technology to buffer the previous data in the corresponding memory or file to solve this problem.

[0060] As Figure 3 shown, the specific process of data buffering and matching output is as follows:

[0061] The first step: Apply for several stream message buffers according to the system resources and application requirements;

[0062] The second step: Establish a management queue for idle stream message buffers;

[0063] The third step: The data is stored in the form of variables and organized and managed through time key values.

[0064] The fourth step: When there is historical data that needs to be buffered by the simulation model, query through the time key value and transfer the matching data to the relevant model.

[0065] In addition, when the time does not match, that is, when there is a difference between the requested time and the queue data time, this embodiment plans to use the interpolation method to solve it. This method is also called the "interpolation method", which uses the function values of several known points of the function f(x) in a certain interval to make an appropriate specific function, and uses the values of this specific function at other points in the interval as the approximate values of the function f(x). This method is called the interpolation method. Its purpose is to assign a specific parameter value to each interpolation point, and different function parameterization methods result in different interpolations.

[0066] c) When ta < tb, that is, the time of client C1 is less than the time of client C2. This situation is the opposite of the second situation, and the solution is to make the model in client C1 predict and cache the model states and data in client C2.

[0067] The traditional time recursion algorithm (DR) of the Distributed Interactive Simulation (DIS) system is as follows: In each simulation node of the DIS system, in addition to storing the internal simulation entity dynamics model, the DR models of other simulation nodes that the DR model of this dynamics model is very likely to interact with are also stored. The simulation nodes do not have to transmit their respective states to other simulation nodes they interact with in each simulation frame cycle. Similarly, in this embodiment, such a method is applied to the model prediction of the time gateway. When the actual motion state of the model has not been calculated yet, when the error between the motion states deduced by the DR model does not exceed the set error limit, the calculated value of the DR prediction model can be used to replace the calculated value of the original model.

[0068] It should be noted that in b) and c), whether it is the interpolation method or the prediction method, it mainly aims at continuous models such as rigid body motion and is not applicable to discrete event models.

[0069] If the system cannot achieve time coupling at multiple subsequent interaction times, in this case, the model step size in subsystem C1 or subsystem C2 can be adjusted so that m = k’×n, k’≠k, so that the time of subsystem C1 and the time of subsystem C2 can be coupled. Through the above mapping and adjustment mechanism, the hierarchical time management function is supported, and the operation of the distributed simulation system is better supported.

[0070] Regarding the following challenges faced by traditional time synchronization technologies (such as the NTP protocol) in complex distributed systems:

[0071] Insufficient convergence speed: In a dynamic network environment, NTP needs to communicate back and forth multiple times to converge to a stable state, and it is difficult to meet scenarios with high real-time requirements (such as military simulations and autonomous driving).

[0072] Accuracy limited by network asymmetry: When there is high latency or path asymmetry, the clock offset calculation error of NTP increases, resulting in global time reference drift.

[0073] Unable to coordinate heterogeneous time granularities: When subsystems run with different simulation step sizes (such as 10ms and 50ms), NTP only synchronizes the clocks but cannot solve the problem of misaligned interaction data caused by step size differences.

[0074] This embodiment adopts a hierarchical time advancement mechanism, combined with the NTP synchronization and dynamic adjustment mechanism, to solve the time coupling problem of multi-granularity subsystems in distributed simulation, specifically including:

[0075] Improve the real-time performance and accuracy of time synchronization: Combine dynamic network delay compensation and minimum delay screening strategies to optimize the offset calculation of NTP and shorten the convergence time.

[0076] Support flexible coordination of heterogeneous time granularities: Allow subsystems to run at optimal step sizes (e.g., fine granularity for high-precision models and coarse granularity for macroscopic models), and eliminate time differences during interaction through data buffering and interpolation algorithms.

[0077] Dynamic adaptive adjustment: Detect time differences in real time and trigger step size adjustment to ensure that the system quickly converges to a consistent state in a complex environment.

[0078] Embodiment 2

[0079] This embodiment provides a distributed simulation time consistency implementation system, including:

[0080] A number of distributed simulation subsystems; The distributed simulation subsystems are communicatively connected to each other;

[0081] The distributed simulation subsystem is used for:

[0082] Using the NTP algorithm to correct its own local clock to obtain the corrected local clock;

[0083] According to the simulation task requirements, advancing the simulation model for simulation according to the corrected local clock and its own time granularity;

[0084] And during the interaction process, when the first simulation time is greater than the second simulation time, one of the distributed simulation subsystems serves as the data provider, which is used to generate predicted data by interpolation or prediction methods, and use data buffering technology to cache the predicted data to obtain the first cached data, and the other distributed simulation subsystem serves as the data requester, which is used to perform simulation according to the first cached data, where the first simulation time and the second simulation time are the current simulation times of the simulation models of the data requester and the data provider respectively, and the time of the predicted data is consistent with the current simulation time of the data request subsystem;

[0085] When the first simulation time is less than the second simulation time, the data provider is used to cache all simulation data at the current simulation time by using data buffering technology to obtain the second cached data; The data requester is used to perform simulation according to the second cached data.

[0086] Such as Figure 4As shown, taking the client as an example, the client includes four modules. The receiving process module will receive NTP message packets and calculate the offset between the local clock and the remote clock based on this; the correction module is responsible for processing the offset with the remote object using the NTP algorithm; the local clock process module will adjust the local clock using the NTP algorithm according to the offset calculated by the correction module; the transmission process module will collect information in the database and send it to the remote entity via NTP. The message includes the received timestamp and the timestamp when the message is sent and includes corresponding information to determine the network hierarchy and obtain specific information for managing the connection.

[0087] The distributed simulation time consistency implementation system of this embodiment can achieve:

[0088] Faster convergence speed: Optimize the NTP algorithm and introduce a dynamic adjustment strategy to reduce the number of iterations for time alignment.

[0089] Higher interaction accuracy: Eliminate data misalignment caused by step differences through interpolation and data buffering.

[0090] Stronger environmental adaptability: Support dynamic network conditions and heterogeneous computing requirements to ensure the robustness of the system in complex scenarios.

[0091] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.

[0092] Specific examples are used in this article to elaborate on the principles and implementation methods of this application. The descriptions of the above embodiments are only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, based on the idea of this application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.

Claims

1. A method for realizing distributed simulation time consistency, characterized in that The method for realizing distributed simulation time consistency includes: Each distributed simulation subsystem corrects its local clock by using the NTP algorithm to obtain its corrected local clock; According to the requirements of the simulation task, each distributed simulation subsystem advances the simulation model for simulation according to the corrected local clock and its own time granularity; When the first simulation time is greater than the second simulation time, the data providing subsystem generates predicted data by using the interpolation method or the prediction method, and caches the predicted data by using the data buffering technology to obtain the first buffered data, where the first simulation time and the second simulation time are the current simulation times of the simulation models of the data demanding subsystem and the data providing subsystem respectively, the data demanding subsystem is a distributed simulation subsystem that is the data demanding party among any two interacting distributed simulation subsystems, the data providing subsystem is the other distributed simulation subsystem that is the data providing party among any two interacting distributed simulation subsystems, and the time of the predicted data is consistent with the current simulation time of the data demanding subsystem; When the first simulation time is less than the second simulation time, the data providing subsystem uses the data buffering technology to cache all simulation data at the current simulation time to obtain the second buffered data; The data demanding subsystem performs simulation according to the buffered data, where the buffered data is the first buffered data or the second buffered data.

2. The method for realizing distributed simulation time consistency according to claim 1, characterized in that After executing the step "The data demanding subsystem performs simulation according to the buffered data", the method for realizing distributed simulation time consistency further includes: When the number of interactions reaches the preset number of interactions, and the time difference between the first simulation time and the second simulation time is greater than the time difference threshold, adjust the time granularities of the data demanding subsystem and the data providing subsystem; The data demanding subsystem and the data providing subsystem advance the simulation model for simulation according to the corrected local clock and the adjusted time granularity, and return to the step "When the first simulation time is greater than the second simulation time, the data providing subsystem generates predicted data by using the interpolation method or the prediction method, and caches the predicted data by using the data buffering technology to obtain the first buffered data".

3. The method for realizing distributed simulation time consistency according to claim 1, wherein The process of caching the predicted data or the simulation data by using the data buffering technology specifically includes: Determine a number of stream message buffers according to the system resources and application requirements; Use time as the key value and store the predicted data or the simulation data in the stream message buffer in the form of a variable.

4. The method for realizing distributed simulation time consistency according to claim 1, wherein The time granularity is the time step.

5. The method for realizing distributed simulation time consistency according to claim 1, wherein Each distributed simulation subsystem corrects its local clock by using the NTP algorithm to obtain its corrected local clock, specifically including: The server in each distributed simulation subsystem corrects the local clock of the local server according to the reference time to obtain its first corrected local clock, where the reference time is the local clock of the server in any one distributed simulation subsystem; Each distributed simulation subsystem is based on the client-server mode, and corrects the local clock of the local client according to the first corrected local clock to obtain its respective second corrected local clock, where the second corrected local clock is the corrected local clock.

6. The method for realizing distributed simulation time consistency according to claim 5, wherein Correcting the local clock of the local client according to the first corrected local clock to obtain its respective second corrected local clock specifically includes: The client calculates the network delay according to the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp, where the first timestamp is the time when the client sends a request message to the server, the second timestamp is the first corrected local clock, the third timestamp is the time when the server sends the processed request message to the client, and the fourth timestamp is the time when the client receives the processed request message; The client calculates the clock offset according to the network delay; The client corrects its own local clock according to the clock offset to obtain the corresponding second corrected local clock.

7. The method for implementing distributed simulation time consistency according to claim 6, characterized in that The calculation formula for the network delay is: Delay = (T4 - T1) - (T3 - T2); where Delay represents the network delay; T1, T2, T3, and T4 respectively represent the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp.

8. The method for realizing distributed simulation time consistency according to claim 6, wherein The calculation formula for the clock offset is: where Offset represents the network delay; T1, T2, T3, and T4 respectively represent the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp.

9. A distributed simulation time consistency implementation system, characterized in that, The distributed simulation time consistency implementation system includes: Several distributed simulation subsystems; the distributed simulation subsystems are communicatively connected to each other; The distributed simulation subsystem is used for: Using the NTP algorithm to correct its own local clock to obtain the corrected local clock; According to the simulation task requirements, advancing the simulation model for simulation according to the corrected local clock and its own time granularity; And during the interaction process, when the first simulation time is greater than the second simulation time, one of the distributed simulation subsystems serves as the data provider, which is used to generate predicted data by interpolation or prediction method and cache the predicted data using data buffering technology to obtain the first cached data, and the other distributed simulation subsystem serves as the data requester, which is used to perform simulation according to the first cached data, where the first simulation time and the second simulation time are respectively the current simulation times of the simulation models of the data requester and the data provider, and the time of the predicted data is consistent with the current simulation time of the data request subsystem; When the first simulation time is less than the second simulation time, the data provider is used to cache all simulation data at the current simulation time using data buffering technology to obtain the second cached data; the data requester is used to perform simulation according to the second cached data.

Citation Information

Cited By

  • Simulation data analysis method and system for virtual training of emergency personnel

    CN121839173A

  • Control method and device of distributed simulation system, equipment, medium and product

    CN122154253A