CN112804746A - Time synchronization method, device and computer readable medium - Google Patents

Time synchronization method, device and computer readable medium Download PDF

Info

Publication number
CN112804746A
CN112804746A CN202011613510.8A CN202011613510A CN112804746A CN 112804746 A CN112804746 A CN 112804746A CN 202011613510 A CN202011613510 A CN 202011613510A CN 112804746 A CN112804746 A CN 112804746A
Authority
CN
China
Prior art keywords
service end
message information
server
local time
time
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.)
Granted
Application number
CN202011613510.8A
Other languages
Chinese (zh)
Other versions
CN112804746B (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.)
Lenovo Future Communication Technology Chongqing Co Ltd
Original Assignee
Lenovo Future Communication Technology Chongqing Co Ltd
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 Lenovo Future Communication Technology Chongqing Co Ltd filed Critical Lenovo Future Communication Technology Chongqing Co Ltd
Priority to CN202011613510.8A priority Critical patent/CN112804746B/en
Publication of CN112804746A publication Critical patent/CN112804746A/en
Application granted granted Critical
Publication of CN112804746B publication Critical patent/CN112804746B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/0055Synchronisation arrangements determining timing error of reception due to propagation delay
    • H04W56/0065Synchronisation arrangements determining timing error of reception due to propagation delay using measurement of signal travel time

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention discloses a method, a device and a computer readable medium for time synchronization, wherein the method comprises the following steps: the first service end receives first message information sent by the second service end, wherein the first message information comprises path delay when the message information is sent between the first service end and the second service end and local time of the second service end when the second service end sends the first message information; the first service end acquires the local time of the first service end when receiving the first message information based on the first message information; and then the first service end determines the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay. Therefore, the time deviation between the first server and the second server can be calculated based on the path delay, so that the number of times of interaction between the two servers can be reduced, and the time synchronization between the two servers can be quickly and accurately realized.

Description

Time synchronization method, device and computer readable medium
Technical Field
The present invention relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for time synchronization, and a computer readable medium.
Background
For the wireless access network of the 5G technology, in order to ensure normal switching of services between base stations, it is generally required that signals between the base stations implement frequency synchronization and time synchronization, because barrier-free interaction of signals between the base stations can be implemented only if the signals between the base stations satisfy the time synchronization and the frequency synchronization.
In the prior art, the synchronization of the frequency between the base stations is realized by adopting the technology of recovering the clock by using the Ethernet link code stream, the time synchronization between the base stations is realized by adopting an accurate time protocol, however, the realization of the time synchronization by the accurate time protocol requires the interaction of a master service terminal and a slave service terminal for many times, so the process is complex, the whole accurate protocol development process is long, and a large amount of manpower investment needs to be coordinated in the short-term development.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, an apparatus, and a computer readable medium for time synchronization, which can quickly implement time synchronization between two base stations under the condition of frequency synchronization between the two base stations, and improve the accuracy of time synchronization between the two base stations.
To achieve the above object, according to a first aspect of the embodiments of the present invention, there is provided a method for time synchronization, including a first server and a second server, where the method is applied to the first server, and includes: receiving first message information sent by the second server, wherein the first message information comprises path delay when the message information is sent between the first server and the second server and local time of the second server when the second server sends the first message information; acquiring the local time of a first service terminal when the first message information is received based on the first message information; and determining the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
Optionally, the method further includes: judging whether the time deviation meets a preset threshold value or not to obtain a judgment result; and if the judgment result represents that the time deviation meets a preset threshold value, adjusting the local time of the first server.
Optionally, the method further includes: receiving second message information sent by the second server, and packaging the second message information to generate packaged second message information; and sending the encapsulated second message information to the second server, so that the second server determines the path delay when the message information is sent between the first server and the second server according to the local time of the second server when the second server receives the encapsulated second message information and the encapsulated second message information.
In order to achieve the above object, according to a second aspect of the embodiments of the present invention, there is provided a method for time synchronization, including a first server and a second server, the method applied to the second server, including: determining path delay when message information is sent between a first service end and a second service end; and sending first message information to the first service end so that the first service end can determine the time deviation between the first service end and the second service end based on the first message information and the local time of the first service end when receiving the first message information.
Optionally, the determining a path delay for sending the message information between the second service end and the first service end includes: sending second message information to the first server; receiving encapsulated second message information sent by the first service terminal; acquiring the local time of a second server when the packaged second message information is received based on the packaged second message information; and determining the path delay when the message information is sent between the first service end and the second service end based on the encapsulated second message information and the local time of the second service end.
Optionally, the determining, based on the encapsulated second packet information and the local time of the second service end, a path delay when the packet information is sent between the first service end and the second service end includes: extracting the local time of the second server when the second server sends the second message information from the encapsulated second message information; and determining the path delay when the message information is sent between the first service end and the second service end based on the local time of the second service end in the packaged second message information and the acquired local time of the second service end.
In order to achieve the above object, according to a third aspect of the embodiments of the present invention, there is further provided an apparatus for time synchronization, where the apparatus is applied to the first service end, and includes: a receiving module, configured to receive first message information sent by the second server, where the first message information includes a path delay between the first server and the second server when sending message information and a local time of the second server when the second server sends the first message information; the acquisition module is used for acquiring the local time of the first service terminal when the first message information is received based on the first message information; a calculation module, configured to determine a time offset between the first service end and the second service end based on the local time of the first service end, the local time of the second service end, and the path delay;
in order to achieve the above object, according to a fourth aspect of the embodiments of the present invention, there is further provided a device for time synchronization, where the device is applied to the second server, and the device includes: the device is applied to a second server and comprises: the determining module is used for determining the path delay when the message information is sent between the first service end and the second service end; the sending module is configured to send first message information to the first service end, so that the first service end determines a time offset between the first service end and the second service end based on the first message information and a local time of the first service end when receiving the first message information.
In order to achieve the above object, according to a fifth aspect of the embodiments of the present invention, there is further provided a time synchronization system, including a first server and a second server, where the second server determines a path delay when a message information is sent between the first server and the second server; the second service end sends first message information to the first service end; the first message information comprises path delay when the message information is sent between a first server and a second server and local time of the second server when the second server sends the first message information; the first server acquires the local time of the first server when receiving the first message information according to the first message information; and the first service end determines the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
To achieve the above object, according to a sixth aspect of the embodiments of the present invention, there is further provided a computer readable medium having a computer program stored thereon, where the computer program is executed by a processor to implement the method for time synchronization according to the first aspect or the second aspect.
Compared with the prior art, the method, the device and the computer readable medium for time synchronization provided by the embodiment of the invention comprise a first service end and a second service end, wherein the first service end receives first message information sent by the second service end, and the first message information comprises path delay when the message information is sent between the first service end and the second service end and local time of the second service end when the second service end sends the first message information; the first service end acquires the local time of the first service end when receiving the first message information based on the first message information; and then the first service end determines the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay. Therefore, the time deviation between the first server and the second server can be accurately obtained by performing two times of interaction between the first server and the second server, so that the interaction times between the two servers are reduced, and the time synchronization between the two servers can be quickly realized.
It is to be understood that the teachings of the present invention need not achieve all of the above-described benefits, but rather that specific embodiments may achieve specific technical results, and that other embodiments of the present invention may achieve benefits not mentioned above.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein like or corresponding reference numerals designate like or corresponding parts throughout the several views.
FIG. 1 is a schematic flow chart diagram of a method of time synchronization according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram of a method of time synchronization according to another embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram of a method of time synchronization according to yet another embodiment of the present invention;
FIG. 4 is a schematic flow chart of a system for time synchronization according to an embodiment of the present invention;
FIG. 5 is a schematic block diagram of an apparatus for time synchronization according to an embodiment of the present invention;
fig. 6 is a schematic block diagram of an apparatus for time synchronization according to still another embodiment of the present invention.
Fig. 7 is a schematic diagram of a message information encapsulation format according to another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, a schematic flow chart of a method for time synchronization according to an embodiment of the present invention is shown. A time synchronization method comprises a first service end and a second service end, the method is applied to the first service end, and the method at least comprises the following operation flows: s101, receiving first message information sent by a second server, wherein the first message information comprises path delay when the message information is sent between the first server and the second server and local time of the second server when the second server sends the first message information; s102, acquiring local time of a first service terminal when the first message information is received based on the first message information; s103, determining the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
In S101, the path delay may be calculated by the first server, may also be calculated by the second server, and may also be known, which is not limited herein. The second server side obtains the local time of the second server side when the first message information is about to be sent, packages the obtained local time and the path delay to generate the first message information, and finally sends the first message information to the first server side.
In S102, the first service obtains the local time of the first service when receiving the first message information.
In S103, the first service end extracts, from the first message information, the local time of the second service end when the second service end sends the first message information, and the path delay; and then calculating the time deviation between the first service end and the second service end based on the acquired local time of the first service end, the extracted local time of the second service end and the extracted path delay.
It should be noted that the steps of extracting, by the first service end, the local time of the second service end when the second service end sends the first message information from the first message information, and the path delay, calculating the time deviation between the first service end and the second service end, and the like can be implemented by the FPGA accelerator card on the first service end.
According to the embodiment of the invention, the first server receives the first message information sent by the second server, acquires the local time of the first server when the first message information is received, and then calculates the time deviation between the first server and the second server based on the local time and the path delay of the second server extracted from the first message information and the local time of the first server. Therefore, the time deviation can be calculated based on the path delay, the calculation process is simple, the calculation precision of the time deviation can be improved, and the time synchronization precision of the first service terminal and the second service terminal can be improved.
Referring to fig. 2, a schematic flow chart of a method for time synchronization according to another embodiment of the present invention is shown. The embodiment is further optimized on the basis of the previous embodiment. A method for time synchronization is applied to a first service end, and the method at least comprises the following operation flows: s201, receiving second message information sent by a second server, and encapsulating the second message information to generate encapsulated second message information. S202, the packaged second message information is sent to a second server, so that the second server determines the path delay when the message information is sent between the first server and the second server according to the local time of the second server when the second server receives the packaged second message information and the packaged second message information. S203, receiving first message information sent by the second server, wherein the first message information comprises path delay when the message information is sent between the first server and the second server and local time of the second server when the second server sends the first message information. S204, based on the first message information, the local time of the first server when the first message information is received is obtained. S205, determining the time deviation between the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay. And S206, judging whether the time deviation meets a preset threshold value or not to obtain a judgment result. And S207, if the judgment result represents that the time deviation meets the preset threshold, adjusting the local time of the first server.
The specific implementation processes of S203, S204, and S205 are similar to the specific implementation processes of S101, S102, and S103 in the embodiment shown in fig. 1, and are not described here again.
In S201 and S202, the second server sends the second message information to the first server, where the second message information includes the local time of the second server when the second server sends the second message information to the first server. And the first server encapsulates the received second message information to generate encapsulated second message information, and sends the encapsulated second message information to the second server. And when the second server receives the encapsulated second message information, the local time of the second server is obtained, and the local time of the second server when the second server sends the second message information to the first server is extracted from the encapsulated second message information. And the second server calculates the path delay of message information transmission between the first server and the second server according to the acquired local time of the second server and the extracted local time of the second server.
In S206 and S207, the preset threshold is a time error allowed when the first server and the second server perform communication, for example, ± 1.5 us. And when the judgment result represents that the time deviation exceeds the preset threshold value, adjusting the local time of the first server based on the time deviation, so that the local time of the first server and the local time of the second server are synchronized.
It should be noted that, the second server extracts, from the encapsulated second message information, the local time of the second server when the second server sends the second message information to the first server, and the local time can be implemented by an FPGA accelerator card on the second server.
In the embodiment of the invention, the second message information is sent to the first server side through the second server side, and the first server side returns the encapsulated second message information to the first server side, so that one-time complete interaction between the first server side and the second server side is realized; therefore, through one-time complete interaction, the second service end can accurately calculate the path delay between the first service end and the second service end. Then the first service end calculates the time deviation between the first service end and the second service end based on the path delay, and adjusts the local time of the first service end according to the time deviation to realize the local time synchronization of the first service end and the second service end; therefore, the first service end can accurately calculate the time deviation based on the path delay, so that the time synchronization of the first service end and the second service end can be quickly realized, and the precision and the efficiency of the time synchronization of the first service end and the second service end are improved.
The following describes a scheme of an embodiment of the present invention in detail with reference to a specific application scenario.
For example, the first server is a first base station and the second server is a second base station. The first base station obtains the local time of the second base station, and encapsulates the local time of the second base station according to the mode of fig. 7a to generate second message information, and the second base station sends the second message information to the first base station, for example, the second message information is as follows:
/3_byte,2_byte,1_byte,0_byte/[24:31],[23:16],[15:8],[7:0]/5a,5a,5a,5a/0,0,0,1/0,0,RTC[79:64]-12:00/。
the first base station encapsulates the second message information according to the method shown in fig. 7b, generates encapsulated second message information, and sends the encapsulated second message information to the second base station, for example, the encapsulated second message information is as follows:
/3_byte,2_byte,1_byte,0_byte/[24:31],[23:16],[15:8],[7:0]/5b,5b,5b,5b/0,0,0,0/0,0,RTC[79:64]-12:00/。
the second base station obtains the local time of the second base station when receiving the encapsulated second message information, for example, 13: 00; and extracting the local time of the second base station when the second base station sends the second message information, for example, 12:00, from the encapsulated second message information. At this time, the second base station makes a difference between the acquired local time of the second base station and the extracted local time of the second base station, and divides the difference by the path times, so that the path delay is calculated to be 30 min. Here, the second base station sends the second message information to the first base station, and the first base station sends the encapsulated second message information to the second base station, in this process, the same path is taken 2 times, so the number of paths is 2.
Then, the second base station obtains the local time of the second base station at this time, and encapsulates the path delay and the local time of the second base station according to the manner as shown in fig. 7a, so as to generate the first message information, for example, the first message information is as follows:
/3_byte,2_byte,1_byte,0_byte/[24:31],[23:16],[15:8],[7:0]/5a,5a,5a,5a/0,0,0,1/0,0,RTC[79:64]-13:00/30min/。
after receiving the first message information, the first base station extracts local time of the second base station from the first message information, for example, 13: 00; and the path delay is extracted at the same time, e.g. 30 min. The first base station further obtains a local time of the first base station when the first message information is received, for example, 14: 00. And calculating a time deviation, for example, the time deviation is 14:00- (13:00+30) ═ 30min, based on the extracted local time of the second base station, the path delay and the acquired local time of the first base station.
To this end, the first base station adjusts the local time of the first base station from 14:00 to 13: 30. The local time of the second base station is also 13:30 at this time, thereby achieving time synchronization of the first base station and the second base station.
Fig. 3 is a schematic flow chart of a method for time synchronization according to another embodiment of the present invention. The embodiment is further optimized on the basis of the previous embodiment. A method for time synchronization is applied to a second server, and the method at least comprises the following operation flows: s301, determining path delay when message information is sent between a first service terminal and a second service terminal; s302, sending the first message information to the first service end, so that the first service end determines a time offset between the first service end and the second service end based on the first message information and a local time of the first service end when receiving the first message information.
In S301, the second server sends the second message information to the first server, and receives the encapsulated second message information sent by the first server. The second server acquires the local time of the second server when receiving the packaged second message information based on the packaged second message information; and extracting the local time of the second server when the second server sends the second message information from the encapsulated second message information. And the second server determines the path delay when the message information is sent between the first server and the second server based on the local time of the second server in the encapsulated second message information and the acquired local time of the second server.
According to the embodiment of the invention, the second service end can calculate the path delay of the first service end and the second service end by performing one-time complete interaction between the first service end and the second service end, so that the interaction times of the first service end and the second service end are reduced, and the accuracy of calculating the path delay is improved. And then the second server encapsulates the path delay and the local time when the second server sends the first message information together to generate the first message information, and sends the first message information to the first server, and the first server calculates the time deviation between the first server and the second server based on the first message information, so that the time deviation can be calculated based on the path delay.
Fig. 4 is a schematic flow chart of a system for time synchronization according to an embodiment of the present invention. The embodiment is further optimized on the basis of the previous embodiment. A system for time synchronization, comprising: the system comprises a first service end and a second service end; the method at least comprises the following operation flows: s401, the second service end determines the path delay when the message information is sent between the first service end and the second service end; s402, the second service end sends first message information to the first service end; the first message information comprises path delay when the message information is sent between the first server and the second server and local time of the second server when the second server sends the first message information; s403, the first server acquires the local time of the first server when receiving the first message information according to the first message information; s404, the first service end determines the time deviation between the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
It should be understood that, in the embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and the inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 5 is a schematic block diagram of an apparatus for time synchronization according to an embodiment of the present invention. An apparatus for time synchronization, the apparatus 500 includes a first server and a second server, and the apparatus 500 is applied to the first server, and includes: a receiving module 501, configured to receive first message information sent by the second server, where the first message information includes a path delay between the first server and the second server when sending message information and a local time of the second server when the second server sends the first message information; an obtaining module 502, configured to obtain, based on the first packet information, a local time of the first service terminal when receiving the first packet information; a calculating module 503, configured to determine a time offset between the first service end and the second service end based on the local time of the first service end, the local time of the second service end, and the path delay.
In an optional embodiment, the apparatus further comprises: the judging module is used for judging whether the time deviation meets a preset threshold value or not to obtain a judging result; and the adjusting module is used for adjusting the local time of the first server if the judging result represents that the time deviation meets a preset threshold value.
In an optional embodiment, the apparatus further comprises: the receiving module is further configured to receive second message information sent by the second server, and encapsulate the second message information to generate encapsulated second message information; the sending module is configured to send the encapsulated second packet information to the second server, so that the second server determines a path delay when the packet information is sent between the first server and the second server according to the local time of the second server when the second server receives the encapsulated second packet information and the encapsulated second packet information.
The device can execute the time synchronization method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the time synchronization method. For details of the technique not described in detail in this embodiment, reference may be made to the method for time synchronization provided in an embodiment of the present invention.
Fig. 6 is a schematic block diagram of an apparatus for time synchronization according to another embodiment of the present invention. A device for time synchronization, wherein the device 600 includes a first server and a second server, and the device 600 is applied to the second server, and includes: a determining module 601, configured to determine a path delay when sending message information between a first service end and a second service end; a sending module 602, configured to send first message information to the first service end, so that the first service end determines a time offset between the first service end and the second service end based on the first message information and a local time of the first service end when receiving the first message information.
In an alternative embodiment, the determining module includes: the sending unit is used for sending the second message information to the first service terminal; a receiving unit, configured to receive encapsulated second message information sent by the first service end; an obtaining unit, configured to obtain, based on the encapsulated second packet information, a local time of a second server when the encapsulated second packet information is received; and the determining unit is used for determining the path delay when the message information is sent between the first service end and the second service end based on the encapsulated second message information and the local time of the second service end.
In an alternative embodiment, the determining unit includes: an extracting subunit, configured to extract, from the encapsulated second packet information, a local time of the second server when the second server sends the second packet information; and the determining subunit is configured to determine, based on the local time of the second service end in the encapsulated second packet information and the obtained local time of the second service end, a path delay when the packet information is sent between the first service end and the second service end.
The device can execute the time synchronization method provided by the further embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the time synchronization method. For details of the technique not described in detail in this embodiment, reference may be made to a method for time synchronization according to another embodiment of the present invention.
Another aspect of the embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, causes the processor to perform at least the following operation steps: s101, receiving first message information sent by the second server, wherein the first message information comprises path delay when the message information is sent between the first server and the second server and local time of the second server when the second server sends the first message information; s102, acquiring local time of a first service terminal when the first message information is received based on the first message information; s103, determining the time deviation between the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for time synchronization, which comprises a first service end and a second service end, is applied to the first service end and comprises the following steps:
receiving first message information sent by the second server, wherein the first message information comprises path delay when the message information is sent between the first server and the second server and local time of the second server when the second server sends the first message information;
acquiring the local time of a first service terminal when the first message information is received based on the first message information;
and determining the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
2. The method of claim 1, further comprising:
judging whether the time deviation meets a preset threshold value or not to obtain a judgment result;
and if the judgment result represents that the time deviation meets a preset threshold value, adjusting the local time of the first server.
3. The method of claim 1, further comprising:
receiving second message information sent by the second server, and packaging the second message information to generate packaged second message information;
and sending the encapsulated second message information to the second server, so that the second server determines the path delay when the message information is sent between the first server and the second server according to the local time of the second server when the second server receives the encapsulated second message information and the encapsulated second message information.
4. A method for time synchronization, which comprises a first server and a second server, is applied to the second server and comprises the following steps:
determining path delay when message information is sent between a first service end and a second service end;
and sending first message information to the first service end so that the first service end can determine the time deviation between the first service end and the second service end based on the first message information and the local time of the first service end when receiving the first message information.
5. The method of claim 4, wherein the determining the path delay for sending the message information between the second service end and the first service end comprises:
sending second message information to the first server;
receiving encapsulated second message information sent by the first service terminal;
acquiring the local time of a second server when the packaged second message information is received based on the packaged second message information;
and determining the path delay when the message information is sent between the first service end and the second service end based on the encapsulated second message information and the local time of the second service end.
6. The method of claim 5, wherein the determining a path delay for sending the packet information between the first service end and the second service end based on the encapsulated second packet information and the local time of the second service end comprises:
extracting the local time of the second server when the second server sends the second message information from the encapsulated second message information;
and determining the path delay when the message information is sent between the first service end and the second service end based on the local time of the second service end in the packaged second message information and the acquired local time of the second service end.
7. An apparatus for time synchronization, the apparatus being applied to the first service end, comprising:
a receiving module, configured to receive first message information sent by the second server, where the first message information includes a path delay between the first server and the second server when sending message information and a local time of the second server when the second server sends the first message information;
the acquisition module is used for acquiring the local time of the first service terminal when the first message information is received based on the first message information;
and the calculation module is used for determining the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
8. An apparatus for time synchronization, the apparatus being applied to a second server, comprising:
the determining module is used for determining the path delay when the message information is sent between the first service end and the second service end;
the sending module is configured to send first message information to the first service end, so that the first service end determines a time offset between the first service end and the second service end based on the first message information and a local time of the first service end when receiving the first message information.
9. A time synchronization system comprises a first server and a second server,
the second server determines the path delay when the message information is sent between the first server and the second server;
the second service end sends first message information to the first service end; the first message information comprises path delay when the message information is sent between a first server and a second server and local time of the second server when the second server sends the first message information;
the first server acquires the local time of the first server when receiving the first message information according to the first message information;
and the first service end determines the time deviation of the first service end and the second service end based on the local time of the first service end, the local time of the second service end and the path delay.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 3 or 4 to 6.
CN202011613510.8A 2020-12-30 2020-12-30 Method, device and computer readable medium for time synchronization Active CN112804746B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011613510.8A CN112804746B (en) 2020-12-30 2020-12-30 Method, device and computer readable medium for time synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011613510.8A CN112804746B (en) 2020-12-30 2020-12-30 Method, device and computer readable medium for time synchronization

Publications (2)

Publication Number Publication Date
CN112804746A true CN112804746A (en) 2021-05-14
CN112804746B CN112804746B (en) 2023-06-23

Family

ID=75805869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011613510.8A Active CN112804746B (en) 2020-12-30 2020-12-30 Method, device and computer readable medium for time synchronization

Country Status (1)

Country Link
CN (1) CN112804746B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102195735A (en) * 2010-03-11 2011-09-21 杭州华三通信技术有限公司 Time synchronization method for multi-subsystem equipment and subsystem
CN103188064A (en) * 2011-12-28 2013-07-03 中兴通讯股份有限公司 Clock synchronization method and clock synchronization device
CN111158867A (en) * 2018-11-07 2020-05-15 阿里巴巴集团控股有限公司 Time synchronization processing method, thread scheduling device and electronic equipment
CN111867045A (en) * 2020-06-19 2020-10-30 联想(北京)有限公司 Method, device and system for clock synchronization between cells
CN111934804A (en) * 2020-06-24 2020-11-13 联想(北京)有限公司 Method, device and system for synchronizing communication equipment
WO2020234792A1 (en) * 2019-05-21 2020-11-26 Politecnico Di Milano An fpga-as-a-service system for accelerated serverless computing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102195735A (en) * 2010-03-11 2011-09-21 杭州华三通信技术有限公司 Time synchronization method for multi-subsystem equipment and subsystem
CN103188064A (en) * 2011-12-28 2013-07-03 中兴通讯股份有限公司 Clock synchronization method and clock synchronization device
CN111158867A (en) * 2018-11-07 2020-05-15 阿里巴巴集团控股有限公司 Time synchronization processing method, thread scheduling device and electronic equipment
WO2020234792A1 (en) * 2019-05-21 2020-11-26 Politecnico Di Milano An fpga-as-a-service system for accelerated serverless computing
CN111867045A (en) * 2020-06-19 2020-10-30 联想(北京)有限公司 Method, device and system for clock synchronization between cells
CN111934804A (en) * 2020-06-24 2020-11-13 联想(北京)有限公司 Method, device and system for synchronizing communication equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"\"GR_NGP003v010101p\"" *
KYLE BECKMEYER;: "推动下一波时序创新的数据中心趋势" *
房晓瑜,王京梅,晏子杰,陈卓: "基于FPGA 的PTP 时间同步技术实现" *

Also Published As

Publication number Publication date
CN112804746B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US20210099385A1 (en) Information transmission method and device
CN111049752B (en) Load balancing method and device for multiple transmission lines
CN110649983B (en) Synchronization method and device
EP3627792A1 (en) Method and device for automatically implementing ioam encapsulation, and storage medium
CN103138887A (en) Processing method of 1588 event messages and processing method of 1588 event messages
US20210392612A1 (en) Method, device and terminal for location message transmission processing
CN106921641B (en) Method and device for transmitting message
CN112583509B (en) Method and device for acquiring time stamp of data stream, storage medium and electronic device
US11849505B2 (en) Method and apparatus for interworking between communication systems
CN110858790B (en) Data packet transmission method and device, storage medium and electronic device
CN101136738A (en) Network clock synchronous method, device and system
CN115460638B (en) Network service time delay monitoring method, device, equipment and storage medium
CN114071487B (en) Interface delay measurement method, related network equipment and storage medium
CN103731252A (en) Improvement method and system for IEEE1588 unicast negotiation mechanism
CN112804746B (en) Method, device and computer readable medium for time synchronization
US20200267529A1 (en) Communication Method and Communications Apparatus
CN110505002B (en) Method, device and system for automatically generating route and satellite terminal equipment
CN106027189A (en) Method and system for providing message timestamp of Internet of things equipment
CN114501604B (en) Method for acquiring (or providing) clock synchronization information and communication device
CN105871613A (en) E1 service protection method and system
CN113573403A (en) Slave clock synchronization system and method for 5G RRU
CN112702759B (en) Vertical industry-oriented data link performance testing method and system
CN110933607B (en) Method, device and equipment for transmitting positioning information
CN112583775B (en) Method, device and network equipment for processing message
CN110224777B (en) Method and system for transmitting time based on 1588 protocol

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