WO2021121275A1 - Message processing method and apparatus for clock synchronization, and clock synchronization method and apparatus - Google Patents

Message processing method and apparatus for clock synchronization, and clock synchronization method and apparatus Download PDF

Info

Publication number
WO2021121275A1
WO2021121275A1 PCT/CN2020/136845 CN2020136845W WO2021121275A1 WO 2021121275 A1 WO2021121275 A1 WO 2021121275A1 CN 2020136845 W CN2020136845 W CN 2020136845W WO 2021121275 A1 WO2021121275 A1 WO 2021121275A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
time stamp
clock synchronization
timestamp
clock
Prior art date
Application number
PCT/CN2020/136845
Other languages
French (fr)
Chinese (zh)
Inventor
何涛
石兴建
孟凡顺
李�浩
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021121275A1 publication Critical patent/WO2021121275A1/en

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • 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/0673Clock or time synchronisation among packet nodes using intermediate nodes, e.g. modification of a received timestamp before further transmission to the next packet node, e.g. including internal delay time or residence time into the packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Definitions

  • This application relates to the field of clock synchronization, and in particular to a message processing method, clock synchronization method and device for clock synchronization.
  • Clock synchronization means that the clock frequency of each device remains the same, and the clock phase can maintain a certain phase difference.
  • some methods for clock synchronization can be used between devices for clock synchronization, for example, a circuit emulation service adaptive clock recovery (CESACR) method is used for clock synchronization.
  • CESACR circuit emulation service adaptive clock recovery
  • a variety of devices such as routers and switches in telecommunications networks, can use the CESACR method to synchronize clocks.
  • the embodiments of the present application provide a message processing method and a clock synchronization method for clock synchronization, which can improve the effect of clock synchronization using the CESACR method.
  • the embodiments of the present application provide a message processing method for clock synchronization.
  • the method may be executed by a first device, and the first device may be a source device or an intermediate device that uses the CESACR method for clock transfer.
  • the intermediate device transparently transmits the message for clock synchronization
  • the intermediate device transparently transmits the message for clock synchronization.
  • the switching module in the device introduces packet delay variation (PDV) when processing messages used for clock synchronization, and the introduced packet delay variation will affect the accuracy of clock synchronization.
  • PDV packet delay variation
  • the first device after the first device obtains the first message, it can generate a second message based on the first message, and the second message can reflect the residence time of the first message in the exchange module of the first device , Instead of simply transparently transmitting the first message.
  • the first time stamp may be recorded, and the first time stamp is used to indicate the moment when the first device obtains the first message.
  • the first message is a message used for clock synchronization.
  • the first device may determine the port for forwarding the first message according to the first message, and record a second time stamp, which is used to indicate the time when the first device determines the port.
  • the first device may generate a second message including the third time stamp according to the first message, and send the second message to the second device.
  • the third time stamp is determined according to the difference between the aforementioned second time stamp and the first time stamp.
  • Determining the port for forwarding the first message may be performed by the switching module in the first device, that is, the third timestamp may reflect the residence time of the aforementioned first message in the switching module.
  • the first message may be a message generated by the first device for clock synchronization, and the first time stamp may be used to instruct the first device to generate the first device. The moment of the news.
  • the difference between the second time stamp and the first time stamp is the residence time of the first message in the switching module of the first device.
  • the first message may have a field for carrying timestamp data. If the first message is a message generated by the first device, the first device may determine the difference between the second timestamp and the first timestamp as the third timestamp, and add the third timestamp to this field, thereby It is realized that the second message including the third time stamp is generated according to the first message.
  • the first message may also be a message for clock synchronization received by the first device from another device.
  • the first message may be a message for clock synchronization received by the first device from the device as the clock source.
  • the first device is an intermediate device, the first message may be obtained by the first device from the third device, where the first device is the next hop device of the third device. If the first message is a message obtained by the first device from another device, the first message may carry a fourth timestamp, and the first device may determine the sum of the fourth timestamp and the aforementioned difference as the third timestamp, And the third time stamp is added to this field, so that the second message including the third time stamp is generated according to the first message.
  • the embodiments of the present application also provide a clock synchronization method, which can be executed by a second device as a sink device.
  • the second device can obtain a second message from the first device.
  • the second device is the next hop device of the first device.
  • the second device acquires the second message, it can record a fifth timestamp indicating the moment when the second device acquires the second message.
  • the second message includes the third timestamp .
  • the third time stamp is determined according to the method provided in the above first aspect.
  • the second device may perform clock synchronization according to the difference between the fifth time stamp and the third time stamp.
  • the third time stamp can reflect the sum of the residence time of the synchronization message used for the clock in the switching modules of one or more devices, the difference between the fifth time stamp and the third time stamp also removes the aforementioned one or The amount of packet delay variation introduced by the switching modules of multiple devices. Therefore, with this method, the accuracy of clock synchronization can be improved.
  • an embodiment of the present application provides a message processing device for clock synchronization.
  • the device includes an acquiring unit, a recording unit, a determining unit, a generating unit, and a sending unit.
  • the obtaining unit is used for obtaining the first message;
  • the recording unit is used for recording the first time stamp indicating the time when the first message is obtained;
  • the determining unit is used for determining the port for forwarding the first message according to the first message
  • the recording unit is also used to record a second time stamp used to indicate the time at which the port is determined;
  • the generating unit is used to generate a second message including a third time stamp according to the first message, and the third time
  • the stamp is determined according to the difference between the second time stamp and the first time stamp;
  • the sending unit is configured to send the second message to the second device.
  • the acquiring unit is specifically configured to: acquire the first message from a third device, where the first message carries a fourth timestamp; the third timestamp is equal to the The sum of the difference and the fourth time stamp.
  • an embodiment of the present application provides a clock synchronization device, which includes an acquisition unit, a recording unit, and a synchronization unit.
  • the acquiring unit is configured to acquire a second message from the first device, where the second message includes a third time stamp, the third time stamp being determined according to the apparatus according to any one of the above third aspects;
  • the recording unit is configured to A fifth time stamp used to indicate the time when the second message is acquired is recorded;
  • the synchronization unit is used to perform clock synchronization according to the difference between the fifth time stamp and the third time stamp.
  • an embodiment of the present application provides a device.
  • the device includes a processor and a memory.
  • the memory is used to store instructions or computer programs.
  • the processor is configured to execute the instructions or computer programs in the memory, execute the method described in any one of the first aspect above, or execute the method described in any one of the second aspect above.
  • the embodiments of the present application provide a computer-readable storage medium, including instructions or computer programs, which when run on a computer, cause the computer to execute the method described in any one of the first aspects above, or execute the above The method of any one of the second aspect.
  • the embodiments of the present application provide a computer program product containing instructions or computer programs, which when run on a computer, cause the computer to execute any of the methods described in the first aspect, or execute the second The method of any one of the aspects.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the application
  • Figure 2 is another schematic diagram provided by an embodiment of the application.
  • FIG. 3 is a schematic flowchart of a message processing method for clock synchronization provided by an embodiment of the application
  • FIG. 4 is a schematic structural diagram of a first device provided by an embodiment of this application.
  • FIG. 5 is a schematic structural diagram of a message processing apparatus for clock synchronization provided by an embodiment of the application
  • FIG. 6 is a schematic structural diagram of a clock synchronization device provided by an embodiment of this application.
  • FIG. 7 is a schematic structural diagram of a device provided by an embodiment of the application.
  • the embodiments of the present application provide a message processing method and a clock synchronization method for clock synchronization, which can improve the effect of clock synchronization using the CESACR method.
  • a constant bit rate (constant bit rate, CBR) service is a real-time service, and the clock synchronization of the equipment processing the service is the basis for ensuring the normal operation of the service. Therefore, the network supporting the CBR service needs to synchronize the clock of the equipment processing the CBR service.
  • the network supporting the CBR service may be, for example, an asynchronous transfer mode (ATM) network.
  • ATM asynchronous transfer mode
  • the CESACR method can be used to synchronize clocks of devices that process CBR services.
  • the principle of clock synchronization using the CESACR method is briefly introduced.
  • CBR services may include Gigabit Ethernet (GE), synchronous digital hierarchy (SDH), common public radio interface (CPRI), and so on.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the application.
  • the device 101 and the device 102 are included, and the device 101 and the device 102 need to realize clock synchronization.
  • the device 101 may send a message for clock synchronization to the device 102, and the message for clock synchronization sent by the device 101 to the device 102 may be forwarded by the device 103, where the device 103 may be, for example, an optical transport network (optical transport network, OTN) equipment.
  • the device 101 that sends the message for clock synchronization can also be called the source device, and the destination receiving device of the clock synchronization message, that is, the device 102 can also be called the sink device.
  • a device that transmits a message for clock synchronization, for example, the device 103 shown in FIG. 1 may also be referred to as an intermediate device.
  • the device 101 When the device 101 sends a message for clock synchronization, it can record a timestamp T1, and carry the timestamp T1 in the message for clock synchronization.
  • the timestamp T1 is used to instruct the device 101 to send the message for clock synchronization. The moment of the news.
  • the device 103 After the device 103 receives the message for clock synchronization sent by the device 101, it transparently transmits the message for clock synchronization.
  • FIG. 1 is only shown for the convenience of understanding.
  • the number of intermediate devices used for forwarding the message for clock synchronization may also be multiple, and the multiple devices are all used for transparently transmitting the message for clock synchronization.
  • the device 102 may record a time stamp T2, which is used to indicate the time when the device 102 receives the message for clock synchronization. Further, the device 102 can perform clock synchronization by combining T2 with the time stamp T1 carried in the aforementioned message for clock synchronization. Specifically, the device 102 can input the aforementioned time stamp T1 and time stamp T2 into adaptive clock recovery (adaptive clock recovery). , ACR) algorithm, so as to realize the clock synchronization of the device 101 and the device 102.
  • the ACR algorithm can synchronize the clocks of the device 101 and the device 102 according to the difference between T2 and T1.
  • the principle of the ACR algorithm is briefly introduced below in conjunction with Figure 2.
  • FIG. 2 is another schematic diagram provided by an embodiment of the application.
  • the device 101 periodically sends a message for clock synchronization to the device 102.
  • T1_i represents the timestamp carried in the ith message for clock synchronization sent by the device 101 to the device 102, and T1_i is used to indicate the time of the ith message for clock synchronization sent by the device 101 to the device 102.
  • T2_i represents the time stamp recorded when the device 102 receives the i-th message for clock synchronization, and T2_i is used to indicate the time when the device 102 receives the i-th message for clock synchronization. If the clocks of the device 101 and the device 102 are synchronized, and the transmission delay of each message used for clock synchronization is the same, then:
  • T2_1–T2_0 T1_1–T1_0
  • T2_2–T2_1 T1_2–T1_1,
  • T2_n–T2_n-1 T1_n–T1_n-1
  • T2_n–T2_0 T1_n–T1_0, if T2_n–T2_0 is greater than T1_n–T1_0, it means that the frequency of the device 102 is higher than that of the device 101, and the frequency of the device 102 needs to be reduced, and vice versa, the frequency of the device 102 needs to be increased.
  • the ideal condition of the ACR algorithm is: the transmission delay of each message used for clock synchronization is the same, that is, the packet delay variation is zero.
  • the forwarding delay of the message synchronized with the user's clock is greatly affected by the forwarding device, such as the device 103 in FIG. 1.
  • the device 103 can also forward other messages. Therefore, when the device 103 forwards the clock synchronization message, the residence time of the clock synchronization message in the device 103 is affected by the current state of the device 103. However, the state of the device 103 cannot be kept the same all the time.
  • the residence time of multiple messages used for clock synchronization in the device 103 may be different, that is, the packet delay variation is not zero.
  • the packet delay variation is relatively large, for example, it can reach the level of microseconds, such as 2 microseconds. This makes it difficult for the transmission delays of multiple messages used for clock synchronization to be exactly the same, which further makes the accuracy of clock synchronization using the ACR algorithm not high.
  • the residence time of the message used for clock synchronization in the device 103 includes multiple parts, which are:
  • the time used by the switching module in the device 103 to process messages used for clock synchronization where the switching module is used to determine the port for forwarding and scheduling messages used for clock synchronization, and the switching module can be a hardware chip or Software module
  • the packet delay variation introduced by the switching module for the time used for processing clock synchronization messages is the largest, which is greater than the packet delay variation introduced by the other three factors mentioned above. Therefore, if the packet delay variation introduced by the time used by the switching module to process the clock synchronization message can be removed, the accuracy of clock synchronization by the sink device using the received clock synchronization message can be improved.
  • the embodiments of the present application provide a message processing method and a clock synchronization method for clock synchronization, which will be introduced below with reference to the accompanying drawings.
  • FIG. 3 is a schematic flowchart of a message processing method for clock synchronization according to an embodiment of the application.
  • the message processing method for clock synchronization shown in FIG. 3 can be implemented by the following S101-S103.
  • the first device acquires the first message, and records a first time stamp, where the first time stamp is used to indicate the moment when the first device acquires the first message.
  • the first message in the embodiment of the present application may be a message used for clock synchronization.
  • the first device in the embodiment of the present application may be the device 101 shown in FIG. 1 or the device 103.
  • the first device may be a device for processing CBR services.
  • the message structure of the first message and the transmission rate of the first message may be determined according to the CBR service processed by the first device, which is not specifically limited in the embodiment of the present application.
  • the first device may use the local clock of the first device to perform counting to obtain the first time stamp.
  • the first message may be a message generated by the first device for clock synchronization.
  • the first time stamp It can be used to indicate the moment when the first device generates the first message.
  • the first message may also be a message for clock synchronization received by the first device from another device.
  • the first message may be a message for clock synchronization received by the first device from a device that is a clock source.
  • the first message may be obtained by the first device from the third device, and the first device is the next hop device of the third device.
  • the first message may carry a fourth timestamp, and the fourth timestamp may be added to the first message by the third device.
  • the first device determines a port for forwarding the first message according to the first message, and records a second timestamp, where the second timestamp is used to indicate the time when the first device determines the port.
  • the first message may be a layer 2 forwarding message or a layer 3 forwarding message. If the first message is a layer 2 forwarding message, the first device may determine the port for forwarding the first message according to a locally stored media access control (MAC) forwarding table. Specifically, the corresponding relationship between the MAC address and the port is stored in the forwarding table. The first device can parse the first message to obtain the destination MAC address, and determine the port for forwarding the first message according to the destination MAC address and the MAC forwarding table. If the first message is a Layer 3 forwarding message, the first device may determine a port for forwarding the first message according to a forwarding information table (forward information database, FIB) stored locally.
  • MAC media access control
  • the forwarding information table stores the correspondence between Internet Protocol (IP) addresses, ports, and next hops.
  • IP Internet Protocol
  • the first device can parse the first message to obtain the destination IP address, and based on the destination IP address and The forwarding information table forwarding table determines the port for forwarding the first message.
  • S102 may be performed by the switching module of the first device.
  • the first device determines the port for forwarding the first message, it can use the local clock of the first device to count to obtain the second timestamp.
  • the first device generates a second message including a third time stamp according to the first message, and sends the second message to the second device, where the third time stamp is based on the difference between the second time stamp and the first time stamp determine.
  • the difference between the second time stamp and the first time stamp is the residence time of the first message in the switching module of the first device.
  • the first device may generate a second message according to the residence time and the first message.
  • the first message may have a field for carrying timestamp data, and the first device may add a third timestamp to this field, so as to achieve the effect of generating a second message including the third timestamp according to the first message .
  • the third time stamp is equal to the difference between the second time stamp and the first time stamp.
  • the first message carries a fourth time stamp. In this case, the third time stamp is equal to the sum of the fourth time stamp and the aforementioned difference.
  • the first message can be sent to the second device.
  • the second device can perform steps similar to those of the first device, that is, modify the third timestamp carried in the second message, and modify the third timestamp so that the second message is in the first The sum of the residence time of the switching module of the second device and the third time stamp.
  • the second device may record a fifth timestamp. The fifth timestamp is used to indicate the time when the second device obtains the second message.
  • the second device may use the third The time stamp and the fifth time stamp perform clock synchronization. Specifically, the second device may use the difference between the fifth time stamp and the third time stamp as the input of the ACR algorithm, so as to achieve clock synchronization.
  • the fifth time stamp and the third time stamp can reflect the sum of the residence time of the synchronization message used for the clock in the switching modules of one or more devices.
  • the difference between the fifth time stamp and the third time stamp also removes the packet delay variation introduced by the switching module of one or more devices. Since the packet delay variation introduced by the switching module is removed, the solution of the embodiment of the present application can be used to improve the accuracy of clock synchronization.
  • the one or more devices mentioned here are part or all of the source device and the intermediate device.
  • the source device and each intermediate device both execute the message processing method for clock synchronization shown in FIG. .
  • the first device may include multiple functional modules, for example, including a first module and a second module, and the first module and the second module may be connected through an optical fiber or connected through an optical relay.
  • the first module and the second module are connected by optical fiber or optical relay, if the first module of the first device receives a message for clock synchronization and the switching module is located on the second module, the first device can The message for clock synchronization is sent to the second module through an optical fiber or an optical relay, and the second module determines the port for forwarding the message for clock synchronization.
  • the first device may be used to transmit messages for clock synchronization corresponding to various CBR services.
  • the format and transmission rate of the message for clock synchronization received by the first device may also be possible. different.
  • optical fibers or optical relays can transmit messages in the first format at the first rate.
  • the first module receives the message for clock synchronization, converts the clock synchronization message, and obtains a message that conforms to the first format And transmit the converted clock synchronization message to the second module at the first rate using optical fiber or optical relay.
  • the aforementioned first message may be a message after conversion.
  • the first message when the first message is a converted message, the first message may also be referred to as an information element.
  • the second module after the second module receives the cell, it can perform inverse conversion on the cell to obtain a message that meets the requirements of the first CBR service, and determine the forwarding of the first message based on the message obtained by the inverse conversion. port.
  • the port mentioned in S102 is a physical port.
  • the first device may include one or more boards, and one board may include multiple physical ports.
  • the board card can also be called a daughter card, and the board card can be divided into a branch card and a line card.
  • the switch module can be located on the line card.
  • the first device when the first message is a message obtained by the first device from the third device, the first device can obtain the first message through the first port on the first board.
  • the first board The clock on the card counts to get the first time stamp. Then, the first device can determine the port for forwarding the first message through the switching module, and the second time stamp is obtained by counting the clock on the board to which the switching module belongs.
  • the switching module may be located on the first board, or may be located on a second board different from the first board, which is not specifically limited in the embodiment of the present application. It should be noted that when the switching module is located on the second board, although the clocks used to obtain the first time stamp and the second time stamp are located on different boards, the two clocks are both located on the first device. The frequencies of the two clocks are synchronized. Therefore, the difference between the second time stamp and the first time stamp can accurately represent the residence time of the first message in the exchange module.
  • the port for forwarding the first message may be located on the second board, or may be located on a third board different from the second board, which is not specifically limited in the embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a first device provided by an embodiment of the application.
  • the first device 400 includes a board 401, a board 402, and a board 403.
  • the board 401, the board 402, and the board 403 can communicate through a backplane (not shown in FIG. 4).
  • the board 401 includes a port 401a and a crystal oscillator 401b
  • the board 402 includes a switch module 402a and a crystal oscillator 402b
  • the board 403 includes a port 403a and a crystal oscillator 403b.
  • the first device 400 obtains the first message through the port 401a and uses The clock count generated by the crystal oscillator 401b obtains the first time stamp.
  • the switching module 402a of the first device 400 determines the port for forwarding the first message, and uses the clock count generated by the crystal oscillator 402b to obtain the second time stamp. It is assumed here that the port for forwarding the first message is 403a.
  • the first device 400 sends the second message to the second device through the port 403a, and the crystal oscillator 403b is used to generate the working clock of the board 403.
  • the working clocks of the board 401, the board 402, and the board 403 may not be directly generated by the crystal oscillator, but may also be generated indirectly by the crystal oscillator, or may be generated by other real-time clocks (RTC).
  • RTC real-time clocks
  • the intermediate device or the source device may also introduce a certain amount of packet delay variation when performing the foregoing S101 and S102.
  • the introduced packet delay variation will reduce the accuracy of clock synchronization.
  • the following combined theoretical analysis shows that the packet delay variation introduced by S101 and S102 is smaller than the packet delay variation removed by the method shown in FIG. 3. Therefore, the above method is theoretically feasible to improve the accuracy of clock synchronization.
  • the first factor is that the clocks used for counting to obtain the time stamp are not synchronized between the devices.
  • the devices mentioned here include various devices used to transmit messages for clock synchronization.
  • the second factor is: there is a certain error in the time stamp obtained from the real-time clock count.
  • the real-time clock mentioned here can be, for example, a clock directly generated by a crystal oscillator.
  • the timestamp is essentially a counter, and the timestamp can represent time only if the clocks used by each device to count are consistent.
  • the first time stamp recorded by the j-th device is TS1 j
  • the second time stamp recorded by the j-th device is TS2 j
  • the message for clock synchronization is
  • the residence time T stay_j of the switching module of the j-th device can be calculated by the following formula (1):
  • T stay_j TS2 j- TS1 j formula (1)
  • Delay e2e contains the message in The sum of the residence time of the switching module of each device except the sink device, and the optical fiber delay between the devices, etc. Therefore, the message resides in the switching module of each device except the sink device The time accumulated value is less than the terminal delay Delay e2e , as shown in formula (2).
  • N is the sum of the number of source-end devices and intermediate devices, for example, N is equal to 20, which means that the source-end device sends the message for clock synchronization to the sink-end device and has been forwarded by 19 intermediate devices.
  • TS1 j and TS2 j are counted, which are affected by the local clock.
  • the clock of the j-th device is a tertiary clock
  • the maximum frequency deviation of the clock frequency between devices is foffset max , where the unit of the maximum frequency offset is parts per million (ppm)
  • the maximum value of the change in residence time T stay_j can be calculated by the following formula (4):
  • the unit of PDV j,max is nanosecond (nanosecond, ns).
  • the message used for clock synchronization is forwarded by N devices to the sink device, then the end-to-end delay variation PDV e2e of the long-chain networking can be expressed by the following formula (5) :
  • the end-to-end delay of long-chain networking is small, for example, Delay e2e ⁇ 1ms, and the maximum frequency deviation of the clock frequency between devices foffset max is 4.6ppm, that is: -4.6ppm ⁇ foffset j ⁇ +4.6 ppm.
  • the frequency of the clock used to record the first time stamp and the second time stamp is F rtc , where the unit of frequency is megahertz (MHz)
  • the error of calculating the timestamp is ⁇ 1000/F rtc (ns)
  • the maximum error introduced by a device in calculating the timestamp is 1000/F rtc (ns).
  • PDV e2e,max 2*foffset max ⁇ Delay e2e +20000/F rtc (ns)
  • the packet experiment variation eliminated by the method shown in FIG. 3 can generally reach the microsecond level, for example, up to 1 microsecond or more. It can be seen that using the solution of the embodiment of the present application, although an additional packet delay variation is introduced For example, the 266.4ns packet delay variation is introduced, but the eliminated packet delay variation is much larger than the introduced packet delay variation, thereby improving the accuracy of clock synchronization.
  • the embodiment of the present application also provides a corresponding device, which is described below with reference to the accompanying drawings.
  • FIG. 5 is a schematic structural diagram of a message processing apparatus for clock synchronization provided by an embodiment of the application.
  • the message processing device 500 for clock synchronization shown in FIG. 5 can be used to execute the clock synchronization method shown in FIG. 3.
  • the message processing apparatus 500 for clock synchronization may include an acquiring unit 501, a recording unit 502, a determining unit 503, a generating unit 504, and a sending unit 505.
  • the obtaining unit 501 is used to obtain a first message; the recording unit 502 is used to record a first time stamp indicating the moment when the first message is obtained; and the determining unit 503 is used to determine to forward the first message according to the first message.
  • the port of the message; the recording unit 502 is further configured to record a second time stamp used to indicate the time when the port is determined; the generating unit 504 is configured to generate a second message including a third time stamp according to the first message, The third time stamp is determined according to the difference between the second time stamp and the first time stamp; the sending unit 505 is configured to send the second message to the second device.
  • the acquiring unit 501 is specifically configured to generate the first message; the recording unit 502 is specifically configured to record the first time indicating the moment when the first message is generated stamp.
  • the acquiring unit 501 is specifically configured to acquire the first message from a third device, and the first message carries a fourth timestamp; the third timestamp is equal to the The sum of the difference and the fourth time stamp.
  • the device 500 is a device corresponding to the message processing method for clock synchronization in FIG. 3 described in the above embodiment
  • the specific implementation of each unit of the device 500 is based on the same idea as the above method embodiment, so For the specific implementation of each unit of the apparatus 500, reference may be made to the description part of the above method embodiment about the message processing method for clock synchronization corresponding to FIG. 3, which is not repeated here.
  • FIG. 6 is a schematic structural diagram of a clock synchronization device provided by an embodiment of the application.
  • the clock synchronization apparatus 600 shown in FIG. 6 may be used to execute the steps performed by the second device as the sink device.
  • the clock synchronization device 600 may include an acquiring unit 601, a recording unit 602, and a synchronization unit 603.
  • the obtaining unit 601 is used for obtaining a second message from the first device, and the second message includes a third time stamp, which is determined according to the apparatus 500 shown in FIG. 5; the recording unit 602 is used for recording At the fifth time stamp indicating the time when the second message is acquired; the synchronization unit 603 is configured to perform clock synchronization according to the difference between the fifth time stamp and the third time stamp.
  • the device 600 is a device corresponding to the steps performed by the second device as the sink device described in the above embodiment, the specific implementation of each unit of the device 600 is based on the same idea as the above method embodiment, therefore, Regarding the specific implementation of each unit of the apparatus 600, reference may be made to the description part of the steps performed by the second device as the sink device in the above method embodiments, which will not be repeated here.
  • FIG. 7 is a diagram of a device provided by an embodiment of the application. Schematic.
  • the device 700 includes a processor 710, a communication interface 720, and a memory 730.
  • the number of processors 710 in the device 700 may be one or more.
  • One processor is taken as an example in FIG. 7.
  • the processor 710, the communication interface 720, and the memory 730 may be connected through a bus system or other methods. In FIG. 7, the connection through the bus system 740 is taken as an example.
  • the processor 710 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • the processor 710 may further include a hardware chip.
  • the above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • the above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
  • the memory 730 may include a volatile memory (English: volatile memory), such as random-access memory (RAM); the memory 730 may also include a non-volatile memory (English: non-volatile memory), such as fast Flash memory (English: flash memory), hard disk drive (HDD) or solid-state drive (SSD); the memory 730 may also include a combination of the foregoing types of memory.
  • the memory 730 may store, for example, a first time stamp, a second time stamp, and a third time stamp; when the device 700 corresponds to the clock synchronization apparatus 600 shown in FIG. 6
  • the memory 730 may store the fifth time stamp and the third time stamp, for example.
  • the memory 730 stores an operating system and a program, an executable module or a data structure, or a subset of them, or an extended set of them, where the program may include various operation instructions for implementing various operations.
  • the operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
  • the processor 710 can read the program in the memory 730 to implement the message processing method or the clock synchronization method for clock synchronization provided in the embodiments of the present application.
  • the bus system 740 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus system 740 can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
  • the embodiments of the present application also provide a computer-readable storage medium, including instructions or computer programs, which when run on a computer, cause the computer to execute the message processing method or the clock synchronization method for clock synchronization provided in the above embodiments.
  • the embodiments of the present application also provide a computer program product containing instructions or computer programs, which when run on a computer, cause the computer to execute the message processing method or the clock synchronization method for clock synchronization provided in the above embodiments.
  • the device or device mentioned in this application may be a network device, such as a switch, a router, a server, or a part of a network device or server.
  • the device or device of the present application may also be a functional module deployed in the device or network.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of units is only a logical business division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • business units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software business unit.
  • the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
  • the services described in the present invention can be implemented by hardware, software, firmware, or any combination thereof.
  • these services can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in embodiments of the present application is a message processing method. In the method, when obtaining a first message for clock synchronization, a first device may record a first timestamp, the first timestamp being used for indicating the moment when the first device obtains the first message. After obtaining the first message, the first device may determine, according to the first message, a port for forwarding the first message, and records a second timestamp, the second timestamp being used for indicating the moment when the first device determines the port. The first device may generate, according to the first message, a second message comprising the third timestamp, and send the second message to the second device, the third timestamp being determined according to the difference between the second timestamp and the first timestamp. The step of determining the port may be performed by a switching module in the first device, that is, the third timestamp may reflect the residence time of the first message in the switching module. Therefore, when a sink device performs clock synchronization, the packet delay variation introduced by the switching module can be removed, thereby improving the accuracy of clock synchronization.

Description

一种用于时钟同步的消息处理方法、时钟同步方法及装置Message processing method, clock synchronization method and device for clock synchronization
本申请要求于2020年1月22日提交中国专利局、申请号为202010075071.3、发明创造名称为“一种用于时钟同步的消息处理方法、时钟同步方法及装置”的中国专利申请的优先权、以及于2019年12月16日提交中国专利局、申请号为201911295200.3、发明创造名称为“降低包延迟变化量的方法、处理器、设备和网络系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of a Chinese patent application filed with the Chinese Patent Office on January 22, 2020, the application number is 202010075071.3, and the invention title is "a message processing method, clock synchronization method and device for clock synchronization", And the priority of the Chinese patent application filed with the Chinese Patent Office on December 16, 2019, with the application number 201911295200.3, and the invention titled "Methods, Processors, Equipment, and Network Systems for Reducing Packet Delay Variation", with all contents Incorporated in this application by reference.
技术领域Technical field
本申请涉及时钟同步领域,尤其涉及一种用于时钟同步的消息处理方法、时钟同步方法及装置。This application relates to the field of clock synchronization, and in particular to a message processing method, clock synchronization method and device for clock synchronization.
背景技术Background technique
时钟同步,指的是各个设备的时钟频率保持一致,而时钟相位可以保持一定的相位差。目前,设备间可以利用一些用于时钟同步的方法进行时钟同步,例如利用电路仿真业务自适应时钟恢复(circuit emulation service adaptive clock recovery,CESACR)方法进行时钟同步。目前,多种设备例如电信网络中的路由器、交换机等可以利用CESACR方法进行时钟同步。Clock synchronization means that the clock frequency of each device remains the same, and the clock phase can maintain a certain phase difference. At present, some methods for clock synchronization can be used between devices for clock synchronization, for example, a circuit emulation service adaptive clock recovery (CESACR) method is used for clock synchronization. Currently, a variety of devices, such as routers and switches in telecommunications networks, can use the CESACR method to synchronize clocks.
当两个设备利用CESACR方法进行时钟同步时,可以通过传递报文的形式来进行时钟同步。但是这种方式进行时钟同步的效果并不好,因此,需要一种方案可以解决上述问题。When two devices use the CESACR method to synchronize their clocks, they can synchronize their clocks in the form of messages. However, the effect of clock synchronization in this way is not good. Therefore, a solution is needed to solve the above-mentioned problems.
发明内容Summary of the invention
本申请实施例提供了一种用于时钟同步的消息处理方法和时钟同步方法,可以改善利用CESACR方法进行时钟同步的效果。The embodiments of the present application provide a message processing method and a clock synchronization method for clock synchronization, which can improve the effect of clock synchronization using the CESACR method.
第一方面,本申请实施例提供了一种用于时钟同步的消息处理方法,该方法可以由第一设备执行,第一设备可以是利用CESACR方法进行时钟传递的源端设备或者中间设备。在传统技术中,源端设备在将用于时钟同步的消息发送给宿端设备时,中间设备透传该用于时钟同步的消息,而中间设备在透传用于时钟同步的消息时,中间设备中的交换模块对用于时钟同步的消息进行处理时会引入包时延变化量(packet delay variation,PDV),引入的包时延变化量会影响时钟同步的精确度。鉴于此,在本申请实施例中,第一设备获取到第一消息之后,可以基于第一消息生成第二消息,该第二消息能够体现第一消息在第一设备的交换模块的驻留时间,而不是简单的透传该第一消息。具体地,第一设备获取第一消息时,可以记录第一时间戳,该第一时间戳用于指示第一设备获取第一消息的时刻。其中,第一消息为用于时钟同步的消息。第一设备获取第一消息之后,可以根据第一消息确定转发第一消息的端口,并记录第二时间戳,第二时间戳用于指示第一设备确定该端口的时刻。第一设备在对第一消息进行转发时,可以根据第一消息生成包括第三时间戳的第二消息,并将第二消息发送给第二设备。其中,第三时间戳根据前述第二时间戳和第一时间戳的差值确定。确定转发第一消息的端口可以由第一设备中的交换模块执行,即第三时间戳可以体现前述第一消息在交换模块的驻留时间。由此可见,利用本申请实施例中的方案,宿端设备接收到的用于时钟同步的消息中可以携带能够体现该用于时钟同步的消息在交换模块的驻留时间,宿端设备进行时钟同步时,即可去掉交换模块引入的包时延变化量,从而提升宿端设备利用接收到的用于时钟同步的消息进行时钟同步的精度。In the first aspect, the embodiments of the present application provide a message processing method for clock synchronization. The method may be executed by a first device, and the first device may be a source device or an intermediate device that uses the CESACR method for clock transfer. In the traditional technology, when the source device sends a message for clock synchronization to the sink device, the intermediate device transparently transmits the message for clock synchronization, and when the intermediate device transparently transmits the message for clock synchronization, the intermediate device transparently transmits the message for clock synchronization. The switching module in the device introduces packet delay variation (PDV) when processing messages used for clock synchronization, and the introduced packet delay variation will affect the accuracy of clock synchronization. In view of this, in the embodiment of the present application, after the first device obtains the first message, it can generate a second message based on the first message, and the second message can reflect the residence time of the first message in the exchange module of the first device , Instead of simply transparently transmitting the first message. Specifically, when the first device obtains the first message, the first time stamp may be recorded, and the first time stamp is used to indicate the moment when the first device obtains the first message. Wherein, the first message is a message used for clock synchronization. After obtaining the first message, the first device may determine the port for forwarding the first message according to the first message, and record a second time stamp, which is used to indicate the time when the first device determines the port. When forwarding the first message, the first device may generate a second message including the third time stamp according to the first message, and send the second message to the second device. Wherein, the third time stamp is determined according to the difference between the aforementioned second time stamp and the first time stamp. Determining the port for forwarding the first message may be performed by the switching module in the first device, that is, the third timestamp may reflect the residence time of the aforementioned first message in the switching module. It can be seen that, using the solution in the embodiment of the present application, the message for clock synchronization received by the sink device can carry the residence time of the message for clock synchronization in the switching module, and the sink device performs clock synchronization. During synchronization, the packet delay variation introduced by the switching module can be removed, thereby improving the accuracy of the sink device using the received clock synchronization message to perform clock synchronization.
在一种可能的实现方式中,若第一设备是源端设备,则第一消息可以是第一设备生成的用于时钟同步的消息,第一时间戳可以用于指示第一设备生成第一消息的时刻。第二时间戳和第一时间戳的差值为第一消息在第一设备的交换模块的驻留时间。第一消息中可以具备用于携带时间戳数据的字段。若第一消息是第一设备生成的消息,则第一设备可以将第二时间戳和第一时间戳的差值确定为第三时间戳,并将第三时间戳添加至该字段中,从而实现根据第一消息生成包括第三时间戳的第二消息。In a possible implementation, if the first device is the source device, the first message may be a message generated by the first device for clock synchronization, and the first time stamp may be used to instruct the first device to generate the first device. The moment of the news. The difference between the second time stamp and the first time stamp is the residence time of the first message in the switching module of the first device. The first message may have a field for carrying timestamp data. If the first message is a message generated by the first device, the first device may determine the difference between the second timestamp and the first timestamp as the third timestamp, and add the third timestamp to this field, thereby It is realized that the second message including the third time stamp is generated according to the first message.
在一种可能的实现方式中,第一消息也可以是第一设备从其它设备处接收的用于时钟同步的消息。例如,当第一设备为源端设备时,第一消息可以是第一设备从作为时钟源的设备处接收的用于时钟同步的消息。当第一设备为中间设备时,第一消息可以是第一设备从第三设备处获取的,其中,第一设备为第三设备的下一跳设备。若第一消息是第一设备从其它设备处获取的消息,则第一消息中可以携带第四时间戳,第一设备可以将第四时间戳与前述差值之和确定为第三时间戳,并将第三时间戳添加至该字段中,从而实现根据第一消息生成包括第三时间戳的第二消息。In a possible implementation manner, the first message may also be a message for clock synchronization received by the first device from another device. For example, when the first device is the source device, the first message may be a message for clock synchronization received by the first device from the device as the clock source. When the first device is an intermediate device, the first message may be obtained by the first device from the third device, where the first device is the next hop device of the third device. If the first message is a message obtained by the first device from another device, the first message may carry a fourth timestamp, and the first device may determine the sum of the fourth timestamp and the aforementioned difference as the third timestamp, And the third time stamp is added to this field, so that the second message including the third time stamp is generated according to the first message.
第二方面,本申请实施例还提供了一种时钟同步方法,该方法可以由作为宿端设备的第二设备执行,具体地,第二设备可以获取来自第一设备的第二消息,该第二设备为第一设备的下一跳设备,第二设备获取第二消息时,可以记录用于指示第二设备获取第二消息的时刻的第五时间戳,第二消息中包括第三时间戳,所述第三时间戳根据以上第一方面提供的方法确定。第二设备记录第五时间戳之后,可以根据所述第五时间戳和所述第三时间戳的差值进行时钟同步。由于第三时间戳可以体现用于时钟的同步消息在一个或者多个设备的交换模块的驻留时间之和,故而,第五时间戳和第三时间戳的差值,也去掉了前述一个或者多个设备的交换模块所引入的包时延变化量。因此,利用该方法,可以提升时钟同步的精度。In the second aspect, the embodiments of the present application also provide a clock synchronization method, which can be executed by a second device as a sink device. Specifically, the second device can obtain a second message from the first device. The second device is the next hop device of the first device. When the second device acquires the second message, it can record a fifth timestamp indicating the moment when the second device acquires the second message. The second message includes the third timestamp , The third time stamp is determined according to the method provided in the above first aspect. After recording the fifth time stamp, the second device may perform clock synchronization according to the difference between the fifth time stamp and the third time stamp. Since the third time stamp can reflect the sum of the residence time of the synchronization message used for the clock in the switching modules of one or more devices, the difference between the fifth time stamp and the third time stamp also removes the aforementioned one or The amount of packet delay variation introduced by the switching modules of multiple devices. Therefore, with this method, the accuracy of clock synchronization can be improved.
第三方面,本申请实施例提供了一种用于时钟同步的消息处理装置,该装置包括获取单元、记录单元、确定单元、生成单元和发送单元。获取单元用于获取第一消息;记录单元用于记录用于指示获取所述第一消息的时刻的第一时间戳;确定单元用于根据所述第一消息确定转发所述第一消息的端口;所述记录单元还用于记录用于指示确定所述端口的时刻的第二时间戳;生成单元用于根据所述第一消息生成包括第三时间戳的第二消息,所述第三时间戳根据所述第二时间戳和所述第一时间戳的差值确定;发送单元,用于将所述第二消息发送给第二设备。In a third aspect, an embodiment of the present application provides a message processing device for clock synchronization. The device includes an acquiring unit, a recording unit, a determining unit, a generating unit, and a sending unit. The obtaining unit is used for obtaining the first message; the recording unit is used for recording the first time stamp indicating the time when the first message is obtained; the determining unit is used for determining the port for forwarding the first message according to the first message The recording unit is also used to record a second time stamp used to indicate the time at which the port is determined; the generating unit is used to generate a second message including a third time stamp according to the first message, and the third time The stamp is determined according to the difference between the second time stamp and the first time stamp; the sending unit is configured to send the second message to the second device.
在一种可能的实现方式中,所述获取单元具体用于生成所述第一消息;所述记录单元具体用于记录所述用于指示生成所述第一消息的时刻的第一时间戳。In a possible implementation manner, the acquiring unit is specifically configured to generate the first message; the recording unit is specifically configured to record the first timestamp indicating the moment when the first message is generated.
在一种可能的实现方式中,所述获取单元具体用于:获取来自第三设备的所述第一消息,所述第一消息中携带第四时间戳;所述第三时间戳等于所述差值与所述第四时间戳之和。In a possible implementation manner, the acquiring unit is specifically configured to: acquire the first message from a third device, where the first message carries a fourth timestamp; the third timestamp is equal to the The sum of the difference and the fourth time stamp.
第四方面,本申请实施例提供了一种时钟同步装置,该装置包括获取单元、记录单元和同步单元。获取单元用于获取来自第一设备的第二消息,所述第二消息中包括第三时间戳,所述第三时间戳根据以上第三方面任意一项所述的装置确定;记录单元用于记录用于指示获取所述第二消息的时刻的第五时间戳;同步单元用于根据所述第五时间戳和所述第 三时间戳的差值进行时钟同步。In a fourth aspect, an embodiment of the present application provides a clock synchronization device, which includes an acquisition unit, a recording unit, and a synchronization unit. The acquiring unit is configured to acquire a second message from the first device, where the second message includes a third time stamp, the third time stamp being determined according to the apparatus according to any one of the above third aspects; the recording unit is configured to A fifth time stamp used to indicate the time when the second message is acquired is recorded; the synchronization unit is used to perform clock synchronization according to the difference between the fifth time stamp and the third time stamp.
第五方面,本申请实施例提供了一种设备。所述设备包括处理器和存储器。所述存储器用于存储指令或计算机程序。所述处理器用于执行所述存储器中的所述指令或计算机程序,执行以上第一方面任意一项所述的方法,或者执行以上第二方面任意一项所述的方法。In the fifth aspect, an embodiment of the present application provides a device. The device includes a processor and a memory. The memory is used to store instructions or computer programs. The processor is configured to execute the instructions or computer programs in the memory, execute the method described in any one of the first aspect above, or execute the method described in any one of the second aspect above.
第六方面,本申请实施例提供了一种计算机可读存储介质,包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上第一方面任意一项所述的方法,或者执行以上第二方面任意一项所述的方法。In a sixth aspect, the embodiments of the present application provide a computer-readable storage medium, including instructions or computer programs, which when run on a computer, cause the computer to execute the method described in any one of the first aspects above, or execute the above The method of any one of the second aspect.
第七方面,本申请实施例提供了一种包含指令或计算机程序的计算机程序产品,当其在计算机上运行时,使得计算机执行以上第一方面任意一项所述的方法,或者执行以上第二方面任意一项所述的方法。In the seventh aspect, the embodiments of the present application provide a computer program product containing instructions or computer programs, which when run on a computer, cause the computer to execute any of the methods described in the first aspect, or execute the second The method of any one of the aspects.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments described in this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本申请实施例提供的一种应用场景示意图;FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the application;
图2为本申请实施例提供的又一种示意图;Figure 2 is another schematic diagram provided by an embodiment of the application;
图3为本申请实施例提供的一种用于时钟同步的消息处理方法的流程示意图;3 is a schematic flowchart of a message processing method for clock synchronization provided by an embodiment of the application;
图4为本申请实施例提供的一种第一设备的结构示意图;FIG. 4 is a schematic structural diagram of a first device provided by an embodiment of this application;
图5为本申请实施例提供的一种用于时钟同步的消息处理装置的结构示意图;FIG. 5 is a schematic structural diagram of a message processing apparatus for clock synchronization provided by an embodiment of the application;
图6为本申请实施例提供的一种时钟同步装置的结构示意图;FIG. 6 is a schematic structural diagram of a clock synchronization device provided by an embodiment of this application;
图7为本申请实施例提供的一种设备的结构示意图。FIG. 7 is a schematic structural diagram of a device provided by an embodiment of the application.
具体实施方式Detailed ways
本申请实施例提供了一种用于时钟同步的消息处理方法和时钟同步方法,可以改善利用CESACR方法进行时钟同步的效果。The embodiments of the present application provide a message processing method and a clock synchronization method for clock synchronization, which can improve the effect of clock synchronization using the CESACR method.
为方便理解,首先对本申请实施例的可能的应用场景进行介绍。To facilitate understanding, firstly, possible application scenarios of the embodiments of the present application are introduced.
恒定比特率(constant bit rate,CBR)业务属于实时性业务,处理该业务的设备的时钟同步是保证该业务正常运行的基础。因此,对CBR业务提供支持的网络需要对处理CBR业务的设备进行时钟同步,其中,对CBR业务提供支持的网络例如可以为异步传输模式(asynchronous transfer mode,ATM)网络。具体地,可以利用CESACR方法对处理CBR业务的设备进行时钟同步。接下来对利用CESACR方法进行时钟同步的原理进行简单介绍。CBR业务可以包括千兆以太网(Gigabit Ethernet,GE)、同步数字体系(synchronous digital hierarchy,SDH)、通用公共无线接口(common public radio interface CPRI)等。A constant bit rate (constant bit rate, CBR) service is a real-time service, and the clock synchronization of the equipment processing the service is the basis for ensuring the normal operation of the service. Therefore, the network supporting the CBR service needs to synchronize the clock of the equipment processing the CBR service. The network supporting the CBR service may be, for example, an asynchronous transfer mode (ATM) network. Specifically, the CESACR method can be used to synchronize clocks of devices that process CBR services. Next, the principle of clock synchronization using the CESACR method is briefly introduced. CBR services may include Gigabit Ethernet (GE), synchronous digital hierarchy (SDH), common public radio interface (CPRI), and so on.
参见图1,该图为本申请实施例提供的一种应用场景示意图。Refer to FIG. 1, which is a schematic diagram of an application scenario provided by an embodiment of the application.
在图1所示的场景中,包括设备101和设备102,设备101和设备102需要实现时钟同步。设备101可以向设备102发送用于时钟同步的消息,设备101向设备102发送的用于时钟同步的消息可能会经过设备103进行转发,其中,设备103例如可以为光传送网(optical transport network,OTN)中的设备。发送用于时钟同步的消息的设备101也可以 被称为源端设备,该时钟同步消息的目的接收设备即设备102也可以被称为宿端设备,源端设备和宿端设备之间用于传递用于时钟同步的消息的设备,例如图1所示的设备103也可以被称为中间设备。In the scenario shown in FIG. 1, the device 101 and the device 102 are included, and the device 101 and the device 102 need to realize clock synchronization. The device 101 may send a message for clock synchronization to the device 102, and the message for clock synchronization sent by the device 101 to the device 102 may be forwarded by the device 103, where the device 103 may be, for example, an optical transport network (optical transport network, OTN) equipment. The device 101 that sends the message for clock synchronization can also be called the source device, and the destination receiving device of the clock synchronization message, that is, the device 102 can also be called the sink device. A device that transmits a message for clock synchronization, for example, the device 103 shown in FIG. 1 may also be referred to as an intermediate device.
设备101在发送用于时钟同步的消息时,可以记录时间戳T1,并将该时间戳T1携带在该用于时钟同步的消息中,该时间戳T1用于指示设备101发送该用于时钟同步的消息的时刻。设备103接收到设备101发送的用于时钟同步的消息之后,透传该用于时钟同步的消息。图1只是为了方便理解而示出,用于转发该用于时钟同步的消息的中间设备的数量也可以为多个,该多个设备均用于透传该用于时钟同步的消息。设备102接收到该用于时钟同步的消息之后,可以记录时间戳T2,该时间戳T2用于指示设备102接收到前述用于时钟同步的消息的时刻。进一步地,设备102可以结合T2和前述用于时钟同步的消息中携带的时间戳T1进行时钟同步,具体地,设备102可以将前述时间戳T1和时间戳T2输入自适应时钟恢复(adaptive clock recovery,ACR)算法,从而实现设备101和设备102的时钟同步。ACR算法可以根据T2和T1的差值实现设备101和设备102的时钟同步。以下结合图2对ACR算法的原理进行简单介绍。When the device 101 sends a message for clock synchronization, it can record a timestamp T1, and carry the timestamp T1 in the message for clock synchronization. The timestamp T1 is used to instruct the device 101 to send the message for clock synchronization. The moment of the news. After the device 103 receives the message for clock synchronization sent by the device 101, it transparently transmits the message for clock synchronization. FIG. 1 is only shown for the convenience of understanding. The number of intermediate devices used for forwarding the message for clock synchronization may also be multiple, and the multiple devices are all used for transparently transmitting the message for clock synchronization. After the device 102 receives the message for clock synchronization, it may record a time stamp T2, which is used to indicate the time when the device 102 receives the message for clock synchronization. Further, the device 102 can perform clock synchronization by combining T2 with the time stamp T1 carried in the aforementioned message for clock synchronization. Specifically, the device 102 can input the aforementioned time stamp T1 and time stamp T2 into adaptive clock recovery (adaptive clock recovery). , ACR) algorithm, so as to realize the clock synchronization of the device 101 and the device 102. The ACR algorithm can synchronize the clocks of the device 101 and the device 102 according to the difference between T2 and T1. The principle of the ACR algorithm is briefly introduced below in conjunction with Figure 2.
参见图2,该图为本申请实施例提供的又一种示意图。如图2所示,设备101周期性给设备102发送用于时钟同步的消息。T1_i表示设备101向设备102发送的第i条用于时钟同步的消息中携带的时间戳,T1_i用于指示设备101向设备102发送的第i条用于时钟同步的消息的时刻。T2_i表示设备102接收到的第i条用于时钟同步的消息时记录的时间戳,T2_i用于指示设备102接收到的第i条用于时钟同步的消息的时刻。若设备101和设备102的时钟同步,且每一条用于时钟同步的消息的传输时延相同,则:Refer to FIG. 2, which is another schematic diagram provided by an embodiment of the application. As shown in FIG. 2, the device 101 periodically sends a message for clock synchronization to the device 102. T1_i represents the timestamp carried in the ith message for clock synchronization sent by the device 101 to the device 102, and T1_i is used to indicate the time of the ith message for clock synchronization sent by the device 101 to the device 102. T2_i represents the time stamp recorded when the device 102 receives the i-th message for clock synchronization, and T2_i is used to indicate the time when the device 102 receives the i-th message for clock synchronization. If the clocks of the device 101 and the device 102 are synchronized, and the transmission delay of each message used for clock synchronization is the same, then:
T2_1–T2_0=T1_1–T1_0,T2_1–T2_0=T1_1–T1_0,
T2_2–T2_1=T1_2–T1_1,T2_2–T2_1=T1_2–T1_1,
T2_n–T2_n-1=T1_n–T1_n-1,T2_n–T2_n-1=T1_n–T1_n-1,
依次类推,T2_n–T2_0=T1_n–T1_0,如果T2_n–T2_0大于T1_n–T1_0,说明设备102的频率比设备101高,则需要减小设备102的频率,反之,则需要增大设备102的频率。对T2_n–T2_n-1=T1_n–T1_n-1进行公式变换可得:T2_n–T1_n=T2_n-1–T1_n-1,因此,ACR算法可以根据T2_n–T1_n的差值实现设备101和设备102的时钟同步。By analogy, T2_n–T2_0=T1_n–T1_0, if T2_n–T2_0 is greater than T1_n–T1_0, it means that the frequency of the device 102 is higher than that of the device 101, and the frequency of the device 102 needs to be reduced, and vice versa, the frequency of the device 102 needs to be increased. The formula transformation of T2_n–T2_n-1=T1_n–T1_n-1 can be obtained: T2_n–T1_n=T2_n-1–T1_n-1, therefore, the ACR algorithm can realize the clock of device 101 and device 102 according to the difference of T2_n–T1_n Synchronize.
通过以上描述可知,ACR算法的理想条件是:每一条用于时钟同步的消息的传输时延相同,即包时延变化量为0。但是实际上用户时钟同步的消息的转发时延,受到转发设备例如图1中的设备103的影响较大。由于设备103除了转发用于时钟同步的消息之外,还可以转发其它报文。因此设备103转发用于时钟同步消息时,时钟同步消息在设备103中的驻留时间受到设备103当前状态的影响。而设备103的状态并不能时刻保持相同,因此,多条用于时钟同步的消息在设备103中的驻留时间可能并不相同,即包时延变化量不为0。而且,在一些实施例中,包时延变化量比较大,例如可以达到微秒级别,例如2微秒。这就导致多条用于时钟同步的消息的传输时延很难完全相同,进一步使得利用ACR算法进行时钟同步的精度不高。It can be seen from the above description that the ideal condition of the ACR algorithm is: the transmission delay of each message used for clock synchronization is the same, that is, the packet delay variation is zero. However, in fact, the forwarding delay of the message synchronized with the user's clock is greatly affected by the forwarding device, such as the device 103 in FIG. 1. In addition to forwarding the message for clock synchronization, the device 103 can also forward other messages. Therefore, when the device 103 forwards the clock synchronization message, the residence time of the clock synchronization message in the device 103 is affected by the current state of the device 103. However, the state of the device 103 cannot be kept the same all the time. Therefore, the residence time of multiple messages used for clock synchronization in the device 103 may be different, that is, the packet delay variation is not zero. Moreover, in some embodiments, the packet delay variation is relatively large, for example, it can reach the level of microseconds, such as 2 microseconds. This makes it difficult for the transmission delays of multiple messages used for clock synchronization to be exactly the same, which further makes the accuracy of clock synchronization using the ACR algorithm not high.
用于时钟同步的消息在设备103中的驻留时间包括多个部分,分别为:The residence time of the message used for clock synchronization in the device 103 includes multiple parts, which are:
1、设备103中的交换模块对用于时钟同步消息进行处理所使用的时间,其中,交换 模块用于确定转发、调度用于时钟同步的消息的端口,交换模块可以为硬件芯片,也可以为软件模块;1. The time used by the switching module in the device 103 to process messages used for clock synchronization, where the switching module is used to determine the port for forwarding and scheduling messages used for clock synchronization, and the switching module can be a hardware chip or Software module
2、用于时钟同步的消息在报文出口队列中排队所使用的时间;2. The time used for queuing messages for clock synchronization in the message exit queue;
3、由于网络突发情况导致的路径重定向所使用的时间;3. The time used for path redirection due to network emergencies;
4、其它因素导致的驻留时间,例如光传输网中的光衰减。4. The residence time caused by other factors, such as the optical attenuation in the optical transmission network.
发明人发现,交换模块对用于时钟同步消息进行处理所使用的时间引入的包时延变化量最大,大于上述其它三种因素引入的包时延变化量。因此,若能去掉交换模块对用于时钟同步消息进行处理所使用的时间引入的包时延变化量,则可以提升宿端设备利用接收到的用于时钟同步的消息进行时钟同步的精度。The inventor found that the packet delay variation introduced by the switching module for the time used for processing clock synchronization messages is the largest, which is greater than the packet delay variation introduced by the other three factors mentioned above. Therefore, if the packet delay variation introduced by the time used by the switching module to process the clock synchronization message can be removed, the accuracy of clock synchronization by the sink device using the received clock synchronization message can be improved.
鉴于此,本申请实施例提供了一种用于时钟同步的消息处理方法和时钟同步方法,以下结合附图对该方法进行介绍。In view of this, the embodiments of the present application provide a message processing method and a clock synchronization method for clock synchronization, which will be introduced below with reference to the accompanying drawings.
参见图3,该图为本申请实施例提供的一种用于时钟同步的消息处理方法的流程示意图。图3所示的用于时钟同步的消息处理方法,可以通过如下S101-S103实现。Refer to FIG. 3, which is a schematic flowchart of a message processing method for clock synchronization according to an embodiment of the application. The message processing method for clock synchronization shown in FIG. 3 can be implemented by the following S101-S103.
S101:第一设备获取第一消息,并记录第一时间戳,第一时间戳用于指示第一设备获取第一消息的时刻。S101: The first device acquires the first message, and records a first time stamp, where the first time stamp is used to indicate the moment when the first device acquires the first message.
本申请实施例中的第一消息可以是用于时钟同步的消息。本申请实施例中的第一设备,可以是如图1所示的设备101,也可以是设备103。第一设备可以是用于处理CBR业务的设备。第一消息的消息结构以及第一消息的传输速率可以根据第一设备处理的CBR业务来确定,本申请实施例不做具体限定。The first message in the embodiment of the present application may be a message used for clock synchronization. The first device in the embodiment of the present application may be the device 101 shown in FIG. 1 or the device 103. The first device may be a device for processing CBR services. The message structure of the first message and the transmission rate of the first message may be determined according to the CBR service processed by the first device, which is not specifically limited in the embodiment of the present application.
在本申请实施例中,第一设备可以利用第一设备的本地时钟进行计数得到第一时间戳。In this embodiment of the present application, the first device may use the local clock of the first device to perform counting to obtain the first time stamp.
在本申请实施例中,若第一设备是源端设备例如图1所示的设备101,第一消息可以是第一设备生成的用于时钟同步的消息,对于这种情况,第一时间戳可以用于指示第一设备生成第一消息的时刻。第一消息也可以是第一设备从其它设备处接收的用于时钟同步的消息,例如第一消息可以是第一设备从作为时钟源的设备处接收的用于时钟同步的消息。In the embodiment of the present application, if the first device is the source device, such as the device 101 shown in FIG. 1, the first message may be a message generated by the first device for clock synchronization. In this case, the first time stamp It can be used to indicate the moment when the first device generates the first message. The first message may also be a message for clock synchronization received by the first device from another device. For example, the first message may be a message for clock synchronization received by the first device from a device that is a clock source.
若第一设备是中间设备,则第一消息可以是第一设备从第三设备处获取的,第一设备为第三设备的下一跳设备。对于这种情况,第一消息中可以携带第四时间戳,第四时间戳可以是第三设备添加到第一消息中的。If the first device is an intermediate device, the first message may be obtained by the first device from the third device, and the first device is the next hop device of the third device. In this case, the first message may carry a fourth timestamp, and the fourth timestamp may be added to the first message by the third device.
S102:第一设备根据第一消息确定转发第一消息的端口,并记录第二时间戳,第二时间戳用于指示第一设备确定该端口的时刻。S102: The first device determines a port for forwarding the first message according to the first message, and records a second timestamp, where the second timestamp is used to indicate the time when the first device determines the port.
在本申请实施例中,第一消息可以为二层转发消息,也可以为三层转发消息。若第一消息为二层转发消息,则第一设备可以根据本地存储的媒体接入控制(media access control,MAC)转发表确定转发第一消息的端口。具体地,该转发表中存储有MAC地址和端口的对应关系,第一设备可以对第一消息进行解析得到目的MAC地址,并根据目的MAC地址和MAC转发表确定转发第一消息的端口。若第一消息为三层转发消息,则第一设备可以根据本地存储的转发信息表(forward information database,FIB)确定转发第一消息的端口。具体地,该转发信息表中存储有互联网协议(Internet Protocol,IP)地址、端口和下一跳的对应关系,第一设备可以对第一消息进行解析得到目的IP地址,并根据目的IP地址和转发信息表转发表确定转发第一消息的端口。在一些实施例中,S102可以由第一设备的交换 模块执行。In the embodiment of the present application, the first message may be a layer 2 forwarding message or a layer 3 forwarding message. If the first message is a layer 2 forwarding message, the first device may determine the port for forwarding the first message according to a locally stored media access control (MAC) forwarding table. Specifically, the corresponding relationship between the MAC address and the port is stored in the forwarding table. The first device can parse the first message to obtain the destination MAC address, and determine the port for forwarding the first message according to the destination MAC address and the MAC forwarding table. If the first message is a Layer 3 forwarding message, the first device may determine a port for forwarding the first message according to a forwarding information table (forward information database, FIB) stored locally. Specifically, the forwarding information table stores the correspondence between Internet Protocol (IP) addresses, ports, and next hops. The first device can parse the first message to obtain the destination IP address, and based on the destination IP address and The forwarding information table forwarding table determines the port for forwarding the first message. In some embodiments, S102 may be performed by the switching module of the first device.
第一设备确定转发第一消息的端口时,可以利用第一设备的本地时钟进行计数得到第二时间戳。When the first device determines the port for forwarding the first message, it can use the local clock of the first device to count to obtain the second timestamp.
S103:第一设备根据第一消息生成包括第三时间戳的第二消息,并将第二消息发送给第二设备,其中,第三时间戳根据第二时间戳和第一时间戳的差值确定。S103: The first device generates a second message including a third time stamp according to the first message, and sends the second message to the second device, where the third time stamp is based on the difference between the second time stamp and the first time stamp determine.
第二时间戳和第一时间戳的差值为第一消息在第一设备的交换模块的驻留时间。得到驻留时间之后,第一设备可以根据该驻留时间和第一消息,生成第二消息。其中,第一消息中可以具备用于携带时间戳数据的字段,第一设备可以将第三时间戳添加至该字段中,从而实现根据第一消息生成包括第三时间戳的第二消息的效果。具体地,若第一消息是第一设备生成的,则第三时间戳等于第二时间戳与第一时间戳的差值。若第一消息是第一设备从第三设备处获取的,则第一消息中携带第四时间戳,对于这种情况,第三时间戳等于第四时间戳与前述差值之和。The difference between the second time stamp and the first time stamp is the residence time of the first message in the switching module of the first device. After obtaining the residence time, the first device may generate a second message according to the residence time and the first message. Among them, the first message may have a field for carrying timestamp data, and the first device may add a third timestamp to this field, so as to achieve the effect of generating a second message including the third timestamp according to the first message . Specifically, if the first message is generated by the first device, the third time stamp is equal to the difference between the second time stamp and the first time stamp. If the first message is obtained by the first device from the third device, the first message carries a fourth time stamp. In this case, the third time stamp is equal to the sum of the fourth time stamp and the aforementioned difference.
第一设备生成第一消息之后,可以将第一消息发送给第二设备。若第二设备不是宿端设备,则第二设备可以执行与第一设备类似的步骤,即对第二消息中携带的第三时间戳进行修改,将第三时间戳修改为第二消息在第二设备的交换模块的驻留时间与第三时间戳之和。若第二设备是宿端设备,则第二设备可以记录第五时间戳,第五时间戳用于指示第二设备获取第二消息的时间,第二设备可以根据第二消息中携带的第三时间戳和第五时间戳进行时钟同步。具体地,第二设备可以将第五时间戳和第三时间戳的差值作为ACR算法的输入,从而实现时钟同步。After the first device generates the first message, the first message can be sent to the second device. If the second device is not the sink device, the second device can perform steps similar to those of the first device, that is, modify the third timestamp carried in the second message, and modify the third timestamp so that the second message is in the first The sum of the residence time of the switching module of the second device and the third time stamp. If the second device is a sink device, the second device may record a fifth timestamp. The fifth timestamp is used to indicate the time when the second device obtains the second message. The second device may use the third The time stamp and the fifth time stamp perform clock synchronization. Specifically, the second device may use the difference between the fifth time stamp and the third time stamp as the input of the ACR algorithm, so as to achieve clock synchronization.
当第二设备为宿端设备时,由于第三时间戳可以体现用于时钟的同步消息在一个或者多个设备的交换模块的驻留时间之和,故而,第五时间戳和第三时间戳的差值,等于第五时间戳减去用于时钟的同步消息在一个或者多个设备的交换模块的驻留时间之和。相应的,第五时间戳和第三时间戳的差值,也去掉了前述一个或者多个设备的交换模块所引入的包时延变化量。由于交换模块引入的包时延变化量被去掉,故而利用本申请实施例的方案,可以提升时钟同步的精度。此处提及的一个或者多个设备为源端设备和中间设备中的部分或者全部。When the second device is the sink device, since the third time stamp can reflect the sum of the residence time of the synchronization message used for the clock in the switching modules of one or more devices, the fifth time stamp and the third time stamp The difference is equal to the sum of the fifth time stamp minus the residence time of the synchronization message used for the clock in the switching module of one or more devices. Correspondingly, the difference between the fifth time stamp and the third time stamp also removes the packet delay variation introduced by the switching module of one or more devices. Since the packet delay variation introduced by the switching module is removed, the solution of the embodiment of the present application can be used to improve the accuracy of clock synchronization. The one or more devices mentioned here are part or all of the source device and the intermediate device.
在一些实施例中,若用于时钟同步的消息在转发过程中,源端设备和各个中间设备均执行图3所示的用于时钟同步的消息处理方法,则宿端设备在进行时钟同步时,可以去掉源端设备和所有中间设备的交换模块所引入的包时延变化量,从而有效提升时钟同步的精度。In some embodiments, if the message used for clock synchronization is in the forwarding process, the source device and each intermediate device both execute the message processing method for clock synchronization shown in FIG. , You can remove the packet delay variation introduced by the switching modules of the source device and all intermediate devices, thereby effectively improving the accuracy of clock synchronization.
在一些实施例中,第一设备可以包括多个功能模块,例如包括第一模块和第二模块,第一模块和第二模块之间可以通过光纤相连,或者通过光中继相连。当第一模块和第二模块通过光纤或者光中继相连时,若第一设备的第一模块接收到用于时钟同步的消息,而交换模块位于第二模块上,则第一设备可以将该用于时钟同步的消息通过光纤或者光中继发送给第二模块,由第二模块确定转发该用于时钟同步的消息的端口。在一些实施例中,第一设备可以用于传递与各种CBR业务对应的用于时钟同步的消息,CBR业务不同,第一设备接收到的用于时钟同步的消息的格式和传输速率也可能不同。而通过光纤或者光中继传输消息时,对消息的传输速率和消息格式也有一定的要求,例如,光纤或者光中继可以 以第一速率传输第一格式的消息。假设第一模块接收到的用于时钟同步的消息为与第一CBR业务对应的消息,则第一模块接收用于时钟同步的消息,对该时钟同步的消息进行转换,得到符合第一格式的消息,并通过第一速率利用光纤或者光中继将转换得到的时钟同步消息传输给第二模块。对于这种情况,前述第一消息可以是转换之后的消息。在一些实施例中,当第一消息为转换后的消息时,第一消息也可以被称作信元。相应的,对于这种情况,第二模块接收到该信元之后,可以对该信元进行逆转换,得到符合第一CBR业务要求的消息,并根据逆转换得到的消息确定转发第一消息的端口。In some embodiments, the first device may include multiple functional modules, for example, including a first module and a second module, and the first module and the second module may be connected through an optical fiber or connected through an optical relay. When the first module and the second module are connected by optical fiber or optical relay, if the first module of the first device receives a message for clock synchronization and the switching module is located on the second module, the first device can The message for clock synchronization is sent to the second module through an optical fiber or an optical relay, and the second module determines the port for forwarding the message for clock synchronization. In some embodiments, the first device may be used to transmit messages for clock synchronization corresponding to various CBR services. Unlike CBR services, the format and transmission rate of the message for clock synchronization received by the first device may also be possible. different. When messages are transmitted through optical fibers or optical relays, there are also certain requirements on the transmission rate and message format of the messages. For example, optical fibers or optical relays can transmit messages in the first format at the first rate. Assuming that the message for clock synchronization received by the first module is a message corresponding to the first CBR service, the first module receives the message for clock synchronization, converts the clock synchronization message, and obtains a message that conforms to the first format And transmit the converted clock synchronization message to the second module at the first rate using optical fiber or optical relay. In this case, the aforementioned first message may be a message after conversion. In some embodiments, when the first message is a converted message, the first message may also be referred to as an information element. Correspondingly, in this case, after the second module receives the cell, it can perform inverse conversion on the cell to obtain a message that meets the requirements of the first CBR service, and determine the forwarding of the first message based on the message obtained by the inverse conversion. port.
在本申请实施例中,S102中提及的端口为物理端口。具体地,第一设备可以包括一块或者多块板卡,一个板卡上可以包括多个物理端口。其中,板卡也可以被称为子卡,板卡可以分为支卡和线卡。交换模块可以位于线卡上。在一些实施例中,当第一消息是第一设备从第三设备处获取的消息时,第一设备可以通过第一板卡上的第一端口获取第一消息,相应的,由第一板卡上的时钟进行计数得到第一时间戳。而后,第一设备可以通过交换模块确定转发第一消息的端口,由交换模块所属的板卡上的时钟进行计数得到第二时间戳。交换模块可以位于第一板卡上,也可以位于不同于第一板卡的第二板卡上,本申请实施例不做具体限定。需要说明的是,当交换模块位于第二板卡上时,虽然获得第一时间戳和第二时间戳所使用的时钟位于不同的板卡上,但是这两个时钟均位于第一设备上,两个时钟的频率是同步的,因此,第二时间戳和第一时间戳的差值可以准确表示第一消息在交换模块的驻留时间。另外,转发第一消息的端口可以位于第二板卡上,也可以位于不同于第二板卡的第三板卡上,本申请实施例不做具体限定。In the embodiment of the present application, the port mentioned in S102 is a physical port. Specifically, the first device may include one or more boards, and one board may include multiple physical ports. Among them, the board card can also be called a daughter card, and the board card can be divided into a branch card and a line card. The switch module can be located on the line card. In some embodiments, when the first message is a message obtained by the first device from the third device, the first device can obtain the first message through the first port on the first board. Correspondingly, the first board The clock on the card counts to get the first time stamp. Then, the first device can determine the port for forwarding the first message through the switching module, and the second time stamp is obtained by counting the clock on the board to which the switching module belongs. The switching module may be located on the first board, or may be located on a second board different from the first board, which is not specifically limited in the embodiment of the present application. It should be noted that when the switching module is located on the second board, although the clocks used to obtain the first time stamp and the second time stamp are located on different boards, the two clocks are both located on the first device. The frequencies of the two clocks are synchronized. Therefore, the difference between the second time stamp and the first time stamp can accurately represent the residence time of the first message in the exchange module. In addition, the port for forwarding the first message may be located on the second board, or may be located on a third board different from the second board, which is not specifically limited in the embodiment of the present application.
可参见图4进行理解,图4为本申请实施例提供的一种第一设备的结构示意图。如图4所示,第一设备400包括板卡401,板卡402和板卡403,板卡401、板卡402和板卡403可以通过背板(图4中未示出)进行通信。其中,板卡401上包括端口401a和晶振401b,板卡402上包括交换模块402a和晶振402b,板卡403上包括端口403a和晶振403b,第一设备400通过端口401a获取第一消息,并利用晶振401b产生的时钟计数得到第一时间戳。第一设备400的交换模块402a确定转发第一消息的端口,并利用晶振402b产生的时钟计数得到第二时间戳。此处假设转发第一消息的端口为403a。第一设备400通过端口403a将第二消息发送给第二设备,晶振403b用于产生板卡403的工作时钟。在一些实施例中,板卡401、板卡402以及板卡403的工作时钟不一定是由晶振直接产生的,也可以是晶振间接产生的,还可以是其它实时时钟(realtime clock,RTC)产生的,此处只是为了方便理解而示出,其并不构成对本申请实施例的限定。It can be understood with reference to FIG. 4, which is a schematic structural diagram of a first device provided by an embodiment of the application. As shown in FIG. 4, the first device 400 includes a board 401, a board 402, and a board 403. The board 401, the board 402, and the board 403 can communicate through a backplane (not shown in FIG. 4). Among them, the board 401 includes a port 401a and a crystal oscillator 401b, the board 402 includes a switch module 402a and a crystal oscillator 402b, and the board 403 includes a port 403a and a crystal oscillator 403b. The first device 400 obtains the first message through the port 401a and uses The clock count generated by the crystal oscillator 401b obtains the first time stamp. The switching module 402a of the first device 400 determines the port for forwarding the first message, and uses the clock count generated by the crystal oscillator 402b to obtain the second time stamp. It is assumed here that the port for forwarding the first message is 403a. The first device 400 sends the second message to the second device through the port 403a, and the crystal oscillator 403b is used to generate the working clock of the board 403. In some embodiments, the working clocks of the board 401, the board 402, and the board 403 may not be directly generated by the crystal oscillator, but may also be generated indirectly by the crystal oscillator, or may be generated by other real-time clocks (RTC). Yes, it is shown here only for the convenience of understanding, and it does not constitute a limitation to the embodiments of the present application.
在一些实施例中,中间设备或者源端设备在执行前述S101和S102时,也会引入一定的包时延变化量。而引入的包时延变化量会降低时钟同步的精度。以下结合理论分析,说明前述S101和S102所引入的包时延变化量小于利用图3所示的方法而去掉的包时延变化量。故而上述方法提升时钟同步的精度理论可行。In some embodiments, the intermediate device or the source device may also introduce a certain amount of packet delay variation when performing the foregoing S101 and S102. The introduced packet delay variation will reduce the accuracy of clock synchronization. The following combined theoretical analysis shows that the packet delay variation introduced by S101 and S102 is smaller than the packet delay variation removed by the method shown in FIG. 3. Therefore, the above method is theoretically feasible to improve the accuracy of clock synchronization.
前述S101和S102之所以会引入包时延变化量,主要包括以下两个因素。The reason why the aforementioned S101 and S102 introduce the packet delay variation mainly includes the following two factors.
第一个因素为:设备间用于计数得到时间戳的时钟不同步,此处提及的设备包括用于传递用于时钟同步的消息的各个设备。第二个因素为:实时时钟计数得到时间戳存在一定 的误差,此处提及的实时时钟例如可以为晶振直接产生的时钟。The first factor is that the clocks used for counting to obtain the time stamp are not synchronized between the devices. The devices mentioned here include various devices used to transmit messages for clock synchronization. The second factor is: there is a certain error in the time stamp obtained from the real-time clock count. The real-time clock mentioned here can be, for example, a clock directly generated by a crystal oscillator.
关于第一个因素,需要说明的是,时间戳本质上为一个计数器,只有各个设备计数所使用的时钟一致,该时间戳才能表示时间。Regarding the first factor, it should be noted that the timestamp is essentially a counter, and the timestamp can represent time only if the clocks used by each device to count are consistent.
对于传递用于时钟同步的消息的第j台设备而言,将第j台设备记录的第一时间戳为TS1 j,记录的第二时间戳为TS2 j,则该用于时钟同步的消息在第j台设备的交换模块驻留的时间T stay_j可以通过如下公式(1)计算得到: For the j-th device that transmits a message for clock synchronization, the first time stamp recorded by the j-th device is TS1 j , and the second time stamp recorded by the j-th device is TS2 j , then the message for clock synchronization is The residence time T stay_j of the switching module of the j-th device can be calculated by the following formula (1):
T stay_j=TS2 j-TS1 j    公式(1) T stay_j = TS2 j- TS1 j formula (1)
假设该用于时钟同步的消息从源端设备传递到宿端设备的端到端时延为Delay e2e,其中端到端时延的单位为毫秒(millisecond,ms),则Delay e2e包含该消息在除宿端设备之外的各设备的交换模块的驻留时间、和设备间的光纤时延等等之和,因此,故该消息在除宿端设备之外的各设备的交换模块的驻留时间累加值小于端时延Delay e2e,如公式(2)所示。 Assuming that the end-to-end delay of the message used for clock synchronization from the source device to the sink device is Delay e2e , where the unit of the end-to-end delay is milliseconds (ms), then Delay e2e contains the message in The sum of the residence time of the switching module of each device except the sink device, and the optical fiber delay between the devices, etc. Therefore, the message resides in the switching module of each device except the sink device The time accumulated value is less than the terminal delay Delay e2e , as shown in formula (2).
Figure PCTCN2020136845-appb-000001
Figure PCTCN2020136845-appb-000001
其中,N为源端设备和中间设备的数量之和,例如,N等于20,表示源端设备将用于时钟同步的消息发送给宿端设备经过了19个中间设备的转发。Where N is the sum of the number of source-end devices and intermediate devices, for example, N is equal to 20, which means that the source-end device sends the message for clock synchronization to the sink-end device and has been forwarded by 19 intermediate devices.
对于第j台设备而言,计数得到TS1 j和TS2 j,受本地时钟影响。根据国际电联电信标准化部门(International Telecommunication Union Telecommunication Standardization Sector,ITU-T)G.813标准规定,一般情况下,第j台设备的时钟为三级时钟,设备间的时钟频率的最大频偏为foffset max,其中,最大频偏的单位为每百万单位(parts per million,ppm)可得到公式(3): For the jth device, TS1 j and TS2 j are counted, which are affected by the local clock. According to the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) G.813 standard, in general, the clock of the j-th device is a tertiary clock, and the maximum frequency deviation of the clock frequency between devices is foffset max , where the unit of the maximum frequency offset is parts per million (ppm), and formula (3) can be obtained:
-foffset max≤foffset j≤+foffset max    公式(3) -foffset max ≤foffset j ≤+foffset max formula (3)
故而第j台设备内,驻留时间T stay_j的变化量的最大值为可以通过如下公式(4)计算得到: Therefore, in the j-th device, the maximum value of the change in residence time T stay_j can be calculated by the following formula (4):
PDV j,max=2*foffset max×T stay_j(ns)    公式(4) PDV j,max = 2*foffset max ×T stay_j (ns) formula (4)
其中,PDV j,max的单位为纳秒(nanosecond,ns)。 Among them, the unit of PDV j,max is nanosecond (nanosecond, ns).
对于长链组网的场景,该用于时钟同步的消息经过N台设备转发之后到的宿端设备,则长链组网的端到端的时延变化量PDV e2e可以通过如下公式(5)表示: For the long-chain networking scenario, the message used for clock synchronization is forwarded by N devices to the sink device, then the end-to-end delay variation PDV e2e of the long-chain networking can be expressed by the following formula (5) :
Figure PCTCN2020136845-appb-000002
Figure PCTCN2020136845-appb-000002
结合公式(2)、公式(3)和公式(5)可知:Combining formula (2), formula (3) and formula (5), we can know:
Figure PCTCN2020136845-appb-000003
Figure PCTCN2020136845-appb-000003
即:which is:
PDV e2e≤2*foffset max×Delay e2e(ns)    公式(7) PDV e2e ≤2*foffset max × Delay e2e (ns) formula (7)
对于OTN网络,长链组网的端到端时延较小,例如Delay e2e≤1ms,而设备间的时钟频率的最大频偏foffset max为4.6ppm,即:-4.6ppm≤foffset j≤+4.6ppm。 For OTN networks, the end-to-end delay of long-chain networking is small, for example, Delay e2e ≤1ms, and the maximum frequency deviation of the clock frequency between devices foffset max is 4.6ppm, that is: -4.6ppm≤foffset j ≤+4.6 ppm.
则根据公式(7)可知,PDV e2e≤2*4.6ppm×1ms=9.2ns。 According to formula (7), it can be known that PDV e2e ≤ 2*4.6ppm×1ms=9.2ns.
关于第二个因素实时时钟计数得到时间戳存在一定的误差,需要说明的是,假设用于 记录第一时间戳和第二时间戳的时钟的频率是F rtc,其中,频率的单位是兆赫兹(MHz),则计算时间戳的误差为±1000/F rtc(ns),一台设备计算时间戳引入的误差最大为1000/F rtc(ns),假设前述N等于20,则第二个因素引入的端到端时延变化量可以通过如下公式(8)表示: Regarding the second factor, there is a certain error in the time stamp counted by the real-time clock. It should be noted that the frequency of the clock used to record the first time stamp and the second time stamp is F rtc , where the unit of frequency is megahertz (MHz), the error of calculating the timestamp is ±1000/F rtc (ns), and the maximum error introduced by a device in calculating the timestamp is 1000/F rtc (ns). Assuming that the aforementioned N is equal to 20, the second factor The introduced end-to-end delay variation can be expressed by the following formula (8):
PDV e2e_ts≤20000/F rtc(ns)    公式(8) PDV e2e_ts ≤20000/F rtc (ns) formula (8)
假设F rtc等于155.52MHz,则计算时间戳的误差为+/-6.43ns,一台设备计算时间戳引入的误差最大为12.86ns,若N等于20,则PDV e2e_ts≤257.2ns,其中,257.2=12.86*20。 Assuming that F rtc is equal to 155.52MHz, the error of calculating the timestamp is +/-6.43ns, and the maximum error introduced by a device in calculating the timestamp is 12.86ns. If N is equal to 20, then PDV e2e_ts ≤257.2ns, where 257.2= 12.86*20.
综合以上两个因素,利用图3所示的方案所引入的包时延变化量,理论上的最大值为Combining the above two factors, using the packet delay variation introduced by the scheme shown in Figure 3, the theoretical maximum value is
PDV e2e,max=2*foffset max×Delay e2e+20000/F rtc(ns) PDV e2e,max = 2*foffset max × Delay e2e +20000/F rtc (ns)
在一个实施例中,PDV e2e,max=257.2ns+9.2ns=266.4ns。 In one embodiment, PDV e2e,max =257.2ns+9.2ns=266.4ns.
而图3所示的方法所消除的包实验变化量一般可以达到微秒级别,例如达到1微秒以上,由此可见,利用本申请实施例的方案,虽然引入了额外的包时延变化量,例如引入了266.4ns包时延变化量,但是消除的包时延变化量远大于引入的包时延变化量,从而提升了时钟同步的精度。However, the packet experiment variation eliminated by the method shown in FIG. 3 can generally reach the microsecond level, for example, up to 1 microsecond or more. It can be seen that using the solution of the embodiment of the present application, although an additional packet delay variation is introduced For example, the 266.4ns packet delay variation is introduced, but the eliminated packet delay variation is much larger than the introduced packet delay variation, thereby improving the accuracy of clock synchronization.
基于以上实施例提供的用于时钟同步的消息处理方法和时钟同步方法,本申请实施例还提供了对应的装置,以下结合附图介绍该装置。Based on the message processing method and clock synchronization method for clock synchronization provided in the above embodiments, the embodiment of the present application also provides a corresponding device, which is described below with reference to the accompanying drawings.
参见图5,图5为本申请实施例提供的一种用于时钟同步的消息处理装置的结构示意图。图5所示的用于时钟同步的消息处理装置500,可以用于执行图3所示的时钟同步方法。具体地,该用于时钟同步的消息处理装置500可以包括获取单元501、记录单元502、确定单元503、生成单元504和发送单元505。Referring to FIG. 5, FIG. 5 is a schematic structural diagram of a message processing apparatus for clock synchronization provided by an embodiment of the application. The message processing device 500 for clock synchronization shown in FIG. 5 can be used to execute the clock synchronization method shown in FIG. 3. Specifically, the message processing apparatus 500 for clock synchronization may include an acquiring unit 501, a recording unit 502, a determining unit 503, a generating unit 504, and a sending unit 505.
获取单元501用于获取第一消息;记录单元502用于记录用于指示获取所述第一消息的时刻的第一时间戳;确定单元503用于根据所述第一消息确定转发所述第一消息的端口;所述记录单元502还用于记录用于指示确定所述端口的时刻的第二时间戳;生成单元504用于根据所述第一消息生成包括第三时间戳的第二消息,所述第三时间戳根据所述第二时间戳和所述第一时间戳的差值确定;发送单元505用于将所述第二消息发送给第二设备。The obtaining unit 501 is used to obtain a first message; the recording unit 502 is used to record a first time stamp indicating the moment when the first message is obtained; and the determining unit 503 is used to determine to forward the first message according to the first message. The port of the message; the recording unit 502 is further configured to record a second time stamp used to indicate the time when the port is determined; the generating unit 504 is configured to generate a second message including a third time stamp according to the first message, The third time stamp is determined according to the difference between the second time stamp and the first time stamp; the sending unit 505 is configured to send the second message to the second device.
在一种可能的实现方式中,所述获取单元501具体用于生成所述第一消息;所述记录单元502具体用于记录所述用于指示生成所述第一消息的时刻的第一时间戳。In a possible implementation manner, the acquiring unit 501 is specifically configured to generate the first message; the recording unit 502 is specifically configured to record the first time indicating the moment when the first message is generated stamp.
在一种可能的实现方式中,所述获取单元501具体用于获取来自第三设备的所述第一消息,所述第一消息中携带第四时间戳;所述第三时间戳等于所述差值与所述第四时间戳之和。In a possible implementation manner, the acquiring unit 501 is specifically configured to acquire the first message from a third device, and the first message carries a fourth timestamp; the third timestamp is equal to the The sum of the difference and the fourth time stamp.
由于所述装置500是与以上实施例描述的图3对应的用于时钟同步的消息处理方法对应的装置,所述装置500的各个单元的具体实现,均与以上方法实施例为同一构思,因此,关于所述装置500的各个单元的具体实现,可以参考以上方法实施例关于图3对应的用于时钟同步的消息处理方法的描述部分,此处不再赘述。Since the device 500 is a device corresponding to the message processing method for clock synchronization in FIG. 3 described in the above embodiment, the specific implementation of each unit of the device 500 is based on the same idea as the above method embodiment, so For the specific implementation of each unit of the apparatus 500, reference may be made to the description part of the above method embodiment about the message processing method for clock synchronization corresponding to FIG. 3, which is not repeated here.
参见图6,图6为本申请实施例提供的一种时钟同步装置的结构示意图。图6所示的时钟同步装置600,可以用于执行作为宿端设备的第二设备执行的步骤。具体地,该时钟 同步装置600可以包括获取单元601、记录单元602和同步单元603。Refer to FIG. 6, which is a schematic structural diagram of a clock synchronization device provided by an embodiment of the application. The clock synchronization apparatus 600 shown in FIG. 6 may be used to execute the steps performed by the second device as the sink device. Specifically, the clock synchronization device 600 may include an acquiring unit 601, a recording unit 602, and a synchronization unit 603.
获取单元601用于获取来自第一设备的第二消息,所述第二消息中包括第三时间戳,所述第三时间戳根据图5所示的装置500确定;记录单元602用于记录用于指示获取所述第二消息的时刻的第五时间戳;同步单元603用于根据所述第五时间戳和所述第三时间戳的差值进行时钟同步。The obtaining unit 601 is used for obtaining a second message from the first device, and the second message includes a third time stamp, which is determined according to the apparatus 500 shown in FIG. 5; the recording unit 602 is used for recording At the fifth time stamp indicating the time when the second message is acquired; the synchronization unit 603 is configured to perform clock synchronization according to the difference between the fifth time stamp and the third time stamp.
由于所述装置600是与以上实施例描述的作为宿端设备的第二设备执行的步骤对应的装置,所述装置600的各个单元的具体实现,均与以上方法实施例为同一构思,因此,关于所述装置600的各个单元的具体实现,可以参考以上方法实施例关于作为宿端设备的第二设备执行的步骤的描述部分,此处不再赘述。Since the device 600 is a device corresponding to the steps performed by the second device as the sink device described in the above embodiment, the specific implementation of each unit of the device 600 is based on the same idea as the above method embodiment, therefore, Regarding the specific implementation of each unit of the apparatus 600, reference may be made to the description part of the steps performed by the second device as the sink device in the above method embodiments, which will not be repeated here.
需要说明的是,前述提及的用于时钟同步的消息处理装置500和时钟同步装置600,其硬件结构可以为如图7所示的结构,图7为本申请实施例提供的一种设备的结构示意图。It should be noted that the aforementioned message processing device 500 and clock synchronization device 600 for clock synchronization may have a hardware structure as shown in FIG. 7. FIG. 7 is a diagram of a device provided by an embodiment of the application. Schematic.
请参阅图7所示,设备700包括:处理器710、通信接口720和和存储器730。其中设备700中的处理器710的数量可以一个或多个,图7中以一个处理器为例。本申请实施例中,处理器710、通信接口720和存储器730可通过总线系统或其它方式连接,其中,图7中以通过总线系统740连接为例。Please refer to FIG. 7, the device 700 includes a processor 710, a communication interface 720, and a memory 730. The number of processors 710 in the device 700 may be one or more. One processor is taken as an example in FIG. 7. In the embodiment of the present application, the processor 710, the communication interface 720, and the memory 730 may be connected through a bus system or other methods. In FIG. 7, the connection through the bus system 740 is taken as an example.
处理器710可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器710还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 710 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 710 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
存储器730可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(random-access memory,RAM);存储器730也可以包括非易失性存储器(英文:non-volatile memory),例如快闪存储器(英文:flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器730还可以包括上述种类的存储器的组合。当设备700对应前述用于时钟同步的消息处理装置500时,存储器730例如可以存储第一时间戳、第二时间戳和第三时间戳;当设备700对应图6所示的时钟同步装置600时,存储器730例如可以存储第五时间戳和第三时间戳。The memory 730 may include a volatile memory (English: volatile memory), such as random-access memory (RAM); the memory 730 may also include a non-volatile memory (English: non-volatile memory), such as fast Flash memory (English: flash memory), hard disk drive (HDD) or solid-state drive (SSD); the memory 730 may also include a combination of the foregoing types of memory. When the device 700 corresponds to the aforementioned message processing apparatus 500 for clock synchronization, the memory 730 may store, for example, a first time stamp, a second time stamp, and a third time stamp; when the device 700 corresponds to the clock synchronization apparatus 600 shown in FIG. 6 The memory 730 may store the fifth time stamp and the third time stamp, for example.
可选地,存储器730存储有操作系统和程序、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,程序可包括各种操作指令,用于实现各种操作。操作系统可包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。处理器710可以读取存储器730中的程序,实现本申请实施例提供的用于时钟同步的消息处理方法或者时钟同步方法。Optionally, the memory 730 stores an operating system and a program, an executable module or a data structure, or a subset of them, or an extended set of them, where the program may include various operation instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 710 can read the program in the memory 730 to implement the message processing method or the clock synchronization method for clock synchronization provided in the embodiments of the present application.
总线系统740可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线系统740可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus system 740 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus system 740 can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
本申请实施例还提供了一种计算机可读存储介质,包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上实施例提供的用于时钟同步的消息处理方法或者时钟同步方法。The embodiments of the present application also provide a computer-readable storage medium, including instructions or computer programs, which when run on a computer, cause the computer to execute the message processing method or the clock synchronization method for clock synchronization provided in the above embodiments.
本申请实施例还提供了一种包含指令或计算机程序的计算机程序产品,当其在计算机上运行时,使得计算机执行以上实施例提供的用于时钟同步的消息处理方法或者时钟同步方法。The embodiments of the present application also provide a computer program product containing instructions or computer programs, which when run on a computer, cause the computer to execute the message processing method or the clock synchronization method for clock synchronization provided in the above embodiments.
本申请中提到的装置或设备,可以是网络设备,比如交换机、路由器,也可以是服务器,也可以是网络设备或服务器的一部分。在一些实施例中,本申请的装置或设备,也可以是部署在设备或网络中的功能模块。The device or device mentioned in this application may be a network device, such as a switch, a router, a server, or a part of a network device or server. In some embodiments, the device or device of the present application may also be a functional module deployed in the device or network.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, without having to use To describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in a sequence other than the content illustrated or described herein. In addition, the terms "including" and "having" and any variations of them are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those clearly listed. Those steps or units may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or equipment.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the above-described system, device, and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑业务划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of units is only a logical business division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各业务单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件业务单元的形式实现。In addition, the business units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized in the form of hardware or software business unit.
集成的单元如果以软件业务单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码 的介质。If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的业务可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些业务存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should be aware that, in one or more of the foregoing examples, the services described in the present invention can be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these services can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已。The above specific implementations further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementations of the present invention.
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Above, the above embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, a person of ordinary skill in the art should understand that it can still implement the foregoing various implementations. The technical solutions described in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (38)

  1. 一种用于时钟同步的消息处理方法,其特征在于,包括:A message processing method for clock synchronization, which is characterized in that it comprises:
    第一设备获取第一消息,并记录用于指示所述第一设备获取所述第一消息的时刻的第一时间戳;The first device obtains the first message, and records a first time stamp used to indicate the moment when the first device obtains the first message;
    所述第一设备根据所述第一消息确定转发所述第一消息的端口,并记录用于指示所述第一设备确定所述端口的时刻的第二时间戳;Determining, by the first device, a port for forwarding the first message according to the first message, and recording a second time stamp used to indicate the moment when the first device determines the port;
    所述第一设备根据所述第一消息生成包括第三时间戳的第二消息,并将所述第二消息发送给第二设备,所述第三时间戳根据所述第二时间戳和所述第一时间戳的差值确定。The first device generates a second message including a third time stamp according to the first message, and sends the second message to the second device, and the third time stamp is based on the second time stamp and the time stamp. The difference of the first time stamp is determined.
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备获取第一消息,并记录用于指示所述第一设备获取所述第一消息的时刻的第一时间戳,包括:The method according to claim 1, wherein the first device acquiring the first message and recording a first timestamp indicating the moment when the first device acquires the first message comprises:
    所述第一设备生成所述第一消息,并记录所述用于指示所述第一设备生成所述第一消息的时刻的第一时间戳。The first device generates the first message, and records the first timestamp indicating the moment when the first device generates the first message.
  3. 根据权利要求1所述的方法,其特征在于,所述第一设备获取第一消息,包括:The method according to claim 1, wherein the obtaining of the first message by the first device comprises:
    所述第一设备获取来自第三设备的所述第一消息,所述第一消息中携带第四时间戳;Acquiring, by the first device, the first message from a third device, where the first message carries a fourth timestamp;
    所述第三时间戳等于所述差值与所述第四时间戳之和。The third time stamp is equal to the sum of the difference and the fourth time stamp.
  4. 根据权利要求1-3中任一所述的方法,其特征在于,所述第一设备为利用电路仿真业务自适应时钟恢复CESACR方法进行时钟传递的源端设备或者中间设备。The method according to any one of claims 1 to 3, wherein the first device is a source device or an intermediate device that uses a circuit emulation service adaptive clock recovery CESACR method for clock transfer.
  5. 根据权利要求1-3中任一所述的方法,其特征在于,所述第一设备为利用电路仿真业务自适应时钟恢复CESACR方法进行时钟传递的源端设备,所述第一消息为所述第一设备从作为时钟源的设备处接收的用于时钟同步的消息;或The method according to any one of claims 1-3, wherein the first device is a source device that uses a circuit emulation service adaptive clock recovery CESACR method for clock transfer, and the first message is the The message for clock synchronization received by the first device from the device as the clock source; or
    所述第一设备为利用CESACR方法进行时钟传递的中间设备,所述第一消息为所述第一设备从第三设备处接收的用于时钟同步的消息,其中所述第一设备为所述第三设备的下一跳设备。The first device is an intermediate device that uses the CESACR method for clock transfer, and the first message is a message for clock synchronization received by the first device from a third device, and the first device is the The next hop device of the third device.
  6. 根据权利要求1-5中任一所述的方法,其特征在于,所述第一消息包括用于携带时间戳数据的字段。The method according to any one of claims 1-5, wherein the first message includes a field for carrying time stamp data.
  7. 根据权利要求1-6中任一所述的方法,其特征在于,所述第一设备为光传送网OTN中的设备。The method according to any one of claims 1-6, wherein the first device is a device in an optical transport network (OTN).
  8. 根据权利要求1-7中任一所述的方法,其特征在于,所述第一设备为处理恒定比特率CBR业务的设备。The method according to any one of claims 1-7, wherein the first device is a device that processes a constant bit rate CBR service.
  9. 根据权利要求1-8中任一所述的方法,其特征在于,通过自适应时钟恢复ACR算法实现所述第一设备与所述第二设备之间的时钟同步。8. The method according to any one of claims 1-8, wherein the clock synchronization between the first device and the second device is achieved through an adaptive clock recovery ACR algorithm.
  10. 一种时钟同步方法,其特征在于,包括:A clock synchronization method is characterized in that it includes:
    第二设备获取来自第一设备的第二消息,并记录用于指示所述第二设备获取所述第二消息的时刻的第五时间戳,所述第二消息中包括第三时间戳,所述第三时间戳根据权利要求1-9任意一项所述的方法确定;The second device obtains the second message from the first device, and records a fifth timestamp indicating the moment when the second device obtains the second message, the second message includes the third timestamp, so The third time stamp is determined according to the method according to any one of claims 1-9;
    所述第二设备根据所述第五时间戳和所述第三时间戳的差值进行时钟同步。The second device performs clock synchronization according to the difference between the fifth time stamp and the third time stamp.
  11. 根据权利要求10所述的方法,其特征在于,所述第二设备通过自适应时钟恢复ACR算法实现所述第一设备与所述第二设备之间的时钟同步。The method according to claim 10, wherein the second device implements clock synchronization between the first device and the second device through an adaptive clock recovery ACR algorithm.
  12. 根据权利要求11所述的方法,其特征在于,所述ACR算法的输入值为所述第五时间戳与所述第三时间戳的差值。The method according to claim 11, wherein the input value of the ACR algorithm is the difference between the fifth time stamp and the third time stamp.
  13. 根据权利要求10-12中任一所述的方法,其特征在于,所述第二设备为宿端设备。The method according to any one of claims 10-12, wherein the second device is a sink device.
  14. 一种用于时钟同步的消息处理装置,其特征在于,包括:A message processing device for clock synchronization, which is characterized in that it comprises:
    获取单元,用于获取第一消息;The obtaining unit is used to obtain the first message;
    记录单元,用于记录用于指示获取所述第一消息的时刻的第一时间戳;A recording unit, configured to record a first time stamp used to indicate the moment when the first message is acquired;
    确定单元,用于根据所述第一消息确定转发所述第一消息的端口;A determining unit, configured to determine a port for forwarding the first message according to the first message;
    所述记录单元,还用于记录用于指示确定所述端口的时刻的第二时间戳;The recording unit is further configured to record a second time stamp used to indicate the time when the port is determined;
    生成单元,用于根据所述第一消息生成包括第三时间戳的第二消息,所述第三时间戳根据所述第二时间戳和所述第一时间戳的差值确定;A generating unit, configured to generate a second message including a third time stamp according to the first message, the third time stamp being determined according to the difference between the second time stamp and the first time stamp;
    发送单元,用于将所述第二消息发送给第二设备。The sending unit is configured to send the second message to the second device.
  15. 根据权利要求14所述的装置,其特征在于,所述获取单元,具体用于:生成所述第一消息;The device according to claim 14, wherein the acquiring unit is specifically configured to: generate the first message;
    所述记录单元,具体用于:记录所述用于指示生成所述第一消息的时刻的第一时间戳。The recording unit is specifically configured to record the first time stamp used to indicate the moment when the first message is generated.
  16. 根据权利要求14所述的装置,其特征在于,所述获取单元,具体用于:The device according to claim 14, wherein the acquiring unit is specifically configured to:
    获取来自第三设备的所述第一消息,所述第一消息中携带第四时间戳;Acquiring the first message from a third device, where the first message carries a fourth timestamp;
    所述第三时间戳等于所述差值与所述第四时间戳之和。The third time stamp is equal to the sum of the difference and the fourth time stamp.
  17. 根据权利要求14-16中任一所述的装置,其特征在于,该装置为利用电路仿真业务自适应时钟恢复CESACR方法进行时钟传递的源端设备或者中间设备。The device according to any one of claims 14-16, wherein the device is a source device or an intermediate device that uses a circuit emulation service adaptive clock recovery CESACR method for clock transfer.
  18. 根据权利要求14-17中任一所述的装置,其特征在于,所述装置为利用电路仿真业务自适应时钟恢复CESACR方法进行时钟传递的源端设备,所述第一消息为所述第一设备从作为时钟源的设备处接收的用于时钟同步的消息;或The device according to any one of claims 14-17, wherein the device is a source device that uses a circuit emulation service adaptive clock recovery CESACR method for clock transfer, and the first message is the first The message used for clock synchronization received by the device from the device as the clock source; or
    所述装置为利用CESACR方法进行时钟传递的中间设备,所述第一消息为所述装置从第三设备处接收的用于时钟同步的消息,其中所述装置为所述第三设备的下一跳设备。The device is an intermediate device that uses the CESACR method for clock transfer, the first message is a message for clock synchronization received by the device from a third device, and the device is the next device of the third device. Jump equipment.
  19. 根据权利要求14-18中任一所述的装置,其特征在于,所述装置为光传送网OTN中的设备。The device according to any one of claims 14-18, wherein the device is a device in an optical transport network (OTN).
  20. 根据权利要求14-19中任一所述的装置,其特征在于,所述装置为处理恒定比特率CBR业务的设备。The device according to any one of claims 14-19, wherein the device is a device for processing a constant bit rate CBR service.
  21. 一种时钟同步装置,其特征在于,包括:A clock synchronization device, characterized in that it comprises:
    获取单元,用于获取来自第一设备的第二消息,所述第二消息中包括第三时间戳,所述第三时间戳根据权利要求14-20任意一项所述的装置确定;An obtaining unit, configured to obtain a second message from the first device, the second message includes a third time stamp, and the third time stamp is determined according to the apparatus according to any one of claims 14-20;
    记录单元,用于记录用于指示获取所述第二消息的时刻的第五时间戳;A recording unit, configured to record a fifth timestamp used to indicate the moment when the second message is acquired;
    同步单元,用于根据所述第五时间戳和所述第三时间戳的差值进行时钟同步。The synchronization unit is configured to perform clock synchronization according to the difference between the fifth time stamp and the third time stamp.
  22. 根据权利要求21所述的装置,其特征在于,所述装置通过自适应时钟恢复ACR算法实现所述第一设备与所述装置之间的时钟同步。The device according to claim 21, wherein the device implements clock synchronization between the first device and the device through an adaptive clock recovery ACR algorithm.
  23. 根据权利要求22所述的装置,其特征在于,所述ACR算法的输入值为所述第五时间戳与所述第三时间戳的差值。The device according to claim 22, wherein the input value of the ACR algorithm is the difference between the fifth time stamp and the third time stamp.
  24. 根据权利要求21-23中任一所述的装置,其特征在于,所述装置为宿端设备。The device according to any one of claims 21-23, wherein the device is a sink device.
  25. 一种处理消息的方法,其特征在于,包括:A method for processing messages, characterized in that it comprises:
    获取用于指示获取到第一消息的时刻的第一时间戳;Acquiring a first timestamp used to indicate the moment when the first message is acquired;
    根据所述第一消息确定转发所述第一消息的端口,获取用于指示确定所述端口的时刻的第二时间戳;Determining a port for forwarding the first message according to the first message, and acquiring a second timestamp indicating the time when the port is determined;
    生成第二消息,所述第二消息包括第三时间戳,所述第三时间戳与所述第二时间戳和所述第一时间戳的差值有关。A second message is generated, the second message includes a third timestamp, and the third timestamp is related to the difference between the second timestamp and the first timestamp.
  26. 根据权利要求25所述的方法,其特征在于,所述获取所述第一时间戳,包括:生成所述第一消息,并获取所述用于指示生成所述第一消息的时刻的第一时间戳。The method according to claim 25, wherein said obtaining said first timestamp comprises: generating said first message, and obtaining said first message indicating the moment when said first message is generated. Timestamp.
  27. 根据权利要求25所述的方法,其特征在于,所述获取所述第一时间戳,包括:接收所述第一消息,所述第一消息包括第四时间戳,所述第三时间戳等于所述差值与所述第四时间戳之和。The method according to claim 25, wherein said obtaining said first timestamp comprises: receiving said first message, said first message includes a fourth timestamp, and said third timestamp is equal to The sum of the difference and the fourth time stamp.
  28. 根据权利要求25-27中任一所述的方法,其特征在于,所述方法由利用电路仿真业务自适应时钟恢复CESACR方法进行时钟传递的源端设备或者中间设备执行。The method according to any one of claims 25-27, wherein the method is executed by a source device or an intermediate device that uses a circuit emulation service adaptive clock recovery CESACR method for clock transfer.
  29. 根据权利要求25-27中任一所述的方法,其特征在于,所述方法由利用电路仿真业务自适应时钟恢复CESACR方法进行时钟传递的源端设备执行,所述第一消息为所述源端设备从作为时钟源的设备处接收的用于时钟同步的消息;或The method according to any one of claims 25-27, wherein the method is executed by a source device that uses a circuit emulation service adaptive clock recovery CESACR method for clock transfer, and the first message is the source The message used for clock synchronization received by the end device from the device as the clock source; or
    所述方法由利用CESACR方法进行时钟传递的中间设备执行,所述第一消息为所述中间设备从第三设备处接收的用于时钟同步的消息,其中所述中间设备为所述第三设备的下一跳设备。The method is executed by an intermediate device that uses the CESACR method for clock transfer, and the first message is a message for clock synchronization received by the intermediate device from a third device, where the intermediate device is the third device The next hop device.
  30. 根据权利要求25-29中任一所述的方法,其特征在于,所述第一消息包括用于携带时间戳数据的字段。The method according to any one of claims 25-29, wherein the first message includes a field for carrying time stamp data.
  31. 根据权利要求25-29中任一所述的方法,其特征在于,所述方法由光传送网OTN中的设备执行。The method according to any one of claims 25-29, wherein the method is executed by a device in an optical transport network (OTN).
  32. 根据权利要求25-31中任一所述的方法,其特征在于,所述方法由处理恒定比特率CBR业务的设备执行。The method according to any one of claims 25-31, wherein the method is executed by a device that processes a constant bit rate CBR service.
  33. 根据权利要求25-32中任一所述的方法,其特征在于,通过自适应时钟恢复ACR算法实现设备之间的时钟同步。The method according to any one of claims 25-32, characterized in that the clock synchronization between devices is achieved through an adaptive clock recovery ACR algorithm.
  34. 一种设备,其特征在于,包括:处理器,A device, characterized by comprising: a processor,
    所述处理器,用于执行指令或计算机程序,执行权利要求1-13和25-33中任意一项所述的方法。The processor is configured to execute instructions or computer programs, and execute the method described in any one of claims 1-13 and 25-33.
  35. 根据权利要求34所述的设备,其特征在于,还包括存储器,所述存储器用于存储所述指令或计算机程序。The device according to claim 34, further comprising a memory, and the memory is configured to store the instruction or the computer program.
  36. 根据权利要求34或35所述的设备,其特征在于,所述设备还包括通信接口。The device according to claim 34 or 35, wherein the device further comprises a communication interface.
  37. 一种计算机可读存储介质,其特征在于,包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上权利要求1-13和25-33中任意一项所述的方法。A computer-readable storage medium, characterized by comprising instructions or computer programs, which when run on a computer, causes the computer to execute the method described in any one of claims 1-13 and 25-33.
  38. 一种计算机程序产品,其特征在于,包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上权利要求1-13和25-33中任意一项所述的方法。A computer program product, characterized by comprising instructions or computer programs, which when run on a computer, causes the computer to execute the method described in any one of claims 1-13 and 25-33.
PCT/CN2020/136845 2019-12-16 2020-12-16 Message processing method and apparatus for clock synchronization, and clock synchronization method and apparatus WO2021121275A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201911295200 2019-12-16
CN201911295200.3 2019-12-16
CN202010075071.3 2020-01-22
CN202010075071.3A CN112994819B (en) 2019-12-16 2020-01-22 Message processing method for clock synchronization, clock synchronization method and device

Publications (1)

Publication Number Publication Date
WO2021121275A1 true WO2021121275A1 (en) 2021-06-24

Family

ID=76344141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/136845 WO2021121275A1 (en) 2019-12-16 2020-12-16 Message processing method and apparatus for clock synchronization, and clock synchronization method and apparatus

Country Status (2)

Country Link
CN (1) CN112994819B (en)
WO (1) WO2021121275A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172915A (en) * 2021-11-05 2022-03-11 中汽创智科技有限公司 Message synchronization method, automatic driving system, storage medium and electronic equipment
CN115022204A (en) * 2022-05-26 2022-09-06 阿里巴巴(中国)有限公司 RTC transmission delay detection method, device and equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114554237B (en) * 2022-02-18 2023-12-26 北京有竹居网络技术有限公司 Information processing method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140247839A1 (en) * 2013-01-17 2014-09-04 Paul Kingsley Time synchronization in distributed network testing equipment
CN104767582A (en) * 2014-01-07 2015-07-08 艾默生网络能源有限公司 Ethernet synchronization method, device and system
CN108449228A (en) * 2018-03-05 2018-08-24 新华三技术有限公司 Message processing method and the network equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2392588A (en) * 2002-08-24 2004-03-03 Zarlink Semiconductor Ltd Adaptive TDM clock recovery using timestamps
US8462819B2 (en) * 2010-01-06 2013-06-11 Lsi Corporation Adaptive clock recovery with step-delay pre-compensation
EP2487819B1 (en) * 2011-02-10 2015-08-05 Alcatel Lucent Network element for a packet-switched network
CN102833061B (en) * 2012-08-31 2016-02-24 北京东土科技股份有限公司 Based on method and the node of the raising clock accuracy of seamless redundant looped network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140247839A1 (en) * 2013-01-17 2014-09-04 Paul Kingsley Time synchronization in distributed network testing equipment
CN104767582A (en) * 2014-01-07 2015-07-08 艾默生网络能源有限公司 Ethernet synchronization method, device and system
CN108449228A (en) * 2018-03-05 2018-08-24 新华三技术有限公司 Message processing method and the network equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MAEGAWA RYUICHIRO; MATSUI DAIKI; YAMASAKI YASUHIRO; OHSAKI HIROYUKI: "A Discrete Model of IEEE 1588-2008 Precision Time Protocol with Clock Servo using PI Controller", 2019 IEEE 43RD ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), IEEE, vol. 2, 15 July 2019 (2019-07-15), pages 531 - 536, XP033610176, ISBN: 978-1-7281-2607-4, DOI: 10.1109/COMPSAC.2019.10261 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172915A (en) * 2021-11-05 2022-03-11 中汽创智科技有限公司 Message synchronization method, automatic driving system, storage medium and electronic equipment
CN114172915B (en) * 2021-11-05 2023-10-31 中汽创智科技有限公司 Message synchronization method, automatic driving system, storage medium and electronic equipment
CN115022204A (en) * 2022-05-26 2022-09-06 阿里巴巴(中国)有限公司 RTC transmission delay detection method, device and equipment
CN115022204B (en) * 2022-05-26 2023-12-05 阿里巴巴(中国)有限公司 RTC transmission delay detection method, device and equipment

Also Published As

Publication number Publication date
CN112994819B (en) 2023-02-03
CN112994819A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
WO2021121275A1 (en) Message processing method and apparatus for clock synchronization, and clock synchronization method and apparatus
US11095384B2 (en) Re-timing a packetized radio flow to clean noise induced by packet delay variation of a packet network
US7079554B2 (en) System and method for synchronizing between communication terminals of asynchronous packets networks
KR100567326B1 (en) Apparatus for switching and transferring SONET/SDH, PDH, Ethernet signals and method thereof
EP2430784B1 (en) Network timing distribution and synchronization using virtual network delays
CN106162860B (en) Time synchronization method and system, and network device
KR101651166B1 (en) Apparatus and method for synchronized networks
US7760625B2 (en) Exchange node and exchange node control method
GB2399263A (en) Clock synchronisation over a packet network
US10355799B2 (en) Pseudowire clock recovery
WO2011140945A1 (en) Service data transmission method and apparatus
JP2013030835A5 (en)
EP2630752B1 (en) Layer one path delay compensation
US8761207B2 (en) System and method for advanced adaptive pseudowire
WO2020259261A1 (en) Message processing method and device
CN100393056C (en) E1 emulate system
KR20040052921A (en) Clock synchronizer for distributed traffic control
Mallela et al. Building a 1588 system solution—Key learnings
WO2021073570A1 (en) Communication method, apparatus and system
WO2016187781A1 (en) Packet processing method and apparatus
WO2024067520A1 (en) Network delay or jitter processing method and apparatus, and communication device
Cottrell pathchirp: Efficient available bandwidth estimation for network paths
US20230388252A1 (en) Providing high assurance of end-to-end cpri circuit in a high jitter packet based fronthaul network
WO2022000234A1 (en) Communication method and related apparatus
Gringeri et al. Optimizing transport systems to integrate TDM and packet services

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20901971

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20901971

Country of ref document: EP

Kind code of ref document: A1