A clock intelligent synchronization system and method for a distributed system

CN119109545BActive Publication Date: 2026-09-25THE QUARTERMASTER RES INST OF THE GENERAL LOGISTICS DEPT OF THE CPLA
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0008]为解决上述技术问题,本发明提出了一种用于分布式系统的时钟智能化同步系统及方法,用以解决现有跨节点时钟同步技术无法适用于联合试验环境的技术问题

Benefits of technology

[0034]本发明先通过基于时间戳的时钟同步技术,优化底层时钟同步算法,尽可能消除网络延迟造成的误差;然后采取节点局部仿真逻辑时间统一技术,针对分布式联合试验体系进行时间统一管理,将运行周期各不相同的资源时间进行统一,解决物理时间节点和逻辑时间节点的冲突问题。本发明可有效消除网络传输延迟造成的试验节点时钟不同步问题,并且可以有效协调不同节点间物理时间与逻辑时间的冲突,实现联合试验系统内个节点的时间同步,避免因为时间不统一造成的试验结果误差。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109545B_ABST
    Figure CN119109545B_ABST
Patent Text Reader

Abstract

The application provides a clock intelligent synchronization system and method for a distributed system. The system comprises a physical clock source, a plurality of time servers, and a plurality of distributed nodes provided with time service by the time servers. Each time server receives the physical clock information, calibrates the computer time based on the physical clock information and the computer time of the time server itself, establishes a routing table for each distributed node in each internal network and external network, determines the path of each distributed node to other distributed nodes, and estimates the delay time of each distributed node to other distributed nodes. When a source distributed node needs to send information to a target distributed node, a time stamp is generated based on the real-time computer time of the calibrated time server corresponding to the source distributed node, and the delay time from the source distributed node to the target distributed node is combined to synchronize the clocks of the source distributed node and the target distributed node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of clock calibration technology, and more particularly to an intelligent clock synchronization system and method for distributed systems. Background Technology

[0002] Current time synchronization technology 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 nodes adjust their local time to be the same as the central node, and then run their local physical clock until the next broadcast synchronization.

[0003] This technology is currently the most common implementation of clock synchronization in distributed systems. Its implementation is based on broadcasting within the distributed system. A central node is designated within the system, and the time of this node becomes the global time for the entire distributed system. When the distributed system starts up or after running for a period of time, the central node broadcasts its local time information. Upon receiving the broadcast, the child nodes adjust their local system time and then continue with the normal physical clock progression.

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

[0005] This implementation method has been widely accepted and recognized by developers and users, but it does not take into account network transmission latency. The broadcasting of time information is affected by network latency, causing slight deviations in the local clocks of each node. For distributed simulation systems with high accuracy requirements, even small delays can lead to errors in simulation results. This is especially true for cross-regional joint experiments, where the physical distance between resource nodes is greater than in typical simulation experiments, making it easy for existing technologies to cause clock desynchronization, thus affecting the experimental results.

[0006] Joint experiments integrate various available data, models, systems, and corresponding computer hardware and software resources to achieve seamless connectivity between physical resources, virtual resources, and semi-physical resources (Live Virtual Constructor, LVC). This enables experimental resource devices distributed across different regions, network domains, and types to interconnect and participate in simulations. Joint experiments are characterized by their distributed nature, cross-regional and cross-network capabilities, and high simulation accuracy.

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

[0008] To address the aforementioned technical problems, this invention proposes an intelligent clock synchronization system and method for distributed systems, which solves the technical problem that existing cross-node clock synchronization technologies cannot be applied to joint experimental environments.

[0009] This invention proposes an intelligent clock synchronization system for distributed systems, the system comprising:

[0010] The system consists of a physical clock source, several time synchronization servers, and multiple distributed nodes that provide time synchronization services to the time synchronization servers. Each time synchronization server provides time synchronization services to one or more distributed nodes. Distributed nodes that receive time synchronization services from the same time synchronization server form an intranet. Multiple intranets are combined to form an extranet. Distributed nodes within each intranet and distributed nodes in the extranet can communicate with each other. Each distributed node manages multiple subsystems, and each subsystem stores the test results.

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

[0012] Each time synchronization server receives the physical clock information, calibrates the computer time based on the physical clock information and its own computer time, and generates the computer time after initial calibration. One time synchronization server is designated as the master time synchronization server, and the computer time after initial calibration of the master time synchronization server is used as the calibrated computer time of the master time synchronization server. Based on the calibrated computer time of the master time synchronization server, the computer time of each slave time synchronization server after initial calibration is calibrated again, and used as the calibrated computer time of the slave time synchronization server.

[0013] Establish routing tables for each distributed node in each internal network and external network, 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] Distributed nodes, or distributed resource devices, are used to exchange data information in a distributed system. When a source distributed node needs to send information to a target distributed node, it generates a timestamp based on the real-time computer time of the calibrated time synchronization server corresponding to the source distributed node, and combines it 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 step involves calibrating the computer time based on the physical clock information and the computer time of the time synchronization server itself, generating the computer time after the initial calibration, designating one time synchronization server as the primary time synchronization server, and using the computer time of the primary time synchronization server after its initial calibration as the calibrated computer time of the primary time synchronization server, wherein:

[0016]

[0017] T calibrated =T recv +ΔT

[0018] T phy It is a physical clock timestamp, that is, a timestamp obtained from a physical clock source, representing physical clock information; T recv It is the received timestamp, that is, the local time received by the time synchronization server from the physical clock timestamp; ΔT net It is the network delay of the physical clock source receiving the timestamp; ΔT proc It is the local processing time of the time synchronization server; T calibrated It is the computer time after the master time server's initial calibration.

[0019] Preferably, based on the calibrated computer time of the master time server, the computer time of each slave time server after its initial calibration is recalibrated and used as the calibrated computer time of the slave time server, wherein:

[0020]

[0021] in, The timestamp sent in the request is the local time from when the time synchronization request is sent from the time synchronization server to the primary time synchronization server. The request received timestamp is the time when the primary time server received the request from the secondary time server. The timestamp sent in response is the time when the primary time server sent the time synchronization response. The response timestamp is the local time at which the response is received from the primary time server from the secondary time server. RTT (Round-Trip Time) measures the total time required for information to propagate between the secondary and primary time servers. θ (Clock Offset) is the time difference between the secondary and primary time servers. It is the calibrated time from the time server.

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

[0023]

[0024] in, It is the message sending timestamp, the timestamp when distributed node A sends a message to distributed node B. This is the message reception timestamp, the timestamp at which distributed node B receives the message from distributed node A. It is the response sending timestamp, which is the timestamp when the response message from distributed node B was sent to distributed node A. It is the response reception timestamp, which is the timestamp when distributed node A receives the response message from distributed node B; Round-Trip Time (RTT) AB This represents the total time it takes for a message to travel from distributed node A to distributed node B and back to distributed node A; one-way delay OWD. AB It 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 time synchronization server corresponding to the source distributed node, and combined with the delay time to the target distributed node, the clocks of the source distributed node and the target distributed node are synchronized, wherein:

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

[0027] Where, θ fused T represents the clock skew after fusion, indicating the clock skew of the target distributed node calculated using the fusion algorithm. phy It is a timestamp from the physical clock source, representing the physical clock time of the target distributed node, T. logical It is a logical clock timestamp, representing the logical clock time of the target distributed node, T. other It is a timestamp obtained from other clock synchronization algorithms, representing the time of other clock synchronization algorithms on the target distributed node; OWD AB ω is the time delay between the source distributed node and the target distributed node. phy This is the physical clock weight, representing the importance weight of the physical clock in the fusion algorithm, ω. logical This is the logical clock weight, representing the importance weight of the logical clock in the fusion algorithm; ω other The weights of other clock synchronization algorithms represent the importance weights of other clock synchronization algorithms in the fusion algorithm.

[0028] Preferably, after synchronizing the clocks of the source distributed nodes and the target distributed nodes, a time offset is used to adaptively adjust the clocks of the synchronized target distributed nodes, including:

[0029]

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

[0031] A method for intelligent clock synchronization in a distributed system, based on the aforementioned intelligent clock synchronization system for a distributed system, the method comprising:

[0032] Step S1: Each time synchronization server receives the physical clock information, and the intelligent clock 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] This invention first optimizes the underlying clock synchronization algorithm using timestamp-based clock synchronization technology to minimize errors caused by network latency. Then, it employs a node-specific simulation logic time unification technique to manage the time uniformly in a distributed joint experimental system, unifying the time of resources with different operating cycles and resolving conflicts between physical and logical time nodes. This invention effectively eliminates clock asynchrony issues among experimental nodes caused by network transmission latency and effectively coordinates conflicts between physical and logical times between different nodes, achieving time synchronization among nodes within the joint experimental system and avoiding errors in experimental results due to time inconsistencies.

[0035] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0036] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

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

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

[0039] Figure 3 This is a schematic diagram of the architecture of an embodiment of the present invention. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0041] Figure 1 A schematic diagram of an intelligent clock synchronization system for distributed systems is shown. Figure 1 As shown, the system includes:

[0042] The system consists of a physical clock source, several time synchronization servers, and multiple distributed nodes that provide time synchronization services to the time synchronization servers. Each time synchronization server provides time synchronization services to one or more distributed nodes. Distributed nodes that provide time synchronization services to the same time synchronization server form an intranet. Multiple intranets are combined to form an extranet. Distributed nodes within each intranet and distributed nodes in the extranet can communicate with each other. Each distributed node manages multiple subsystems, and each subsystem stores the test results.

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

[0044] Each time synchronization server receives the physical clock information, calibrates the computer time based on the physical clock information and its own computer time, and generates the computer time after initial calibration. One time synchronization server is designated as the master time synchronization server, and the computer time after initial calibration of the master time synchronization server is used as the calibrated computer time of the master time synchronization server. Based on the calibrated computer time of the master time synchronization server, the computer time after initial calibration of each slave time synchronization server is calibrated again and used as the calibrated computer time of the slave time synchronization server.

[0045] Establish routing tables for each distributed node in each internal network and external network, 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] Distributed nodes, or distributed resource devices, are used to exchange data information in a distributed system. When a source distributed node needs to send information to a target distributed node, it generates a timestamp based on the real-time computer time of the calibrated time synchronization server corresponding to the source distributed node, and combines it with the delay time to the target distributed node to synchronize the clocks of the source distributed node and the target distributed node.

[0047] This invention first optimizes the underlying clock synchronization algorithm using timestamp-based clock synchronization technology to minimize errors caused by network latency. Then, it employs node-local simulation logical time unification technology to manage the time uniformly for a distributed joint experimental system, unifying the time of resources with different operating cycles and resolving conflicts between physical and logical time nodes. By integrating the underlying cross-node physical clock synchronization algorithm and the distributed node-local simulation logical time unification algorithm, time consistency among all nodes in the distributed joint experimental system is achieved.

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

[0049] Further, based on the physical clock information and the computer time of the time synchronization server itself, the computer time is calibrated to generate the computer time after the initial calibration. One time synchronization server is designated as the primary time synchronization server, and the computer time of the primary time synchronization server after its initial calibration is used as the calibrated computer time of the primary time synchronization server, wherein:

[0050]

[0051] T calibrated =T recv +ΔT

[0052] T phy It is a physical clock timestamp, that is, a timestamp obtained from a physical clock source, representing physical clock information; T recv It is the received timestamp, that is, the local time received by the time synchronization server from the physical clock timestamp; ΔT net It is the network delay of the physical clock source receiving the timestamp; ΔT proc It is the local processing time of the time synchronization server; T calibrated It is the computer time after the master time server's initial calibration.

[0053] The computer time of each slave time server is recalibrated based on the calibrated computer time of the master time server, and used as the calibrated computer time of the slave time server, wherein:

[0054]

[0055] in, The timestamp sent in the request is the local time from when the time synchronization request is sent from the time synchronization server to the primary time synchronization server. The request received timestamp is the time when the primary time server received the request from the secondary time server. The timestamp sent in response is the time when the primary time server sent the time synchronization response. The response timestamp is the local time at which the response is received from the primary time server from the secondary time server. RTT (Round-Trip Time) measures the total time required for information to propagate between the secondary and primary time servers. θ (Clock Offset) is the time difference between the secondary and primary time servers. It is the calibrated time from the time server.

[0056] Furthermore, estimating the latency for each distributed node to route to other distributed nodes includes:

[0057]

[0058] in, It is the message sending timestamp, the timestamp when distributed node A sends a message to distributed node B. This is the message reception timestamp, the timestamp at which distributed node B receives the message from distributed node A. It is the response sending timestamp, which is the timestamp when the response message from distributed node B was sent to distributed node A. It is the response reception timestamp, which is the timestamp when distributed node A receives the response message from distributed node B; Round-Trip Time (RTT) AB This represents the total time it takes for a message to travel from distributed node A to distributed node B and back to distributed node A; one-way delay OWD. AB This is the one-way delay from distributed node A to distributed node B. Theoretically, it is half the round-trip delay, but due to variations in network conditions, the timestamps for message reception and response need to be considered in actual calculations.

[0059] When the source distributed node needs to send information to the target distributed node, it generates a timestamp based on the real-time computer time of the calibrated time synchronization server corresponding to the source distributed node, and combines it with the delay time to the target distributed node to synchronize the clocks of the source distributed node and the target distributed node, wherein:

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

[0061] Where, θ fused T represents the clock skew after fusion, indicating the clock skew of the target distributed node calculated using the fusion algorithm. phy It is a timestamp from the physical clock source, representing the physical clock time of the target distributed node, T. logical It is a logical clock timestamp, representing the logical clock time of the target distributed node, T. other It is a timestamp obtained from other clock synchronization algorithms, representing the time of other clock synchronization algorithms on the target distributed node; OWD AB ω is the time delay between the source distributed node and the target distributed node. phy This is the physical clock weight, representing the importance weight of the physical clock in the fusion algorithm, ω. logical This is the logical clock weight, representing the importance weight of the logical clock in the fusion algorithm; ω other The weights of other clock synchronization algorithms represent the importance weights 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 based on specific system requirements, the accuracy of the clock synchronization algorithm, and system performance. For the physical clock weight ω... phy If the system requires high accuracy in absolute time, the physical clock should be given a higher weight. An empirical value is between 0.3 and 0.5. For the logical clock weight ω... logical It plays an important role in event sequencing and system stability and should be given an appropriate weight, with an empirical value between 0.2 and 0.4. If the system uses other clock synchronization algorithms, such as NTP and PTP, an appropriate weight should be assigned according to the stability and accuracy of the algorithm, with an empirical value between 0.1 and 0.3.

[0063] Furthermore, after synchronizing the clocks of the source distributed nodes and the target distributed nodes, a time offset is used to adaptively adjust the clocks of each synchronized target distributed node, including:

[0064]

[0065] Among them, T new It is the adjusted clock time of the target distributed node, T.old It is the clock time of the target distributed node after synchronization, and α is an adjustment coefficient used to control the adjustment speed; Δt is the scaling factor of the time interval, Δt is the time interval between two measurement time differences, representing the time interval between two clock measurements, and Δt0 is the reference time interval, used to control the adjustment speed. When high accuracy is required, the reference value is relatively small.

[0066] In this embodiment, a larger adjustment coefficient leads to a faster adjustment speed, but may also cause oscillations and instability; a smaller adjustment coefficient leads to a slower adjustment speed, but is more stable. A scaling factor for the time interval is introduced. The scaling factor and adjustment speed can be dynamically adjusted based on changes in communication latency and clock skew between nodes. If the communication latency or clock skew between nodes is large, the scaling factor will decrease, and the scaling factor and adjustment speed will decrease accordingly to avoid over-adjustment and clock synchronization instability. If the communication latency or clock skew between nodes is small, the scaling factor will increase, and the scaling factor and adjustment speed will increase accordingly to accelerate the speed and effectiveness of clock synchronization.

[0067] This invention estimates message transmission delay and then compensates for it to minimize the impact of transmission delay on experimental results. During node clock synchronization, the constraints between different nodes in the joint experiment are considered, and the time progression order is determined based on these constraints to avoid confusion between physical and logical time in LVC simulation experiments.

[0068] This invention provides a specific embodiment of a clock synchronization system for distributed systems.

[0069] This embodiment is used to synchronize experimental resource nodes between military bases. It employs methods for precisely maintaining wall clocks, such as GPS satellite positioning systems and soft time synchronization servers, and publishes time synchronization signals through data distribution services. With minimal and stable network latency, the time service algorithm can be modified to calibrate or eliminate the network's impact on time synchronization.

[0070] In this example, satellite signals are used as the precise clock source and serve as the standard time for the joint experimental system. The system's time synchronization function is jointly performed by the time synchronization server and the time synchronization client software. The time synchronization server receives precise clock signals from an external clock source, GPS / BeiDou, and uses the NTP protocol to distribute the clock among the participating client nodes.

[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 delay, avoid cumulative errors, and ensure that the physical clocks of each node are consistent during the experiment.

[0072] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0073] This invention provides a method for intelligent clock synchronization in a distributed system, based on the aforementioned intelligent clock synchronization system for a distributed system, the method comprising:

[0074] Step S1: Each time synchronization server receives the physical clock information, and the intelligent clock 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] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0077] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections can include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections can include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.

[0078] It should be noted that these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Furthermore, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Additionally, these modules can be integrated together to form a System-on-a-Chip (SOC).

[0079] The electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, Near Field Communication (NFC), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0080] This application also provides a program product, such as a computer-readable storage medium, including a program that, when executed by a processor, performs the above-described method embodiments.

[0081] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

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

[0083] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0084] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A smart clock synchronization system for distributed systems, characterized in that, The system includes: The system consists of a physical clock source, several time synchronization servers, and multiple distributed nodes that provide time synchronization services to the time synchronization servers. Each time synchronization server provides time synchronization services to one or more distributed nodes. Distributed nodes that receive time synchronization services from the same time synchronization server form an intranet. Multiple intranets are combined to form an extranet. Distributed nodes within each intranet and distributed nodes in the extranet can communicate with each other. Each distributed node manages multiple subsystems, and each subsystem stores the test results. The physical clock source is a physical clock, which provides physical clock information; Each time synchronization server receives the physical clock information, calibrates the computer time based on the physical clock information and its own computer time, and generates the computer time after initial calibration. One time synchronization server is designated as the master time synchronization server, and the computer time after initial calibration of the master time synchronization server is used as the calibrated computer time of the master time synchronization server. Based on the calibrated computer time of the master time synchronization server, the computer time of each slave time synchronization server after initial calibration is calibrated again, and used as the calibrated computer time of the slave time synchronization server. Establish routing tables for each distributed node in each internal network and external network, determine the path from each distributed node to other distributed nodes, and estimate the delay time from each distributed node to other distributed nodes. Distributed nodes, or distributed resource devices, are used to exchange data information in a distributed system. When a source distributed node needs to send information to a target distributed node, it generates a timestamp based on the real-time computer time of the calibrated time synchronization server corresponding to the source distributed node, and combines it 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 as described in claim 1, characterized in that, The process involves calibrating the computer time based on the physical clock information and the computer time of the time synchronization server itself, generating an initial calibrated computer time, designating one time synchronization server as the primary time synchronization server, and using the initial calibrated computer time of the primary time synchronization server as its calibrated computer time. T calibrated =T recv +ΔT T phy It is a physical clock timestamp, that is, a timestamp obtained from a physical clock source, representing physical clock information; T recv It is the received timestamp, that is, the local time received by the time synchronization server from the physical clock timestamp; ΔT net It is the network delay of the physical clock source receiving the timestamp; ΔT proc It is the local processing time of the time synchronization server; T calibrated It is the computer time after the master time server's initial calibration.

3. The system as described in claim 2, characterized in that, The computer time of each slave time server is recalibrated based on the calibrated computer time of the master time server, and used as the calibrated computer time of the slave time server, wherein: in, The timestamp sent in the request is the local time from when the time synchronization request is sent from the time synchronization server to the primary time synchronization server. The request received timestamp is the time when the primary time server received the request from the secondary time server. The timestamp sent in response is the time when the primary time server sent the time synchronization response. The response timestamp is the local time at which the response is received from the primary time server from the secondary time server. RTT (Round-Trip Time) measures the total time required for information to propagate between the secondary and primary time servers. θ (Clock Offset) is the time difference between the secondary and primary time servers. It is the calibrated time from the time server.

4. The system as described in claim 3, characterized in that, The estimation of the latency for each distributed node to route to other distributed nodes includes: in, It is the message sending timestamp, the timestamp when distributed node A sends a message to distributed node B. This is the message reception timestamp, the timestamp at which distributed node B receives the message from distributed node A. It is the response sending timestamp, which is the timestamp when the response message from distributed node B was sent to distributed node A. It is the response reception timestamp, which is the timestamp when distributed node A receives the response message from distributed node B; Round-Trip Time (RTT) AB This represents the total time it takes for a message to travel from distributed node A to distributed node B and back to distributed node A; one-way delay OWD. AB It is the one-way delay from distributed node A to distributed node B.

5. The system as described in claim 4, characterized in that, When the source distributed node needs to send information to the target distributed node, it generates a timestamp based on the real-time computer time of the calibrated time synchronization server corresponding to the source distributed node, and combines it with the delay time to the target distributed node to synchronize the clocks of the source distributed node and the target distributed node, wherein: i fused =ω phy ·T phy +oh logical ·T logical +oh other ·T other -OWD AB Where, θ fused T represents the clock skew after fusion, indicating the clock skew of the target distributed node calculated using the fusion algorithm. phy It is a timestamp from the physical clock source, representing the physical clock time of the target distributed node, T. logical It is a logical clock timestamp, representing the logical clock time of the target distributed node, T. other It is a timestamp obtained from other clock synchronization algorithms, representing the time of other clock synchronization algorithms on the target distributed node; OWD AB ω is the time delay between the source distributed node and the target distributed node. phy This is the physical clock weight, representing the importance weight of the physical clock in the fusion algorithm, ω. logical This is the logical clock weight, representing the importance weight of the logical clock in the fusion algorithm; ω other The weights of other clock synchronization algorithms represent the importance weights of other clock synchronization algorithms in the fusion algorithm.

6. The system as described in claim 4, characterized in that, After synchronizing the clocks of the source and target distributed nodes, a time skew is used to adaptively adjust the clocks of each target distributed node after synchronization, including: Among them, T new It is the adjusted clock time of the target distributed node, T. old It is the clock time of the target distributed node after synchronization, and α is an adjustment coefficient used to control the adjustment speed; Δt is the scaling factor of the time interval, Δt is the time interval between two measurement time differences, Δt0 is the reference time interval.

7. A method for intelligent clock synchronization in a distributed system, based on the intelligent clock synchronization system for a distributed system as described in any one of claims 1-6, characterized in that, The method includes: Step S1: Each time synchronization server receives the physical clock information, and the intelligent clock 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

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

    CN116405347A

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

    CN117042111A