Intelligent clock synchronization system and method for distributed system

The intelligent clock synchronization system addresses network delay-induced clock asynchrony by calibrating computer time and adjusting for various clock sources, ensuring time consistency and accuracy in distributed joint tests.

CN119109545AActive Publication Date: 2024-12-10THE QUARTERMASTER RES INST OF THE GENERAL LOGISTICS DEPT OF THE CPLA

Patent Information

Application Number
CN202411196798.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-10
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

Existing clock synchronization technologies in distributed systems fail to account for network delays, leading to clock asynchrony and errors in high-precision simulations, especially in cross-regional joint tests where physical resources are distributed across different regions and domains.

Method used

An intelligent clock synchronization system that utilizes a physical clock source, timing servers, and distributed nodes to calibrate computer time, estimate network delays, and synchronize clocks using a fusion algorithm that adjusts for physical, logical, and other clock sources, ensuring time consistency across nodes.

Benefits of technology

Effectively eliminates clock asynchrony caused by network delays, ensuring time consistency and accuracy in distributed joint tests, thereby preventing errors in simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109545A_ABST
    Figure CN119109545A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent clock synchronization system and method for a distributed system. The system comprises a physical clock source, a plurality of time service servers and a plurality of distributed nodes, wherein the time service servers provide time service for the distributed nodes; each time service server receives the physical clock information and calibrates the computer time based on the physical clock information and the computer time of the time service server; establishing a routing table for each distributed node in each internal network and each external network, determining a path from each distributed node to other distributed nodes, and estimating delay time from each distributed node to other distributed nodes; when a source distributed node needs to send information to a target distributed node, a timestamp is generated based on the real-time computing time of a calibrated time service server corresponding to the source distributed node, and clocks of the source distributed node and the target distributed node are synchronized in combination with the delay time of the timestamp to the target distributed node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of clock calibration, and in particular to an intelligent clock synchronization system and method for a distributed system, that is, a clock synchronization system and method for a distributed system. Background Art

[0002] The time synchronization technology currently on the market is based on node network synchronization technology. The central node broadcasts the current standard time at regular intervals. After receiving the time synchronization information, the child node adjusts the local time to be the same as the central node, and then runs the local physical clock until the next broadcast synchronization.

[0003] This technology is currently the most common implementation of distributed system clock synchronization. Its technical implementation is based on broadcasting within the distributed system. A central node is designated within the system, and the time of this node is the global time of the entire distributed system. When the distributed system starts or runs for a period of time, the central node broadcasts the local time information. After receiving the broadcast, the child node adjusts the local time of the system and then continues to advance the physical clock normally.

[0004] In order to ensure the accuracy of clock synchronization in the distributed system, the clock synchronization broadcast has a cycle, and synchronization is performed every period of time to eliminate clock asynchrony caused by inaccurate local physical clocks.

[0005] This implementation has been accepted and recognized by many developers and users, but it does not take into account the delay of network transmission. The broadcast of time information will be affected by network delay, resulting in slight deviations in the local clocks of each node. For distributed simulation systems with high precision requirements, slight delays may cause errors in simulation results. Especially for cross-regional joint experiments, because the physical distance between resource nodes is far, the delay is higher than that of general simulation experiments. The use of existing technologies can easily lead to clock asynchrony, thus affecting the test results.

[0006] Joint testing is to achieve seamless connection of physical resources, virtual resources, and semi-physical resources (Live Virtual Constructor, LVC) by integrating various available data, models, systems, and corresponding computer hardware and software resources, so that test resource equipment distributed in different regions, different domains, and different types can be interconnected and participate in simulation. Joint testing has the characteristics of being distributed, cross-regional, cross-domain, and high-precision simulation.

[0007] In the LVC simulation test, the clock of virtual resources is based on logical time and can be adjusted, but the physical time of physical test resources and semi-physical test resources cannot be adjusted. The management node needs to align the time with the child node. Therefore, the implementation method of the central node's timed broadcast cannot be simply applied to the operating environment of the military joint test. Summary of the invention

[0008] In order to solve the above technical problems, the present invention proposes an intelligent clock synchronization system and method for distributed systems, which are used to solve the technical problem that the existing cross-node clock synchronization technology cannot be applied to the joint test environment.

[0009] The present invention proposes a clock intelligent synchronization system for a distributed system, the system comprising:

[0010] A physical clock source, several timing servers, and multiple distributed nodes provided with timing services by the timing servers, wherein each timing server provides timing services to one or more distributed nodes, and the distributed nodes provided with timing services by the same timing server form an intranet, and multiple intranets are combined into an extranet, and each distributed node in each intranet and each distributed node in the extranet can communicate with each other; each distributed node manages multiple subsystems, and each subsystem stores test results;

[0011] The physical clock source is a physical clock, providing physical clock information;

[0012] Each timing server receives the physical clock information, calibrates the computer time based on the physical clock information and the computer time of the timing server itself, and generates the computer time after the first calibration; one timing server is used as the master timing server, and the computer time after the first calibration of the master timing server is used as the calibrated computer time of the master timing server; based on the calibrated computer time of the master timing server, the computer time after the first calibration of each slave timing server is calibrated again to be the calibrated computer time of the slave timing server;

[0013] Establish a routing table for each distributed node in each intranet and extranet, determine the path from each distributed node to other distributed nodes, and estimate the delay time from each distributed node to other distributed nodes;

[0014] A distributed node is a distributed resource device used to exchange data information in a distributed system. When a source distributed node needs to send information to a target distributed node, a timestamp is generated based on the real-time computer time of the calibrated timing server corresponding to the source distributed node, combined with the delay time to the target distributed node, to synchronize the clocks of the source distributed node and the target distributed node.

[0015] Preferably, the computer time is calibrated based on the physical clock information and the computer time of the timing server itself to generate the computer time after the first calibration, one timing server is used as the main timing server, and the computer time after the first calibration of the main timing server is used as the calibrated computer time of the main timing server, wherein:

[0016]

[0017] T calibrated =T recv +ΔT

[0018] T phy is the physical clock timestamp, that is, the timestamp obtained from the physical clock source, representing the physical clock information; T recv is the receiving timestamp, that is, the local time when the timing server receives the physical clock timestamp; ΔT net is the network delay of the physical clock source receiving the timestamp; ΔT proc is the local processing time of the timing server; T calibrated It is the computer time after the first calibration by the master timing server.

[0019] Preferably, the computer time after the first calibration of each slave timing server is calibrated again based on the calibrated computer time of the master timing server as the calibrated computer time of the slave timing server, wherein:

[0020]

[0021] in, The timestamp for the request is the local time when the time synchronization request is sent from the timing server to the main timing server. The request receiving timestamp is the time when the master timing server receives the request from the slave timing server. The timestamp for sending the response is the time when the main timing server sends the time synchronization response. The response receiving timestamp is the local time when the slave timing server receives the response from the master timing server. RTT is the round trip delay, which measures the total time required for information to propagate between the slave timing server and the master timing server. θ is the clock deviation, which is the time difference between the slave timing server and the master timing server. It is the calibrated time from the timing server.

[0022] Preferably, estimating the delay time of routing each distributed node to other distributed nodes includes:

[0023]

[0024] in, It is the timestamp of the message being sent, which is the timestamp of the message being sent from distributed node A to distributed node B. is the message receiving timestamp, which is the timestamp when distributed node B receives the message from distributed node A. is the timestamp of the response sent, which is the timestamp of the distributed node B sending the response message to the distributed node A. is the response reception timestamp, which is the timestamp when distributed node A receives the response message from distributed node B; round-trip delay RTT AB Indicates the total time it takes for a message to travel from distributed node A to distributed node B and then back to distributed node A; one-way delay OWD AB is the one-way delay from distributed node A to distributed node B.

[0025] Preferably, when the source distributed node needs to send information to the target distributed node, a timestamp is generated based on the real-time computer time of the calibrated timing server corresponding to the source distributed node, and the clocks of the source distributed node and the target distributed node are synchronized in combination with the delay time to the target distributed node, wherein:

[0026] θ fused =ω phy ·T phy +ω logical ·T logical +ω other ·T other -OWD AB

[0027] Among them, θ fused is the fused clock deviation, which represents the clock deviation of the target distributed node calculated by the fusion algorithm. phy is the timestamp from the physical clock source, indicating the physical clock time of the target distributed node, T logical is the logical clock timestamp, indicating the logical clock time of the target distributed node, T other It is the timestamp obtained by other clock synchronization algorithms, indicating the time of other clock synchronization algorithms of the target distributed node; OWD AB is the delay time between the source distributed node and the target distributed node, ω phy is the physical clock weight, which indicates the importance of the physical clock in the fusion algorithm, ω logical is the logical clock weight, which indicates the importance weight of the logical clock in the fusion algorithm; ω other The weight of other clock synchronization algorithms indicates the importance weight of other clock synchronization algorithms in the fusion algorithm.

[0028] Preferably, after synchronizing the clocks of the source distributed node and the target distributed node, the clocks of the synchronized target distributed nodes are adaptively adjusted using the time deviation, including:

[0029]

[0030] Among them, T new is the adjusted clock time of the target distributed node, T old is the clock time of the target distributed node after synchronization, α is the adjustment coefficient, which is used to control the speed of adjustment; is the proportional factor of the time interval, Δt is the time interval between two measured time differences, represents the time interval between two clock measurements, and Δt0 is the reference time interval.

[0031] A distributed system clock intelligent synchronization method, based on the distributed system clock intelligent synchronization system as described above, the method comprises:

[0032] Step S1: Each timing server receives the physical clock information, and the clock intelligent synchronization system of the distributed system performs clock synchronization;

[0033] Step S2: Synchronize the clocks of the source distributed node and the target distributed node.

[0034] The present invention first optimizes the underlying clock synchronization algorithm through a timestamp-based clock synchronization technology to eliminate errors caused by network delays as much as possible; then adopts node local simulation logic time unification technology to perform time unified management for the distributed joint test system, unify resource times with different operating cycles, and solve the conflict problem between physical time nodes and logical time nodes. The present invention can effectively eliminate the problem of clock asynchrony of test nodes caused by network transmission delays, and can effectively coordinate the conflict between physical time and logical time between different nodes, realize time synchronization of nodes in the joint test system, and avoid test result errors caused by time inconsistency.

[0035] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:

[0037] Figure 1This is a schematic diagram of the structure of the intelligent clock synchronization system for distributed systems proposed by the present invention;

[0038] Figure 2 This is a schematic diagram of the inter-node clock synchronization calculation proposed by the present invention;

[0039] Figure 3 It is a schematic diagram of the architecture of an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0041] Figure 1 FIG. 1 shows a schematic diagram of an intelligent clock synchronization system for distributed systems. Figure 1 As shown, the system comprises:

[0042] A physical clock source, several timing servers, and multiple distributed nodes provided with timing services by the timing servers, wherein each timing server provides timing services to one or more distributed nodes, and the distributed nodes provided with timing services by the same timing server form an intranet, and multiple intranets are combined into an extranet, and each distributed node in each intranet and each distributed node in the extranet can communicate with each other; each distributed node manages multiple subsystems, and each subsystem stores test results;

[0043] The physical clock source is a physical clock, providing physical clock information;

[0044] Each timing server receives the physical clock information, calibrates the computer time based on the physical clock information and the computer time of the timing server itself, and generates the computer time after the first calibration; one timing server is used as the master timing server, and the computer time after the first calibration of the master timing server is used as the calibrated computer time of the master timing server; based on the calibrated computer time of the master timing server, the computer time after the first calibration of each slave timing server is calibrated again to be the calibrated computer time of the slave timing server;

[0045] Establish a routing table for each distributed node in each intranet and extranet, determine the path from each distributed node to other distributed nodes, and estimate the delay time from each distributed node to other distributed nodes;

[0046] A distributed node is a distributed resource device used to exchange data information in a distributed system. When a source distributed node needs to send information to a target distributed node, a timestamp is generated based on the real-time computer time of the calibrated timing server corresponding to the source distributed node, combined with the delay time to the target distributed node, to synchronize the clocks of the source distributed node and the target distributed node.

[0047] The present invention first optimizes the underlying clock synchronization algorithm through the clock synchronization technology based on timestamp, and eliminates the error caused by network delay as much as possible; then adopts the node local simulation logic time unification technology to perform time unified management for the distributed joint test system, unify the resource time with different operation cycles, and solve the conflict problem between physical time nodes and logical time nodes. By integrating the underlying cross-node physical clock synchronization algorithm and the distributed node local simulation logic time unification algorithm, the time consistency of each node in the distributed joint test system is achieved.

[0048] The physical clock source, such as GPS satellites and BeiDou satellites, is a benchmark that can provide accurate physical time. It uses a high-precision atomic clock to maintain time information and transmits it to ground receivers via satellite signals. The error is usually between tens of nanoseconds and hundreds of nanoseconds.

[0049] Further, the computer time is calibrated based on the physical clock information and the computer time of the timing server itself to generate the computer time after the first calibration, and one timing server is used as the main timing server, and the computer time after the first calibration of the main timing server is used as the calibrated computer time of the main timing server, wherein:

[0050]

[0051] T calibrated =T recv +ΔT

[0052] T phy is the physical clock timestamp, that is, the timestamp obtained from the physical clock source, representing the physical clock information; T recv is the receiving timestamp, that is, the local time when the timing server receives the physical clock timestamp; ΔT net is the network delay of the physical clock source receiving the timestamp; ΔT proc is the local processing time of the timing server; T calibrated It is the computer time after the first calibration by the master timing server.

[0053] The computer time after the first calibration of each slave timing server is calibrated again based on the calibrated computer time of the master timing server as the calibrated computer time of the slave timing server, wherein:

[0054]

[0055] in, The timestamp for the request is the local time when the time synchronization request is sent from the timing server to the main timing server. The request receiving timestamp is the time when the master timing server receives the request from the slave timing server. The timestamp for sending the response is the time when the main timing server sends the time synchronization response. The response receiving timestamp is the local time when the slave timing server receives the response from the master timing server. RTT is the round trip delay, which measures the total time required for information to propagate between the slave timing server and the master timing server. θ is the clock deviation, which is the time difference between the slave timing server and the master timing server. It is the calibrated time from the timing server.

[0056] Furthermore, estimating the delay time of routing each distributed node to other distributed nodes includes:

[0057]

[0058] in, It is the timestamp of the message being sent, which is the timestamp of the message being sent from distributed node A to distributed node B. is the message receiving timestamp, which is the timestamp when distributed node B receives the message from distributed node A. is the timestamp of the response sent, which is the timestamp of the distributed node B sending the response message to the distributed node A. is the response reception timestamp, which is the timestamp when distributed node A receives the response message from distributed node B; round-trip delay RTT AB Indicates the total time it takes for a message to travel from distributed node A to distributed node B and then back to distributed node A; one-way delay OWD AB It is the one-way delay from distributed node A to distributed node B. In theory, it is half of the round-trip delay, but due to changes in network conditions, the actual calculation needs to take into account the timestamps of message reception and response.

[0059] When the source distributed node needs to send information to the target distributed node, a timestamp is generated based on the real-time computer time of the calibrated timing server corresponding to the source distributed node, and the clocks of the source distributed node and the target distributed node are synchronized in combination with the delay time to the target distributed node, wherein:

[0060] θ fused =ω phy ·T phy +ω logical ·T logical +ω other ·T other -OWD AB

[0061] Among them, θ fused is the fused clock deviation, which represents the clock deviation of the target distributed node calculated by the fusion algorithm. phy is the timestamp from the physical clock source, indicating the physical clock time of the target distributed node, T logical is the logical clock timestamp, indicating the logical clock time of the target distributed node, T other It is the timestamp obtained by other clock synchronization algorithms, indicating the time of other clock synchronization algorithms of the target distributed node; OWD AB is the delay time between the source distributed node and the target distributed node, ω phy is the physical clock weight, which indicates the importance of the physical clock in the fusion algorithm, ω logical is the logical clock weight, which indicates the importance weight of the logical clock in the fusion algorithm; ω other The weight of other clock synchronization algorithms indicates the importance weight of other clock synchronization algorithms in the fusion algorithm.

[0062] These weights determine the importance of different clock sources in the fusion algorithm. The weight values ​​should be adjusted according to specific system requirements, the accuracy of the clock synchronization algorithm, and system performance. phy If the system has high requirements for the accuracy of absolute time, the physical clock should be given a higher weight. The empirical value is between 0.3 and 0.5. logical , which plays an important role in event sequencing and system stability, should be given an appropriate weight, with an empirical value between 0.2-0.4. If the system uses other clock synchronization algorithms, such as NTP, PTP, etc., appropriate weights should be assigned based on the stability and accuracy of the algorithm, with an empirical value between 0.1-0.3.

[0063] Further, after synchronizing the clocks of the source distributed node and the target distributed node, the clocks of the synchronized target distributed nodes are adaptively adjusted using the time deviation, including:

[0064]

[0065] Among them, T new is the adjusted clock time of the target distributed node, Told is the clock time of the target distributed node after synchronization, α is the adjustment coefficient, which is used to control the speed of adjustment; is the proportional factor of the time interval, Δt is the time interval between two measured time differences, indicating the time interval between two clock measurements, and Δt0 is the reference time interval, which is used to control the adjustment speed. When the accuracy requirement is high, the reference value is smaller.

[0066] In this embodiment, a larger adjustment coefficient will result in a faster adjustment speed, but may also cause oscillation and instability; a smaller adjustment coefficient will result in a slower adjustment speed, but more stable. The size and speed of the adjustment can be adjusted dynamically according to the changes in the communication delay and clock deviation between nodes. If the communication delay between nodes is large, or the clock deviation is large, the proportional factor will become smaller, and the adjustment amount and speed will also be reduced accordingly to avoid over-adjustment and instability of clock synchronization; if the communication delay between nodes is small, or the clock deviation is small, the proportional factor will become larger, and the adjustment amount and speed will also be increased accordingly to speed up the speed and effect of clock synchronization.

[0067] The present invention estimates the message transmission delay and then compensates for the delay to eliminate the impact of the transmission delay on the test results as much as possible. When synchronizing the node clocks, the constraint relationship between different nodes in the joint test is considered, and the time advancement order is determined according to the constraint relationship to avoid confusion between the physical time and the logical time in the LVC simulation test.

[0068] The present invention provides a specific embodiment of a clock synchronization system for a distributed system.

[0069] This embodiment is used to synchronize test resource nodes between military bases. By using a method of accurately maintaining a wall clock, such as a GPS satellite positioning system and a soft time synchronization server, a time synchronization signal is released through a data distribution service. Under a small and stable network delay, the time service algorithm can be changed to calibrate or eliminate the influence of the network on time synchronization.

[0070] In this example, satellite signals are used as the precise clock source and the standard time of the joint test system. The system timing function is completed by the timing server and the timing client software. The timing server receives precise clock signals from the external clock source GPS / Beidou and realizes the clock distribution between the participating node clients in combination with the NTP protocol.

[0071] The underlying clock synchronization method adopts the timestamp-based clock synchronization technology proposed in this application, which can eliminate the impact of physical transmission delays, avoid cumulative errors, and ensure that the physical clocks of each node are consistent during the test.

[0072] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0073] The present invention provides a distributed system clock intelligent synchronization method, based on the distributed system clock intelligent synchronization system as described above, the method comprises:

[0074] Step S1: Each timing server receives the physical clock information, and the clock intelligent synchronization system of the distributed system performs clock synchronization;

[0075] Step S2: Synchronize the clocks of the source distributed node and the target distributed node.

[0076] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0077] The above modules can be connected or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, a ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.

[0078] It should be noted that the above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0079] The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0080] The present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.

[0081] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0082] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0083] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0084] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

Claims

1. A clock intelligent synchronization system for distributed systems, characterized in that: The system comprises: A physical clock source, several timing servers, and multiple distributed nodes provided with timing services by the timing servers, wherein each timing server provides timing services to one or more distributed nodes, and the distributed nodes provided with timing services by the same timing server form an intranet, and multiple intranets are combined into an extranet, and each distributed node in each intranet and each distributed node in the extranet can communicate with each other; each distributed node manages multiple subsystems, and each subsystem stores test results; The physical clock source is a physical clock, providing physical clock information; Each timing server receives the physical clock information, calibrates the computer time based on the physical clock information and the computer time of the timing server itself, and generates the computer time after the first calibration; one timing server is used as the master timing server, and the computer time after the first calibration of the master timing server is used as the calibrated computer time of the master timing server; based on the calibrated computer time of the master timing server, the computer time after the first calibration of each slave timing server is calibrated again to be the calibrated computer time of the slave timing server; Establish a routing table for each distributed node in each intranet and extranet, determine the path from each distributed node to other distributed nodes, and estimate the delay time from each distributed node to other distributed nodes; A distributed node is a distributed resource device used to exchange data information in a distributed system. When a source distributed node needs to send information to a target distributed node, a timestamp is generated based on the real-time computer time of the calibrated timing server corresponding to the source distributed node, combined with the delay time to the target distributed node, to synchronize the clocks of the source distributed node and the target distributed node.

2. The system according to claim 1, characterized in that The computer time is calibrated based on the physical clock information and the computer time of the timing server itself to generate the computer time after the first calibration, and a timing server is used as the main timing server, and the computer time after the first calibration of the main timing server is used as the calibrated computer time of the main timing server, wherein: T calibrated =T recv +ΔT T phy is the physical clock timestamp, that is, the timestamp obtained from the physical clock source, representing the physical clock information; T recv is the receiving timestamp, that is, the local time when the timing server receives the physical clock timestamp; ΔT net is the network delay of the physical clock source receiving the timestamp; ΔT proc is the local processing time of the timing server; T calibrated It is the computer time after the first calibration by the master timing server.

3. The system according to claim 2, characterized in that The computer time after the first calibration of each slave timing server is calibrated again based on the calibrated computer time of the master timing server as the calibrated computer time of the slave timing server, wherein: in, The timestamp for the request is the local time when the time synchronization request is sent from the timing server to the main timing server. The request receiving timestamp is the time when the master timing server receives the request from the slave timing server. The timestamp for sending the response is the time when the main timing server sends the time synchronization response. The response receiving timestamp is the local time when the slave timing server receives the response from the master timing server. RTT is the round trip delay, which measures the total time required for information to propagate between the slave timing server and the master timing server. θ is the clock deviation, which is the time difference between the slave timing server and the master timing server. It is the calibrated time from the timing server.

4. The system according to claim 3, characterized in that The estimating the delay time of routing each distributed node to other distributed nodes includes: in, It is the timestamp of the message being sent, which is the timestamp of the message being sent from distributed node A to distributed node B. is the message receiving timestamp, which is the timestamp when distributed node B receives the message from distributed node A. is the timestamp of the response sent, which is the timestamp of the distributed node B sending the response message to the distributed node A. is the response reception timestamp, which is the timestamp when distributed node A receives the response message from distributed node B; round-trip delay RTT AB Indicates the total time it takes for a message to travel from distributed node A to distributed node B and then back to distributed node A; one-way delay OWD AB is the one-way delay from distributed node A to distributed node B.

5. The system according to claim 4, characterized in that When the source distributed node needs to send information to the target distributed node, a timestamp is generated based on the real-time computer time of the calibrated timing server corresponding to the source distributed node, and the clocks of the source distributed node and the target distributed node are synchronized in combination with the delay time to the target distributed node, wherein: i fused =ω phy ·T phy +oh logical ·T logical +oh other ·T other -OWD AB Among them, θ fused is the fused clock deviation, which represents the clock deviation of the target distributed node calculated by the fusion algorithm. phy is the timestamp from the physical clock source, indicating the physical clock time of the target distributed node, T logical is the logical clock timestamp, indicating the logical clock time of the target distributed node, T other It is the timestamp obtained by other clock synchronization algorithms, indicating the time of other clock synchronization algorithms of the target distributed node; OWD AB is the delay time between the source distributed node and the target distributed node, ω phy is the physical clock weight, which indicates the importance weight of the physical clock in the fusion algorithm, ω logical is the logical clock weight, which indicates the importance weight of the logical clock in the fusion algorithm; ω other The weight of other clock synchronization algorithms indicates the importance weight of other clock synchronization algorithms in the fusion algorithm.

6. The system according to claim 4, characterized in that After synchronizing the clocks of the source distributed node and the target distributed node, the clocks of the synchronized target distributed nodes are adaptively adjusted using the time deviation, including: Among them, T new is the adjusted clock time of the target distributed node, T old is the clock time of the target distributed node after synchronization, α is the adjustment coefficient, which is used to control the speed of adjustment; is the proportional factor of the time interval, Δt is the time interval between two measured time differences, represents the time interval between two clock measurements, and Δt0 is the reference time interval.

7. A distributed system clock intelligent synchronization method, based on the distributed system clock intelligent synchronization system as claimed in any one of claims 1 to 6, characterized in that: The method comprises: Step S1: Each timing server receives the physical clock information, and the clock intelligent synchronization system of the distributed system performs clock synchronization; Step S2: Synchronize the clocks of the source distributed node and the target distributed node.

Citation Information

Patent Citations

  • Double-fiber double-loop-back time delay deviation estimation compensation method in optical fiber time transmission

    CN112202524A

  • DDS-HLA gateway design method, computer equipment and medium

    CN116405347A

  • Power 5G converged communication network time synchronization system, method and equipment

    CN117042111A

Cited By

  • Real-time distributed actual battlefield scene simulation control system

    CN121978988A

  • Real-time distributed battlefield scenario simulation control system

    CN121978988B

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

    CN122154253A