CN112968748B - Software synchronization error compensation method, system, medium, and apparatus - Google Patents

Software synchronization error compensation method, system, medium, and apparatus Download PDF

Info

Publication number
CN112968748B
CN112968748B CN202110402022.0A CN202110402022A CN112968748B CN 112968748 B CN112968748 B CN 112968748B CN 202110402022 A CN202110402022 A CN 202110402022A CN 112968748 B CN112968748 B CN 112968748B
Authority
CN
China
Prior art keywords
time
client
application program
server
ntp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110402022.0A
Other languages
Chinese (zh)
Other versions
CN112968748A (en
Inventor
孙媛
单鑫
赵建印
陈健
李保刚
李志成
高松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Coastal Defense College Of Naval Aviation University Of Chinese Pla
Original Assignee
Coastal Defense College Of Naval Aviation University Of Chinese Pla
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Coastal Defense College Of Naval Aviation University Of Chinese Pla filed Critical Coastal Defense College Of Naval Aviation University Of Chinese Pla
Priority to CN202110402022.0A priority Critical patent/CN112968748B/en
Publication of CN112968748A publication Critical patent/CN112968748A/en
Application granted granted Critical
Publication of CN112968748B publication Critical patent/CN112968748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Abstract

The invention provides a software synchronization error compensation method, a system, a medium and a device, comprising: step 1: initializing a client application program, wherein the client application program comprises application program cache data, whether an initial state is matched or not and an NTP state of a client computer; step 2: the client and the server finish timing through Socket; and step 3: after the time correction is completed, the server issues an application program running instruction to all the clients connected with the server, and all the clients synchronously start the application program after receiving the instruction; and 4, step 4: and after the operation period is finished, each client application program performs error compensation on the next operation period, and corrects the operation time of the application program. The invention carries out time correction on all client application programs on the basis of NTP synchronous time correction, ensures that the application programs strictly run according to time sequence and carry out normal service interaction, does not need too much hardware time correction equipment, and has the characteristics of low cost, system controllability and high reliability.

Description

Software synchronization error compensation method, system, medium, and apparatus
Technical Field
The invention relates to the technical field of time calibration, in particular to a software synchronization error compensation method, a system, a medium and equipment.
Background
The NTP technology can be adopted in a computer system supporting network sockets to carry out time synchronization, time errors on a client side are in millisecond level, but for application programs running on the client side, error accumulation is overlarge after the application programs run for a period of time (half an hour), and the error tolerance range is exceeded, so that the programs running on the client sides are interfered with each other in time sequence, and the normal work cannot be carried out. For NTP timing, the client performs timing again at intervals, but the more stable the timing interval is, the larger the timing interval is, so that the error generated by the running of the application program needs to be compensated at the timing interval of two times, thereby avoiding long-time error accumulation and enabling the application program to work normally.
Patent document CN104410481B (application number: CN 201410710632.7) discloses a time setting method and a time setting system based on NTP network, which includes the following steps: the master station sends a request for inquiring an accurate clock to the terminal; the terminal replies a request of the master station for inquiring the accurate clock; the master station records the time for replying the request and repeats the preorder steps; the master station calculates the time of network transmission from the master station to the terminal and sends a time deviation modification request to the terminal; the terminal confirms and modifies the time; the master station inquires the terminal time; the terminal returns the terminal time to the master station; after the master station confirms that the time of the terminal is correct, a timing request is sent to the terminal; the terminal carries out time synchronization on the primary meter according to the time calibration request of the master station; and (5) terminal confirmation.
Disclosure of Invention
In view of the defects in the prior art, the present invention provides a software synchronization error compensation method, system, medium and device.
The software synchronization error compensation method provided by the invention comprises the following steps:
step 1: initializing a client application program, including application program cache data, whether an initial state is matched or not, and an NTP state of a client computer;
and 2, step: the client and the server finish timing through Socket;
and step 3: after the time correction is completed, the server issues an application program running instruction to all the clients connected with the server, and all the clients synchronously start the application program after receiving the instruction;
and 4, step 4: and after the operation period of each client application program is finished, carrying out error compensation on the next operation period, and correcting the operation time of the application program.
Preferably, the time recorded by the client clock for sending the NTP message and the time recorded by the client clock for receiving the NTP message are T respectively 1 And T 4 The time recorded by the server end clock for receiving and sending the NTP message is T respectively 2 And T 3 The time deviation between the client and the time server is theta, the network path delay in the time setting process is delta, and the path delay from the client to the server is delta based on the clock of the server 1 The path delay from server to client is δ 2 The following equation is derived:
T 2 -T 1 =θ+δ 1 …………(1)
T 4 -T 3 =δ 2 -θ…………(2)
δ 12 =δ…………(3)。
preferably, the path delay from the client to the server for sending the message is the same as the path delay from the server to the client, that is:
Figure BDA0003020684360000021
then there are:
Figure BDA0003020684360000022
Figure BDA0003020684360000023
the network path delay δ and the time offset θ are obtained as:
δ=(T 4 -T 1 )-(T 3 -T 2 )…………(6)
Figure BDA0003020684360000024
adding the time deviation theta to the time of receiving the message by the client to obtain the corrected time T new
T new =T 4 +θ…………(8)
The client compensates the local time according to equation (8), thereby achieving time synchronization with the server.
Preferably, there is an error between the actual time slot and the defined time slot of the application program, and the application program on each terminal can keep a synchronous state between two times of timing by eliminating the corresponding error, and the initial NTP timing time is defined as T start One time slot time is S, the total number of the time slots is n, and the operation defined period and the actual compensation period of the application program are respectively T and T θ The actual mth period of the application program is finished at the moment of T m_real The definition time and the actual running time of the application program after running for m periods are respectively t m And t m_real And the error of m periods after the application program runs is theta, and the following formula is obtained:
T=nS…………(11)
t m_real =T m_real -T start …………(12)
t m =mT…………(13)
θ=t m_real -t m …………(14)
T θ =T-θ…………(15)
the client application program compensates the m +1 times period according to equation (15), and all the client application programs start to continue running after resynchronization until the next NTP timing.
The software synchronization error compensation system provided by the invention comprises the following modules:
a module M1: initializing a client application program, including application program cache data, whether an initial state is matched or not, and an NTP state of a client computer;
a module M2: the client and the server finish timing through Socket;
a module M3: after the time correction is completed, the server issues an application program running instruction to all the clients connected with the server, and all the clients synchronously start the application program after receiving the instruction;
a module M4: and after the operation period is finished, each client application program performs error compensation on the next operation period, and corrects the operation time of the application program.
Preferably, the time recorded by the client clock for sending the NTP message and the time recorded by the client clock for receiving the NTP message are respectively T 1 And T 4 The time recorded by the server end clock for receiving and sending the NTP message is T respectively 2 And T 3 The time deviation between the client and the time server is theta, the network path delay in the time setting process is delta, and the path delay from the client to the server is delta based on the clock of the server 1 The path delay from server to client is δ 2 The following equation is derived:
T 2 -T 1 =θ+δ 1 …………(1)
T 4 -T 3 =δ 2 -θ…………(2)
δ 12 =δ…………(3)。
preferably, the path delay from the client to the server for sending the message is the same as the path delay from the server to the client, that is:
Figure BDA0003020684360000031
then there are:
Figure BDA0003020684360000032
Figure BDA0003020684360000033
the network path delay δ and the time offset θ are obtained as:
δ=(T 4 -T 1 )-(T 3 -T 2 )…………(6)
Figure BDA0003020684360000041
adding the time deviation theta to the time of receiving the message by the client to obtain the corrected time T new
T new =T 4 +θ…………(8)
The client compensates the local time according to equation (8), thereby achieving time synchronization with the server.
Preferably, there is an error between the actual time slot and the defined time slot of the application program, and the application program on each terminal can keep a synchronous state between two times of timing by eliminating the corresponding error, and the initial NTP timing time is defined as T start One time slot time is S, the total number of the time slots is n, and the operation defined period and the actual compensation period of the application program are respectively T and T θ The actual m-th period of the application program is finished at the time T m_real The definition time and the actual running time of the application program after running for m periods are respectively t m And t m_real After the application program runs for m periods, the error is theta, and the following formula is obtained:
T=nS…………(11)
t m_real =T m_real -T start …………(12)
t m =mT…………(13)
θ=t m_real -t m …………(14)
T θ =T-θ…………(15)
and (3) the client application program compensates the m + 1-time period according to the formula (15), and all the client application programs are synchronized again and continue to run until the next NTP timing.
According to the present invention, a computer-readable storage medium is provided, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method as described above.
According to the present invention, there is provided a software synchronization error compensation apparatus, comprising: a controller;
the controller comprises the computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the software synchronization error compensation method described above; alternatively, the controller includes the software synchronization error compensation system described above.
Compared with the prior art, the invention has the following beneficial effects:
(1) For NTP timing, the client-side can perform timing again at intervals, but the more stable the timing interval is, the larger the timing interval is, so that the error generated by the operation of the application program needs to be compensated at the timing interval of two times, the long-time error accumulation is avoided, and the application program can normally work;
(2) The software time synchronization error compensation method is used for timing all client application programs on the basis of NTP (network time protocol) synchronization timing, ensures that the application programs run strictly according to a time sequence and perform normal service interaction, does not need too many hardware timing equipment, is low in use cost, controllable in system and high in reliability, has timing precision in a millisecond level, and plays an important role in actual engineering use.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a diagram of a typical scenario;
FIG. 2 is a time slot setting diagram;
FIG. 3 is a diagram of a server-side and client-side timing process;
FIG. 4 is an operational flow diagram;
FIG. 5 is an application scenario diagram;
fig. 6 is a schematic diagram of a time slot.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will aid those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any manner. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the present invention.
The embodiment is as follows:
as shown in the typical scenarios and time slot settings of fig. 1 and fig. 2, it is necessary to perform time synchronization on all the clients so as to enable the applications on the clients to run according to the time slot settings, assuming that the number of the clients is n, n clients are interconnected with the server through the network, and n clients perform time synchronization through the server clock, so as to achieve time synchronization on the applications respectively running on the n clients, where an error of the running application is in the millisecond level. The client time synchronization mainly adopts a network time service technology, and a common method of the network time service technology is shown in table 1.
TABLE 1 technical comparison of network time synchronization
Figure BDA0003020684360000051
Figure BDA0003020684360000061
As can be seen from the table content, the NTP method is a time synchronization method with better comprehensive performance in the current network synchronization, so the network time service technology based on NTP is mainly adopted at this time, and the specific principle is as follows:
NTP Network Time Protocol (NTP) is a Protocol used to synchronize the Time of each computer in a Network. The precise time synchronization of the NTP is mainly realized in a master-slave working mode, and the NTP algorithm firstly determines the difference value of two local clocks and the transmission delay of a message in a network according to the round-trip messages of a server and a client. The equipment using NTP for time synchronization and its transmission link form a time synchronization sub-network, in the network, according to the equipment precision and importance, the coding is in the level of 0-15, the equipment with smaller coding number, the clock precision and importance are higher, as shown in FIG. 1, two levels of a server and a client are studied, and the server is the upper level structure of the client. The NTP working principle is as follows:
in FIG. 3, T 1 And T 4 The time for sending NTP message and receiving NTP message recorded by client clock, T 2 And T 3 The time recorded by the server-side clock for receiving and sending the NTP message is provided. Defining the time offset (offset) between the client and the time server as theta, during the time synchronizationThe network path delay (delay) is denoted by the greek letter δ. Assuming that the server clock is the reference, the time offset between the server and client clocks is θ, and the path delay from the client to the server is δ 1 The path delay from server to client is δ 2 The sum of the path delays is δ. The following equation can be derived:
T 2 -T 1 =θ+δ 1 …………(1)
T 4 -T 3 =δ 2 -θ…………(2)
δ 12 =δ…………(3)
suppose that
Figure BDA0003020684360000062
Equations (1) - (3) are transformed into:
Figure BDA0003020684360000063
Figure BDA0003020684360000064
the link delay delta and the time offset theta under an ideal state can be obtained as follows:
δ=(T 4 -T 1 )-(T 3 -T 2 )…………(6)
Figure BDA0003020684360000065
adding the offset theta to the time of the client to obtain the corrected time T new
T new =T 4 +θ…………(8)
Considering clock error and measurement error between the client and the server, the actual time deviation value theta 0 Undulate around theta due to T 2 -T 1 =θ 01 And client to server networkEnvelope delay delta 1 =T 2 -T 10 Is more than or equal to 0. For the same reason T 4 -T 3 =δ 20 Theta of 0 ≥T 3 -T 4 And is recorded as:
T 3 -T 4 ≤θ 0 ≤T 2 -T 1 …………(9)
in combination of formulae (4) and (5), formula (9) is equivalent to:
Figure BDA0003020684360000071
the client compensates the local time according to equation (8), thereby achieving time synchronization with the server. After a plurality of clients are synchronized through NTP, the clients start to operate strictly according to the predefined time slot, and therefore program data interaction running on each client is guaranteed not to interfere with each other. The whole scene operation flow is shown in fig. 4.
For the problem of accumulated errors of an NTP twice timing application program, a method for compensating time synchronization errors of application program software is provided, and the method is hereinafter referred to as an error compensation method. The error compensation method is that the error of the application program is obtained by absolute time and acquired system time in the NTP time correction interval in software, and compensation is carried out in the next period of the application program, so that the accumulated error of the application program time is eliminated, the application program time sequence is ensured to be synchronous all the time, and the interaction of the application program service data is carried out smoothly. The application scenario diagram is shown in fig. 5.
As shown in fig. 6, all the client applications run according to different time slots in the time sequence, and the applications run strictly according to the time sequence so that they do not interfere with each other and run correctly, but in practice, the client applications are inevitably out of synchronization between NTP two times due to frequency drift caused by client calibration errors, environmental changes, and device aging, and the error compensation method performs calibration compensation on errors generated by the client applications, so that all the clients maintain a time synchronization state.
The actual time slot of the application program has certain error with the defined time slotThe application programs on each terminal can keep a synchronous state between two times of timing by only eliminating corresponding errors, and the initial NTP timing time is defined as T start One time slot time is S, the total number of the time slots is n, and the operation defined period and the actual compensation period of the application program are respectively T and T θ The actual m-th period of the application program is finished at the time T m_real The definition time and the actual running time of the application program after running for m periods are respectively t m And t m_real After the application program runs for m periods, the error is θ, and the following formula can be obtained:
T=nS…………(11)
t m_real =T m_real -T start …………(12)
t m =mT…………(13)
θ=t m_real -t m …………(14)
T θ =T-θ…………(15)
the client application program compensates the m +1 times of period according to the formula (15), and all the client application programs start to continuously run after being resynchronized until the next NTP calibration, so that the time synchronization state of the application programs is always kept after the application programs run for a long time, and the interaction of the services of different client application programs without mutual interference is ensured. The algorithm steps of the software time synchronization error compensation method are as follows:
step 1, initializing each client application program, such as whether the application program caches data, the initial state is matched and the NTP state of the client computer.
And 2, each client side and the server perform NTP timing, and the client side and the server quickly finish timing through socket sockets.
And 3, the server sends application program running instructions to all connected clients after timing is finished, and all the clients start to synchronously start the application programs after receiving the instructions.
And 4, after the operation period of each client application program is finished, carrying out error compensation on the next operation period, and correcting the operation time of the application program.
And all the client application programs interact with the server once again every half hour, the server corrects all the client time, then each client application program performs error compensation on the next operation period after the operation period is finished, the operation time of the application program is corrected, and the application program is always kept in an operation state.
For NTP timing, the client performs timing again at intervals, but the more stable the timing interval is, the larger the timing interval is, so that the error generated by the running of the application program needs to be compensated at the timing interval of two times, thereby avoiding long-time error accumulation and enabling the application program to work normally.
The software time synchronization error compensation method is used for timing all client application programs on the basis of NTP synchronization timing, and ensures that the application programs run strictly according to a time sequence to perform normal service interaction. The compensation method does not need too many hardware timing devices, is low in use cost, controllable in system and high in reliability, has timing precision in millisecond level, and plays an important role in actual engineering use. Under the hardware configuration condition of the table 2, the synchronization capacity is obviously improved by adopting a software time synchronization error compensation method for time correction of all clients compared with the time correction without adopting the method; the longer the run time the better the synchronization, as in table 3.
TABLE 2 client and Server hardware configuration Table
CPU Inteli7-7700
Memory device DDR432G
Display card NVIDIAGTX1070
Hard disk SSD120G
Display device 1920x1080 (24 inch)
TABLE 3 Effect of different runtimes on application accumulated errors
Run time 0.5h 1h 2h 4h
By compensating for errors 0.02ms 0.016ms 0.023ms 0.019ms
Without using compensating errors ≈5ms ≈12ms ≈30ms ≈73ms
Those skilled in the art will appreciate that, in addition to implementing the systems, apparatus, and various modules thereof provided by the present invention in purely computer readable program code, the same procedures can be implemented entirely by logically programming method steps such that the systems, apparatus, and various modules thereof are provided in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system, the apparatus, and the modules thereof provided by the present invention may be considered as a hardware component, and the modules included in the system, the apparatus, and the modules for implementing various programs may also be considered as structures in the hardware component; modules for performing various functions may also be considered to be both software programs for performing the methods and structures within hardware components.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (8)

1. A software synchronization error compensation method is characterized by comprising the following steps:
step 1: initializing a client application program, wherein the client application program comprises application program cache data, whether an initial state is matched or not and an NTP state of a client computer;
step 2: the client and the server finish timing through Socket;
and step 3: after the time correction is completed, the server issues an application program running instruction to all the clients connected with the server, and all the clients synchronously start the application program after receiving the instruction;
and 4, step 4: after the operation period is finished, each client application program carries out error compensation on the next operation period, and the operation time of the application program is corrected;
the actual time slot and the defined time slot of the application program have errors, and the application program on each terminal can be enabled to be free from the corresponding errorsThe sequence keeps a synchronous state between two times of timing, and the initial NTP timing time is defined as T start One time slot time is S, the total number of the time slots is n, and the operation defined period and the actual compensation period of the application program are respectively T and T θ The actual m-th period of the application program is finished at the time T m_real The definition time and the actual running time of the application program after running for m periods are respectively t m And t m_real And the error of m periods after the application program runs is theta, and the following formula is obtained:
T=nS…………(11)
t m_real =T m_real -T start …………(12)
t m =mT…………(13)
θ=t m_real -t m …………(14)
T θ =T-θ…………(15)
the client application program compensates the m +1 times period according to equation (15), and all the client application programs start to continue running after resynchronization until the next NTP timing.
2. The software synchronization error compensation method of claim 1, wherein the time for sending the NTP message and the time for receiving the NTP message recorded by the client clock are T 1 And T 4 The time recorded by the server end clock for receiving and sending the NTP message is T respectively 2 And T 3 The time deviation between the client and the time server is theta, the network path delay in the time setting process is delta, and the path delay from the client to the server is delta by taking the clock of the server as the reference 1 The path delay from server to client is δ 2 The following equation is derived:
T 2 -T 1 =θ+δ 1 …………(1)
T 4 -T 3 =δ 2 -θ…………(2)
δ 12 =δ…………(3)。
3. the software synchronization error compensation method of claim 2, wherein the path delay from the client to the server for sending the message is the same as the path delay from the server to the client, that is:
Figure FDA0003815544510000021
then there are:
Figure FDA0003815544510000022
Figure FDA0003815544510000023
the network path delay δ and the time offset θ are obtained as:
δ=(T 4 -T 1 )-(T 3 -T 2 )…………(6)
Figure FDA0003815544510000024
adding the time deviation theta to the time of receiving the message by the client to obtain the corrected time T new
T new =T 4 +θ…………(8)
The client compensates the local time according to equation (8), thereby achieving time synchronization with the server.
4. A software synchronization error compensation system is characterized by comprising the following modules:
a module M1: initializing a client application program, wherein the client application program comprises application program cache data, whether an initial state is matched or not and an NTP state of a client computer;
a module M2: the client and the server finish timing through Socket;
a module M3: after the time correction is completed, the server issues an application program running instruction to all the clients connected with the server, and all the clients synchronously start the application program after receiving the instruction;
a module M4: after the operation period is finished, each client application program carries out error compensation on the next operation period, and the operation time of the application program is corrected;
the actual time slot and the defined time slot of the application program have errors, the application program on each terminal can keep a synchronous state between two times of timing by eliminating the corresponding errors, and the initial NTP timing time is defined as T start One time slot time is S, the total number of the time slots is n, and the operation defined period and the actual compensation period of the application program are respectively T and T θ The actual m-th period of the application program is finished at the time T m_real The definition time and the actual running time of the application program after running for m periods are respectively t m And t m_real After the application program runs for m periods, the error is theta, and the following formula is obtained:
T=nS…………(11)
t m_real =T m_real -T start …………(12)
t m =mT…………(13)
θ=t m_real -t m …………(14)
T θ =T-θ…………(15)
and (3) the client application program compensates the m + 1-time period according to the formula (15), and all the client application programs are synchronized again and continue to run until the next NTP timing.
5. The software synchronization error compensation system of claim 4, wherein the time recorded by the client clock for transmitting the NTP message and the time recorded by the client clock for receiving the NTP message are T respectively 1 And T 4 The time recorded by the server end clock for receiving and sending the NTP message is T respectively 2 And T 3 The time deviation between the client and the time server is theta, the network path delay in the time setting process is delta, and the path delay from the client to the server is delta based on the clock of the server 1 The path delay from server to client is δ 2 The following equation is derived:
T 2 -T 1 =θ+δ 1 …………(1)
T 4 -T 3 =δ 2 -θ…………(2)
δ 12 =δ…………(3)。
6. the software synchronization error compensation system of claim 5, wherein the path delay from the client to the server for sending the message is the same as the path delay from the server to the client, namely:
Figure FDA0003815544510000031
then there are:
Figure FDA0003815544510000032
Figure FDA0003815544510000033
the network path delay δ and the time offset θ are obtained as:
δ=(T 4 -T 1 )-(T 3 -T 2 )…………(6)
Figure FDA0003815544510000034
adding the time deviation theta to the time of receiving the message by the client to obtain the corrected time T new
T new =T 4 +θ…………(8)
The client compensates the local time according to equation (8), thereby achieving time synchronization with the server.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3.
8. A software synchronization error compensation apparatus, comprising: a controller;
the controller comprises a computer readable storage medium of claim 7 having a computer program stored thereon, which computer program, when executed by a processor, implements the steps of the software synchronization error compensation method of any of claims 1 to 3; alternatively, the controller comprises the software synchronization error compensation system of any one of claims 4 to 6.
CN202110402022.0A 2021-04-14 2021-04-14 Software synchronization error compensation method, system, medium, and apparatus Active CN112968748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110402022.0A CN112968748B (en) 2021-04-14 2021-04-14 Software synchronization error compensation method, system, medium, and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110402022.0A CN112968748B (en) 2021-04-14 2021-04-14 Software synchronization error compensation method, system, medium, and apparatus

Publications (2)

Publication Number Publication Date
CN112968748A CN112968748A (en) 2021-06-15
CN112968748B true CN112968748B (en) 2022-11-11

Family

ID=76280533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110402022.0A Active CN112968748B (en) 2021-04-14 2021-04-14 Software synchronization error compensation method, system, medium, and apparatus

Country Status (1)

Country Link
CN (1) CN112968748B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190577B (en) * 2022-05-11 2023-10-13 四川创智联恒科技有限公司 ORAN system time sequence synchronization mutual backup method
CN114785445B (en) * 2022-06-20 2022-09-09 中国空气动力研究与发展中心低速空气动力研究所 Clock synchronization implementation method of wind tunnel pressure measurement system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103929293A (en) * 2013-01-15 2014-07-16 电子科技大学 Asymmetrically-delayed time synchronization method and system
CN104410481A (en) * 2014-11-28 2015-03-11 国家电网公司 Time synchronization method and time synchronization system based on NTP (network time protocol) network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008103170A1 (en) * 2007-02-20 2008-08-28 Symmetricom, Inc. Assisted wall-clock
CN101783801B (en) * 2010-01-29 2013-04-24 福建星网锐捷网络有限公司 Software protection method based on network, client side and server
US8873589B2 (en) * 2012-09-04 2014-10-28 Khalifa University Of Science, Technology And Research Methods and devices for clock synchronization
CN105337680B (en) * 2015-08-07 2017-12-22 中国人民解放军63892部队 A kind of high-accuracy network time unification device and method
CN109428662A (en) * 2017-08-25 2019-03-05 北京国双科技有限公司 Time deviation statistical method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103929293A (en) * 2013-01-15 2014-07-16 电子科技大学 Asymmetrically-delayed time synchronization method and system
CN104410481A (en) * 2014-11-28 2015-03-11 国家电网公司 Time synchronization method and time synchronization system based on NTP (network time protocol) network

Also Published As

Publication number Publication date
CN112968748A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112968748B (en) Software synchronization error compensation method, system, medium, and apparatus
EP2429105B1 (en) Node in a wireless system with time and clock frequency synchronizing and corresponding method
EP1456987B1 (en) Time synchronization using dynamic thresholds
US9167545B2 (en) Receiver, method of calculating time difference, and program
US7630383B2 (en) Synchronization of time stamps of peer devices in a communication node
US20160306726A1 (en) Methods, systems, and computer readable media for emulating network devices with different clocks
WO2001050674A1 (en) Synchronization in packet-switched telecommunications system
KR20050025582A (en) A system and method for correcting the clock drift and maintaining the synchronization in wireless networks
CN103905135A (en) Method, device and system for realizing time synchronization
US10594424B2 (en) Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period
Mahmood et al. Performance of IEEE 802.11’s timing advertisement against SyncTSF for wireless clock synchronization
CN104079957A (en) Multimedia device synchronous operation method and system
JP2007529163A (en) Network node
US10263760B2 (en) Method for time synchronization
US11303376B2 (en) Information processing apparatus and time synchronization method
JP2018155679A (en) Time correction method
CN112787742A (en) Clock synchronization method and device, wireless earphone and readable storage medium
JP4346557B2 (en) Timing detection device, display device, timing detection program, and computer-readable recording medium recording timing detection program
CN113014352A (en) Equipment time synchronization method and device based on fiber channel protocol
JP6240635B2 (en) Wireless communication method and wireless communication system
US10069584B2 (en) Frequency calibration apparatus and method
CN113037418B (en) Error correction method and related device for network time service
CN115080495B (en) Time synchronization method and system for standard peripheral extension interface equipment
KR20090093206A (en) Method of deciding a delay for network synchronization in network system
KR102064575B1 (en) Method, apparatus, system and computer program for enhancing the accuracy of Time Synchronization between devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant