Method and system for slowly adjusting client time through NTP protocol

By adjusting the maximum adjustment rate of the second NTP time server and adopting a three-stage adjustment strategy, the time jump problem during NTP protocol synchronization is solved, and more accurate and stable time synchronization is achieved.

CN119906515APending Publication Date: 2025-04-29SHANGHAI TONGZHISHI ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510078279.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing NTP protocol may cause time jumps when synchronizing client time, affecting system stability and time accuracy.

Method used

By adjusting the maximum adjustment rate of the second NTP time server and synchronizing with the standard time provided by the satellite, instead of the first NTP time server, it leads its NTP client to slow down the time, and adopts a three-stage adjustment strategy (acceleration, constant speed, deceleration) to smooth the synchronization process.

Benefits of technology

It effectively avoids the jump of client time, realizes a smoother and more accurate time synchronization process, reduces system load fluctuations and errors, and improves time accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906515A_ABST
    Figure CN119906515A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet, and particularly provides a method and a system for slowly adjusting client time through an NTP (Network Temporary Protocol). The method comprises the following steps: adjusting the maximum adjustment rate of a second NTP time server; obtaining standard time provided by the satellite by using the second NTP time server, and synchronizing the time of the second NTP time server and the time of the first NTP time server; according to the method, the first NTP time server is replaced by the second NTP time server, and the NTP client of the first NTP time server is guided to adjust the time slowly, so that the time jump of the client is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a method and system for adjusting client time by using an NTP protocol. Background Art

[0002] The Network Time Protocol (NTP) is a protocol for synchronizing clocks in a computer network. NTP is a distributed, hierarchical protocol designed to synchronize the clocks of participating devices with high precision over a network. In the prior art, according to the NTP protocol, the NTP server will directly synchronize the local time to the client, which may cause the client time to jump. Summary of the invention

[0003] In view of this, the present invention provides a method and system for slowly adjusting client time through the NTP protocol, so as to avoid the jump of client time.

[0004] In a first aspect, the present invention provides a method for adjusting client time by using an NTP protocol, the method comprising:

[0005] Step 1, adjusting the maximum adjustment rate of the second NTP time server;

[0006] Step 2: Use the second NTP time server to obtain the standard time provided by the satellite, and synchronize the time of the second NTP time server with the first NTP time server;

[0007] Step 3: Replace the first NTP time server with the second NTP time server, and lead the NTP client of the first NTP time server to adjust the time.

[0008] Optionally, step 1 includes:

[0009] The adjustment rate is from 0, and is uniformly accelerated according to the slow adjustment acceleration a to the maximum adjustment rate R max .

[0010] Optionally, the step 2 includes:

[0011] After the second NTP time server is started, it will only serve as a primary time server to obtain standard time from the satellite. After the second NTP time server locks the satellite's standard time, the panel indicator light will indicate that the time of the second NTP time server and the satellite's standard time are synchronized successfully.

[0012] Configure the IP address of the second NTP time server through the console management port of the second NTP time server, and ensure that the configured IP address does not conflict with the IP addresses of other devices; after the configuration is complete, test and ping the IP address of the first NTP time server; on the second NTP time server, run the time synchronization command; after the synchronization is complete, the local time of the second NTP time server will be consistent with that of the first NTP time server; after the synchronization, the local time of the first NTP time server and the second NTP time server will have the same time deviation ΔT from the standard time.

[0013] Optionally, step 3 includes:

[0014] Set the IP address on the second NTP time server to the IP address of the first NTP time server, and unplug the network cable of the first NTP time server;

[0015] The second NTP time server has started to provide NTP service at this time. Since the second NTP time server receives the signal from satellite 11, there is a time deviation ΔT between the time of the second NTP time server and the standard time of the satellite. The slow adjustment mechanism of the second NTP time server is started. The second NTP time server adjusts the time according to the time deviation ΔT and the maximum adjustment rate R. max and the setting of the slow adjustment acceleration a, calculate t1, t2 and t3, and record this moment as the zero moment when the slow adjustment starts;

[0016] The time of the NTP client of the first NTP time server is in synchronization with the time of the first NTP time server. When the second NTP time server replaces the first NTP time server and the slow adjustment starts, the time of the NTP client of the first NTP time server and the second NTP time server will be synchronized; for the NTP client, a synchronization request will be made to the IP address of the first NTP time server. Since the second NTP time server is configured with the same IP address as the NTP time server and the first NTP time server is offline at this time, the second NTP time server receives and processes the synchronization request of the NTP client; the NTP client, the first NTP time server and the second NTP time server perform IP communication through network equipment;

[0017] Since the second NTP time server calculates that the slow adjustment will last for t1+t2+t3 seconds, at any time t in 0≤t≤t1+t2+t3, the second NTP time server adopts the value of the sum of the local time and the accumulated adjustment time F(t) when responding to the synchronization request of the NTP client; after t1+t2+t3 seconds, the NTP client of the first NTP time server will slow down to synchronize with the standard time of the satellite, where t1 is the duration of the first stage acceleration adjustment; t2 is the duration of the second stage constant speed adjustment; and t3 is the duration of the third stage deceleration adjustment.

[0018] Optionally include:

[0019] The first stage of accelerated adjustment:

[0020] According to the uniform acceleration formula and the maximum adjustment rate R max , the duration of the first stage acceleration adjustment is:

[0021]

[0022] During the duration t1, from the start of the slow adjustment process to the current time, the cumulative adjustment time is:

[0023] 0≤t≤t1, t represents the time from the start of the slow adjustment process to the present;

[0024] At the end of the first stage of accelerated adjustment, the total time difference of the first stage adjustment is:

[0025]

[0026] Second stage constant speed adjustment:

[0027] Adjust the rate, maintain the maximum adjustment rate R max unchanged; if the current maximum adjustment rate R max If the ΔT1 calculated by the parameters satisfies │ΔT│≤2·│ΔT1│, it means that the time deviation ΔT is less than the total adjustment of the first stage acceleration adjustment duration and the third stage deceleration adjustment duration; if the original parameters are adjusted, the adjustment will be excessive. At this time, the maximum adjustment rate R max Need to be recalculated, the expression is:

[0028]

[0029] If │ΔT│>2·│ΔT1│, the duration of the second stage constant speed adjustment is:

[0030]

[0031] The total time adjustment of the constant speed stage ΔT2 = ±R max t2;

[0032] At this time, the cumulative adjustment calculation formula is:

[0033] t1≤t≤t2;

[0034] At the end of the second stage of constant speed adjustment, the total time difference of the second stage adjustment is:

[0035]

[0036] The third stage of deceleration adjustment:

[0037] The adjustment rate is from the maximum adjustment rate R max Uniformly decelerate to 0; due to the symmetry requirements of the algorithm, the duration of this stage is:

[0038]

[0039] During the duration t3, the total time adjustment of the deceleration phase is:

[0040]

[0041] At this time, the cumulative adjustment calculation formula is:

[0042]

[0043] At the end of the third stage of deceleration adjustment, the total time difference of the third stage adjustment is:

[0044] When ΔT2 is not 0, the total time adjustment is:

[0045]

[0046] When ΔT2 is 0, the total time adjustment is:

[0047]

[0048] In a second aspect, the present invention provides a system for adjusting client time through the NTP protocol, the system being used to implement the method for adjusting client time through the NTP protocol described in the first aspect or any one of the first aspects; the system comprising: a satellite, a first NTP time server, a second NTP time server, a network device and an NTP client;

[0049] The second NTP time server is used to obtain the standard time from the satellite, and after obtaining the standard time, synchronize with the time of the first NTP time server; then obtain the local time of the first NTP time server from the first NTP time server, obtain the time difference between the two, that is, the total time deviation that needs to be adjusted, start the time adjustment mechanism, and lead the NTP client synchronized with the first NTP time server to adjust to the standard time; according to the maximum value of the adjustment, calculate the corresponding time required for adjustment per second; the network device is used for IP communication between the NTP client, the first NTP time server, and the second NTP time server.

[0050] In the technical solution provided by the present invention, the method includes adjusting the maximum adjustment rate of the second NTP time server; using the second NTP time server to obtain the standard time provided by the satellite, and synchronizing the time of the second NTP time server and the first NTP time server; replacing the first NTP time server with the second NTP time server, and leading the NTP client of the first NTP time server to slowly adjust the time, and the method avoids the jump of the client time. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0052] Figure 1 A schematic diagram of a system for adjusting client time by NTP protocol provided by an embodiment of the present invention;

[0053] Figure 2 A flowchart of a method for adjusting client time by NTP protocol provided by an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of a slow adjustment phase provided by an embodiment of the present invention;

[0055] Figure 4 A schematic diagram of a device for adjusting client time through the NTP protocol provided by an embodiment of the present invention.

[0056] Figure numerals: 11 - satellite, 12 - first NTP time server, 13 - second NTP time server, 14 - network device, 15 - NTP client, 41 - satellite antenna, 42 - satellite receiving module, 43 - CPU module and 44 - network module. DETAILED DESCRIPTION

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

[0058] It should be clear that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings.

[0060] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0061] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0062] The Network Time Protocol (NTP) can achieve high precision: up to milliseconds in a local area network and usually tens of milliseconds in a wide area network; high reliability: ensuring fault tolerance of time synchronization through multiple servers and multiple paths; scalability: supporting everything from a small local area network to the globally distributed Internet.

[0063] NTP is based on UDP protocol transmission, using port 123, and usually runs in IPv4 or IPv6 networks. The core of NTP is to adjust the client's clock through communication between the time server and the client in the network. NTP uses a network delay correction algorithm to accurately calculate the time difference ΔT between the client and the server. Basic formula: Among them, T0 is the timestamp when the client sends the request; T1 is the timestamp when the server receives the request; T2 is the timestamp when the server sends the response; T3 is the timestamp when the client receives the response.

[0064] When NTP client 15 sends a request to the NTP server, it records the sending time, local time T0, and sends it to the NTP server. When the NTP server responds to the client request, it sends the server time T1 and T2 to the NTP client 15. After receiving the response, the NTP client records the receiving time, local time T3. Through the above algorithm, NTP client 15 can obtain the time difference between the local time and the NTP server time. NTP client 15 adjusts the local time of NTP client 15 according to the time difference, so as to achieve time synchronization with the NTP server.

[0065] In engineering practice, there is a scenario: a customer's first-level NTP server (A) in service has a large time difference T (usually about tens of seconds) from the standard time due to a long period of time without receiving satellite signals and inaccurate timekeeping. The customer requires another server B to replace server A, and slowly bring the NTP clients 15 that were originally synchronized with A to synchronize with the standard time. The specific total time of slow adjustment can be flexibly configured. During this process, the client does not need to make any changes.

[0066] Figure 1 A schematic diagram of a system for adjusting client time by NTP protocol provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the system includes: a satellite 11, a first NTP time server 12, a second NTP time server 13, a network device 14 and an NTP client 15;

[0067] The second NTP time server 13 is used to obtain the standard time from the satellite 11, and after obtaining the standard time, synchronize with the time of the first NTP time server 12; then obtain the local time of the first NTP time server 12 from the first NTP time server 12, obtain the time difference between the two, that is, the total time deviation that needs to be adjusted, start the time adjustment mechanism, and lead the NTP client synchronized with the first NTP time server 12 to adjust to the standard time; according to the maximum value of the adjustment, calculate the corresponding time required for adjustment per second; the network device 14 is used for IP communication between the NTP client 15, the first NTP time server 12, and the second NTP time server 13.

[0068] Figure 2 A flowchart of a method for adjusting client time by NTP protocol provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method includes:

[0069] Step 1: Adjust the maximum adjustment rate of the second NTP time server 13.

[0070] In the embodiment of the present invention, step 1 includes:

[0071] The adjustment rate is from 0, and is uniformly accelerated according to the slow adjustment acceleration a to the maximum adjustment rate R max .

[0072] The user can specify the maximum slow adjustment time per day based on the system's sensitivity to time jumps. For example, if the user expects a maximum adjustment of 100 milliseconds per day, the average adjustment per second is 100 / 24 / 3600 = 1.1574*10 -6 seconds. Mark the maximum debugging rate R max =1.1574ppm, the maximum debugging rate R max Configured to the second NTP time server 13.

[0073] Step 2: Use the second NTP time server 13 to obtain the standard time provided by the satellite 11, and synchronize the time of the second NTP time server 13 and the first NTP time server 12.

[0074] In the embodiment of the present invention, step 2 includes:

[0075] After the second NTP time server 13 is started, it is only connected to the satellite without plugging in the network cable, and only acts as a primary time server to obtain the standard time from the satellite 11; after the second NTP time server 13 locks the standard time of the satellite 11, the panel indicator light indicates that the time of the second NTP time server 13 and the standard time of the satellite 11 are successfully synchronized;

[0076] Configure the IP address of the second NTP time server 13 through the console management port of the second NTP time server 13 to ensure that there is no conflict between the configured IP address and the IP addresses of other devices; after the configuration is completed, test and ping the IP address of the first NTP time server 12; run the time synchronization command on the second NTP time server 13; after the synchronization is completed, the local time of the second NTP time server 13 will be consistent with the local time of the first NTP time server 12; after the synchronization, the local time of the first NTP time server 12 and the second NTP time server 13 have the same time deviation ΔT from the standard time.

[0077] Step 3: The second NTP time server 13 replaces the first NTP time server 12 and leads the NTP client 15 of the first NTP time server 12 to adjust the time.

[0078] In the embodiment of the present invention, step 3 includes:

[0079] Set the IP address on the second NTP time server 13 to the IP address of the first NTP time server 12, and unplug the network cable of the first NTP time server 12;

[0080] The second NTP time server 13 has started to provide NTP service at this time. Since the second NTP time server 13 receives the signal from the satellite 11, there is a time deviation ΔT between the time of the second NTP time server 13 and the standard time of the satellite 11. The slow adjustment mechanism of the second NTP time server 13 is started. The second NTP time server 13 adjusts the time according to the time deviation ΔT and the maximum adjustment rate R. max and the setting of the slow adjustment acceleration a, calculate t1, t2 and t3, and record this moment as the zero moment when the slow adjustment starts;

[0081] The NTP client 15 of the first NTP time server 12 is in synchronization with the time of the first NTP time server 12. When the second NTP time server 13 replaces the first NTP time server 12 and the slow adjustment starts, the time of the NTP client 15 of the first NTP time server 12 and the second NTP time server 13 will be synchronized; for the NTP client 15, a synchronization request will be made to the IP address of the first NTP time server 12. Since the second NTP time server 13 is configured with the same IP address as the NTP time server 12, and the first NTP time server 12 is offline at this time, the second NTP time server 13 receives and processes the synchronization request of the NTP client 15; the NTP client 15, the first NTP time server 12, and the second NTP time server 13 perform IP communication through the network device 14;

[0082] Since the second NTP time server 13 calculates that the slow adjustment will last for t1+t2+t3 seconds, at any time t in 0≤t≤t1+t2+t3, the second NTP time server 13 uses the value of the sum of the local time and the cumulative adjustment time F(t) when responding to the synchronization request of the NTP client 15; after t1+t2+t3 seconds, the NTP client 15 of the first NTP time server 12 will slow down to synchronize with the standard time of the satellite 11, where t1 is the duration of the first stage acceleration adjustment; t2 is the duration of the second stage constant speed adjustment; and t3 is the duration of the third stage deceleration adjustment.

[0083] During the slow adjustment process of the second NTP time server 13, a command may be used to display the progress and remaining time of the slow adjustment.

[0084] Time adjustment algorithm description:

[0085] The time adjustment algorithm uses Figure 3The process consists of three stages: the first stage is acceleration adjustment, the second stage is constant speed adjustment, and the third stage is deceleration adjustment. The first stage and the third stage are required to have the same duration. The second stage is based on the time deviation ΔT and R max Different settings may not exist.

[0086] The parameters used by the procedure are defined as follows:

[0087] ΔT is the time deviation (seconds), the deviation between the first NTP time server 12 and the standard time; R max is the maximum adjustment rate in ppm (10 -6 seconds / second), set according to customer expectations; adjustment rate R(t) is the real-time rate; a is the slow adjustment acceleration, in ppm / s (fixed value, 0.001ppm / second); t is the time from the start of the slow adjustment process to the present, that is, the adjustment time; F(t) is the cumulative adjustment time from the start of the slow adjustment process to the present. t1 is the duration of the first stage acceleration adjustment; t2 is the duration of the second stage constant speed adjustment; t3 is the duration of the third stage deceleration adjustment; ΔT1 is the total time difference of the first stage adjustment; ΔT2 is the total time difference of the second stage adjustment; ΔT3 is the total time difference of the third stage adjustment.

[0088] The goal to be achieved is: ΔT = -(ΔT1 + ΔT2 + ΔT3), that is, through three stages of time adjustment, the client time is adjusted to the standard time. When ΔT>0, take the negative value of the value with ± sign in the following calculation, which means that the clock will be slowed down and aligned with the standard time. When ΔT<0, take the positive value of the value with ± sign in the following calculation, which means that the clock will be accelerated and aligned with the standard time.

[0089] In the embodiment of the present invention, it includes:

[0090] The first stage of accelerated adjustment:

[0091] According to the uniform acceleration formula and the maximum adjustment rate R max , the duration of the first stage acceleration adjustment is:

[0092]

[0093] During the duration t1, from the start of the slow adjustment process to the current time, the cumulative adjustment time is:

[0094] 0≤t≤t1, t represents the time from the start of the slow adjustment process to the present;

[0095] At the end of the first stage of accelerated adjustment, the total time difference of the first stage adjustment is:

[0096]

[0097] Second stage constant speed adjustment:

[0098] Adjust the rate, maintain the maximum adjustment rate R max unchanged; if the current maximum adjustment rate R max If the ΔT1 calculated by the parameters satisfies │ΔT│≤2·│ΔT1│, it means that the time deviation ΔT is less than the total adjustment of the first stage acceleration adjustment duration and the third stage deceleration adjustment duration; if the original parameters are adjusted, the adjustment will be excessive. At this time, the maximum adjustment rate R max Need to be recalculated, the expression is:

[0099]

[0100] If │ΔT│>2·│ΔT1│, the duration of the second stage constant speed adjustment is:

[0101]

[0102] The total time adjustment of the constant speed stage ΔT2 = ±R m2x t2;

[0103] At this time, the cumulative adjustment calculation formula is:

[0104]

[0105] At the end of the second stage of constant speed adjustment, the total time difference of the second stage adjustment is:

[0106]

[0107] The third stage of deceleration adjustment:

[0108] The adjustment rate is from the maximum adjustment rate R max Uniformly decelerate to 0; due to the symmetry requirements of the algorithm, the duration of this stage is:

[0109]

[0110] During the duration t3, the total time adjustment of the deceleration phase is:

[0111]

[0112] At this time, the cumulative adjustment calculation formula is:

[0113]

[0114] At the end of the third stage of deceleration adjustment, the total time difference of the third stage adjustment is:

[0115] When ΔT2 is not 0, the total time adjustment is:

[0116]

[0117] When ΔT2 is 0, the total time adjustment is:

[0118]

[0119] In the embodiment of the present invention, the three-stage time adjustment method has the following advantages compared to the method of adjusting the time at a constant speed:

[0120] 1. Smoother time synchronization process:

[0121] The three-stage adjustment avoids sudden changes caused by instantaneous changes in clock speed by adjusting the rate in gradual changes, ensuring a smoother time synchronization process and reducing the impact on system stability.

[0122] The first stage is accelerated adjustment: gradually increase the adjustment speed to start the synchronization process smoothly.

[0123] The second stage of constant speed adjustment: stabilize synchronization at the maximum rate and improve synchronization efficiency.

[0124] The third stage is deceleration adjustment: slow down the adjustment speed when approaching the target time to prevent overshoot or frequent corrections.

[0125] 2. Reduce errors and overshoot:

[0126] Constant speed adjustment is prone to overshoot or undershoot, especially when approaching the target time. Three-stage adjustment can more accurately approach the target time by slowing down at the end, thereby reducing errors.

[0127] 3. Optimize time accuracy and stability:

[0128] Three-stage adjustment can strike a balance between fast synchronization and system stability. Constant speed adjustment may cause the system to be in an inaccurate time state for a long time in some cases, while three-stage adjustment can more effectively maintain time accuracy and ensure that the system enters a stable state in the shortest time.

[0129] 4. Adapt to various scene requirements:

[0130] The three-stage adjustment strategy can flexibly adjust the time and rate of each stage, which is suitable for scenarios with different accuracy and latency requirements. However, the constant speed adjustment method has poor flexibility and is difficult to adapt to the changing network or system environment.

[0131] 5. Reduce system load fluctuations:

[0132] Due to the gradual acceleration and deceleration, the three-stage adjustment method occupies system resources more evenly, reduces the fluctuation of system load compared to constant speed adjustment, and is conducive to the stable operation of real-time systems.

[0133] The three-stage time adjustment method has significant advantages in time synchronization accuracy, system stability and load balancing, so it is more popular in many precise timing or distributed systems.

[0134] The present invention provides a device for adjusting the client time by NTP protocol, the device comprising: a satellite antenna 41, a satellite receiving module 42, a CPU module 43, and a network module 44;

[0135] The CPU module 43 obtains the standard time provided by the satellite 11 through the satellite antenna 41 and the satellite receiving module 42, synchronizes the time of the second NTP time server 13 and the first NTP time server 12, and runs the adjustment algorithm; the network module 44 is used to communicate with the NTP client 15 to adjust the time of the NTP client 15.

[0136] In the technical solution provided by the present invention, the method includes adjusting the maximum adjustment rate of the second NTP time server; using the second NTP time server to obtain the standard time provided by the satellite, and synchronizing the time of the second NTP time server and the first NTP time server; replacing the first NTP time server with the second NTP time server, and leading the NTP client of the first NTP time server to slowly adjust the time, and the method avoids the jump of the client time.

[0137] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for adjusting client time by NTP protocol, characterized in that: The method comprises: Step 1, adjusting the maximum adjustment rate of the second NTP time server (13); Step 2: using the second NTP time server (13) to obtain the standard time provided by the satellite (11), and synchronizing the time of the second NTP time server (13) and the first NTP time server (12); Step 3: Replace the first NTP time server (12) with the second NTP time server (13), and lead the NTP client (15) of the first NTP time server (12) to adjust the time.

2. The method according to claim 1, characterized in that The step 1 comprises: The adjustment rate is from 0, and is uniformly accelerated according to the slow adjustment acceleration a to the maximum adjustment rate R max .

3. The method according to claim 1, characterized in that The step 2 comprises: After the second NTP time server (13) is started, it only acts as a primary time server to obtain standard time from the satellite (11); after the second NTP time server (13) locks the standard time of the satellite (11), a panel indicator light indicates that the time of the second NTP time server (13) and the standard time of the satellite (11) are successfully synchronized; The IP address of the second NTP time server (13) is configured through the console management port of the second NTP time server (13), ensuring that the configured IP address does not conflict with the IP addresses of other devices; after the configuration is completed, a test is performed to achieve pinging with the IP address of the first NTP time server (12); on the second NTP time server (13), a time synchronization command is run; after the synchronization is completed, the local time of the second NTP time server (13) will be consistent with the local time of the first NTP time server (12); after the synchronization, the local time of the first NTP time server (12) and the second NTP time server (13) have the same time deviation ΔT from the standard time.

4. The method according to claim 1, characterized in that: The step 3 comprises: The IP address on the second NTP time server (13) is set to the IP address of the first NTP time server (12), and the network cable of the first NTP time server (12) is unplugged; The second NTP time server (13) has started to provide NTP service at this time. Since the second NTP time server (13) has received the signal from the satellite (11), there is a time deviation ΔT between the time of the second NTP time server (13) and the standard time of the satellite (11). The slow adjustment mechanism of the second NTP time server (13) is started. The second NTP time server (13) adjusts the time according to the time deviation ΔT, the maximum adjustment rate R max and the setting of the slow adjustment acceleration a, calculate t1, t2 and t3, and record this moment as the zero moment when the slow adjustment starts; The time of the NTP client (15) of the first NTP time server (12) is in a synchronized state with that of the first NTP time server (12). When the second NTP time server (13) replaces the first NTP time server (12) and the slow adjustment starts, the time of the NTP client (15) of the first NTP time server (12) and the time of the second NTP time server (13) will be synchronized. For the NTP client (15), a synchronization request will be made to the IP address of the first NTP time server (12). Since the second NTP time server (13) is configured with the same IP address as that of the NTP time server (12), and the first NTP time server (12) is offline at this time, the second NTP time server (13) receives and processes the synchronization request of the NTP client (15); the NTP client (15), the first NTP time server (12), and the second NTP time server (13) perform IP communication through the network device (14); Since the second NTP time server (13) calculates that the slow adjustment will last for t1+t2+t3 seconds, at any time t in the range of 0≤t≤t1+t2+t3, the second NTP time server (13) uses the value of the sum of the local time and the accumulated adjustment time F(t) when responding to the synchronization request of the NTP client (15); after t1+t2+t3 seconds, the NTP client (15) of the first NTP time server (12) will slow adjust to be synchronized with the standard time of the satellite (11), wherein t1 is the duration of the first stage acceleration adjustment; t2 is the duration of the second stage constant speed adjustment; and t3 is the duration of the third stage deceleration adjustment.

5. The method according to claim 4, characterized in that include: The first stage of accelerated adjustment: According to the uniform acceleration formula and the maximum adjustment rate R max , the duration of the first stage acceleration adjustment is: During the duration t1, from the start of the slow adjustment process to the current time, the cumulative adjustment time is: 0≤t≤t1, t represents the time from the start of the slow adjustment process to the present; At the end of the first stage of accelerated adjustment, the total time difference of the first stage adjustment is: Second stage constant speed adjustment: Adjust the rate, maintain the maximum adjustment rate R max unchanged; if the current maximum adjustment rate R max If the ΔT1 calculated by the parameters satisfies │ΔT│≤2·│ΔT1│, it means that the time deviation ΔT is less than the total adjustment amount of the first stage acceleration adjustment duration and the third stage deceleration adjustment duration; Adjusting according to the original parameters will result in over-adjustment. At this time, the maximum adjustment rate R max Need to be recalculated, the expression is: If │ΔT│>2·│ΔT1│, the duration of the second stage constant speed adjustment is: The total time adjustment of the constant speed stage ΔT2 = ±R max t2; At this time, the cumulative adjustment calculation formula is: At the end of the second stage of constant speed adjustment, the total time difference of the second stage adjustment is: The third stage of deceleration adjustment: The adjustment rate is from the maximum adjustment rate R max Uniformly decelerate to 0; due to the symmetry requirements of the algorithm, the duration of this stage is: During the duration t3, the total time adjustment of the deceleration phase is: At this time, the cumulative adjustment calculation formula is: <h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> t1+t2≤t≤t1+t2+t3; At the end of the third stage of deceleration adjustment, the total time difference of the third stage adjustment is: When ΔT2 is not 0, the total time adjustment is: When ΔT2 is 0, the total time adjustment is:

6. A system for adjusting client time by NTP protocol, characterized in that: The system is used to implement the method for adjusting the client time by the NTP protocol as described in any one of claims 1 to 5; the system comprises: a satellite (11), a first NTP time server (12), a second NTP time server (13), a network device (14) and an NTP client (15); The second NTP time server (13) is used to obtain the standard time from the satellite (11), and after obtaining the standard time, synchronize with the time of the first NTP time server (12); then obtain the local time of the first NTP time server (12) from the first NTP time server (12), obtain the time difference between the two, that is, the total time deviation that needs to be adjusted, start the time adjustment mechanism, and lead the NTP client synchronized with the first NTP time server (12) to adjust to the standard time; according to the maximum value of the adjustment, calculate the corresponding time required for adjustment per second; the network device (14) is used for IP communication between the NTP client (15), the first NTP time server (12), and the second NTP time server (13).