WO2019149280A1 - Method for generating synchronization message, synchronization apparatus, and computer readable storage medium - Google Patents

Method for generating synchronization message, synchronization apparatus, and computer readable storage medium Download PDF

Info

Publication number
WO2019149280A1
WO2019149280A1 PCT/CN2019/074550 CN2019074550W WO2019149280A1 WO 2019149280 A1 WO2019149280 A1 WO 2019149280A1 CN 2019074550 W CN2019074550 W CN 2019074550W WO 2019149280 A1 WO2019149280 A1 WO 2019149280A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
synchronization
sync message
time
sync
Prior art date
Application number
PCT/CN2019/074550
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 WO2019149280A1 publication Critical patent/WO2019149280A1/en

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method for generating a synchronous message, a synchronization device, and a computer readable storage medium.
  • PTP Precision Time Protoco1
  • PTP is a network time synchronization protocol with sub-microsecond time synchronization performance.
  • the PTP protocol includes two-step and two-step PTP protocol standards. Some current communication network devices are limited by hardware and/or software, and cannot be time synchronized according to the two-step PTP protocol standard.
  • the timestamps specified by the two-step PTP protocol standard are obtained by other means, and are passed according to timestamps.
  • the time synchronization calculation formula specified by the two-step PTP protocol standard performs time synchronization. Therefore, the two-step PTP protocol standard is not widely applicable to devices in communication networks.
  • the technical problem to be solved by the present invention is that some communication network devices in the prior art cannot carry time synchronization information in the Followup message according to the two-step PTP protocol standard.
  • the technical solution adopted by the present invention is to provide a method for generating a synchronous message, including: when receiving a synchronous Sync message, setting identification information of the Sync message in the Sync message, and setting the Sync message Transmitting the message to the first synchronization device; receiving the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync message; and confirming that the Sync message is received according to the identifier information In the Followup message, the time synchronization information is set in the Followup message.
  • the present invention further provides a second synchronization device, the second synchronization device comprising a processor and a memory; the processor is configured to execute a program for generating a synchronization message stored in the memory to implement the generation of the synchronization message The steps of the method.
  • the present invention further provides a method for generating a synchronization message, comprising: when receiving the Sync message sent by the second synchronization device, sending the Sync message to a next communication node; sending according to the next communication node And the time synchronization information corresponding to the Sync message is obtained, and the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device.
  • the present invention also provides a first synchronization device, the first synchronization device comprising a processor and a memory; the processor is configured to execute a program for generating a synchronization message stored in the memory, to implement the generation of the synchronization message. The steps of the method.
  • the present invention also provides a synchronization message generating apparatus, including: a setting module, configured to: when receiving a synchronous Sync message, set identification information of the Sync message in the Sync message, and set the The Sync message is sent to the first synchronization device, and the receiving module is configured to receive the identifier information that is fed back by the first synchronization device and the time synchronization information corresponding to the Sync packet, and the synchronization module is configured to: when the identifier is based on the identifier When the information confirms that the Followup message corresponding to the Sync message is received, the time synchronization information is set in the Followup message.
  • a setting module configured to: when receiving a synchronous Sync message, set identification information of the Sync message in the Sync message, and set the The Sync message is sent to the first synchronization device
  • the receiving module is configured to receive the identifier information that is fed back by the first synchronization device and the time synchronization information corresponding to the Sync packet
  • the present invention further provides a device for generating a synchronization message, comprising: a sending module, configured to: when receiving the Sync message sent by the second synchronization device, send the Sync message to a next communication node; And acquiring, according to the sending time of the Sync message, the time synchronization information corresponding to the Sync message, and the first feedback module, configured to send the identifier information carried in the Sync message, And the time synchronization information is fed back to the second synchronization device.
  • a sending module configured to: when receiving the Sync message sent by the second synchronization device, send the Sync message to a next communication node; And acquiring, according to the sending time of the Sync message, the time synchronization information corresponding to the Sync message, and the first feedback module, configured to send the identifier information carried in the Sync message, And the time synchronization information is fed back to the second synchronization device.
  • the present invention further provides a synchronization message generation system, including: a second synchronization device, configured to: when receiving a synchronous Sync message, set identification information of the Sync message in the Sync message, and Sending the Sync message to the first synchronization device; the first synchronization device, when receiving the Sync message, sending the Sync message to the next communication node; sending according to the next communication node And the time synchronization information corresponding to the Sync message is obtained, and the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device; The second synchronization device is further configured to set the time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received according to the identifier information.
  • a second synchronization device configured to: when receiving a synchronous Sync message, set identification information of the Sync message in the Sync message, and Sending the Sync message to the first synchronization device
  • the first synchronization device when
  • the present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the synchronization report described above The steps of the text generation method.
  • FIG. 1 is a flowchart of a method for generating a synchronization message according to first and second embodiments of the present invention
  • FIG. 2 is a flowchart of a method for generating a synchronization message according to a third embodiment of the present invention
  • FIG. 3 is a flowchart of a method for generating a synchronization message according to a fourth embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a device for generating a synchronization message according to fifth and sixth embodiments of the present invention.
  • FIG. 5 is a schematic structural diagram of a device for generating a synchronization message according to a seventh embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a device for generating a synchronization message according to an eighth embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a system for generating a synchronization message according to ninth and tenth embodiments of the present invention.
  • FIG. 8 is a schematic structural diagram of a synchronizing device according to an eleventh embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a synchronizing device according to a twelfth embodiment of the present invention.
  • PTP time synchronization involves three clock devices, including: OC (Ordinary Clock).
  • the OC clock node has only one PTP port in the same PTP domain to participate in time synchronization, and time synchronization with the upstream clock node through the PTP port; BC (Boundary Clock), the BC clock node has multiple PTP ports in the same PTP domain to participate in time synchronization.
  • the BC clock synchronizes time from the upstream clock node through one of the PTP ports, and performs time on the downstream clock node through the remaining ports. Synchronization; TC (Transparent Clock), the TC time node does not need to keep time synchronization with other clock nodes.
  • the TC clock only forwards PTP protocol packets and performs PAT protocol packet forwarding delay correction without passing through any port. Time synchronization.
  • a first embodiment of the present invention includes the following specific steps:
  • step S101 when the Sync message is received, the identification information of the Sync message is set in the Sync message, and the Sync message is sent to the first synchronization device.
  • the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
  • the identification information of the Sync packet includes at least one of the following information: the destination IP address of the Sync packet (Internet Protocol), the source IP address of the Sync packet, and the source port of the Sync packet ( The port number, the destination port number of the Sync message, the protocol number of the Sync message, the source port identifier of the Sync message, and the serial number of the Sync message.
  • the step S101 includes: when receiving the Sync message, acquiring the identification information of the Sync message; setting the identification information of the Sync message in the Sync message, and sending the Sync message carrying the identification information.
  • the first synchronization device is configured to feed back, by the first synchronization device, the identification information carried in the Sync message based on the received Sync message.
  • Step S102 Receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
  • the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
  • the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
  • Step S103 When it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information, time synchronization information is set in the Followup message.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
  • the method for generating a synchronization message according to the first embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a second embodiment of the present invention a method for generating a synchronization packet, as shown in FIG. 1, includes the following specific steps:
  • step S101 when the Sync message is received, the identification information of the Sync message is set in the Sync message, and the Sync message is sent to the first synchronization device.
  • the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the step S101 includes: when receiving the Sync message, acquiring the identification information of the Sync message; setting the identification information of the Sync message in the Sync message, and sending the Sync message carrying the identification information.
  • the first synchronization device is configured to feed back, by the first synchronization device, the identification information carried in the Sync message based on the received Sync message.
  • Step S102 Receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
  • the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
  • the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
  • Step S103 When it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information, time synchronization information is set in the Followup message.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, sending the Followup message to the first synchronization device when the time synchronization information is not received, and receiving the first synchronization device when the time synchronization information is not received.
  • the time synchronization information is set in the Followup message, and the Followup message is stopped from being sent to the first synchronization device.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
  • the method for generating a synchronization message according to the second embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a third embodiment of the present invention includes the following specific steps:
  • Step S301 when receiving the Sync message sent by the second synchronization device, sending the Sync message to the next communication node.
  • step S302 the time synchronization information corresponding to the Sync message is obtained according to the sending time of the Sync message sent by the next communication node.
  • the step S302 includes: determining whether the Sync message received by the second synchronization device is sent by the control plane or sent by the previous communication node; and determining that the Sync message received by the second synchronization device is controlled.
  • the time synchronization information is set to the sending time of the Sync message sent by the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time is The synchronization information is set to a synchronization time difference; wherein, the synchronization time difference is a difference between the transmission time of the Sync message sent by the next communication node and the reception time of the Sync message received by the second synchronization device.
  • Step S303 the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device.
  • the step S303 includes: feeding back the identifier information carried in the Sync packet and the time synchronization information to the second synchronization device, so that the second synchronization device confirms that the Sync message is received according to the identifier information.
  • the time synchronization information is set in the Followup message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the method for generating a synchronization message according to the third embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a fourth embodiment of the present invention includes the following specific steps:
  • Step S401 when receiving the Sync message sent by the second synchronization device, sending the Sync message to the next communication node.
  • step S401 the method further includes: when the number of received Sync messages is greater than the first set threshold, buffering the next received Sync message.
  • the first set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
  • the overflow of the Sync message can be effectively avoided, and the overflow protection mechanism is provided for the Sync message.
  • Step S402 Acquire time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node.
  • the step S402 includes: determining whether the Sync message received by the second synchronization device is sent by the control plane or sent by the previous communication node; and determining that the Sync message received by the second synchronization device is controlled
  • the time synchronization information is set to the sending time of the Sync message sent by the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time is The synchronization information is set to a synchronization time difference; wherein, the synchronization time difference is a difference between the transmission time of the Sync message sent by the next communication node and the reception time of the Sync message received by the second synchronization device.
  • Step S403 When receiving the Followup message sent by the second synchronization device, the Followup message is fed back to the second synchronization device.
  • step S403 the method further includes: when the number of times the Followup message is fed back to the second synchronization device is greater than the second set threshold, the feedback of the Followup message to the second synchronization device is stopped.
  • the second set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
  • Step S404 the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device.
  • the step S404 includes: feeding back the identifier information carried in the Sync packet and the time synchronization information to the second synchronization device, so that the second synchronization device confirms that the Sync message is received according to the identifier information.
  • the time synchronization information is set in the Followup message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the method for generating a synchronization message according to the fourth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a fifth embodiment of the present invention a device for generating a synchronous message, as shown in FIG. 4, includes the following components:
  • the setting module 101 is configured to: when receiving the Sync message, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device.
  • the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the setting module 101 is configured to: when receiving the Sync message, obtain the identification information of the Sync message; set the identification information of the Sync message in the Sync message, and carry the Sync of the identifier information.
  • the message is sent to the first synchronization device, so that the first synchronization device feeds back the identifier information carried in the Sync message based on the received Sync message.
  • the receiving module 102 is configured to receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
  • the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
  • the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
  • the synchronization module 103 is configured to set time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
  • the apparatus for generating a synchronization message according to the fifth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a device for generating a synchronous message includes the following components:
  • the setting module 101 is configured to: when receiving the Sync message, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device.
  • the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the setting module 101 is configured to: when receiving the Sync message, obtain the identification information of the Sync message; set the identification information of the Sync message in the Sync message, and carry the Sync of the identifier information.
  • the message is sent to the first synchronization device, so that the first synchronization device feeds back the identifier information carried in the Sync message based on the received Sync message.
  • the receiving module 102 is configured to receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
  • the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
  • the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
  • the synchronization module 103 is configured to set time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, sending the Followup message to the first synchronization device when the time synchronization information is not received, and receiving the first synchronization device when the time synchronization information is not received.
  • the time synchronization information is set in the Followup message, and the Followup message is stopped from being sent to the first synchronization device.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
  • the apparatus for generating a synchronization message according to the sixth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a seventh embodiment of the present invention a device for generating a synchronous message, as shown in FIG. 5, includes the following components:
  • the sending module 201 is configured to: when receiving the Sync message sent by the second synchronization device, send the Sync message to the next communication node.
  • the obtaining module 202 is configured to obtain time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node.
  • the obtaining module 202 is configured to: determine whether the Sync message received by the second synchronization device is sent by the control plane, or is sent by the previous communication node; and if the Sync message received by the second synchronization device is determined If the text is sent by the control plane, the time synchronization information is set to send the sending time of the Sync message to the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, The time synchronization information is set to a synchronization time difference; wherein, the synchronization time difference is a difference between a transmission time of the Sync message sent by the next communication node and a reception time of the Sync message received by the second synchronization device.
  • the first feedback module 203 is configured to feed back the identification information carried in the Sync message and the time synchronization information to the second synchronization device.
  • the first feedback module 203 is configured to: feed back the identifier information carried in the Sync packet, and the time synchronization information to the second synchronization device, so that the second synchronization device confirms receiving the identifier based on the identifier information.
  • the time synchronization information is set in the Followup message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the device for generating a synchronization message according to the seventh embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a device for generating a synchronous message includes the following components:
  • the sending module 201 is configured to: when receiving the Sync message sent by the second synchronization device, send the Sync message to the next communication node.
  • the device for generating the synchronization message further includes: a buffering module 204, configured to cache the next received Sync message when the number of received Sync messages is greater than the first set threshold.
  • the first set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
  • the overflow of the Sync message can be effectively avoided, and the overflow protection mechanism is provided for the Sync message.
  • the obtaining module 202 is configured to obtain time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node.
  • the obtaining module 202 is configured to: determine whether the Sync message received by the second synchronization device is sent by the control plane, or is sent by the previous communication node; and if the Sync message received by the second synchronization device is determined If the text is sent by the control plane, the time synchronization information is set to send the sending time of the Sync message to the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, Then, the time synchronization information is set as the synchronization time difference; wherein, the synchronization time difference is the difference between the transmission time of the Sync message sent by the next communication node and the reception time of the Sync message received by the second synchronization device.
  • the second feedback module 205 is configured to feed back the Followup message to the second synchronization device when receiving the Followup message sent by the second synchronization device.
  • the device for generating a synchronization message further includes: a termination module 206, configured to stop feeding back the Followup message to the time when the number of times the Followup message is fed back to the second synchronization device is greater than a second threshold Second synchronization device.
  • a termination module 206 configured to stop feeding back the Followup message to the time when the number of times the Followup message is fed back to the second synchronization device is greater than a second threshold Second synchronization device.
  • the second set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
  • the first feedback module 203 is configured to feed back the identification information carried in the Sync message and the time synchronization information to the second synchronization device.
  • the first feedback module 203 is configured to: feed back the identifier information carried in the Sync packet, and the time synchronization information to the second synchronization device, so that the second synchronization device confirms receiving the identifier based on the identifier information.
  • the time synchronization information is set in the Followup message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the apparatus for generating a synchronization message according to the eighth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a ninth embodiment of the present invention a system for generating a synchronous message, as shown in FIG. 7, includes the following components:
  • the second synchronization device 301 is configured to: when the synchronization Sync message is received, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device 302.
  • the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the first synchronization device 302 is configured to: when the Sync message is received, send the Sync message to the next communication node; and according to the sending time of the Sync message sent by the next communication node, obtain the corresponding Sync message Time synchronization information; the identification information carried in the Sync message and the time synchronization information are fed back to the second synchronization device 301.
  • the manner of obtaining the time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node including but not limited to: determining that the Sync message received by the second synchronization device 301 is The control layer sends the message sent by the previous communication node; if it is determined that the Sync message received by the second synchronization device 301 is sent by the control plane, the time synchronization information is set to be sent by the first synchronization device 302 to the next communication node.
  • the sending time of the Sync message if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time synchronization information is set as the synchronization time difference; wherein, the synchronization time difference is the first synchronization device 302.
  • the sending time of the Sync message sent by the communication node is different from the receiving time of the Sync message received by the second synchronization device 301.
  • the second synchronization device 301 is further configured to set time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
  • the synchronization message generation system enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a tenth embodiment of the present invention a system for generating a synchronous message, as shown in FIG. 7, includes the following components:
  • the second synchronization device 301 is configured to: when the synchronization Sync message is received, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device 302.
  • the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
  • the Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the protocol number, the source port identifier of the Sync message, and the serial number of the Sync message is not limited to the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message.
  • the first synchronization device 302 is configured to: when the Sync message is received, send the Sync message to the next communication node; and according to the sending time of the Sync message sent by the next communication node, obtain the corresponding Sync message Time synchronization information; the identification information carried in the Sync message and the time synchronization information are fed back to the second synchronization device 301.
  • the manner of obtaining the time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node including but not limited to: determining that the Sync message received by the second synchronization device 301 is The control layer sends the message sent by the previous communication node; if it is determined that the Sync message received by the second synchronization device 301 is sent by the control plane, the time synchronization information is set to be sent by the first synchronization device 302 to the next communication node.
  • the sending time of the Sync message if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time synchronization information is set as the synchronization time difference; wherein, the synchronization time difference is the first synchronization device 302.
  • the sending time of the Sync message sent by the communication node is different from the receiving time of the Sync message received by the second synchronization device 301.
  • the second synchronization device 301 is further configured to: when the acknowledgment of the Followup message corresponding to the Sync message is received, the time synchronization information is set in the Followup message.
  • the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
  • the second synchronization device 301 is further configured to send the Followup message to the first synchronization, if the time synchronization information is not received, after receiving the Followup message corresponding to the Sync message based on the identifier information.
  • the first synchronization device 302 is further configured to: when receiving the Followup message sent by the second synchronization device 301, feed the Followup message to the second synchronization device 301;
  • the second synchronization device 301 is further configured to: when receiving the Followup message and the time synchronization information fed back by the first synchronization device 302, set time synchronization information in the Followup message, and stop sending the Followup message to the first synchronization device. 302.
  • the first synchronization device 302 is further configured to cache the next received Sync message when the number of received Sync messages is greater than the first set threshold.
  • the first synchronization device 302 is further configured to stop feeding the Followup message to the second synchronization device 301 when the number of times the Followup message is fed back to the second synchronization device 301 is greater than the second set threshold.
  • the system for generating a synchronization message according to the tenth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device.
  • the standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a synchronization device in an eleventh embodiment, includes the following components: a processor 501 and a memory 502.
  • processor 501 and memory 502 may be connected by a bus or other means.
  • the processor 501 may be a general-purpose processor, such as a central processing unit (CPU), or may be a digital signal processor (DSP) or an application specific integrated circuit (ASIC). Or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 502 is configured to store executable instructions of the processor 501;
  • the memory 502 is configured to store the program code and transmit the program code to the processor 501.
  • the memory 502 may include a volatile memory (Volatile Memory), such as a random access memory (RAM); the memory 502 may also include a non-volatile memory (Non-Volatile Memory), such as a read-only memory (Read- Only Memory, ROM), Flash Memory, Hard Disk Drive (HDD), or Solid-State Drive (SSD); the memory 502 may also include a combination of the above types of memories.
  • volatile memory such as a random access memory (RAM)
  • non-Volatile Memory such as a read-only memory (Read- Only Memory, ROM), Flash Memory, Hard Disk Drive (HDD), or Solid-State Drive (SSD)
  • the memory 502 may also include a combination of the above types of memories.
  • the processor 501 is configured to invoke the program code management code stored in the memory 502 to perform some or all of the steps from the first embodiment of the present invention to the second embodiment of the present invention.
  • the synchronization device can be disposed in any of the network communication devices.
  • the synchronization device of the eleventh embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the time for the network communication device to perform the PTP protocol based on the two-step method. Synchronization enables a wide range of network communication equipment to be applied to the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a synchronization device includes the following components: a processor 601 and a memory 602.
  • processor 601 and memory 602 may be connected by a bus or other means.
  • the processor 601 may be a general-purpose processor, such as a central processing unit (CPU), or may be a digital signal processor (DSP) or an application specific integrated circuit (ASIC). Or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 602 is configured to store executable instructions of the processor 601;
  • the memory 602 is configured to store the program code and transmit the program code to the processor 601.
  • the memory 602 may include a volatile memory (Volatile Memory), such as a random access memory (RAM); the memory 602 may also include a non-volatile memory (Non-Volatile Memory), such as a read-only memory (Read- Only Memory, ROM), Flash Memory, Hard Disk Drive (HDD), or Solid-State Drive (SSD); the memory 602 may also include a combination of the above types of memories.
  • the processor 601 is configured to invoke the program code management code stored in the memory 602 to perform some or all of the steps from the third embodiment of the present invention to the fourth embodiment of the present invention.
  • the synchronization device can be disposed in any of the network communication devices.
  • the synchronization device enables the network communication device to carry the time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the time for the network communication device to perform the PTP protocol based on the two-step method. Synchronization enables a wide range of network communication equipment to be applied to the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
  • a thirteenth embodiment of the present invention is a computer readable storage medium.
  • the computer storage medium can be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, mobile hard disk, CD-ROM, or any other form of storage medium known in the art.
  • the computer readable storage medium stores one or more programs, which may be executed by one or more processors to implement any one of the first embodiment of the present invention to the second embodiment of the present invention. Part or all of the steps, and/or to implement some or all of the steps of any one of the third embodiment of the present invention to the fourth embodiment of the present invention.
  • a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors, enabling the network communication device to follow the two-step method
  • the PTP protocol standard carries time synchronization information in the Followup message to implement time synchronization of the network communication device based on the two-step PTP protocol standard, so that a wide range of network communication devices are applicable to the two-step PTP protocol standard; the control plane selection is simplified.
  • the type reduces the complexity of the control surface implementation and simplifies the design flow of the control surface.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Abstract

Provided is a method for generating a synchronization message, the method comprising: upon receiving a synchronization (Sync) message, configuring identification information of the Sync message in the Sync message, and sending the Sync message to a first synchronization apparatus; receiving the identification information fed back by the first synchronization apparatus and time synchronization information corresponding to the Sync message; and configuring, when receipt of a Follow_Up message corresponding to the Sync message is confirmed on the basis of the identification information, the time synchronization information in the Follow_Up message. Further disclosed are a synchronization apparatus and a computer readable storage medium.

Description

同步报文的生成方法、同步设备及计算机可读存储介质Synchronous message generation method, synchronization device and computer readable storage medium
交叉引用cross reference
本发明要求在2018年2月2日提交中国专利局、申请号为201810107668.4、发明名称为“同步报文的生成方法、装置、系统、同步设备及存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本发明中。The invention claims the priority of the Chinese patent application filed on February 2, 2018, the Chinese Patent Office, the application number is 201810107668.4, and the invention name is "synchronized message generation method, device, system, synchronization device and storage medium". The entire contents of the application are incorporated herein by reference.
技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种同步报文的生成方法、同步设备及计算机可读存储介质。The present invention relates to the field of communications technologies, and in particular, to a method for generating a synchronous message, a synchronization device, and a computer readable storage medium.
背景技术Background technique
在通信网络中,许多业务的正常运行都要求通信网络设备进行时间同步,以保持整个通信网络中各设备之间的时间或频率差在合理的误差内。PTP(Precision Time Protoco1,精确时间协议)是一种网络时间同步协议,具有次微秒级的时间同步性能。In a communication network, the normal operation of many services requires communication network devices to perform time synchronization to keep the time or frequency difference between devices in the entire communication network within reasonable errors. PTP (Precision Time Protoco1) is a network time synchronization protocol with sub-microsecond time synchronization performance.
PTP协议包括一步法和两步法两种PTP协议标准。目前的一些通信网络设备受到硬件和/或软件的限制,不能够按照两步法PTP协议标准进行时间同步,仅是通过其他方式获取两步法PTP协议标准规定的时间戳,并根据时间戳通过两步法PTP协议标准规定的时间同步计算公式进行时间同步。因此,两步法PTP协议标准并不能广泛适用于通信网络中的设备。The PTP protocol includes two-step and two-step PTP protocol standards. Some current communication network devices are limited by hardware and/or software, and cannot be time synchronized according to the two-step PTP protocol standard. The timestamps specified by the two-step PTP protocol standard are obtained by other means, and are passed according to timestamps. The time synchronization calculation formula specified by the two-step PTP protocol standard performs time synchronization. Therefore, the two-step PTP protocol standard is not widely applicable to devices in communication networks.
发明内容Summary of the invention
本发明要解决的技术问题是,现有技术中部分通信网络设备无法按照两步法PTP协议标准在Followup报文中携带时间同步信息。The technical problem to be solved by the present invention is that some communication network devices in the prior art cannot carry time synchronization information in the Followup message according to the two-step PTP protocol standard.
本发明采用的技术方案是提供一种同步报文的生成方法,包括:当接收到同步Sync报文时,在所述Sync报文中设置所述Sync报文的标识信息,并将所述Sync报文发送至第一同步设备;接收所述第一同步设备反馈的所述标识信息和所述Sync报文对应的时间同步信息;当基于所述标识信息确认接收到所述Sync报文对应的Followup报文时,在所述Followup报文中设置所述时间同步信息。The technical solution adopted by the present invention is to provide a method for generating a synchronous message, including: when receiving a synchronous Sync message, setting identification information of the Sync message in the Sync message, and setting the Sync message Transmitting the message to the first synchronization device; receiving the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync message; and confirming that the Sync message is received according to the identifier information In the Followup message, the time synchronization information is set in the Followup message.
本发明还提供一种第二同步设备,所述第二同步设备包括处理器和存储器;所述处理器用于执行存储器中存储的同步报文的生成的程序,以实现上述的同步报文的生成方法的步骤。The present invention further provides a second synchronization device, the second synchronization device comprising a processor and a memory; the processor is configured to execute a program for generating a synchronization message stored in the memory to implement the generation of the synchronization message The steps of the method.
本发明还提供一种同步报文的生成方法,包括:当接收到第二同步设备发送的所述Sync报文时,向下一通信节点发送所述Sync报文;根据向下一通信节点发送所述Sync报文的发送时间,获取所述Sync报文对应的时间同步信息;将所述Sync报文中携带的标识信息,及所述时间同步信息反馈至所述第二同步设备。The present invention further provides a method for generating a synchronization message, comprising: when receiving the Sync message sent by the second synchronization device, sending the Sync message to a next communication node; sending according to the next communication node And the time synchronization information corresponding to the Sync message is obtained, and the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device.
本发明还提供一种第一同步设备,所述第一同步设备包括处理器和存储器;所述处理器用于执行存储器中存储的同步报文的生成的程序,以实现上述的同步报文的生成方法的步骤。The present invention also provides a first synchronization device, the first synchronization device comprising a processor and a memory; the processor is configured to execute a program for generating a synchronization message stored in the memory, to implement the generation of the synchronization message. The steps of the method.
本发明还提供一种同步报文的生成装置,包括:设置模块,用于当接收到同步Sync报文时,在所述Sync报文中设置所述Sync报文的标识信息,并将所述Sync报文发送至第一同步设备;接收模块,用于接收所述第一同步设备反馈的所述标识信息和所述Sync报文对应的时间同步信息;同步模块,用于当基于所述标识信息确认接收到所述Sync报文对应的Followup报文时,在所述Followup报文中设置所述时间同步信息。The present invention also provides a synchronization message generating apparatus, including: a setting module, configured to: when receiving a synchronous Sync message, set identification information of the Sync message in the Sync message, and set the The Sync message is sent to the first synchronization device, and the receiving module is configured to receive the identifier information that is fed back by the first synchronization device and the time synchronization information corresponding to the Sync packet, and the synchronization module is configured to: when the identifier is based on the identifier When the information confirms that the Followup message corresponding to the Sync message is received, the time synchronization information is set in the Followup message.
本发明还提供一种同步报文的生成装置,包括:发送模块,用于当接收到第二同步设备发送的所述Sync报文时,向下一通信节点发送所述Sync报文;获取模块,用于根据向下一通信节点发送所述Sync报文的发送时间,获取所述Sync报文对应的时间同步信息;第一反馈模块,用于将所述Sync 报文中携带的标识信息,及所述时间同步信息反馈至所述第二同步设备。The present invention further provides a device for generating a synchronization message, comprising: a sending module, configured to: when receiving the Sync message sent by the second synchronization device, send the Sync message to a next communication node; And acquiring, according to the sending time of the Sync message, the time synchronization information corresponding to the Sync message, and the first feedback module, configured to send the identifier information carried in the Sync message, And the time synchronization information is fed back to the second synchronization device.
本发明还提供一种同步报文的生成系统,包括:第二同步设备,用于当接收到同步Sync报文时,在所述Sync报文中设置所述Sync报文的标识信息,并将所述Sync报文发送至第一同步设备;所述第一同步设备,用于当接收到所述Sync报文时,向下一通信节点发送所述Sync报文;根据向下一通信节点发送所述Sync报文的发送时间,获取所述Sync报文对应的时间同步信息;将所述Sync报文中携带的标识信息,及所述时间同步信息反馈至所述第二同步设备;所述第二同步设备,还用于当基于所述标识信息确认接收到所述Sync报文对应的Followup报文时,在所述Followup报文中设置所述时间同步信息。The present invention further provides a synchronization message generation system, including: a second synchronization device, configured to: when receiving a synchronous Sync message, set identification information of the Sync message in the Sync message, and Sending the Sync message to the first synchronization device; the first synchronization device, when receiving the Sync message, sending the Sync message to the next communication node; sending according to the next communication node And the time synchronization information corresponding to the Sync message is obtained, and the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device; The second synchronization device is further configured to set the time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received according to the identifier information.
本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述的同步报文的生成方法的步骤。The present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the synchronization report described above The steps of the text generation method.
附图说明DRAWINGS
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1为本发明第一和第二实施例的同步报文的生成方法流程图;1 is a flowchart of a method for generating a synchronization message according to first and second embodiments of the present invention;
图2为本发明第三实施例的同步报文的生成方法流程图;2 is a flowchart of a method for generating a synchronization message according to a third embodiment of the present invention;
图3为本发明第四实施例的同步报文的生成方法流程图;3 is a flowchart of a method for generating a synchronization message according to a fourth embodiment of the present invention;
图4为本发明第五和第六实施例的同步报文的生成装置组成结构示意图;4 is a schematic structural diagram of a device for generating a synchronization message according to fifth and sixth embodiments of the present invention;
图5为本发明第七实施例的同步报文的生成装置组成结构示意图;FIG. 5 is a schematic structural diagram of a device for generating a synchronization message according to a seventh embodiment of the present invention; FIG.
图6为本发明第八实施例的同步报文的生成装置组成结构示意图;6 is a schematic structural diagram of a device for generating a synchronization message according to an eighth embodiment of the present invention;
图7为本发明第九和第十实施例的同步报文的生成系统组成结构示意图;FIG. 7 is a schematic structural diagram of a system for generating a synchronization message according to ninth and tenth embodiments of the present invention; FIG.
图8为本发明第十一实施例的同步设备组成结构示意图;8 is a schematic structural diagram of a synchronizing device according to an eleventh embodiment of the present invention;
图9为本发明第十二实施例的同步设备组成结构示意图。FIG. 9 is a schematic structural diagram of a synchronizing device according to a twelfth embodiment of the present invention.
具体实施方式Detailed ways
为更进一步阐述本发明为达成预定目的所采取的技术手段及功效,以下结合附图及较佳实施例,对本发明进行详细说明如后。The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments.
PTP时间同步涉及三种时钟设备,包括:OC(Ordinary Clock,普通时钟),OC时钟节点在同一个PTP域内只有一个PTP端口参与时间同步,并通过该PTP端口与上游时钟节点进行时间同步;BC(Boundary Clock,边界时钟),BC时钟节点在同一个PTP域内拥有多个PTP端口参与时间同步,BC时钟通过其中一个PTP端口从上游时钟节点进行时间同步,并通过其余端口对下游时钟节点进行时间同步;TC(Transparent Clock,透明时钟),TC时间节点不需要与其它时钟节点保持时间同步,TC时钟仅转发PTP协议报文并对PTP协议报文进行转发延时校正,而不通过任何一个端口进行时间同步。PTP time synchronization involves three clock devices, including: OC (Ordinary Clock). The OC clock node has only one PTP port in the same PTP domain to participate in time synchronization, and time synchronization with the upstream clock node through the PTP port; BC (Boundary Clock), the BC clock node has multiple PTP ports in the same PTP domain to participate in time synchronization. The BC clock synchronizes time from the upstream clock node through one of the PTP ports, and performs time on the downstream clock node through the remaining ports. Synchronization; TC (Transparent Clock), the TC time node does not need to keep time synchronization with other clock nodes. The TC clock only forwards PTP protocol packets and performs PAT protocol packet forwarding delay correction without passing through any port. Time synchronization.
本发明第一实施例,一种同步报文的生成方法,如图1所示,包括以下具体步骤:A first embodiment of the present invention, a method for generating a synchronization message, as shown in FIG. 1, includes the following specific steps:
步骤S101,当接收到Sync(同步)报文时,在Sync报文中设置该Sync报文的标识信息,并将该Sync报文发送至第一同步设备。In step S101, when the Sync message is received, the identification information of the Sync message is set in the Sync message, and the Sync message is sent to the first synchronization device.
可选的,在Sync报文中设置Sync报文的标识信息的方式包括但不限于:在Sync报文的报文头部中设置Sync报文的标识信息。Optionally, the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP(Internet Protocol,网络之间互连的协议)地址、Sync报文的源IP地址、Sync报文的源Port(端口)号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The identification information of the Sync packet includes at least one of the following information: the destination IP address of the Sync packet (Internet Protocol), the source IP address of the Sync packet, and the source port of the Sync packet ( The port number, the destination port number of the Sync message, the protocol number of the Sync message, the source port identifier of the Sync message, and the serial number of the Sync message.
可选的,步骤S101,包括:当接收到Sync报文时,获取Sync报文的标识信息;在该Sync报文中设置Sync报文的标识信息,并将携带标识信息的该Sync报文发送至第一同步设备,以供第一同步设备基于接收到的该 Sync报文,反馈该Sync报文中携带的标识信息。Optionally, the step S101 includes: when receiving the Sync message, acquiring the identification information of the Sync message; setting the identification information of the Sync message in the Sync message, and sending the Sync message carrying the identification information. The first synchronization device is configured to feed back, by the first synchronization device, the identification information carried in the Sync message based on the received Sync message.
步骤S102,接收第一同步设备反馈的该标识信息和该Sync报文对应的时间同步信息。Step S102: Receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
可选的,在接收到控制层面发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:第一同步设备向下一通信节点发送该Sync报文的发送时间。Optionally, in the case that the Sync message sent by the control layer is received, the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
可选的,在接收到上一通信节点发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:同步时间差;其中,同步时间差为第一同步设备向下一通信节点发送该Sync报文的发送时间,与接收到该Sync报文的接收时间的差值。Optionally, in the case that the Sync message sent by the previous communication node is received, the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
步骤S103,当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。Step S103: When it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information, time synchronization information is set in the Followup message.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在Followup报文的预设字段中设置时间同步信息。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
本发明第一实施例所述的同步报文的生成方法,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The method for generating a synchronization message according to the first embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第二实施例,一种同步报文的生成方法,如图1所示,包括以下具体步骤:A second embodiment of the present invention, a method for generating a synchronization packet, as shown in FIG. 1, includes the following specific steps:
步骤S101,当接收到Sync报文时,在Sync报文中设置该Sync报文的标识信息,并将该Sync报文发送至第一同步设备。In step S101, when the Sync message is received, the identification information of the Sync message is set in the Sync message, and the Sync message is sent to the first synchronization device.
可选的,在Sync报文中设置Sync报文的标识信息的方式包括但不限于:在Sync报文的报文头部中设置Sync报文的标识信息。Optionally, the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的 Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
可选的,步骤S101,包括:当接收到Sync报文时,获取Sync报文的标识信息;在该Sync报文中设置Sync报文的标识信息,并将携带标识信息的该Sync报文发送至第一同步设备,以供第一同步设备基于接收到的该Sync报文,反馈该Sync报文中携带的标识信息。Optionally, the step S101 includes: when receiving the Sync message, acquiring the identification information of the Sync message; setting the identification information of the Sync message in the Sync message, and sending the Sync message carrying the identification information. The first synchronization device is configured to feed back, by the first synchronization device, the identification information carried in the Sync message based on the received Sync message.
步骤S102,接收第一同步设备反馈的该标识信息和该Sync报文对应的时间同步信息。Step S102: Receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
可选的,在接收到控制层面发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:第一同步设备向下一通信节点发送该Sync报文的发送时间。Optionally, in the case that the Sync message sent by the control layer is received, the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
可选的,在接收到上一通信节点发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:同步时间差;其中,同步时间差为第一同步设备向下一通信节点发送该Sync报文的发送时间,与接收到该Sync报文的接收时间的差值。Optionally, in the case that the Sync message sent by the previous communication node is received, the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
步骤S103,当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。Step S103: When it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information, time synchronization information is set in the Followup message.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在未接收到时间同步信息的情况下,将Followup报文发送至第一同步设备;当接收到第一同步设备反馈的Followup报文和时间同步信息时,在Followup报文中设置时间同步信息,并停止将Followup报文发送至第一同步设备。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, sending the Followup message to the first synchronization device when the time synchronization information is not received, and receiving the first synchronization device when the time synchronization information is not received. When the Followup message and the time synchronization information are fed back, the time synchronization information is set in the Followup message, and the Followup message is stopped from being sent to the first synchronization device.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在Followup报文的预设字段中设置时间同步信息。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
本发明第二实施例所述的同步报文的生成方法,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信 设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The method for generating a synchronization message according to the second embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第三实施例,一种同步报文的生成方法,如图2所示,包括以下具体步骤:A third embodiment of the present invention, a method for generating a synchronization message, as shown in FIG. 2, includes the following specific steps:
步骤S301,当接收到第二同步设备发送的Sync报文时,向下一通信节点发送该Sync报文。Step S301, when receiving the Sync message sent by the second synchronization device, sending the Sync message to the next communication node.
步骤S302,根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息。In step S302, the time synchronization information corresponding to the Sync message is obtained according to the sending time of the Sync message sent by the next communication node.
可选的,步骤S302,包括:判断第二同步设备接收到的该Sync报文是控制层面发送的,还是上一通信节点发送的;若判定第二同步设备接收到的该Sync报文是控制层面发送的,则将时间同步信息设置为向下一通信节点发该送Sync报文的发送时间;若判定第二同步设备接收到的该Sync报文是上一通信节点发送的,则将时间同步信息设置为同步时间差;其中,同步时间差为向下一通信节点发送该Sync报文的发送时间,与第二同步设备接收到该Sync报文的接收时间的差值。Optionally, the step S302 includes: determining whether the Sync message received by the second synchronization device is sent by the control plane or sent by the previous communication node; and determining that the Sync message received by the second synchronization device is controlled. When the layer sends, the time synchronization information is set to the sending time of the Sync message sent by the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time is The synchronization information is set to a synchronization time difference; wherein, the synchronization time difference is a difference between the transmission time of the Sync message sent by the next communication node and the reception time of the Sync message received by the second synchronization device.
步骤S303,将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备。Step S303, the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device.
可选的,步骤S303,包括:将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备,以供第二同步设备当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。Optionally, the step S303 includes: feeding back the identifier information carried in the Sync packet and the time synchronization information to the second synchronization device, so that the second synchronization device confirms that the Sync message is received according to the identifier information. When the followup packet is received, the time synchronization information is set in the Followup message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
本发明第三实施例所述的同步报文的生成方法,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了 网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The method for generating a synchronization message according to the third embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第四实施例,一种同步报文的生成方法,如图3所示,包括以下具体步骤:A fourth embodiment of the present invention, a method for generating a synchronization packet, as shown in FIG. 3, includes the following specific steps:
步骤S401,当接收到第二同步设备发送的Sync报文时,向下一通信节点发送该Sync报文。Step S401, when receiving the Sync message sent by the second synchronization device, sending the Sync message to the next communication node.
可选的,步骤S401,还包括:当接收到的Sync报文的数量大于第一设定阈值时,对下一次接收到的Sync报文进行缓存。Optionally, in step S401, the method further includes: when the number of received Sync messages is greater than the first set threshold, buffering the next received Sync message.
在本实施例中,对第一设定阈值不做具体限定,可以根据工程师的工程经验进行设置,也可以根据有限次实验得到的最佳阈值进行设置,也可以根据有限次计算机仿真得到的最佳阈值进行设置。In this embodiment, the first set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
通过对大于第一设定阈值接收到的Sync报文进行缓存,能够有效地避免Sync报文的溢出,对Sync报文提供了溢出保护机制。By buffering the Sync message received by the first set threshold, the overflow of the Sync message can be effectively avoided, and the overflow protection mechanism is provided for the Sync message.
步骤S402,根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息。Step S402: Acquire time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node.
可选的,步骤S402,包括:判断第二同步设备接收到的该Sync报文是控制层面发送的,还是上一通信节点发送的;若判定第二同步设备接收到的该Sync报文是控制层面发送的,则将时间同步信息设置为向下一通信节点发该送Sync报文的发送时间;若判定第二同步设备接收到的该Sync报文是上一通信节点发送的,则将时间同步信息设置为同步时间差;其中,同步时间差为向下一通信节点发送该Sync报文的发送时间,与第二同步设备接收到该Sync报文的接收时间的差值。Optionally, the step S402 includes: determining whether the Sync message received by the second synchronization device is sent by the control plane or sent by the previous communication node; and determining that the Sync message received by the second synchronization device is controlled When the layer sends, the time synchronization information is set to the sending time of the Sync message sent by the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time is The synchronization information is set to a synchronization time difference; wherein, the synchronization time difference is a difference between the transmission time of the Sync message sent by the next communication node and the reception time of the Sync message received by the second synchronization device.
步骤S403,当接收到第二同步设备发送的Followup报文时,将该Followup报文反馈至第二同步设备。Step S403: When receiving the Followup message sent by the second synchronization device, the Followup message is fed back to the second synchronization device.
可选的,步骤S403,还包括:当将该Followup报文反馈至第二同步设备的次数大于第二设定阈值时,停止将该Followup报文反馈至第二同步设 备。Optionally, in step S403, the method further includes: when the number of times the Followup message is fed back to the second synchronization device is greater than the second set threshold, the feedback of the Followup message to the second synchronization device is stopped.
在本实施例中,对第二设定阈值不做具体限定,可以根据工程师的工程经验进行设置,也可以根据有限次实验得到的最佳阈值进行设置,也可以根据有限次计算机仿真得到的最佳阈值进行设置。In this embodiment, the second set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
步骤S404,将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备。Step S404, the identifier information carried in the Sync message and the time synchronization information are fed back to the second synchronization device.
可选的,步骤S404,包括:将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备,以供第二同步设备当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。Optionally, the step S404 includes: feeding back the identifier information carried in the Sync packet and the time synchronization information to the second synchronization device, so that the second synchronization device confirms that the Sync message is received according to the identifier information. When the followup packet is received, the time synchronization information is set in the Followup message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
本发明第四实施例所述的同步报文的生成方法,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The method for generating a synchronization message according to the fourth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第五实施例,一种同步报文的生成装置,如图4所示,包括以下组成部分:A fifth embodiment of the present invention, a device for generating a synchronous message, as shown in FIG. 4, includes the following components:
设置模块101,用于当接收到Sync报文时,在Sync报文中设置该Sync报文的标识信息,并将该Sync报文发送至第一同步设备。The setting module 101 is configured to: when receiving the Sync message, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device.
可选的,在Sync报文中设置Sync报文的标识信息的方式包括但不限于:在Sync报文的报文头部中设置Sync报文的标识信息。Optionally, the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的 Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
可选的,设置模块101,具体用于:当接收到Sync报文时,获取Sync报文的标识信息;在该Sync报文中设置Sync报文的标识信息,并将携带标识信息的该Sync报文发送至第一同步设备,以供第一同步设备基于接收到的该Sync报文,反馈该Sync报文中携带的标识信息。Optionally, the setting module 101 is configured to: when receiving the Sync message, obtain the identification information of the Sync message; set the identification information of the Sync message in the Sync message, and carry the Sync of the identifier information. The message is sent to the first synchronization device, so that the first synchronization device feeds back the identifier information carried in the Sync message based on the received Sync message.
接收模块102,用于接收第一同步设备反馈的该标识信息和该Sync报文对应的时间同步信息。The receiving module 102 is configured to receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
可选的,在接收到控制层面发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:第一同步设备向下一通信节点发送该Sync报文的发送时间。Optionally, in the case that the Sync message sent by the control layer is received, the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
可选的,在接收到上一通信节点发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:同步时间差;其中,同步时间差为第一同步设备向下一通信节点发送该Sync报文的发送时间,与接收到该Sync报文的接收时间的差值。Optionally, in the case that the Sync message sent by the previous communication node is received, the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
同步模块103,用于当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。The synchronization module 103 is configured to set time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在Followup报文的预设字段中设置时间同步信息。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
本发明第五实施例所述的同步报文的生成装置,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The apparatus for generating a synchronization message according to the fifth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第六实施例,一种同步报文的生成装置,如图4所示,包括以下组成部分:According to a sixth embodiment of the present invention, a device for generating a synchronous message, as shown in FIG. 4, includes the following components:
设置模块101,用于当接收到Sync报文时,在Sync报文中设置该Sync 报文的标识信息,并将该Sync报文发送至第一同步设备。The setting module 101 is configured to: when receiving the Sync message, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device.
可选的,在Sync报文中设置Sync报文的标识信息的方式包括但不限于:在Sync报文的报文头部中设置Sync报文的标识信息。Optionally, the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
可选的,设置模块101,具体用于:当接收到Sync报文时,获取Sync报文的标识信息;在该Sync报文中设置Sync报文的标识信息,并将携带标识信息的该Sync报文发送至第一同步设备,以供第一同步设备基于接收到的该Sync报文,反馈该Sync报文中携带的标识信息。Optionally, the setting module 101 is configured to: when receiving the Sync message, obtain the identification information of the Sync message; set the identification information of the Sync message in the Sync message, and carry the Sync of the identifier information. The message is sent to the first synchronization device, so that the first synchronization device feeds back the identifier information carried in the Sync message based on the received Sync message.
接收模块102,用于接收第一同步设备反馈的该标识信息和该Sync报文对应的时间同步信息。The receiving module 102 is configured to receive the identifier information that is fed back by the first synchronization device and time synchronization information corresponding to the Sync packet.
可选的,在接收到控制层面发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:第一同步设备向下一通信节点发送该Sync报文的发送时间。Optionally, in the case that the Sync message sent by the control layer is received, the time synchronization information corresponding to the Sync message includes: sending time of the Sync message sent by the first synchronization device to the next communication node.
可选的,在接收到上一通信节点发送的该Sync报文的情况下,该Sync报文对应的时间同步信息,包括:同步时间差;其中,同步时间差为第一同步设备向下一通信节点发送该Sync报文的发送时间,与接收到该Sync报文的接收时间的差值。Optionally, in the case that the Sync message sent by the previous communication node is received, the time synchronization information corresponding to the Sync message includes: a synchronization time difference; wherein the synchronization time difference is the first synchronization device to the next communication node. The difference between the sending time of sending the Sync message and the receiving time of receiving the Sync message.
同步模块103,用于当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。The synchronization module 103 is configured to set time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在未接收到时间同步信息的情况下,将Followup报文发送至第一同步设备;当接收到第一同步设备反馈的Followup报文和时间同步信息时,在Followup报文中设置时间同步信息,并停止将Followup报文发送至第一同步设备。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, sending the Followup message to the first synchronization device when the time synchronization information is not received, and receiving the first synchronization device when the time synchronization information is not received. When the Followup message and the time synchronization information are fed back, the time synchronization information is set in the Followup message, and the Followup message is stopped from being sent to the first synchronization device.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在Followup报文的预设字段中设置时间同步信息。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
本发明第六实施例所述的同步报文的生成装置,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The apparatus for generating a synchronization message according to the sixth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第七实施例,一种同步报文的生成装置,如图5所示,包括以下组成部分:A seventh embodiment of the present invention, a device for generating a synchronous message, as shown in FIG. 5, includes the following components:
发送模块201,用于当接收到第二同步设备发送的Sync报文时,向下一通信节点发送该Sync报文。The sending module 201 is configured to: when receiving the Sync message sent by the second synchronization device, send the Sync message to the next communication node.
获取模块202,用于根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息。The obtaining module 202 is configured to obtain time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node.
可选的,获取模块202,具体用于:判断第二同步设备接收到的该Sync报文是控制层面发送的,还是上一通信节点发送的;若判定第二同步设备接收到的该Sync报文是控制层面发送的,则将时间同步信息设置为向下一通信节点发该送Sync报文的发送时间;若判定第二同步设备接收到的该Sync报文是上一通信节点发送的,则将时间同步信息设置为同步时间差;其中,同步时间差为向下一通信节点发送该Sync报文的发送时间,与第二同步设备接收到该Sync报文的接收时间的差值。Optionally, the obtaining module 202 is configured to: determine whether the Sync message received by the second synchronization device is sent by the control plane, or is sent by the previous communication node; and if the Sync message received by the second synchronization device is determined If the text is sent by the control plane, the time synchronization information is set to send the sending time of the Sync message to the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, The time synchronization information is set to a synchronization time difference; wherein, the synchronization time difference is a difference between a transmission time of the Sync message sent by the next communication node and a reception time of the Sync message received by the second synchronization device.
第一反馈模块203,用于将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备。The first feedback module 203 is configured to feed back the identification information carried in the Sync message and the time synchronization information to the second synchronization device.
可选的,第一反馈模块203,具体用于:将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备,以供第二同步设备当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。Optionally, the first feedback module 203 is configured to: feed back the identifier information carried in the Sync packet, and the time synchronization information to the second synchronization device, so that the second synchronization device confirms receiving the identifier based on the identifier information. When the Sync message corresponds to the Followup message, the time synchronization information is set in the Followup message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的 IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
本发明第七实施例所述的同步报文的生成装置,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The device for generating a synchronization message according to the seventh embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第八实施例,一种同步报文的生成装置,如图6所示,包括以下组成部分:According to the eighth embodiment of the present invention, a device for generating a synchronous message, as shown in FIG. 6, includes the following components:
发送模块201,用于当接收到第二同步设备发送的Sync报文时,向下一通信节点发送该Sync报文。The sending module 201 is configured to: when receiving the Sync message sent by the second synchronization device, send the Sync message to the next communication node.
可选的,同步报文的生成装置,还包括:缓存模块204,用于当接收到的Sync报文的数量大于第一设定阈值时,对下一次接收到的Sync报文进行缓存。Optionally, the device for generating the synchronization message further includes: a buffering module 204, configured to cache the next received Sync message when the number of received Sync messages is greater than the first set threshold.
在本实施例中,对第一设定阈值不做具体限定,可以根据工程师的工程经验进行设置,也可以根据有限次实验得到的最佳阈值进行设置,也可以根据有限次计算机仿真得到的最佳阈值进行设置。In this embodiment, the first set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
通过对大于第一设定阈值接收到的Sync报文进行缓存,能够有效地避免Sync报文的溢出,对Sync报文提供了溢出保护机制。By buffering the Sync message received by the first set threshold, the overflow of the Sync message can be effectively avoided, and the overflow protection mechanism is provided for the Sync message.
获取模块202,用于根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息。The obtaining module 202 is configured to obtain time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node.
可选的,获取模块202,具体用于:判断第二同步设备接收到的该Sync报文是控制层面发送的,还是上一通信节点发送的;若判定第二同步设备接收到的该Sync报文是控制层面发送的,则将时间同步信息设置为向下一通信节点发该送Sync报文的发送时间;若判定第二同步设备接收到的该Sync报文是上一通信节点发送的,则将时间同步信息设置为同步时间差; 其中,同步时间差为向下一通信节点发送该Sync报文的发送时间,与第二同步设备接收到该Sync报文的接收时间的差值。Optionally, the obtaining module 202 is configured to: determine whether the Sync message received by the second synchronization device is sent by the control plane, or is sent by the previous communication node; and if the Sync message received by the second synchronization device is determined If the text is sent by the control plane, the time synchronization information is set to send the sending time of the Sync message to the next communication node; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, Then, the time synchronization information is set as the synchronization time difference; wherein, the synchronization time difference is the difference between the transmission time of the Sync message sent by the next communication node and the reception time of the Sync message received by the second synchronization device.
第二反馈模块205,用于当接收到第二同步设备发送的Followup报文时,将该Followup报文反馈至第二同步设备。The second feedback module 205 is configured to feed back the Followup message to the second synchronization device when receiving the Followup message sent by the second synchronization device.
可选的,同步报文的生成装置,还包括:终止模块206,用于当将该Followup报文反馈至第二同步设备的次数大于第二设定阈值时,停止将该Followup报文反馈至第二同步设备。Optionally, the device for generating a synchronization message further includes: a termination module 206, configured to stop feeding back the Followup message to the time when the number of times the Followup message is fed back to the second synchronization device is greater than a second threshold Second synchronization device.
在本实施例中,对第二设定阈值不做具体限定,可以根据工程师的工程经验进行设置,也可以根据有限次实验得到的最佳阈值进行设置,也可以根据有限次计算机仿真得到的最佳阈值进行设置。In this embodiment, the second set threshold is not specifically limited, and may be set according to an engineer's engineering experience, or may be set according to an optimal threshold obtained by a limited number of experiments, or may be obtained according to a limited number of computer simulations. Good threshold settings.
第一反馈模块203,用于将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备。The first feedback module 203 is configured to feed back the identification information carried in the Sync message and the time synchronization information to the second synchronization device.
可选的,第一反馈模块203,具体用于:将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备,以供第二同步设备当基于标识信息确认接收到该Sync报文对应的Followup报文时,在该Followup报文中设置时间同步信息。Optionally, the first feedback module 203 is configured to: feed back the identifier information carried in the Sync packet, and the time synchronization information to the second synchronization device, so that the second synchronization device confirms receiving the identifier based on the identifier information. When the Sync message corresponds to the Followup message, the time synchronization information is set in the Followup message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
本发明第八实施例所述的同步报文的生成装置,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The apparatus for generating a synchronization message according to the eighth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第九实施例,一种同步报文的生成系统,如图7所示,包括以下组成部分:A ninth embodiment of the present invention, a system for generating a synchronous message, as shown in FIG. 7, includes the following components:
第二同步设备301,用于当接收到同步Sync报文时,在该Sync报文中设置该Sync报文的标识信息,并将该Sync报文发送至第一同步设备302。The second synchronization device 301 is configured to: when the synchronization Sync message is received, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device 302.
可选的,在Sync报文中设置Sync报文的标识信息的方式包括但不限于:在Sync报文的报文头部中设置Sync报文的标识信息。Optionally, the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
第一同步设备302,用于当接收到该Sync报文时,向下一通信节点发送该Sync报文;根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息;将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备301。The first synchronization device 302 is configured to: when the Sync message is received, send the Sync message to the next communication node; and according to the sending time of the Sync message sent by the next communication node, obtain the corresponding Sync message Time synchronization information; the identification information carried in the Sync message and the time synchronization information are fed back to the second synchronization device 301.
可选的,根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息的方式,包括但不限于:判断第二同步设备301接收到的Sync报文是控制层面发送的,还是上一通信节点发送的;若判定第二同步设备301接收到的Sync报文是控制层面发送的,则将时间同步信息设置为第一同步设备302向下一通信节点发送Sync报文的发送时间;若判定第二同步设备接收到的Sync报文是上一通信节点发送的,则将时间同步信息设置为同步时间差;其中,同步时间差为第一同步设备302向下一通信节点发送Sync报文的发送时间,与第二同步设备301接收到Sync报文的接收时间的差值。Optionally, the manner of obtaining the time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node, including but not limited to: determining that the Sync message received by the second synchronization device 301 is The control layer sends the message sent by the previous communication node; if it is determined that the Sync message received by the second synchronization device 301 is sent by the control plane, the time synchronization information is set to be sent by the first synchronization device 302 to the next communication node. The sending time of the Sync message; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time synchronization information is set as the synchronization time difference; wherein, the synchronization time difference is the first synchronization device 302. The sending time of the Sync message sent by the communication node is different from the receiving time of the Sync message received by the second synchronization device 301.
第二同步设备301,还用于当基于标识信息确认接收到该Sync报文对应的Followup报文时,在Followup报文中设置时间同步信息。The second synchronization device 301 is further configured to set time synchronization information in the Followup message when it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在Followup报文的预设字段中设置时间同步信息。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
本发明第九实施例所述的同步报文的生成系统,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了 网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The synchronization message generation system according to the ninth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第十实施例,一种同步报文的生成系统,如图7所示,包括以下组成部分:A tenth embodiment of the present invention, a system for generating a synchronous message, as shown in FIG. 7, includes the following components:
第二同步设备301,用于当接收到同步Sync报文时,在该Sync报文中设置该Sync报文的标识信息,并将该Sync报文发送至第一同步设备302。The second synchronization device 301 is configured to: when the synchronization Sync message is received, set the identification information of the Sync message in the Sync message, and send the Sync message to the first synchronization device 302.
可选的,在Sync报文中设置Sync报文的标识信息的方式包括但不限于:在Sync报文的报文头部中设置Sync报文的标识信息。Optionally, the method for setting the identifier information of the Sync message in the Sync message includes, but is not limited to, setting the identifier information of the Sync message in the message header of the Sync message.
其中,Sync报文的标识信息至少包括以下信息之一:Sync报文的目的IP地址、Sync报文的源IP地址、Sync报文的源Port号、Sync报文的目的Port号、Sync报文的协议号、Sync报文的源端口标识和Sync报文的序列号等信息。The Sync message identification information includes at least one of the following information: a destination IP address of the Sync message, a source IP address of the Sync message, a source port number of the Sync message, a destination port number of the Sync message, and a Sync message. The protocol number, the source port identifier of the Sync message, and the serial number of the Sync message.
第一同步设备302,用于当接收到该Sync报文时,向下一通信节点发送该Sync报文;根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息;将该Sync报文中携带的标识信息,及时间同步信息反馈至第二同步设备301。The first synchronization device 302 is configured to: when the Sync message is received, send the Sync message to the next communication node; and according to the sending time of the Sync message sent by the next communication node, obtain the corresponding Sync message Time synchronization information; the identification information carried in the Sync message and the time synchronization information are fed back to the second synchronization device 301.
可选的,根据向下一通信节点发送该Sync报文的发送时间,获取该Sync报文对应的时间同步信息的方式,包括但不限于:判断第二同步设备301接收到的Sync报文是控制层面发送的,还是上一通信节点发送的;若判定第二同步设备301接收到的Sync报文是控制层面发送的,则将时间同步信息设置为第一同步设备302向下一通信节点发送Sync报文的发送时间;若判定第二同步设备接收到的Sync报文是上一通信节点发送的,则将时间同步信息设置为同步时间差;其中,同步时间差为第一同步设备302向下一通信节点发送Sync报文的发送时间,与第二同步设备301接收到Sync报文的接收时间的差值。Optionally, the manner of obtaining the time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node, including but not limited to: determining that the Sync message received by the second synchronization device 301 is The control layer sends the message sent by the previous communication node; if it is determined that the Sync message received by the second synchronization device 301 is sent by the control plane, the time synchronization information is set to be sent by the first synchronization device 302 to the next communication node. The sending time of the Sync message; if it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, the time synchronization information is set as the synchronization time difference; wherein, the synchronization time difference is the first synchronization device 302. The sending time of the Sync message sent by the communication node is different from the receiving time of the Sync message received by the second synchronization device 301.
第二同步设备301,还用于当基于标识信息确认接收到该Sync报文对 应的Followup报文时,在Followup报文中设置时间同步信息。The second synchronization device 301 is further configured to: when the acknowledgment of the Followup message corresponding to the Sync message is received, the time synchronization information is set in the Followup message.
可选的,在Followup报文中设置时间同步信息的方式,包括但不限于:在Followup报文的预设字段中设置时间同步信息。Optionally, the method for setting the time synchronization information in the Followup message includes, but is not limited to, setting the time synchronization information in the preset field of the Followup message.
可选的,第二同步设备301,还用于当基于标识信息确认接收到Sync报文对应的Followup报文时,在未接收到时间同步信息的情况下,将Followup报文发送至第一同步设备302;Optionally, the second synchronization device 301 is further configured to send the Followup message to the first synchronization, if the time synchronization information is not received, after receiving the Followup message corresponding to the Sync message based on the identifier information. Device 302;
第一同步设备302,还用于当接收到第二同步设备301发送的Followup报文时,将Followup报文反馈至第二同步设备301;The first synchronization device 302 is further configured to: when receiving the Followup message sent by the second synchronization device 301, feed the Followup message to the second synchronization device 301;
第二同步设备301,还用于当接收到第一同步设备302反馈的Followup报文和时间同步信息时,在Followup报文中设置时间同步信息,并停止将Followup报文发送至第一同步设备302。The second synchronization device 301 is further configured to: when receiving the Followup message and the time synchronization information fed back by the first synchronization device 302, set time synchronization information in the Followup message, and stop sending the Followup message to the first synchronization device. 302.
可选的,第一同步设备302,还用于当接收到的Sync报文的数量大于第一设定阈值时,对下一次接收到的Sync报文进行缓存。Optionally, the first synchronization device 302 is further configured to cache the next received Sync message when the number of received Sync messages is greater than the first set threshold.
可选的,第一同步设备302,还用于当将Followup报文反馈至第二同步设备301的次数大于第二设定阈值时,停止将Followup报文反馈至第二同步设备301。Optionally, the first synchronization device 302 is further configured to stop feeding the Followup message to the second synchronization device 301 when the number of times the Followup message is fed back to the second synchronization device 301 is greater than the second set threshold.
本发明第十实施例所述的同步报文的生成系统,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The system for generating a synchronization message according to the tenth embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the two-step PTP protocol of the network communication device. The standard time synchronization makes a wide range of network communication equipment suitable for the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第十一实施例,一种同步设备,如图8所示,包括以下组成部分:处理器501和存储器502。在本发明的一些实施例中,处理器501和存储器502可通过总线或者其它方式连接。In an eleventh embodiment of the present invention, a synchronization device, as shown in FIG. 8, includes the following components: a processor 501 and a memory 502. In some embodiments of the invention, processor 501 and memory 502 may be connected by a bus or other means.
处理器501可以是通用处理器,例如中央处理器(Central Processing Unit,CPU),还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(英文:Application Specific Integrated Circuit,ASIC),或者是被配置成 实施本发明实施例的一个或多个集成电路。其中,存储器502用于存储处理器501的可执行指令;The processor 501 may be a general-purpose processor, such as a central processing unit (CPU), or may be a digital signal processor (DSP) or an application specific integrated circuit (ASIC). Or one or more integrated circuits configured to implement embodiments of the present invention. The memory 502 is configured to store executable instructions of the processor 501;
存储器502,用于存储程序代码,并将该程序代码传输给处理器501。存储器502可以包括易失性存储器(Volatile Memory),例如随机存取存储器(Random Access Memory,RAM);存储器502也可以包括非易失性存储器(Non-Volatile Memory),例如只读存储器(Read-Only Memory,ROM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);存储器502还可以包括上述种类的存储器的组合。The memory 502 is configured to store the program code and transmit the program code to the processor 501. The memory 502 may include a volatile memory (Volatile Memory), such as a random access memory (RAM); the memory 502 may also include a non-volatile memory (Non-Volatile Memory), such as a read-only memory (Read- Only Memory, ROM), Flash Memory, Hard Disk Drive (HDD), or Solid-State Drive (SSD); the memory 502 may also include a combination of the above types of memories.
其中,处理器501用于调用存储器502存储的程序代码管理代码,执行本发明第一实施例至本发明第二实施例中任一实施例中部分或全部步骤。The processor 501 is configured to invoke the program code management code stored in the memory 502 to perform some or all of the steps from the first embodiment of the present invention to the second embodiment of the present invention.
在本实施例中,同步设备可以设置于任一网络通信设备中。In this embodiment, the synchronization device can be disposed in any of the network communication devices.
本发明第十一实施例所述的同步设备,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The synchronization device of the eleventh embodiment of the present invention enables the network communication device to carry time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the time for the network communication device to perform the PTP protocol based on the two-step method. Synchronization enables a wide range of network communication equipment to be applied to the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第十二实施例,一种同步设备,如图9所示,包括以下组成部分:处理器601和存储器602。在本发明的一些实施例中,处理器601和存储器602可通过总线或者其它方式连接。According to a twelfth embodiment of the present invention, a synchronization device, as shown in FIG. 9, includes the following components: a processor 601 and a memory 602. In some embodiments of the invention, processor 601 and memory 602 may be connected by a bus or other means.
处理器601可以是通用处理器,例如中央处理器(Central Processing Unit,CPU),还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(英文:Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。其中,存储器602用于存储处理器601的可执行指令;The processor 601 may be a general-purpose processor, such as a central processing unit (CPU), or may be a digital signal processor (DSP) or an application specific integrated circuit (ASIC). Or one or more integrated circuits configured to implement embodiments of the present invention. The memory 602 is configured to store executable instructions of the processor 601;
存储器602,用于存储程序代码,并将该程序代码传输给处理器601。存储器602可以包括易失性存储器(Volatile Memory),例如随机存取存储器(Random Access Memory,RAM);存储器602也可以包括非易失性存储器 (Non-Volatile Memory),例如只读存储器(Read-Only Memory,ROM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);存储器602还可以包括上述种类的存储器的组合。The memory 602 is configured to store the program code and transmit the program code to the processor 601. The memory 602 may include a volatile memory (Volatile Memory), such as a random access memory (RAM); the memory 602 may also include a non-volatile memory (Non-Volatile Memory), such as a read-only memory (Read- Only Memory, ROM), Flash Memory, Hard Disk Drive (HDD), or Solid-State Drive (SSD); the memory 602 may also include a combination of the above types of memories.
其中,处理器601用于调用存储器602存储的程序代码管理代码,执行本发明第三实施例至本发明第四实施例中任一实施例中部分或全部步骤。The processor 601 is configured to invoke the program code management code stored in the memory 602 to perform some or all of the steps from the third embodiment of the present invention to the fourth embodiment of the present invention.
在本实施例中,同步设备可以设置于任一网络通信设备中。In this embodiment, the synchronization device can be disposed in any of the network communication devices.
本发明第十二实施例所述的同步设备,使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。The synchronization device according to the twelfth embodiment of the present invention enables the network communication device to carry the time synchronization information in the Followup message according to the two-step PTP protocol standard, so as to implement the time for the network communication device to perform the PTP protocol based on the two-step method. Synchronization enables a wide range of network communication equipment to be applied to the two-step PTP protocol standard; it simplifies the control plane selection, reduces the complexity of the control plane implementation, and simplifies the control plane design flow.
本发明第十三实施例,一种计算机可读存储介质。A thirteenth embodiment of the present invention is a computer readable storage medium.
计算机存储介质可以是RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、移动硬盘、CD-ROM或者本领域已知的任何其他形式的存储介质。The computer storage medium can be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, mobile hard disk, CD-ROM, or any other form of storage medium known in the art.
计算机可读存储介质存储有一个或者多个程序,该一个或者多个程序可被一个或者多个处理器执行,以实现本发明第一实施例至本发明第二实施例中任一实施例中部分或全部步骤,和/或,以实现本发明第三实施例至本发明第四实施例中任一实施例中部分或全部步骤。The computer readable storage medium stores one or more programs, which may be executed by one or more processors to implement any one of the first embodiment of the present invention to the second embodiment of the present invention. Part or all of the steps, and/or to implement some or all of the steps of any one of the third embodiment of the present invention to the fourth embodiment of the present invention.
本发明第十三实施例所述的计算机可读存储介质,存储有一个或者多个程序,该一个或者多个程序可被一个或者多个处理器执行,能够使网络通信设备能够按照两步法PTP协议标准在Followup报文中携带时间同步信息,以实现了网络通信设备基于两步法PTP协议标准进行时间同步,使广泛的网络通信设备适用于两步法PTP协议标准;简化了控制面选型,降低了控制面实现的复杂性,有效简化了控制面的设计流程。A computer readable storage medium according to the thirteenth embodiment of the present invention, storing one or more programs, the one or more programs being executable by one or more processors, enabling the network communication device to follow the two-step method The PTP protocol standard carries time synchronization information in the Followup message to implement time synchronization of the network communication device based on the two-step PTP protocol standard, so that a wide range of network communication devices are applicable to the two-step PTP protocol standard; the control plane selection is simplified. The type reduces the complexity of the control surface implementation and simplifies the design flow of the control surface.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物 品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。The embodiments of the present invention have been described above with reference to the drawings, but the present invention is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative and not restrictive, and those skilled in the art In the light of the present invention, many forms may be made without departing from the spirit and scope of the invention as claimed.

Claims (10)

  1. 一种同步报文的生成方法,其中,包括:A method for generating a synchronous message, comprising:
    当接收到同步Sync报文时,在所述Sync报文中设置所述Sync报文的标识信息,并将所述Sync报文发送至第一同步设备;When the synchronous Sync message is received, the identification information of the Sync message is set in the Sync message, and the Sync message is sent to the first synchronization device;
    接收所述第一同步设备反馈的所述标识信息和所述Sync报文对应的时间同步信息;Receiving, by the first synchronization device, the identifier information and time synchronization information corresponding to the Sync packet;
    当基于所述标识信息确认接收到所述Sync报文对应的Followup报文时,在所述Followup报文中设置所述时间同步信息。When it is confirmed that the Followup message corresponding to the Sync message is received based on the identifier information, the time synchronization information is set in the Followup message.
  2. 根据权利要求1所述的方法,其中,所述在所述Followup报文中设置所述时间同步信息,包括:The method of claim 1, wherein the setting the time synchronization information in the Followup message comprises:
    在未接收到所述时间同步信息的情况下,将所述Followup报文发送至所述第一同步设备;Sending the Followup message to the first synchronization device if the time synchronization information is not received;
    当接收到所述第一同步设备反馈的所述Followup报文和所述时间同步信息时,在所述Followup报文中设置所述时间同步信息,并停止将所述Followup报文发送至所述第一同步设备。When the Followup message and the time synchronization information fed back by the first synchronization device are received, the time synchronization information is set in the Followup message, and the sending of the Followup message to the First sync device.
  3. 根据权利要求1至2中任一项所述的方法,其中,在接收到控制层面发送的所述Sync报文的情况下,所述时间同步信息包括:所述第一同步设备向下一通信节点发送所述Sync报文的发送时间。The method according to any one of claims 1 to 2, wherein, in the case of receiving the Sync message sent by the control plane, the time synchronization information comprises: the first synchronization device communicating to the next communication The sending time of the Sync message sent by the node.
  4. 根据权利要求1至2中任一项所述的方法,其中,在接收到上一通信节点发送的所述Sync报文的情况下,所述时间同步信息包括:同步时间差;其中,所述同步时间差为所述第一同步设备向下一通信节点发送所述Sync报文的发送时间,与接收到所述Sync报文的接收时间的差值。The method according to any one of claims 1 to 2, wherein, in the case of receiving the Sync message sent by the last communication node, the time synchronization information comprises: a synchronization time difference; wherein the synchronization The time difference is the difference between the sending time of the Sync message sent by the first synchronization device to the next communication node and the receiving time of receiving the Sync message.
  5. 一种同步报文的生成方法,其中,包括:A method for generating a synchronous message, comprising:
    当接收到第二同步设备发送的所述Sync报文时,向下一通信节点发送所述Sync报文;When receiving the Sync message sent by the second synchronization device, sending the Sync message to the next communication node;
    根据向下一通信节点发送所述Sync报文的发送时间,获取所述Sync报文对应的时间同步信息;Obtaining time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node;
    将所述Sync报文中携带的标识信息,及所述时间同步信息反馈至所述第二同步设备。And sending the identifier information carried in the Sync message and the time synchronization information to the second synchronization device.
  6. 根据权利要求5所述的方法,其中,在所述将所述Sync报文中携带的标识信息,及所述时间同步信息反馈至所述第二同步设备之前,所述方法还包括:The method of claim 5, wherein before the sending the identification information carried in the Sync message and the time synchronization information to the second synchronization device, the method further comprises:
    当接收到所述第二同步设备发送的Followup报文时,将所述Followup报文反馈至所述第二同步设备。When the Followup message sent by the second synchronization device is received, the Followup message is fed back to the second synchronization device.
  7. 根据权利要求5或6所述的方法,其中,所述根据向下一通信节点发送所述Sync报文的发送时间,获取所述Sync报文对应的时间同步信息,包括:The method according to claim 5 or 6, wherein the obtaining the time synchronization information corresponding to the Sync message according to the sending time of the Sync message sent by the next communication node comprises:
    判断所述第二同步设备接收到的所述Sync报文是控制层面发送的,还是上一通信节点发送的;Determining whether the Sync message received by the second synchronization device is sent by a control plane or sent by a previous communication node;
    若判定所述第二同步设备接收到的所述Sync报文是控制层面发送的,则将所述时间同步信息设置为向所述下一通信节点发送所述Sync报文的发送时间;If it is determined that the Sync message received by the second synchronization device is sent by the control plane, setting the time synchronization information to send the sending time of the Sync message to the next communication node;
    若判定所述第二同步设备接收到的所述Sync报文是上一通信节点发送的,则将所述时间同步信息设置为同步时间差;其中,所述同步时间差为向所述下一通信节点发送所述Sync报文的发送时间,与所述第二同步设备接收到所述Sync报文的接收时间的差值。If it is determined that the Sync message received by the second synchronization device is sent by the previous communication node, setting the time synchronization information to a synchronization time difference; wherein the synchronization time difference is to the next communication node And sending, by the second synchronization device, a difference between a sending time of the Sync message and a receiving time of the Sync message.
  8. 一种第二同步设备,其中,所述第二同步设备包括处理器和存储器;A second synchronization device, wherein the second synchronization device comprises a processor and a memory;
    所述处理器用于执行存储器中存储的同步报文的生成的程序,以实现根据权利要求1~4中任一项所述的同步报文的生成方法的步骤。The processor is configured to execute a program for generating a synchronization message stored in a memory to implement the steps of the method for generating a synchronization message according to any one of claims 1 to 4.
  9. 一种第一同步设备,其中,所述第一同步设备包括处理器和存储器;A first synchronization device, wherein the first synchronization device comprises a processor and a memory;
    所述处理器用于执行存储器中存储的同步报文的生成的程序,以实现根 据权利要求5~7中任一项所述的同步报文的生成方法的步骤。The processor is configured to execute a program for generating a synchronization message stored in the memory to implement the steps of the method for generating a synchronization message according to any one of claims 5-7.
  10. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现根据权利要求1~4中任一项所述的同步报文的生成方法的步骤,和/或,以实现根据权利要求5~7中任一项所述的同步报文的生成方法的步骤。A computer readable storage medium, wherein the computer readable storage medium stores one or more programs, the one or more programs executable by one or more processors to implement according to claims 1-4 The steps of the method for generating a synchronization message according to any one of the preceding claims, and/or the steps of the method for generating a synchronization message according to any one of claims 5 to 7.
PCT/CN2019/074550 2018-02-02 2019-02-02 Method for generating synchronization message, synchronization apparatus, and computer readable storage medium WO2019149280A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810107668.4A CN110138486B (en) 2018-02-02 2018-02-02 Method for generating synchronous message, synchronous device and computer readable storage medium
CN201810107668.4 2018-02-02

Publications (1)

Publication Number Publication Date
WO2019149280A1 true WO2019149280A1 (en) 2019-08-08

Family

ID=67477917

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/074550 WO2019149280A1 (en) 2018-02-02 2019-02-02 Method for generating synchronization message, synchronization apparatus, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110138486B (en)
WO (1) WO2019149280A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411153A (en) * 2021-06-07 2021-09-17 中国人民解放军国防科技大学 Centralized control time synchronization method for time sensitive network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101400018A (en) * 2007-09-30 2009-04-01 中兴通讯股份有限公司 Broadcast data synchronization layer implementing method
CN102640454A (en) * 2009-11-11 2012-08-15 三菱电机株式会社 Communication system, communication apparatus and time synchronization method
CN102801733A (en) * 2012-08-28 2012-11-28 盛科网络(苏州)有限公司 Method for setting security authentication in precision time protocol (PTP)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599894B (en) * 2008-06-04 2013-01-30 华为技术有限公司 Method, device and system for processing messages containing clock information
US9548831B2 (en) * 2011-03-03 2017-01-17 Nec Corporation Synchronizing system, synchronizing method, first synchronizing device, second synchronizing device, and computer program
CN103746789B (en) * 2013-12-18 2017-04-26 北京四方继保自动化股份有限公司 Method for realizing high-precision time scales in IEEE-1588 protocol based on CPU universal timer
WO2017144108A1 (en) * 2016-02-25 2017-08-31 Khalifa University of Science, Technology, and Research Methods and systems for estimating skew
CN105812209B (en) * 2016-05-09 2019-01-22 中国南方电网有限责任公司电网技术研究中心 The condition detection method and system of clock synchronization system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101400018A (en) * 2007-09-30 2009-04-01 中兴通讯股份有限公司 Broadcast data synchronization layer implementing method
CN102640454A (en) * 2009-11-11 2012-08-15 三菱电机株式会社 Communication system, communication apparatus and time synchronization method
CN102801733A (en) * 2012-08-28 2012-11-28 盛科网络(苏州)有限公司 Method for setting security authentication in precision time protocol (PTP)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411153A (en) * 2021-06-07 2021-09-17 中国人民解放军国防科技大学 Centralized control time synchronization method for time sensitive network
CN113411153B (en) * 2021-06-07 2022-07-26 中国人民解放军国防科技大学 Centralized control time synchronization method for time sensitive network

Also Published As

Publication number Publication date
CN110138486B (en) 2021-10-12
CN110138486A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
US11444713B2 (en) Transmitting residence time information in a network
EP3026861A1 (en) Method and apparatus for processing time synchronization
CN101455014B (en) Methods and devices for sending transmission-time or reception-time information for a transmitted or received message
WO2017133478A1 (en) Method and clock for time synchronization
WO2011017867A1 (en) Method and system for bearing time synchronization protocol in optical transport network
WO2009071029A1 (en) Synchronization system and method of time information and related equipment
JP2010035171A (en) Multi-router for time-controlled communication system
JP5455138B2 (en) Method and clock device for processing high precision time protocol messages
JP2013520137A (en) Rate-variable multicast transmission for clock distribution in packet networks
US11139995B2 (en) Methods and router devices for verifying a multicast datapath
WO2014117489A1 (en) Clock synchronization method and device
WO2017177751A1 (en) Time synchronization method and apparatus
WO2013178148A1 (en) Clock synchronization method and device for communication network
JP2016005247A (en) Network transmission system, and master node and slave node thereof
US8806063B1 (en) Enhanced pulse assisted time synchronization protocol
WO2019149280A1 (en) Method for generating synchronization message, synchronization apparatus, and computer readable storage medium
US20150055662A1 (en) Internet group management protocol (igmp) leave message processing synchronization
WO2019205756A1 (en) Data transmission protection method, apparatus, and system, and computer readable storage medium
WO2019085651A1 (en) Software-defined network setting method, controller, switch, and storage medium
CN113572561A (en) Method, apparatus, communication system and medium for clock synchronization
WO2015096734A1 (en) Downlink transmission method for service data, and packet data gateway
CN102447612B (en) Bidirectional point is to multipoint label switched path foundation, grafting and pruning method and system
EP4024987B1 (en) Timeslot negotiation method and device
WO2015070427A1 (en) Method, device, and system for configuring maintenance association (ma)
WO2017166969A1 (en) Method and apparatus for sending 1588 message, and storage medium

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: 19746907

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01.12.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 19746907

Country of ref document: EP

Kind code of ref document: A1