WO2017096994A1 - 一种时钟同步的方法、设备和***、存储介质 - Google Patents

一种时钟同步的方法、设备和***、存储介质 Download PDF

Info

Publication number
WO2017096994A1
WO2017096994A1 PCT/CN2016/098770 CN2016098770W WO2017096994A1 WO 2017096994 A1 WO2017096994 A1 WO 2017096994A1 CN 2016098770 W CN2016098770 W CN 2016098770W WO 2017096994 A1 WO2017096994 A1 WO 2017096994A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
message
delay
packet
main control
Prior art date
Application number
PCT/CN2016/098770
Other languages
English (en)
French (fr)
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 WO2017096994A1 publication Critical patent/WO2017096994A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • 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/0685Clock or time synchronisation in a node; Intranode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0075Arrangements for synchronising receiver with transmitter with photonic or optical means

Definitions

  • the present invention relates to network communication technologies, and in particular, to a method, device and system for clock synchronization, and a storage medium.
  • the IEEE 1588 protocol is usually handled in a distributed architecture networking manner, that is, each network service node runs an IEEE 1588 protocol system, which has the advantage of being able to extend the network node.
  • each network node needs to find the best clock of each interface in the network node by running the Best Master Clock algorithm (BMC)
  • BMC Best Master Clock algorithm
  • the clock of each interface in the local node is from the upper The clock of a master device, which leads to stronger coupling between network nodes. Therefore, maintenance is difficult and complicated to implement in the event of a failure.
  • the IEEE 1588 protocol has strict requirements for the transmission of the transport network, that is, the delay between devices participating in time synchronization must be a relatively fixed value, and the two-way residence time of the device must be equal, otherwise time Synchronization produces large errors.
  • OTN optical transport network
  • embodiments of the present invention are directed to a method, a device, and a system for storing a clock, and a storage medium, which reduce coupling between network nodes during time synchronization, and improve time synchronization between devices participating in time synchronization. Precision.
  • an embodiment of the present invention provides a method for time synchronization, where the method is applied to a master device, where the method includes: the master device encapsulates the generated first time value and the acquired first camp time to the first device. Transmitting the first packet to the slave device; the master device receiving the second packet sent by the slave device; wherein the second packet includes a third camp time; The master device acquires a fourth dwell time and a fourth time value when receiving the second packet; the master device uses the fourth time value, the fourth dwell time, and the second packet The third dwell time encapsulates the third message and sends the third message to the slave device.
  • the embodiment of the present invention provides a method for time synchronization, where the method is applied to a slave device, and the method includes: when the slave device receives the first packet, acquiring the first camp time and the second camper. a time, a first time value, and a second time value; the third time value is recorded from the device, the obtained third dwell time is encapsulated into the second message, and the second message is sent to the master device; the slave device And receiving, in the third packet, a fourth time value, a fourth dwell time, and a third dwell time in the second packet, and according to the first time value, Calculating the second time value, the third time value, and the fourth time value, and the first dwell time, the second dwell time, the third dwell time, and the fourth dwell time The time offset and time delay between the master device and the slave device.
  • the embodiment of the present invention provides a master device, where the master device includes: a first main control board and a first service board; wherein the first main control board is configured to generate a first time value. And the obtained first dwell time is encapsulated into the first packet; the first service board is configured to send the first packet to the slave device; and receive the second packet sent by the slave device ; said The second packet includes a third dwell time; the first main control board is further configured to acquire a fourth dwell time and a fourth time value when the first service board receives the second packet; And the third time value, the fourth dwell time, and the third dwell time of the second packet are encapsulated into a third packet; the service board is further configured to: The text is sent to the slave device.
  • the embodiment of the present invention provides a slave device, where the slave device includes a second main control board and a second service board, where the second service board is configured to receive the first packet; a second main control board, configured to acquire a first dwell time, a second dwell time, a first time value, and a second time value; and, record a third time value, and package the acquired third dwell time to the first
  • the second service board is further configured to send the second packet to the master device, and receive the third packet, where the second main control board is further configured to obtain the third packet.
  • a fourth time value, a fourth dwell time, and a third dwell time in the second message and according to the first time value, the second time value, the third time value, and the fourth time value, And calculating, by the first dwell time, the second dwell time, the third dwell time, and the fourth dwell time, a time deviation between the master device and the slave device Delay.
  • an embodiment of the present invention provides a system for time synchronization, where the system includes: a master device and a slave device;
  • the master device is configured to encapsulate the generated first time value and the acquired first camp time into the first packet, and send the first packet to the slave device; and receive the a second message sent by the device; the second message includes a third dwell time; and, when the second message is received, acquiring a fourth dwell time and a fourth time value; The second message includes a third dwell time; and, the fourth time value, the fourth dwell time, and the third dwell time of the second message in the second message are encapsulated into the third message Sending a message to the slave device;
  • the slave device is configured to acquire, when receiving the first packet, a first camp time, a second camp time, a first time value, and a second time value; and, the record acquires the third time value, and the acquiring
  • the third dwell time is encapsulated into the second packet, and the second packet is sent to the primary device; and, when the third packet is received, the fourth time value included in the third packet is obtained.
  • a fourth dwell time and a third dwell time in the second message and based on the first time value, the second time value, the third time value, and the fourth time value, and the first resident
  • the time, the second dwell time, the third dwell time, and the fourth dwell time calculate a time offset and a time delay between the master device and the slave device.
  • an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the time synchronization method provided by the foregoing first embodiment.
  • an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform the time synchronization method provided by the foregoing second embodiment.
  • the embodiment of the invention provides a clock synchronization method, device and system, and a storage medium, which can acquire the two-way residence time of the master and slave devices through multiple message exchanges between the master and the slave device, and according to The two-way dwell time of the master and slave devices can be used to know the delay between the master and slave devices, which reduces the coupling between network nodes during time synchronization and improves the accuracy of time synchronization between devices participating in time synchronization.
  • FIG. 1 is a schematic flowchart of a method for clock synchronization according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a first device sending a first packet according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of acquiring a second dwell time and a second time value from a device according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of sending a second packet from a device according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of acquiring a fourth dwell time and a fourth time value by a master device according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of a third device sending a third packet according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of a master device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a slave device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic flowchart of another primary device sending a first packet according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic flowchart of another method for acquiring a second dwell time and a second time value from a device according to an embodiment of the present disclosure
  • FIG. 11 is a schematic flowchart of another second packet sent by a device according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic flowchart of another master device acquiring a fourth dwell time and a fourth time value according to an embodiment of the present disclosure
  • FIG. 13 is a schematic flowchart of another primary device sending a third packet according to an embodiment of the present disclosure
  • FIG. 14 is a schematic flowchart of a time synchronization method on a primary device side according to an embodiment of the present disclosure
  • FIG. 15 is a schematic flowchart of a time synchronization method on a slave device side according to an embodiment of the present disclosure
  • FIG. 16 is a schematic structural diagram of another main device according to an embodiment of the present disclosure.
  • FIG. 17 is a schematic structural diagram of another slave device according to an embodiment of the present disclosure.
  • FIG. 18 is a schematic structural diagram of a system for time synchronization according to an embodiment of the present invention.
  • a method for time synchronization may be applied to a time synchronization system, where the system may include: a master device and a slave device for performing message interaction.
  • the master device includes a first main control board and at least one first service board
  • the slave device includes a second main control board and at least one second service board.
  • the method can include:
  • the master device encapsulates the generated first time value and the obtained first camp time into the first packet, and sends the first packet to the slave device.
  • the first packet may be a Sync message that is sent by the master device to the slave device, and may also be other types of packets, which is not limited in this embodiment of the present invention.
  • the first dwell time is the dwell time of the message in the main device when the main device performs the message transmission.
  • step S101 is as shown in FIG. 2, and includes:
  • the first main control board records the first time value T 1 of the Sync message when the Sync message is generated, and encapsulates the first time value T 1 in the reserved field of the Sync message; in this embodiment, The first main control board saves the first time value T 1 in the form of a system time stamp, and encapsulates it in a precise time field of the Sync message;
  • S1012 The MPU Sync first message to the first service board, and recording a first MPU sending Sync packets Tout 1; e.g., a first MPU sending Sync packets also Tout 1 It can be saved in the form of a system timestamp and encapsulated in the field field before the Precision Time Protocol (PTP) information in the Sync message and before the frame check sequence (FCS) check; to, T 1 earlier than Tout 1;
  • PTP Precision Time Protocol
  • FCS frame check sequence
  • the first service board parses the Sync message, and obtains a time Tout 1 when the first main control board sends the Sync message;
  • a first time value T 1, followed (Follow-up) after the packets may be encapsulated in Sync message, sent by a first service board to the slave, to be noted that, For the Follow-up message, the first service board is only responsible for sending, and does not perform other processing such as parsing.
  • the slave device acquires the first time value, the second time value, the first dwell time, and the second dwell time when receiving the first packet.
  • the second camp time is the dwell time of the packet in the slave device during the process of receiving the packet.
  • the first packet is a Sync packet as an example.
  • the slave device obtains the first time value, the second time value, the first camp time, and the second camp time.
  • step S102 is as shown in FIG. 3, and includes:
  • the second service board records the time tin 2 when the second service board receives the Sync message when receiving the Sync message.
  • the second service board receives the Sync message at the time tin 2 It can also be saved in the form of a system timestamp, and encapsulated in a field field after the PTP information and before the FCS check in the Sync message;
  • the second service board sends the Sync message to the second main control board.
  • second recording control board receives the Sync message time Tin 2; and analyzing the second service board Sync message received Sync resulting encapsulated packets tin 2, obtaining a second dwell time to obtain ⁇ t 2;
  • the second main control board records the second time value T 2 of the parsing Sync message.
  • the second main control board can save the second time value T 2 in the form of a system time stamp;
  • the first dwell time ⁇ t 1 in the correction domain ⁇ T 1 of the Sync message and the first time value T 1 in the precedence field field are recorded.
  • the second packet may be a Delay-req packet sent from the device to the master device, or may be other types of packets, which is not limited in this embodiment of the present invention.
  • the third dwell time is the dwell time of the message in the slave device when the slave device performs the message transmission.
  • step S103 is as shown in FIG. 4, and may include:
  • Delay-req packet generating third time value T 3 in the second recording MPU generating a delay request (Delay-req) message;
  • the second control board may be the third time
  • the value T 3 is saved in the form of a system time stamp;
  • the second main control board sends the Delay-req message to the second service board, and records the time Tout 3 of the second main control board to send the Delay-req message.
  • the second main board The time Tout 3 of the Delay-req packet sent by the control board can also be saved in the form of a system timestamp and encapsulated in the field after the PTP information in the Delay-req message and before the FCS check; understandably, T 3 Be earlier than Tout 3 ;
  • the second service board parses the Delay-req message, and obtains the time Tout 3 of the second main control board to send the Delay-req message;
  • S104 The master device acquires the fourth dwell time and the fourth time value when receiving the second packet.
  • the fourth camp time is the dwell time of the packet in the master device during the process of receiving the packet.
  • step S104 is as shown in FIG. 5, and includes:
  • S1041 Upon receiving the first service plate Delay-req packet, recording a first service board receiving Delay-req packets tin 4; In other embodiments of the present invention, the first service board receives packets Delay-req
  • the time can also be saved in the form of a system timestamp and encapsulated in a field field after the PTP information and before the FCS check in the Delay-req message.
  • the first service board sends the Delay-req message to the first main control board.
  • the first main control board records the time Tin 4 of receiving the Delay-req message, and parses the Delay-req message to obtain the time tin 4 of the first service board that receives the Delay-req message, and obtains the fourth station. Leave time ⁇ t 4 ;
  • the first main control board records the fourth time value T 4 of the Delay-req message.
  • the first main control board can save the fourth time value T 4 in the form of a system time stamp.
  • S105 The master device encapsulates the fourth time value, the fourth dwell time, and the third dwell time in the second packet into a third packet, and sends the third packet to the slave device.
  • the third packet may be a Delay-resp packet sent by the primary device to the secondary device, or may be other types of packets, which is not limited in this embodiment of the present invention.
  • step S105 is as shown in FIG. 6, and includes:
  • the first main control board generates a Delay-resp message, and the fourth time value T 4 , the fourth dwell time ⁇ t 4 , and the Delay-req message in the Delay-req message are in the correction domain.
  • the third camp time ⁇ t 3 is encapsulated into a Delay-resp message, and the Delay-resp message is sent to the first service board;
  • the first service board receives the Delay-resp message sent by the first main control board, and sends the Delay-resp message to the slave device.
  • the slave device acquires the fourth time value, the fourth dwell time, and the third dwell time in the second packet when receiving the third packet, and according to the first time value, the second time value, a third time value and a fourth time value, and the first dwell time, the second dwell time, the third dwell time, and the fourth dwell time are calculated between the master device and the slave device Time offset and delay, adjust the current time of the slave device by time offset and delay to synchronize the master and slave devices.
  • the third packet may be a Delay-resp packet sent by the primary device to the secondary device, or may be other types of packets, which is not limited in this embodiment of the present invention.
  • the first time value T 1 may be obtained in the presettime field of the Sync message received from the device, and the value ⁇ T′ 1 in the first message correction field may also be in the correction field of the Sync message. Get it in.
  • PTP Precision Time Protocol
  • time deviations may be And delay Calculate the time deviation and delay between the master and slave devices, and then obtain the current time of the first main control board according to the PTP, and synchronize the current time of the first main control board of the master device to the second master of the slave device.
  • the purpose of the board is not limited to the following steps:
  • this embodiment provides a method implementation process for time synchronization, which describes the implementation process of each step in the first embodiment.
  • the master device includes a first main control board and at least one first service board.
  • the first main control board includes a first FPGA module and a first main unit in addition to the CPU.
  • the first Gigabit Media Independent Interface (Sgmii) interface, the first Field-Programmable Gate Array (FPGA) module includes: a first Sync unit, a first Delay a -req unit, a first Delay-resp unit, a first timer 0 (Timer0) unit, and a first timer 1 (Timer1) unit;
  • the first service board includes a first service board sgmii interface, a first Framer module, and a first
  • the optical module, the first framer module further includes a first framer serdes unit, where the framer is an optical transport network (OTN) frame processor; it should be noted that the first Sync unit, the first Delay-req unit, The first Delay-resp unit is a unit for processing the packet on the first main control board, and
  • the slave device includes a second main control board and at least one second service board; wherein the second main control board includes a second FPGA module and a second main control board sgmii interface, and the second FPGA
  • the module further includes: a second Sync unit, a second Delay-req unit, a second Delay-resp unit, a second Timer0 unit, and a second Timer1 unit;
  • the second service board includes a second service board sgmii interface, a second Framer module, and
  • the second optical module, the second framer module further includes a second Framer serdes unit; it should be noted that the second Sync unit, the second Delay-req unit, and the second Delay-resp unit are all the second main control board for transmitting packets.
  • the processed unit processes the corresponding type of message.
  • step S101 the master device encapsulates the generated first time value and the obtained first camp time into the first packet, and the first packet is encapsulated into the first packet.
  • the implementation process sent to the slave device can include:
  • the first Sync unit on the master device generates and sends a Sync message to the first Timer0 unit, and the first Timer0 unit receives the Sync message sent by the first Sync unit, and sends the Sync message to the first Timer1 unit.
  • the first recording MPU unit transmits a first Timer0 Sync packets is a first time value, stored in the form of T 1 as the time stamp, the time stamp T 1 and Sync packets precisetime charged field domain;
  • the first Timer1 unit receives the Sync message sent by the first Timer0 unit, and sends the Sync message to the first main control board sgmii interface module;
  • the first main control board sgmii interface module receives the Sync message sent by the first Timer1 unit, and transmits the Sync message to the first service board sgmii interface module;
  • the first service board sgmii interface module receives the Sync message transmitted by the sgmii interface module of the first main control board, and sends the Sync message to the first Framer module.
  • the first framer serializer (serdesizer) unit in the first framer module receives and sends the Sync message, and sends the Sync message to the first optical module.
  • the first service board records a time when the first Framer serdes unit sends the Sync message, and saves the system timestamp tout 1 ;
  • the first optical module receives the Sync message sent by the first Framer serdes unit, and sends the Sync message to the slave device.
  • step S901 the time value T 1, a first follower (Follow-up) after the packets may be encapsulated in Sync message, sent by a first service board to the slave, to be noted that, For the Follow-up message, the first service board is only responsible for sending, and does not perform other processing such as parsing.
  • the slave device acquires a first time value, a second time value, a first dwell time, and a second resident when receiving the first message.
  • the implementation of time can include:
  • the second optical module in the device receives the packet sent by the master device, and sends the packet to the second Framer module, where the second framer module identifies the Sync packet, and the Sync packet is unified to the inter-board communication.
  • the second Framer serdes unit in the second Framer module receives the Sync message, and sends the Sync message to the second service board sgmii interface module.
  • the second service board sgmii interface module receives the Sync message sent by the second Framer serdes unit, and transmits the Sync message to the second main control board sgmii interface module;
  • the sgmii interface module of the second main control board receives the Sync message transmitted by the sgmii interface module of the second service board, and sends the Sync message to the second Timer1 unit.
  • the second main control board records the time when the second Timer1 unit receives the Sync message, and saves the system time stamp Tin 2 ;
  • the second main control board parses the field field after the PTP information and before the FCS check in the Sync message, and obtains the time tin 2 of the second Framer serdes unit to receive the Sync message;
  • the second Timer0 unit sends a Sync message to the second Sync unit, and the second Sync unit parses the Sync message, and records the first dwell time ⁇ t 1 and the presettime field in the correction field ⁇ T 1 of the Sync message.
  • the first time value T 1 The first time value T 1 .
  • step S103 the slave device records a third time value, encapsulates the obtained third camp time into a second packet, and encapsulates the second packet.
  • the implementation process sent to the master device can include:
  • the second Timer0 unit After generating a Delay-req message from the second Delay-req unit in the device, the second Timer0 unit receives the Delay-req message sent by the second Delay-req unit, and sends the Delay-req message to the first Two Timer1 units;
  • the second MPU Timer0 recording unit transmits a second packet Delay-req time third time value, stored in the form of a timestamp T 3;
  • the second Timer1 unit receives the Delay-req message sent by the second Timer0 unit, and sends the Delay-req message to the second main control board sgmii interface module.
  • the time stamp is saved in the form of Tout 3 system, and the system information is located PTP timestamp Tout 3 charged Delay-req packet: S1104 Field field before FCS check;
  • the second main control board sgmii interface module receives the Delay-req message sent by the second Timer1 unit, and transmits the Delay-req message to the second service board sgmii interface module.
  • the second service board sgmii interface module receives the Delay-req message transmitted by the sgmii interface module of the second main control board, and sends the Delay-req message to the second Framer module.
  • the second Framer serdes unit in the second Framer module receives the Delay-req message, and sends the Delay-req message to the second optical module.
  • the second service board records the time when the second Framer serdes unit sends the Delay-req message, and saves the system timestamp tout 3 ;
  • the second service board parses the field field after the PTP information and before the FCS check in the Delay-req message, to obtain the time Tout 3 of the second Timer1 unit to send the Delay-req message;
  • the second optical module receives the Delay-req message sent by the second Framer serdes unit, and sends the Delay-req message to the master device.
  • the implementation process of acquiring the fourth dwell time and the fourth time value may include:
  • the first optical module in the master device receives the packet sent by the slave device, and sends the packet to the first framer module, and the first framer module identifies the Delay-req packet, and unifies the Delay-req packet.
  • the first Framer serdes unit in the first Framer module receives the Delay-req message, and sends the Delay-req message to the first service board sgmii interface module.
  • the first service board recording unit receives a first Framer serdes Delay-req packets, TiN timestamp stored in the form of 4, 4 and the Delay-req encapsulated packet information is located after PTP timestamp tin, FCS Verify the field field before;
  • the first service board sgmii interface module receives the Delay-req message sent by the first Framer serdes unit, and then transmits the Delay-req message to the first main control board sgmii interface module;
  • the first main control board sgmii interface module receives the Sync message transmitted by the sgmii interface module of the first service board, and then sends the Delay-req message to the first Timer1 unit.
  • the first main control board records the time when the first Timer1 unit receives the Delay-req message, and saves the system timestamp Tin 4 ;
  • the first main control board parses the field field after the PTP information and before the FCS check in the Delay-req message, and obtains the time tin 4 of the first Framer serdes unit receiving the Delay-req message;
  • the first unit transmits Timer1 Delay-req packet to the first Timer0 unit, the recording unit receives a first Timer0 Delay-req packets to a fourth time value, stored in the form of a time stamp T 4;
  • the first Timer0 unit sends a Delay-req message to the first Delay-req unit, and the first Delay-req unit receives and parses the Delay-req message.
  • step S105 the master device encapsulates the fourth time value, the fourth dwell time, and the third dwell time in the second packet into The third packet and the process of sending the third packet to the slave device may include:
  • the first Delay-resp unit in the master device generates a Delay-resp message, and the fourth time value T 4 , the fourth dwell time ⁇ t 4 , and the Delay-req message in the Delay-req message are in the modified domain.
  • the third dwell time ⁇ t 3 is encapsulated into a Delay-resp message, and the Delay-resp message is sent to the first Timer0 unit;
  • the first Timer0 unit receives the Delay-resp message sent by the first Delay-resp unit, and sends the Delay-resp message to the first Timer1 unit.
  • the first Timer1 unit receives the Delay-resp message sent by the first Timer0 unit, and sends the Delay-resp message to the first main control board sgmii interface module.
  • the first main control board sgmii interface module receives the Delay-resp message sent by the first Timer1 unit, and transmits the Delay-resp message to the first service board sgmii interface module.
  • the first service board sgmii interface module receives the Delay-resp message sent by the sgmii interface module of the first main control board, and sends the Delay-resp message to the first optical module by using the first framer module;
  • the first optical module receives the Delay-resp message sent by the first Framer module, and sends the Delay-resp message to the slave device.
  • PTP Precision Time Protocol
  • the third packet may be a Delay-resp packet sent by the primary device to the secondary device, or may be other types of packets, which is not limited in this embodiment of the present invention.
  • the first time value T 1 may be obtained in the precise time field of the Sync message received from the device, and the value ⁇ T 1 in the first message correction field may also be in the modified domain of the Sync message. Get it.
  • time deviations may be And delay Calculate the time deviation and delay between the master and slave devices, and then obtain the current time of the first main control board according to the PTP, and synchronize the current time of the first main control board of the master device to the second master of the slave device.
  • the purpose of the board is not limited to the following steps:
  • the service board also needs to be synchronized with the main control board in the respective devices, so that the time of the boards in all the devices is consistent.
  • the time synchronization process can be performed according to the foregoing process. Narration.
  • FIG. 14 a flow of a time synchronization method on the main device side according to an embodiment of the present invention is shown, and the method may include:
  • the master device encapsulates the generated first time value and the obtained first camp time into the first packet, and sends the first packet to the slave device.
  • S1402 The master device receives the second packet sent by the slave device.
  • the second message includes a third camp time
  • the master device acquires a fourth dwell time and a fourth time value when receiving the second packet.
  • S1404 The master device encapsulates the fourth time value, the fourth dwell time, and the third dwell time in the second packet into the third packet, and the third device The message is sent to the slave.
  • the master device may include a first main control board and at least one first service board; the first message is a Sync message; the second message is a Delay-req message; The message is a Delay-resp message.
  • the master device encapsulates the generated first time value and the obtained first dwell time into the first packet, and sends the first packet to the slave device, including:
  • the first main control board records a first time value T 1 of the Sync message when the Sync message is generated, and encapsulates the first time value T 1 into a reservation of the Sync message.
  • the first main control board sends the Sync message to the first service board, and records the time Tout 1 of the first main control board to send the Sync message;
  • the first service board parses the Sync message, and obtains a time Tout 1 when the first main control board sends the Sync message;
  • the time Tout 1 of the Sync message and the time tout 1 of the first service board sending the Sync message acquire the first dwell time ⁇ t 1 and encapsulate the first dwell time ⁇ t 1
  • the correction field ⁇ T 1 in the Sync message is sent to the slave device.
  • the master device acquires a fourth dwell time and a fourth time value when receiving the second packet; and the fourth dwell time and the fourth time The value is encapsulated in the second packet, including:
  • the first service board records the time tin 4 of the first service board receiving the Delay-req message when receiving the Delay-req message;
  • the first main control board records the time Tin 4 of receiving the Delay-req message, and parses the Delay-req message to obtain the time tin 4 of the encapsulated first service board receiving the Delay-req message. Obtaining the fourth dwell time ⁇ t 4 ;
  • the first main control board records the fourth time value T 4 of parsing the Delay-req message.
  • the master device encapsulates the fourth time value, the fourth dwell time, and the third dwell time in the second packet into a third packet, and
  • the third message is sent to the slave device, including:
  • the first main control board generates the Delay-resp message, and the fourth time value T 4 , the fourth dwell time ⁇ t 4, and the third station in the Delay-req message correction field
  • the delay time ⁇ t 3 is encapsulated into the Delay-resp message, and the Delay-resp message is sent to the first service board;
  • the first service board receives the Delay-resp message sent by the first main control board, and sends the Delay-resp message to the slave device.
  • the method may include:
  • the slave device acquires a first camp time, a second camp time, a first time value, and a second time value when receiving the first packet.
  • the slave device When receiving the third packet, acquires a fourth time value, a fourth dwell time, and a third dwell time in the second packet included in the third packet, and according to the first a time value, a second time value, a third time value, and a fourth time value, and the first dwell time, The second dwell time, the third dwell time, and the fourth dwell time are calculated, and a time offset and a delay between the master device and the slave device are calculated.
  • the slave device includes a second main control board and at least one second service board; the first message is a Sync message; and the second message is a Delay-req message; The third message is a Delay-resp message.
  • the slave device acquires the first camp time, the second camp time, the first time value, and the second time value when receiving the first packet, including:
  • the second service board records the time tin 2 when the second service board receives the Sync message when receiving the Sync message;
  • the second main control board records the time Tin 2 of receiving the Sync message; and parses the Sync message to obtain the time tin 2 of the encapsulated second service board receiving the Sync message, and obtains the The second dwell time ⁇ t 2;
  • the second main control board records a second time value T 2 for parsing the Sync message
  • the second main control board records a first dwell time ⁇ t 1 in the correction domain ⁇ T 1 of the Sync message and a first time value T 1 in the precedence field.
  • the slave device records the third time value, and the obtained third camp time is encapsulated into the second packet, and the second packet is sent to the master device, including:
  • the second main control board records a third time value T 3 of the Delay-req message when the Delay-req message is generated;
  • the second main control board sends the Delay-req message to the second service board, and records the time Tout 3 of the second main control board to send the Delay-req message;
  • the second service board parses the Delay-req message, and obtains a time Tout 3 when the second main control board sends the Delay-req message;
  • the time Tout 3 when the control board sends the Delay-req message and the time tout 3 when the second service board sends the Delay-req message acquire the third dwell time ⁇ t 3 , and the third The camping time ⁇ t 3 is encapsulated in the correction field ⁇ T 2 of the Delay-req message sent to the master device.
  • the slave device when receiving the third packet, acquires a fourth time value, a fourth dwell time, and a third resident in the second packet included in the third packet. Remaining time and based on the first time value, the second time value, the third time value, and the fourth time value, and the first dwell time, the second dwell time, the third dwell Time and the fourth dwell time, calculating a time offset and a delay between the master device and the slave device, including:
  • the slave device passes the synchronization mechanism of the precise time protocol PTP, and the time stamps T 1 and T 2 corresponding to the first time value, the second time value, the third time value, and the fourth time value respectively.
  • the main device 160 includes: a first main control board 1601 and a first service board 1602;
  • the first main control board 1601 is configured to encapsulate the generated first time value and the obtained first dwell time into the first message
  • the first service board 1602 is configured to send the first packet to the slave device
  • the second message includes a third station Leave time
  • the first main control board 1601 is further configured to acquire a fourth dwell time and a fourth time value when the first service board 1602 receives the second message;
  • the service board is further configured to send the third packet to the slave device.
  • the first message is a Sync message
  • the second message is a Delay-req message
  • the third message is a Delay-resp message.
  • the first main control board 1601 is configured to record a first time value T 1 of generating the Sync message when the Sync message is generated, and the first time is The value T 1 is encapsulated in a reserved field of the Sync message;
  • the first service board 1602 is configured to parse the Sync message to obtain the time Tout 1 for sending the Sync message;
  • the Sync message when the Sync message is sent to the slave device, record the time tout 1 of sending the Sync message, and send the time Tout 1 of the Sync message according to the first main control board 1601. Obtaining, by the first service board 1602, the time tout 1 of the Sync message, acquiring the first camp time ⁇ t 1 , and encapsulating the first camp time ⁇ t 1 in a correction domain in the Sync message ⁇ T 1 is sent to the slave device.
  • the first service board 1602 is configured to record, when receiving the Delay-req message, the time that the first service board 1602 receives the Delay-req message, tin 4 ;
  • the first main control board 1601 is configured to record the time Tin 4 of receiving the Delay-req message, and parse the Delay-req message to obtain the first service board 1602 to receive the Delay-req report. time text tin 4, to obtain the fourth acquired dwell time ⁇ t 4;
  • the first main control board 1601 is configured to generate the Delay-resp message, and the fourth time value T 4 in the Delay-req message, and the The third camp time ⁇ t 3 in the Delay-req message correction domain is encapsulated into the Delay-resp message, and the Delay-resp message is sent to the first service board 1602;
  • the first service board 1602 is configured to receive the Delay-resp message sent by the first main control board 1601, and send the Delay-resp message to the slave device.
  • a slave device 170 which may include a second main control board 1701 and a second service board 1702, where
  • the second service board 1702 is configured to receive the first packet.
  • the second main control board 1701 is configured to acquire a first dwell time, a second dwell time, a first time value, and a second time value;
  • the second service board 1702 is further configured to send the second packet to the master device
  • the second main control board 1701 is further configured to acquire a fourth time value, a fourth dwell time, and a third dwell time in the second packet included in the third packet, and according to the first a time value, a second time value, a third time value, and a fourth time value, and the first dwell time, the second dwell time, the third dwell time, and the fourth dwell time Calculating a time offset and a delay between the master device and the slave device.
  • the first message is a Sync message
  • the second message is a Delay-req message
  • the third message is a Delay-resp message.
  • the second service board 1702 is configured to record, when receiving the Sync message, a time tin 2 when the second service board 1702 receives the Sync message;
  • the second control board 1701 configured to record the received Sync packets Tin 2; Sync message and parsing the obtained second encapsulating the service board 1702 receives the Sync packets tin 2 obtaining a second dwell time to obtain ⁇ t 2;
  • the second main control board 1701 records the first dwell time ⁇ t 1 in the correction domain ⁇ T 1 of the Sync message and the first time value T 1 in the precedence field.
  • the second main control board 1701 is configured to record a third time value T 3 of generating the Delay-req message when the Delay-req message is generated;
  • the second service board 1702 is configured to parse the Delay-req message, and obtain a time Tout 3 when the second main control board 1701 sends the Delay-req message;
  • the Delay-req message when the Delay-req message is sent to the primary device, record the time tout 3 of the second service board 1702 to send the Delay-req message, and according to the second main control board 1701 Transmitting the time Tout 3 of the Delay-req message with the time tout 3 of the second service board 1702 to send the Delay-req message, acquiring the third dwell time ⁇ t 3 , and the third station the residence time ⁇ t 3 ⁇ T correction field encapsulated in the packet Delay-req 2 transmits to the master device.
  • the second main control board 1701 is configured to pass the synchronization mechanism of the precise time protocol PTP according to the first time value, the second time value, and the third time value.
  • Timestamps T 1 , T 2 , T 3 and T 4 respectively corresponding to the fourth time value, and the first dwell time ⁇ t 1 , the second dwell time ⁇ t 2 , the third resident
  • the time ⁇ t 3 and the fourth dwell time ⁇ t 4 are calculated, and the time offset and time delay between the master device and the slave device are calculated.
  • a time synchronization system 180 which includes: a master device 160 and a slave device 170;
  • the master device 160 is configured to encapsulate the generated first time value and the obtained first dwell time into the first packet, and send the first packet to the slave device 170;
  • the slave device 170 And receiving a second message sent by the slave device 170; the second message includes a third camp time;
  • the slave device 170 is configured to acquire, when receiving the first packet, a first camp time, a second camp time, a first time value, and a second time value;
  • the third time value is obtained by the record, the obtained third dwell time is encapsulated into the second message, and the second message is sent to the main device 160;
  • Each unit included in the master device can be implemented by a processor in the master device, and can also be implemented by a logic circuit.
  • the processor can be a central processing unit (CPU), a microprocessor. (MPU), digital signal processor (DSP) or field programmable gate array (FPGA).
  • each unit included in the slave device may be implemented by a processor in the slave device, and may also be implemented by a logic circuit; in the process of implementation, the processor may be a central processing unit (CPU), micro Processor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA).
  • the above method of clock synchronization is implemented in the form of a software function module and sold or used as a stand-alone product, it may also be stored in a computer readable storage medium.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • embodiments of the invention are not limited to any specific combination of hardware and software.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute a method for clock synchronization in the embodiment of the present invention.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the two-way residence time between the master and the slave device can be obtained through multiple message exchanges between the master and the slave device, and the master and slave are learned according to the two-way residence time of the master and the slave device.
  • Inter-device delay reduces the coupling between network nodes during time synchronization and improves the accuracy of time synchronization between devices participating in time synchronization.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例公开了一种时钟同步的方法、设备和***、存储介质,该方法包括:主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至从设备;所述主设备接收由所述从设备发送的第二报文;其中,所述第二报文包括第三驻留时间;所述主设备在接收所述第二报文时,获取第四驻留时间和第四时间值;所述主设备将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备。

Description

一种时钟同步的方法、设备和***、存储介质 技术领域
本发明涉及网络通信技术,尤其涉及一种时钟同步的方法、设备和***、存储介质。
背景技术
在现有通信设备中,各设备间进行时间同步的方案大部分都根据电气和电子工程师协会(IEEE,Institute of Electrical and Electronics Engineers)于2002年提出并在2007年进行修改的网络测量和控制***的精密时钟同步协议标准来实现,该标准又称为IEEE 1588协议。
目前,在IEEE 1588协议的应用中,通常采用分布式架构组网方式处理IEEE 1588协议,即每个网络业务节点均运行一套IEEE 1588协议***,这样的优点就是能够对网络节点进行扩展。但是,由于每个网络节点都要通过运行最佳主时钟算法(BMC,Best Master Clock algorithm)找到本网络节点中各接口的最佳时钟,而本地节点中每个接口的时钟都是来自于上一个主设备的时钟,这样就导致网络节点之间的耦合性较强。因此,出现故障的时候维护比较困难,且实现也较复杂。
另外,IEEE 1588协议对传送网的传送驻留有严格的要求,即参与时间同步的设备之间的延时必须是一个相对固定的值,且设备收发双向的驻留时间必须相等,否则对时间同步产生较大的误差。而在光传送网(OTN,Optical Transport Network)网络中,由于存在链路不对称、OTN帧处理延时等现象,可能会导致参与时间同步的设备收发双向驻留时间存在一定的误差,进而影响参与时间同步的设备之间进行时间同步的精度。
发明内容
有鉴于此,本发明实施例期望提供一种时钟同步的方法、设备和***、存储介质,降低了时间同步时网络节点之间的耦合性,提高了参与时间同步的设备之间进行时间同步的精度。
为达到上述目的,本发明的技术方案是这样实现的:
第一方面,本发明实施例提供一种时间同步的方法,所述方法应用于主设备,所述方法包括:主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至从设备;所述主设备接收由所述从设备发送的第二报文;其中,所述第二报文包括第三驻留时间;所述主设备在接收所述第二报文时,获取第四驻留时间和第四时间值;所述主设备将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备。
第二方面,本发明实施例提供一种时间同步的方法,所述方法应用于从设备,所述方法包括:从设备在接收第一报文时,获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;从设备记录第三时间值,将获取的第三驻留时间封装至第二报文,并将所述第二报文发送至主设备;从设备在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
第三方面,本发明实施例提供一种主设备,所述主设备包括:第一主控板和第一业务板;其中,所述第一主控板,配置为将生成的第一时间值与获取的第一驻留时间封装至第一报文;所述第一业务板,配置为将所述第一报文发送至从设备;以及,接收由所述从设备发送的第二报文;所述 第二报文包括第三驻留时间;所述第一主控板,还配置为在所述第一业务板接收所述第二报文时,获取第四驻留时间和第四时间值;以及,将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文;所述业务板,还配置为将所述第三报文发送至从设备。
第四方面,本发明实施例提供一种从设备,所述从设备包括第二主控板和第二业务板,其中,所述第二业务板,用于接收第一报文;所述第二主控板,用于获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;以及,记录第三时间值,并将获取的第三驻留时间封装至第二报文;所述第二业务板,还用于将该第二报文发送至主设备;以及,接收第三报文;所述第二主控板,还用于获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
第五方面,本发明实施例提供一种时间同步的***,所述***包括:主设备和从设备;其中,
所述主设备,配置为将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至所述从设备;以及,接收由所述从设备发送的第二报文;所述第二报文包括第三驻留时间;以及,在接收所述第二报文时,获取第四驻留时间和第四时间值;其中,所述第二报文包括第三驻留时间;以及,将所述第二报文中的第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备;
所述从设备,配置为在接收第一报文时,获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;以及,记录获取第三时间值,将获取 的第三驻留时间封装至第二报文,并将该第二报文发送至所述主设备;以及,在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
第六方面,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行上述第一方面实施例提供的时间同步的方法。
第七方面,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行上述第二方面实施例提供的时间同步的方法。
本发明实施例提供了一种时钟同步的方法、设备和***、存储介质,通过主、从设备之间的多次报文交互,从而能够获取主、从设备收发双向的驻留时间,并且根据主、从设备收发双向的驻留时间获知主、从设备间延时,降低了时间同步时网络节点之间的耦合性,提高了参与时间同步的设备之间进行时间同步的精度。
附图说明
图1为本发明实施例提供的一种时钟同步的方法详细流程示意图;
图2为本发明实施例提供的一种主设备发送第一报文的流程示意图;
图3为本发明实施例提供的一种从设备获取第二驻留时间和第二时间值的流程示意图;
图4为本发明实施例提供的一种从设备发送第二报文的流程示意图;
图5为本发明实施例提供的一种主设备获取第四驻留时间和第四时间值的流程示意图;
图6为本发明实施例提供的一种主设备发送第三报文的流程示意图;
图7为本发明实施例提供的一种主设备的结构示意图;
图8为本发明实施例提供的一种从设备的结构示意图;
图9为本发明实施例提供的另一种主设备发送第一报文的流程示意图;
图10为本发明实施例提供的另一种从设备获取第二驻留时间和第二时间值的流程示意图;
图11为本发明实施例提供的另一种从设备发送第二报文的流程示意图;
图12为本发明实施例提供的另一种主设备获取第四驻留时间和第四时间值的流程示意图;
图13为本发明实施例提供的另一种主设备发送第三报文的流程示意图;
图14为本发明实施例提供的一种主设备侧的时间同步方法流程示意图;
图15为本发明实施例提供的一种从设备侧的时间同步方法流程示意图;
图16为本发明实施例提供的另一种主设备的结构示意图;
图17为本发明实施例提供的另一种从设备的结构示意图;
图18为本发明实施例提供的一种时间同步的***结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
实施例一
参见图1,为本发明实施例提供的一种时间同步的方法,该方法可以应用于一时间同步的***,该***可以包括:进行报文交互的主设备和从设 备;其中,主设备包括一个第一主控板和至少一个第一业务板,从设备包括一个第二主控板和至少一个第二业务板。该方法可以包括:
S101:主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将该第一报文发送至从设备;
需要说明的是,第一报文可以为主设备向从设备发送的同步(Sync)报文,也可以为其他类型的报文,本发明实施例对此不作限定。而且,第一驻留时间为主设备在进行报文发送时,报文在主设备内的驻留时间。
示例性地,由于主设备可以包括一个第一主控板和至少一个第一业务板,因此,步骤S101的实现过程如图2所示,包括:
S1011:第一主控板在生成Sync报文时记录生成Sync报文的第一时间值T1,并且将第一时间值T1封装于Sync报文的预留字段;在本实施例中,第一主控板将第一时间值T1可以通过***时间戳的形式进行保存,封装于Sync报文的精确时间(precisetime)字段域;
S1012:第一主控板将Sync报文发送至第一业务板,并记录第一主控板发送Sync报文的时间Tout1;例如,第一主控板发送Sync报文的时间Tout1也可以通过***时间戳的形式进行保存,并封装于Sync报文中精确时间协议(Precision Time Protocol,PTP)信息之后、帧检测序列错误(Frame Check Sequence,FCS)校验之前的字段域;可以理解地,T1要早于Tout1
S1013:第一业务板解析Sync报文,获得第一主控板发送Sync报文的时间Tout1
S1014:第一业务板在将Sync报文向从设备发送时,记录第一业务板发送Sync报文的时间tout1,并根据第一主控板发送Sync报文的时间Tout1与第一业务板发送Sync报文的时间tout1获取第一驻留时间Δt1,以及将第一驻留时间Δt1封装于Sync报文中向从设备发送;例如,第一驻留时间 Δt1=tout1-Tout1,第一驻留时间可以封装于Sync报文的修正域,从而有ΔT1=Δt1
可选地,在步骤S1011中,第一时间值T1可以封装于Sync报文之后发送的跟随(Follow-up)报文中,并由第一业务板发送至从设备,需要说明的是,对于Follow-up报文,第一业务板仅负责发送,并不进行解析等其他处理。
S102:从设备在接收第一报文时,获取第一时间值、第二时间值、第一驻留时间和第二驻留时间;
需要说明的是,第二驻留时间为从设备在接收报文的过程中,报文在从设备内的驻留时间。可以理解地,本实施例中以第一报文为Sync报文为例进行说明,此时,从设备获得第一时间值、第二时间值、第一驻留时间和第二驻留时间。
示例性地,由于从设备可以包括一个第二主控板和至少一个第二业务板,因此,步骤S102的实现过程如图3所示,包括:
S1021:第二业务板在接收Sync报文时,记录第二业务板接收到Sync报文的时间tin2;在本发明的其他实施例中,第二业务板接收到Sync报文的时间tin2也可以通过***时间戳的形式进行保存,并封装于Sync报文中位于PTP信息之后、FCS校验之前的字段域;
S1022:第二业务板将Sync报文发送至第二主控板;
S1023:第二主控板记录接收到Sync报文的时间Tin2;并解析Sync报文得到封装的第二业务板接收到Sync报文的时间tin2,获取得到第二驻留时间Δt2
例如,第二主控板可以通过解析Sync报文中位于PTP信息之后、FCS校验之前的字段域获取得到tin2,随后根据Δt2=Tin2-tin2获取得到第二驻留 时间。
S1024:第二主控板记录解析Sync报文的第二时间值T2,在本实施例中,第二主控板可以将第二时间值T2通过***时间戳的形式进行保存;同时,记录Sync报文的修正域ΔT1中的第一驻留时间Δt1和precisetime字段域中的第一时间值T1
S103:从设备记录第三时间值,将获取的第三驻留时间封装至第二报文,并将所述第二报文发送至主设备;
需要说明的是,第二报文可以为从设备向主设备发送的Delay-req报文,也可以为其他类型的报文,本发明实施例对此不作限定。而且,第三驻留时间为从设备在进行报文发送时,报文在从设备内的驻留时间。
示例性地,由于从设备可以包括一个第二主控板和至少一个第二业务板,因此,步骤S103的实现过程如图4所示,可以包括:
S1031:第二主控板在生成延迟请求(Delay-req)报文时记录生成Delay-req报文的第三时间值T3;在本实施例中,第二主控板可以将第三时间值T3通过***时间戳的形式进行保存;
S1032:第二主控板将Delay-req报文发送至第二业务板,并记录第二主控板发送Delay-req报文的时间Tout3;在本发明的其他实施例中,第二主控板发送Delay-req报文的时间Tout3也可以通过***时间戳的形式进行保存,并封装于Delay-req报文中PTP信息之后、FCS校验之前的字段域;可以理解地,T3要早于Tout3
S1033:第二业务板解析Delay-req报文,获得第二主控板发送Delay-req报文的时间Tout3
S1034:第二业务板在将Delay-req报文向主设备发送时,记录第二业务板发送Delay-req报文的时间tout3,并根据第二主控板发送Delay-req报文 的时间Tout3与第二业务板发送Delay-req报文的时间tout3获取第三驻留时间Δt3,以及将第三驻留时间封装于Delay-req报文中向主设备发送;在本发明的其他实施例中,第三驻留时间Δt3=Tout3-tout3,第三驻留时间Δt3可以封装于Delay-req报文的修正域,从而有ΔT2=Δt3
S104:主设备在接收第二报文时,获取第四驻留时间和第四时间值;
需要说明的是,第四驻留时间为主设备在接收报文的过程中,报文在主设备内的驻留时间。
示例性地,由于主设备可以包括一个第一主控板和至少一个第一业务板,因此,步骤S104的实现过程如图5所示,包括:
S1041:第一业务板在接收Delay-req报文时,记录第一业务板接收Delay-req报文的时间tin4;在本发明的其他实施例中,第一业务板接收Delay-req报文的时间也可以通过***时间戳的形式进行保存,并封装于Delay-req报文中位于PTP信息之后、FCS校验之前的字段域;
S1042:第一业务板将Delay-req报文发送至第一主控板;
S1043:第一主控板记录接收到Delay-req报文的时间Tin4,并解析Delay-req报文得到封装的第一业务板接收Delay-req报文的时间tin4,获取得到第四驻留时间Δt4
在本发明的其他实施例中,第一主控板可以通过解析Delay-req报文中位于PTP信息之后、FCS校验之前的字段域获取到tin4,随后根据Δt4=Tin4-tin4获取得到第四驻留时间。
S1044:第一主控板记录解析Delay-req报文的第四时间值T4;在本实施例中,第一主控板可以将第四时间值T4通过***时间戳的形式进行保存。
S105:主设备将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将该第三报文发送至从设备;
需要说明的是,第三报文可以为主设备向从设备发送的Delay-resp报文,也可以为其他类型的报文,本发明实施例对此不作限定。
示例性地,由于主设备可以包括一个第一主控板和至少一个第一业务板,因此,步骤S105的实现过程如图6所示,包括:
S1051:第一主控板产生延迟响应(Delay-resp)报文,将Delay-req报文中的第四时间值T4、第四驻留时间Δt4以及Delay-req报文修正域中的第三驻留时间Δt3封装入Delay-resp报文,并将Delay-resp报文发送至第一业务板;
S1052:第一业务板接收第一主控板发送过来的Delay-resp报文,并将Delay-resp报文发送至从设备。
S106:从设备在接收第三报文时,获取第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、第二驻留时间、第三驻留时间和第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延,通过时间偏差和时延来调整从设备的当前时间,使主从设备时间同步。
需要说明的是,第三报文可以为主设备向从设备发送的Delay-resp报文,也可以为其他类型的报文,本发明实施例对此不作限定。
另外,第一时间值T1可以在从设备之前收到的Sync报文的precisetime字段域中获取得到,并且第一报文修正域中的数值ΔT'1也可以在上述Sync报文的修正域中获取得到。
在实施过程中,由精确时间协议(PTP,Precision Time Protocol)的同步机制,根据第一时间值、第二时间值、第三时间值和第四时间值分别对应的时间戳T1、T2、T3和T4,以及第一驻留时间Δt1、第二驻留时间Δt2、第三驻留时间Δt3和第四驻留时间Δt4,计算出主设备与从设备之间的时间偏差 和时延;其中,第一驻留时间Δt1保存在第一报文的修正域ΔT1=Δt1,第三驻留时间Δt3保存在第二报文的修正域ΔT2=Δt3
在本发明的其他实施例中,可以根据时间偏差
Figure PCTCN2016098770-appb-000001
和时延
Figure PCTCN2016098770-appb-000002
计算出主从设备之间的时间偏差和时延,进而根据PTP得到第一主控板的当前时间,实现了将主设备的第一主控板的当前时间同步到从设备的第二主控板的目的。
需要说明的是,业务板还需要与各自设备中的主控板对时,使得所有设备中的单板的时间保持一致。
实施例二
基于上述实施例相同的技术构思,本实施例提供了一种时间同步的方法实现流程,该实现流程对实施例一中各步骤的实现过程进行了描述。
在本实施例中,如图7所示,主设备包含一个第一主控板和至少一个第一业务板;其中,第一主控板除了CPU外,还包含第一FPGA模块和第一主控板串行千兆位媒质独立接口(Serial Gigabit Media Independent Interface,sgmii)接口,第一即现场可编程门阵列(Field-Programmable Gate Array,FPGA)模块又包含:第一Sync单元、第一Delay-req单元、第一Delay-resp单元、第一定时器0(Timer0)单元、第一定时器1(Timer1)单元;第一业务板包含第一业务板sgmii接口、第一Framer模块和第一光模块,第一Framer模块又包含第一Framer serdes单元,其中Framer是指光传送网(OTN,Optical Transport Network)帧处理器;需要说明的是,第一Sync单元、第一Delay-req单元、第一Delay-resp单元均为第一主控板进行报文处理的单元,对相应类型的报文进行处理。
如图8所示,从设备包含一个第二主控板和至少一个第二业务板;其中,第二主控板中包含第二FPGA模块和第二主控板sgmii接口,第二FPGA 模块又包含:第二Sync单元、第二Delay-req单元、第二Delay-resp单元、第二Timer0单元、第二Timer1单元;第二业务板包含第二业务板sgmii接口、第二Framer模块和第二光模块,第二Framer模块又包含第二Framer serdes单元;需要说明的是,第二Sync单元、第二Delay-req单元、第二Delay-resp单元均为第二主控板进行报文处理的单元,对相应类型的报文进行处理。
本领域技术人员可以意识到,本发明实施方式并不局限于上述的场景中,而还可以适用于其他任意的场景之中。
基于上述设备的构成,针对实施例一中各步骤的实现如下:
在本发明的其他实施例中,参见图9,对于步骤S101:所述主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将该第一报文发送至从设备的实现过程可以包括:
S901:主设备上的第一Sync单元产生并发送Sync报文至第一Timer0单元,第一Timer0单元接收第一Sync单元发送过来的Sync报文,并将Sync报文发送至第一Timer1单元;
S902:第一主控板记录第一Timer0单元发送Sync报文的时间为第一时间值,以时间戳T1的形式保存,并将时间戳T1装入Sync报文的precisetime字段域;
S903:第一Timer1单元接收第一Timer0单元发送过来的Sync报文,并将Sync报文发送至第一主控板sgmii接口模块;
S904:第一主控板记录第一Timer1单元发送Sync报文的时间,以***时间戳Tout1的形式保存,并将***时间戳Tout1装入Sync报文中位于PTP信息之后、FCS校验之前的字段域;
S905:第一主控板sgmii接口模块接收第一Timer1单元发送过来的Sync报文,并将Sync报文传输至第一业务板sgmii接口模块;
S906:第一业务板sgmii接口模块接收第一主控板sgmii接口模块传输过来的Sync报文,并将Sync报文发送至第一Framer模块;
S907:第一Framer模块中的第一Framer串行器(serdes,SERializer)单元接收并发送Sync报文,并将Sync报文发送至第一光模块;
S908:第一业务板记录第一Framer serdes单元发送Sync报文的时间,并以***时间戳tout1的形式保存;
S909:第一业务板解析Sync报文中位于PTP信息之后、FCS校验之前的字段域,以获取第一Timer1单元发送Sync报文的时间Tout1
S910:第一业务板计算出第一Timer1单元发送Sync报文和第一Framer serdes单元发送Sync报文之间的时间差值,可以记为第一驻留时间Δt1=tout1-Tout1,并且将第一驻留时间Δt1写入Sync报文的修正域ΔT1=Δt1
S911:第一光模块接收第一Framer serdes单元发送过来的Sync报文,并将Sync报文发送至从设备。
可选地,在步骤S901中,第一时间值T1可以封装于Sync报文之后发送的跟随(Follow-up)报文中,并由第一业务板发送至从设备,需要说明的是,对于Follow-up报文,第一业务板仅负责发送,并不进行解析等其他处理。
在本发明的其他实施例中,参见图10,对于步骤S102:所述从设备在接收第一报文时,获取第一时间值、第二时间值、第一驻留时间和第二驻留时间的实现过程可以包括:
S1001:从设备中的第二光模块接收主设备发送过来的报文,并发送报文至第二Framer模块,由第二Framer模块识别出Sync报文,并将Sync报文统一到板间通信定义的以太网报文格式上;
S1002:第二Framer模块中的第二Framer serdes单元接收Sync报文,并将Sync报文发送至第二业务板sgmii接口模块;
S1003:第二业务板记录第二Framer serdes单元接收Sync报文的时间,以时间戳tin2的形式保存,并将时间戳tin2封装入Sync报文中位于PTP信息之后、FCS校验之前的字段域;
S1004:第二业务板sgmii接口模块接收第二Framer serdes单元发送过来的Sync报文,并将Sync报文传输至第二主控板sgmii接口模块;
S1005:第二主控板sgmii接口模块接收第二业务板sgmii接口模块传输过来的Sync报文,再将Sync报文发送至第二Timer1单元;
S1006:第二主控板记录第二Timer1单元接收Sync报文的时间,以***时间戳Tin2的形式保存;
S1007:第二主控板解析Sync报文中位于PTP信息之后、FCS校验之前的字段域,得到第二Framer serdes单元接收Sync报文的时间tin2
S1008:第二主控板计算出第二Framer serdes单元接收Sync报文和第二Timer1单元接收Sync报文之间的时间差值,可以记为第二驻留时间Δt2=Tin2-tin2
S1009:第二Timer1单元发送Sync报文至第二Timer0单元,记录第二Timer0单元接收Sync报文的时间为第二时间值,以时间戳T2的形式保存;
S1010:第二Timer0单元发送Sync报文至第二Sync单元,第二Sync单元解析Sync报文,并记录Sync报文的修正域ΔT1中的第一驻留时间Δt1和precisetime字段域中的第一时间值T1
在本发明的其他实施例中,参见图11,对于步骤S103,所述从设备记录第三时间值,将获取的第三驻留时间封装至第二报文,并将所述第二报文发送至主设备的实现过程可以包括:
S1101:从设备中的第二Delay-req单元产生Delay-req报文后,第二Timer0单元接收第二Delay-req单元发送过来的Delay-req报文,并将Delay-req报文发送至第二Timer1单元;
S1102:第二主控板记录第二Timer0单元发送Delay-req报文的时间为第三时间值,以时间戳T3的形式保存;
S1103:第二Timer1单元接收第二Timer0单元发送过来的Delay-req报文,并将Delay-req报文发送至第二主控板sgmii接口模块;
S1104:第二主控板记录第二Timer1单元发送Delay-req报文的时间,以***时间戳Tout3的形式保存,并将***时间戳Tout3装入Delay-req报文中位于PTP信息之后、FCS校验之前的字段域;
S1105:第二主控板sgmii接口模块接收第二Timer1单元发送过来的Delay-req报文,并将Delay-req报文传输至第二业务板sgmii接口模块;
S1106:第二业务板sgmii接口模块接收第二主控板sgmii接口模块传输过来的Delay-req报文,并将Delay-req报文发送至第二Framer模块;
S1107:第二Framer模块中的第二Framer serdes单元接收Delay-req报文,并将Delay-req报文发送至第二光模块;
S1108:第二业务板记录第二Framer serdes单元发送Delay-req报文的时间,并以***时间戳tout3的形式保存;
S1109:第二业务板解析Delay-req报文中位于PTP信息之后、FCS校验之前的字段域,以获取第二Timer1单元发送Delay-req报文的时间Tout3
S1110:第二业务板计算出第二Timer1单元发送Delay-req报文和第二Framer serdes单元发送Delay-req报文之间的时间差值,可以记为第三驻留时间Δt3=tout3-Tout3,并且将第三驻留时间Δt3写入Delay-req报文的修正域ΔT2=Δt3
S1111:第二光模块接收第二Framer serdes单元发送过来的Delay-req报文,并将Delay-req报文发送至主设备。
在本发明的其他实施例中,参见图12,对于步骤S104,所述主设备在接收第二报文时,获取第四驻留时间和第四时间值的实现过程可以包括:
S1201:主设备中的第一光模块接收从设备发送过来的报文,并发送报文至第一Framer模块,由第一Framer模块识别出Delay-req报文,并将Delay-req报文统一到板间通信定义的以太网报文格式上;
S1202:第一Framer模块中的第一Framer serdes单元接收Delay-req报文,并将Delay-req报文发送至第一业务板sgmii接口模块;
S1203:第一业务板记录第一Framer serdes单元接收Delay-req报文的时间,以时间戳tin4的形式保存,并将时间戳tin4封装入Delay-req报文中位于PTP信息之后、FCS校验之前的字段域;
S1204:第一业务板sgmii接口模块接收第一Framer serdes单元发送过来的Delay-req报文,再将Delay-req报文传输至第一主控板sgmii接口模块;
S1205:第一主控板sgmii接口模块接收第一业务板sgmii接口模块传输过来的Sync报文,再将Delay-req报文发送至第一Timer1单元;
S1206:第一主控板记录第一Timer1单元接收Delay-req报文的时间,以***时间戳Tin4的形式保存;
S1207:第一主控板解析Delay-req报文中位于PTP信息之后、FCS校验之前的字段域,得到第一Framer serdes单元接收Delay-req报文的时间tin4
S1208:第一主控板计算出第一Framer serdes单元接收Delay-req报文和第一Timer1单元接收Delay-req报文之间的时间差值,可以记为第四驻留时间Δt4=Tin4-tin4
S1209:第一Timer1单元发送Delay-req报文至第一Timer0单元,记录第一Timer0单元接收Delay-req报文的时间为第四时间值,以时间戳T4的形式保存;
S1210:第一Timer0单元发送Delay-req报文至第一Delay-req单元,第一Delay-req单元接收并解析Delay-req报文;
在本发明的其他实施例中,参见图13,对于步骤S105:所述主设备将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将该第三报文发送至从设备的实现过程可以包括:
S1301:主设备中的第一Delay-resp单元产生Delay-resp报文,将Delay-req报文中的第四时间值T4、第四驻留时间Δt4以及Delay-req报文修正域中的第三驻留时间Δt3封装入Delay-resp报文,并将Delay-resp报文发送至第一Timer0单元;
S1302:第一Timer0单元接收第一Delay-resp单元发送过来的Delay-resp报文,并将Delay-resp报文发送至第一Timer1单元;
S1303:第一Timer1单元接收第一Timer0单元发送过来的Delay-resp报文,并将Delay-resp报文发送至的至第一主控板sgmii接口模块;
S1304:第一主控板sgmii接口模块接收第一Timer1单元发送过来的Delay-resp报文,并将Delay-resp报文传输至第一业务板sgmii接口模块;
S1305:第一业务板sgmii接口模块接收第一主控板sgmii接口模块发送过来的Delay-resp报文,并将Delay-resp报文经第一Framer模块发送至第一光模块;
S1306:第一光模块接收第一Framer模块发送过来的Delay-resp报文,并将Delay-resp报文发送至从设备。
在本发明的其他实施例中,对于步骤S106:所述从设备在接收第三报文时,获取第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、第二驻留时间、第三驻留时间和第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延,通过时间偏差和时延来调整从设备的当前时间,使主从设备时间同步的实现过程可以包括:
由精确时间协议(PTP,Precision Time Protocol)的同步机制,根据第 一时间值、第二时间值、第三时间值和第四时间值分别对应的时间戳T1、T2、T3和T4,以及第一驻留时间、第二驻留时间、第三驻留时间和第四驻留时间,计算出主设备与从设备之间的时间偏差和时延;其中,第一驻留时间Δt1保存在第一报文的修正域ΔT1=Δt1,第三驻留时间Δt3保存在第二报文的修正域ΔT2=Δt3
需要说明的是,第三报文可以为主设备向从设备发送的Delay-resp报文,也可以为其他类型的报文,本发明实施例对此不作限定。
另外,第一时间值T1可以在从设备之前收到的Sync报文的precisetime字段域中获取得到,并且第一报文修正域中的数值ΔT1也可以在上述Sync报文的修正域中获取得到。
在本发明的其他实施例中,可以根据时间偏差
Figure PCTCN2016098770-appb-000003
和时延
Figure PCTCN2016098770-appb-000004
计算出主从设备之间的时间偏差和时延,进而根据PTP得到第一主控板的当前时间,实现了将主设备的第一主控板的当前时间同步到从设备的第二主控板的目的。
还需要说明的是,业务板还需要与各自设备中的主控板时间同步,使得所有设备中的单板的时间保持一致,时间同步的过程可以按照上述过程进行,本发明实施例对此不作赘述。
实施例三
基于上述两个实施例相同的技术构思,参见图14,其示出了本发明实施例提供的一种主设备侧的时间同步方法流程,该方法可以包括:
S1401:主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至从设备;
S1402:主设备接收由所述从设备发送的第二报文;
其中,所述第二报文包括第三驻留时间;
S1403:主设备在接收所述第二报文时,获取第四驻留时间和第四时间值;
S1404:主设备将所述第二报文中的第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备。
示例性地,主设备可以包括一个第一主控板和至少一个第一业务板;所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
在本发明的其他实施例中,所述主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至从设备,包括:
所述第一主控板在生成所述Sync报文时记录生成所述Sync报文的第一时间值T1,并且将所述第一时间值T1封装于所述Sync报文的预留字段;
所述第一主控板将所述Sync报文发送至所述第一业务板,并记录所述第一主控板发送所述Sync报文的时间Tout1
所述第一业务板解析所述Sync报文,获得所述第一主控板发送所述Sync报文的时间Tout1
所述第一业务板在将所述Sync报文向所述从设备发送时,记录所述第一业务板发送所述Sync报文的时间tout1,并根据所述第一主控板发送所述Sync报文的时间Tout1与所述第一业务板发送所述Sync报文的时间tout1获取所述第一驻留时间Δt1,以及将所述第一驻留时间Δt1封装于所述Sync报文中的修正域ΔT1向所述从设备发送。
在本发明的其他实施例中,所述主设备在接收所述第二报文时,获取第四驻留时间和第四时间值;并将所述第四驻留时间和所述第四时间值封装于所述第二报文中,包括:
所述第一业务板在接收所述Delay-req报文时,记录所述第一业务板接收所述Delay-req报文的时间tin4
所述第一业务板将所述Delay-req报文发送至所述第一主控板;
所述第一主控板记录接收到所述Delay-req报文的时间Tin4,并解析所述Delay-req报文得到封装的所述第一业务板接收Delay-req报文的时间tin4,获取得到所述第四驻留时间Δt4
所述第一主控板记录解析所述Delay-req报文的所述第四时间值T4
在本发明的其他实施例中,所述主设备将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备,包括:
所述第一主控板产生所述Delay-resp报文,将所述第四时间值T4、所述第四驻留时间Δt4以及所述Delay-req报文修正域中的第三驻留时间Δt3封装入所述Delay-resp报文,并将所述Delay-resp报文发送至所述第一业务板;
所述第一业务板接收所述第一主控板发送过来的所述Delay-resp报文,并将所述Delay-resp报文发送至所述从设备。
实施例四
基于前述实施例相同的技术构思,参见图15,其示出了本发明实施例提供的一种从设备侧的时间同步方法流程,该方法可以包括:
S1501:从设备在接收第一报文时,获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;
S1502:从设备记录第三时间值,将获取的第三驻留时间封装至第二报文,并将该第二报文发送至主设备;
S1503:从设备在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所 述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
示例性地,所述从设备包括一个第二主控板和至少一个第二业务板;所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
在本发明的其他实施例中,所述从设备在接收第一报文时,获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;包括:
所述第二业务板在接收所述Sync报文时,记录所述第二业务板接收到所述Sync报文的时间tin2
所述第二业务板将所述Sync报文发送至所述第二主控板;
所述第二主控板记录接收到所述Sync报文的时间Tin2;并解析所述Sync报文得到封装的所述第二业务板接收到Sync报文的时间tin2,获取得到所述第二驻留时间Δt2
所述第二主控板记录解析所述Sync报文的第二时间值T2
所述第二主控板记录Sync报文的修正域ΔT1中的第一驻留时间Δt1和precisetime字段域中的第一时间值T1
在本发明的其他实施例中,所述从设备记录第三时间值,并将获取的第三驻留时间封装至第二报文,并将所述第二报文发送至主设备,包括:
所述第二主控板在生成所述Delay-req报文时记录生成所述Delay-req报文的第三时间值T3
所述第二主控板将所述Delay-req报文发送至所述第二业务板,并记录所述第二主控板发送所述Delay-req报文的时间Tout3
所述第二业务板解析所述Delay-req报文,获得所述第二主控板发送所述Delay-req报文的时间Tout3
所述第二业务板在将所述Delay-req报文向所述主设备发送时,记录所述第二业务板发送所述Delay-req报文的时间tout3,并根据所述第二主控板发送所述Delay-req报文的时间Tout3与所述第二业务板发送所述Delay-req报文的时间tout3获取所述第三驻留时间Δt3,以及将所述第三驻留时间Δt3封装于所述Delay-req报文的修正域ΔT2向所述主设备发送。
在本发明的其他实施例中,所述从设备在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延,包括:
从设备通过精确时间协议PTP的同步机制,根据所述第一时间值、所述第二时间值、所述第三时间值和所述第四时间值分别对应的时间戳T1、T2、T3和T4,以及第一驻留时间Δt1、第二驻留时间Δt2、第三驻留时间Δt3和第四驻留时间Δt4,计算出主设备与从设备之间的时间偏差和时延;其中,所述第一驻留时间Δt1保存在所述第一报文的修正域ΔT1=Δt1,所述第三驻留时间Δt3保存在所述第二报文的修正域ΔT2=Δt3
实施例五
基于上述实施例相同的技术构思,参见图16,其示出了本发明实施例提供的一种主设备160,该主设备160包括:第一主控板1601和第一业务板1602;其中,
所述第一主控板1601,配置为将生成的第一时间值与获取的第一驻留时间封装至第一报文;
所述第一业务板1602,配置为将所述第一报文发送至从设备;
以及,接收由所述从设备发送的第二报文;所述第二报文包括第三驻 留时间;
所述第一主控板1601,还配置为在所述第一业务板1602接收所述第二报文时,获取第四驻留时间和第四时间值;
以及,将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文;
所述业务板,还配置为将所述第三报文发送至从设备。
示例性地,所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
在本发明的其他实施例中,所述第一主控板1601,配置为在生成所述Sync报文时记录生成所述Sync报文的第一时间值T1,并且将所述第一时间值T1封装于所述Sync报文的预留字段;
以及,将所述Sync报文发送至所述第一业务板1602,并记录发送所述Sync报文的时间Tout1
所述第一业务板1602,配置为解析所述Sync报文,获得所述发送所述Sync报文的时间Tout1
以及,在将所述Sync报文向所述从设备发送时,记录发送所述Sync报文的时间tout1,并根据所述第一主控板1601发送所述Sync报文的时间Tout1与所述第一业务板1602发送所述Sync报文的时间tout1获取所述第一驻留时间Δt1,以及将所述第一驻留时间Δt1封装于所述Sync报文中的修正域ΔT1向所述从设备发送。
在本发明的其他实施例中,所述第一业务板1602,配置为在接收所述Delay-req报文时,记录所述第一业务板1602接收所述Delay-req报文的时间tin4
以及,将所述Delay-req报文发送至所述第一主控板1601;
所述第一主控板1601,配置为记录接收到所述Delay-req报文的时间Tin4,并解析所述Delay-req报文得到封装的所述第一业务板1602接收Delay-req报文的时间tin4,获取得到所述第四驻留时间Δt4
以及,记录解析所述Delay-req报文的所述第四时间值。
在本发明的其他实施例中,所述第一主控板1601,配置为产生所述Delay-resp报文,将所述Delay-req报文中的所述第四时间值T4,以及所述Delay-req报文修正域中的第三驻留时间Δt3封装入所述Delay-resp报文,并将所述Delay-resp报文发送至所述第一业务板1602;
所述第一业务板1602,配置为接收所述第一主控板1601发送过来的所述Delay-resp报文,并将所述Delay-resp报文发送至所述从设备。
实施例六
基于前述实施例相同的技术构思,参见图17,其示出了本发明实施例提供的一种从设备170,该从设备170可以包括第二主控板1701和第二业务板1702,其中,
所述第二业务板1702,配置为接收第一报文;
所述第二主控板1701,配置为获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;
以及,记录第三时间值,并将获取的第三驻留时间封装至第二报文;
所述第二业务板1702,还配置为将该第二报文发送至主设备;
以及,接收第三报文;
所述第二主控板1701,还配置为获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
示例性地,所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
在本发明的其他实施例中,所述第二业务板1702,配置为在接收所述Sync报文时,记录所述第二业务板1702接收到所述Sync报文的时间tin2
以及,将所述Sync报文发送至所述第二主控板1701;
所述第二主控板1701,配置为记录接收到所述Sync报文的时间Tin2;并解析所述Sync报文得到封装的所述第二业务板1702接收到Sync报文的时间tin2,获取得到所述第二驻留时间Δt2
以及,记录解析所述Sync报文的第二时间值T2
所述第二主控板1701记录Sync报文的修正域ΔT1中的第一驻留时间Δt1和precisetime字段域中的第一时间值T1
在本发明的其他实施例中,所述第二主控板1701,配置为在生成所述Delay-req报文时记录生成所述Delay-req报文的第三时间值T3
以及,将所述Delay-req报文发送至所述第二业务板1702,并记录所述第二主控板1701发送所述Delay-req报文的时间Tout3
所述第二业务板1702,配置为解析所述Delay-req报文,获得所述第二主控板1701发送所述Delay-req报文的时间Tout3
以及,在将所述Delay-req报文向所述主设备发送时,记录所述第二业务板1702发送所述Delay-req报文的时间tout3,并根据所述第二主控板1701发送所述Delay-req报文的时间Tout3与所述第二业务板1702发送所述Delay-req报文的时间tout3获取所述第三驻留时间Δt3,以及将所述第三驻留时间Δt3封装于所述Delay-req报文的修正域ΔT2向所述主设备发送。
在本发明的其他实施例中,所述第二主控板1701,配置为通过精确时间协议PTP的同步机制,根据所述第一时间值、所述第二时间值、所述第 三时间值和所述第四时间值分别对应的时间戳T1、T2、T3和T4,以及所述第一驻留时间Δt1、所述第二驻留时间Δt2、所述第三驻留时间Δt3和所述第四驻留时间Δt4,计算出所述主设备与所述从设备之间的时间偏差和时延。
实施例七
基于前述实施例相同的技术构思,参见图18,其示出了本发明实施例提供的一种时间同步的***180,该***180包括:主设备160和从设备170;
其中,
所述主设备160,配置为将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至所述从设备170;
以及,接收由所述从设备170发送的第二报文;所述第二报文包括第三驻留时间;
以及,在接收所述第二报文时,获取第四驻留时间和第四时间值;其中,所述第二报文包括第三驻留时间;
以及,将所述第二报文中的第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备170;
所述从设备170,配置为在接收第一报文时,获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;
以及,记录获取第三时间值,将获取的第三驻留时间封装至第二报文,并将该第二报文发送至所述主设备160;
以及,在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一报文和第二报文修正域中的数值,计算出所述主设备160与所述从设备170之间的时间偏差和 时延。
所述主设备所包括的各单元,都可以通过主设备中的处理器来实现,当然也可通过逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。另外,所述从设备所包括的各单元,都可以通过从设备中的处理器来实现,当然也可通过逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的时钟同步的方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。相应地,本发明实施例再提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例中时钟同步的方法。
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
工业实用性
本发明实施例中,通过主、从设备之间的多次报文交互,从而能够获取主、从设备收发双向的驻留时间,并且根据主、从设备收发双向的驻留时间获知主、从设备间延时,降低了时间同步时网络节点之间的耦合性,提高了参与时间同步的设备之间进行时间同步的精度。

Claims (23)

  1. 一种时间同步的方法,所述方法应用于主设备,所述方法包括:
    主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至从设备;
    所述主设备接收由所述从设备发送的第二报文;其中,所述第二报文包括第三驻留时间;
    所述主设备在接收所述第二报文时,获取第四驻留时间和第四时间值;
    所述主设备将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备。
  2. 根据权利要求1所述的方法,其中,所述主设备包括一个第一主控板和至少一个第一业务板;所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
  3. 根据权利要求2所述的方法,其中,所述主设备将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至从设备,包括:
    所述第一主控板在生成所述Sync报文时记录生成所述Sync报文的第一时间值T1,并且将所述第一时间值T1封装于所述Sync报文的预留字段;
    所述第一主控板将所述Sync报文发送至所述第一业务板,并记录所述第一主控板发送所述Sync报文的时间Tout1
    所述第一业务板解析所述Sync报文,获得所述第一主控板发送所述Sync报文的时间Tout1
    所述第一业务板在将所述Sync报文向所述从设备发送时,记录所述 第一业务板发送所述Sync报文的时间tout1,并根据所述第一主控板发送所述Sync报文的时间Tout1与所述第一业务板发送所述Sync报文的时间tout1获取所述第一驻留时间Δt1,以及将所述第一驻留时间Δt1封装于所述Sync报文中的修正域ΔT1向所述从设备发送。
  4. 根据权利要求2所述的方法,其中,所述主设备在接收所述第二报文时,获取第四驻留时间和第四时间值,包括:
    所述第一业务板在接收所述Delay-req报文时,记录所述第一业务板接收所述Delay-req报文的时间tin4
    所述第一业务板将所述Delay-req报文发送至所述第一主控板;
    所述第一主控板记录接收到所述Delay-req报文的时间Tin4,并解析所述Delay-req报文得到封装的所述第一业务板接收Delay-req报文的时间tin4,获取得到所述第四驻留时间Δt4
    所述第一主控板记录解析所述Delay-req报文的所述第四时间值T4
  5. 根据权利要求2所述的方法,其中,所述主设备将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备,包括:
    所述第一主控板产生所述Delay-resp报文,将所述第四时间值T4、所述第四驻留时间Δt4以及所述Delay-req报文修正域中的第三驻留时间Δt3封装入所述Delay-resp报文,并将所述Delay-resp报文发送至所述第一业务板;
    所述第一业务板接收所述第一主控板发送过来的所述Delay-resp报文,并将所述Delay-resp报文发送至所述从设备。
  6. 一种时间同步的方法,所述方法应用于从设备,所述方法包括:
    从设备在接收第一报文时,获取第一驻留时间、第二驻留时间、第 一时间值和第二时间值;
    从设备记录第三时间值,将获取的第三驻留时间封装至第二报文,并将所述第二报文发送至主设备;
    从设备在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
  7. 根据权利要求6所述的方法,其中,所述从设备包括一个第二主控板和至少一个第二业务板;所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
  8. 根据权利要求7所述的方法,其中,所述从设备在接收第一报文时,获取第一驻留时间、第二驻留时间、第一时间值和第二时间值,包括:
    所述第二业务板在接收所述Sync报文时,记录所述第二业务板接收到所述Sync报文的时间tin2
    所述第二业务板将所述Sync报文发送至所述第二主控板;
    所述第二主控板记录接收到所述Sync报文的时间Tin2;并解析所述Sync报文得到封装的所述第二业务板接收到Sync报文的时间tin2,获取得到所述第二驻留时间Δt2
    所述第二主控板记录解析所述Sync报文的第二时间值T2
    所述第二主控板记录Sync报文的修正域ΔT1中的第一驻留时间Δt1和预留字段中的第一时间值T1
  9. 根据权利要求7所述的方法,其中,所述从设备记录第三时间值,并将获取的第三驻留时间封装至第二报文,并将所述第二报文发送至主 设备,包括:
    所述第二主控板在生成所述Delay-req报文时记录生成所述Delay-req报文的第三时间值T3
    所述第二主控板将所述Delay-req报文发送至所述第二业务板,并记录所述第二主控板发送所述Delay-req报文的时间Tout3
    所述第二业务板解析所述Delay-req报文,获得所述第二主控板发送所述Delay-req报文的时间Tout3
    所述第二业务板在将所述Delay-req报文向所述主设备发送时,记录所述第二业务板发送所述Delay-req报文的时间tout3,并根据所述第二主控板发送所述Delay-req报文的时间Tout3与所述第二业务板发送所述Delay-req报文的时间tout3获取所述第三驻留时间Δt3,以及将所述第三驻留时间Δt3封装于所述Delay-req报文的修正域ΔT2向所述主设备发送。
  10. 根据权利要求7所述的方法,其中,所述从设备在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延,包括:
    所述从设备通过精确时间协议PTP的同步机制,根据所述第一时间值、所述第二时间值、所述第三时间值和所述第四时间值分别对应的时间戳T1、T2、T3和T4,以及第一驻留时间Δt1、第二驻留时间Δt2、第三驻留时间Δt3和第四驻留时间Δt4,计算出主设备与从设备之间的时间偏差和时延;其中,所述第一驻留时间Δt1保存在所述第一报文的修正域ΔT1=Δt1,所述第三驻留时间Δt3保存在所述第二报文的修正域ΔT2=Δt3
  11. 一种主设备,所述主设备包括:第一主控板和第一业务板;其中,
    所述第一主控板,配置为将生成的第一时间值与获取的第一驻留时间封装至第一报文;
    所述第一业务板,配置为将所述第一报文发送至从设备;
    以及,接收由所述从设备发送的第二报文;所述第二报文包括第三驻留时间;
    所述第一主控板,还配置为在所述第一业务板接收所述第二报文时,获取第四驻留时间和第四时间值;
    以及,将所述第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文;
    所述业务板,还配置为将所述第三报文发送至从设备。
  12. 根据权利要求11所述的主设备,其中,所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
  13. 根据权利要求12所述的主设备,其中,所述第一主控板,配置为在生成所述Sync报文时记录生成所述Sync报文的第一时间值T1,并且将所述第一时间值T1封装于所述Sync报文的预留字段;
    以及,将所述Sync报文发送至所述第一业务板,并记录发送所述Sync报文的时间Tout1
    所述第一业务板,配置为解析所述Sync报文,获得所述发送所述Sync报文的时间Tout1
    以及,在将所述Sync报文向所述从设备发送时,记录发送所述Sync报文的时间tout1,并根据所述第一主控板发送所述Sync报文的时间Tout1与所述第一业务板发送所述Sync报文的时间tout1获取所述第一驻留时间Δt1,以及将所述第一驻留时间Δt1封装于所述Sync报文中的修正域ΔT1向 所述从设备发送。
  14. 根据权利要求12所述的主设备,其中,所述第一业务板,配置为在接收所述Delay-req报文时,记录所述第一业务板接收所述Delay-req报文的时间tin4
    以及,将所述Delay-req报文发送至所述第一主控板;
    所述第一主控板,配置为记录接收到所述Delay-req报文的时间Tin4,并解析所述Delay-req报文得到封装的所述第一业务板接收Delay-req报文的时间tin4,获取得到所述第四驻留时间Δt4
    以及,记录解析所述Delay-req报文的所述第四时间值T4
  15. 根据权利要求12所述的主设备,其中,所述第一主控板,配置为产生所述Delay-resp报文,将所述Delay-req报文中的所述第四时间值T4,以及所述Delay-req报文修正域中的第三驻留时间Δt3封装入所述Delay-resp报文,并将所述Delay-resp报文发送至所述第一业务板;
    所述第一业务板,配置为接收所述第一主控板发送过来的所述Delay-resp报文,并将所述Delay-resp报文发送至所述从设备。
  16. 一种从设备,所述从设备包括第二主控板和第二业务板,其中,所述第二业务板,配置为接收第一报文;
    所述第二主控板,配置为获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;
    以及,记录第三时间值,并将获取的第三驻留时间封装至第二报文;
    所述第二业务板,配置为将该第二报文发送至主设备;
    以及,接收第三报文;
    所述第二主控板,配置为获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述 第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
  17. 根据权利要求16所述的从设备,其中,所述第一报文为Sync报文;所述第二报文为Delay-req报文;所述第三报文为Delay-resp报文。
  18. 根据权利要求17所述的从设备,其中,所述第二业务板,配置为在接收所述Sync报文时,记录所述第二业务板接收到所述Sync报文的时间tin2
    以及,将所述Sync报文发送至所述第二主控板;
    所述第二主控板,配置为记录接收到所述Sync报文的时间Tin2;并解析所述Sync报文得到封装的所述第二业务板接收到Sync报文的时间tin2,获取得到所述第二驻留时间Δt2
    所述第二主控板记录解析所述Sync报文的第二时间值T2
    所述第二主控板记录Sync报文的修正域ΔT1中的第一驻留时间Δt1和预留字段中的第一时间值T1
  19. 根据权利要求17所述的从设备,其中,所述第二主控板,配置为在生成所述Delay-req报文时记录生成所述Delay-req报文的第三时间值T3
    以及,将所述Delay-req报文发送至所述第二业务板,并记录所述第二主控板发送所述Delay-req报文的时间Tout3
    所述第二业务板,配置为解析所述Delay-req报文,获得所述第二主控板发送所述Delay-req报文的时间Tout3
    以及,在将所述Delay-req报文向所述主设备发送时,记录所述第二业务板发送所述Delay-req报文的时间tout3,并根据所述第二主控板发送所述Delay-req报文的时间Tout3与所述第二业务板发送所述Delay-req报 文的时间tout3获取所述第三驻留时间Δt3,以及将所述第三驻留时间Δt3封装于所述Delay-req报文的修正域ΔT2向所述主设备发送。
  20. 根据权利要求17所述的从设备,其中,所述第二主控板,配置为通过精确时间协议PTP的同步机制,根据所述第一时间值、所述第二时间值、所述第三时间值和所述第四时间值分别对应的时间戳T1、T2、T3和T4,以及所述第一驻留时间Δt1、所述第二驻留时间Δt2、所述第三驻留时间Δt3和所述第四驻留时间Δt4,计算出所述主设备与所述从设备之间的时间偏差和时延。
  21. 一种时间同步的***,所述***包括:主设备和从设备;其中,
    所述主设备,配置为将生成的第一时间值与获取的第一驻留时间封装至第一报文,并将所述第一报文发送至所述从设备;
    以及,接收由所述从设备发送的第二报文;所述第二报文包括第三驻留时间;
    以及,在接收所述第二报文时,获取第四驻留时间和第四时间值;其中,所述第二报文包括第三驻留时间;
    以及,将所述第二报文中的第四时间值、第四驻留时间以及所述第二报文中的第三驻留时间封装入第三报文,并将所述第三报文发送至从设备;
    所述从设备,配置为在接收第一报文时,获取第一驻留时间、第二驻留时间、第一时间值和第二时间值;
    以及,记录获取第三时间值,将获取的第三驻留时间封装至第二报文,并将该第二报文发送至所述主设备;
    以及,在接收第三报文时,获取第三报文中所包括的第四时间值、第四驻留时间以及第二报文中的第三驻留时间,并根据所述第一时间值、第二时间值、第三时间值和第四时间值,以及所述第一驻留时间、所述 第二驻留时间、所述第三驻留时间和所述第四驻留时间,计算出所述主设备与所述从设备之间的时间偏差和时延。
  22. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至5任一项所述的时间同步的方法。
  23. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求6至10任一项所述的时间同步的方法。
PCT/CN2016/098770 2015-12-11 2016-09-12 一种时钟同步的方法、设备和***、存储介质 WO2017096994A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510918940.3A CN106877959B (zh) 2015-12-11 2015-12-11 一种时钟同步的方法、设备和***
CN201510918940.3 2015-12-11

Publications (1)

Publication Number Publication Date
WO2017096994A1 true WO2017096994A1 (zh) 2017-06-15

Family

ID=59012639

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/098770 WO2017096994A1 (zh) 2015-12-11 2016-09-12 一种时钟同步的方法、设备和***、存储介质

Country Status (2)

Country Link
CN (1) CN106877959B (zh)
WO (1) WO2017096994A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995557A (zh) * 2017-12-29 2019-07-09 ***通信集团陕西有限公司 一种通信方法及装置
CN116436555A (zh) * 2023-06-09 2023-07-14 新华三技术有限公司 一种时间同步方法、装置及分布式网络设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678764B (zh) * 2017-09-30 2020-09-08 杭州迪普科技股份有限公司 一种基于issu升级vsm***的方法及装置
CN108737007A (zh) * 2018-08-24 2018-11-02 新华三技术有限公司 一种时间同步方法、装置及设备
CN113079183B (zh) * 2021-04-25 2022-09-06 安徽科大擎天科技有限公司 一种分布式防火墙的板间通信***及其通信方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447745A (zh) * 2012-01-11 2012-05-09 中兴通讯股份有限公司 Tc设备上的报文驻留时间的处理方法及装置
CN103441832A (zh) * 2013-08-22 2013-12-11 瑞斯康达科技发展股份有限公司 基于ptp的时钟同步方法、***和设备
CN103546268A (zh) * 2013-10-15 2014-01-29 瑞斯康达科技发展股份有限公司 一种***时间的补偿方法及设备
WO2015170201A1 (en) * 2014-05-05 2015-11-12 Telefonaktiebolaget L M Ericsson (Publ) A method for robust ptp synchronization with default 1588v2 profile

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102082697A (zh) * 2009-11-27 2011-06-01 华为技术有限公司 通信路径不对称延时测量方法、装置和***
CN102237995B (zh) * 2010-04-20 2016-06-22 中兴通讯股份有限公司 一种精密时间协议的时间处理装置及方法
CN104348568A (zh) * 2013-07-23 2015-02-11 中兴通讯股份有限公司 时间同步处理方法及装置
CN103441833B (zh) * 2013-08-26 2016-08-10 瑞斯康达科技发展股份有限公司 一种主从设备频率同步方法及***
US9112631B2 (en) * 2013-09-11 2015-08-18 Khalifa University of Science, Technology, and Research Method and devices for frequency distribution
CN103581205B (zh) * 2013-11-20 2017-01-11 盛科网络(苏州)有限公司 在多个mac中实现精准时戳的方法及***

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447745A (zh) * 2012-01-11 2012-05-09 中兴通讯股份有限公司 Tc设备上的报文驻留时间的处理方法及装置
CN103441832A (zh) * 2013-08-22 2013-12-11 瑞斯康达科技发展股份有限公司 基于ptp的时钟同步方法、***和设备
CN103546268A (zh) * 2013-10-15 2014-01-29 瑞斯康达科技发展股份有限公司 一种***时间的补偿方法及设备
WO2015170201A1 (en) * 2014-05-05 2015-11-12 Telefonaktiebolaget L M Ericsson (Publ) A method for robust ptp synchronization with default 1588v2 profile

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CUI, QUANSHENG ET AL.: "Analysis of PTP 1588 Protocol", POWER SYSTEM PROTECTION AND CONTROL, vol. 39, no. 10, 16 May 2011 (2011-05-16) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995557A (zh) * 2017-12-29 2019-07-09 ***通信集团陕西有限公司 一种通信方法及装置
CN116436555A (zh) * 2023-06-09 2023-07-14 新华三技术有限公司 一种时间同步方法、装置及分布式网络设备
CN116436555B (zh) * 2023-06-09 2023-08-18 新华三技术有限公司 一种时间同步方法、装置及分布式网络设备

Also Published As

Publication number Publication date
CN106877959B (zh) 2019-04-30
CN106877959A (zh) 2017-06-20

Similar Documents

Publication Publication Date Title
WO2017096994A1 (zh) 一种时钟同步的方法、设备和***、存储介质
US10673565B2 (en) Confirming data accuracy in a distributed control system
CN103929293B (zh) 非对称延迟的时间同步方法及***
US20160191184A1 (en) Time synchronization for network testing equipment
WO2018041228A1 (zh) 一种传输同步信息的方法、装置和***
WO2020135857A1 (zh) 时间同步方法、***、设备及存储介质
TW201921892A (zh) 間接封包分類時間戳系統及方法
US10097790B2 (en) Carriage of PTP time reference data in a real-time video signal
CN104509023A (zh) 跨多个信道的帧同步
KR20170105573A (ko) Otn 네트워크에서의 시간 동기화 방법, 기기, 시스템 및 저장 매체
CN112887086B (zh) 量子密钥同步方法及***
EP2448168A1 (en) Method and system for bearing time synchronization protocol in optical transport network
US10505651B1 (en) Precision time synchronization over standardized networking protocols
CN111327385A (zh) 物联网设备的时钟同步方法、装置及设备
WO2010057398A1 (zh) 透传时钟的实现装置和方法
US20210314381A1 (en) System and method for interleaved media communication and conversion
WO2019036943A1 (zh) 一种报文处理的方法和网络设备
CN108737006A (zh) 一种时间同步方法、客户端及计算机可读存储介质
Bosk et al. Methodology and infrastructure for tsn-based reproducible network experiments
WO2020027850A1 (en) Precision time synchronization over standardized networking protocols
WO2014075260A1 (zh) 一种时延补偿方法及装置
CN108989246B (zh) 使用稀疏流的设备之间的音频传输
KR20230116903A (ko) 클럭 동기화를 위한 방법 및 이종 컴퓨팅 시스템
EP3868043B1 (en) Wireless audio synchronization
JP2018125768A (ja) データ伝送装置及びプログラム

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16872189

Country of ref document: EP

Kind code of ref document: A1