WO2014161213A1 - Clock synchronization method and apparatus in seamless redundant network - Google Patents

Clock synchronization method and apparatus in seamless redundant network Download PDF

Info

Publication number
WO2014161213A1
WO2014161213A1 PCT/CN2013/075089 CN2013075089W WO2014161213A1 WO 2014161213 A1 WO2014161213 A1 WO 2014161213A1 CN 2013075089 W CN2013075089 W CN 2013075089W WO 2014161213 A1 WO2014161213 A1 WO 2014161213A1
Authority
WO
WIPO (PCT)
Prior art keywords
ptp
adjustment value
seamless redundant
adjustment
value set
Prior art date
Application number
PCT/CN2013/075089
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 WO2014161213A1 publication Critical patent/WO2014161213A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0641Change of the master or reference, e.g. take-over or failure of the master
    • 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

Definitions

  • the invention relates to a clock synchronization method and device in a seamless redundant network.
  • the application is filed on April 3, 2013, and the application number is 201310114333.1.
  • the invention name is "a clock synchronization party and device in a seamless redundant network.
  • the priority of the Chinese Patent Application the entire contents of which is incorporated herein by reference.
  • TECHNICAL FIELD The present invention relates to the field of seamless redundant network technologies, and in particular, to a clock synchronization method and apparatus in a seamless redundant network. BACKGROUND OF THE INVENTION A high availability seamless automatic ring has been added to the IEC62439-3 standard (High Availability Seamless)
  • the protocol content of the network The HSR network (also known as the seamless redundant network) specified in the content of the protocol consists of multiple dual-connected nodes. Each node has two ring access ports. Port), wherein when the source node sends a packet to the destination node, it first adds an HSR label to the duplicated message, and then simultaneously sends the duplicated message to the two ports of the destination node through the two ports. 4 ⁇ .
  • the destination node receives a packet from each port at different times, and the two received packets are the same packet, so that the destination node retains the first packet received and discards the packet. The second message received.
  • the Precision Timing Protocol (PTP) protocol implements clock synchronization by selecting one node as the master clock and the other nodes as the slave clock.
  • the master clock node periodically sends the master clock time to the slave clock node through the ⁇ ⁇ text, and after receiving the message from the clock node, the ⁇ adjustment value is calculated based on the master clock time, and the ⁇ adjustment is calculated according to the calculation. The value is adjusted to achieve synchronization with the primary clock node.
  • FIG. 1 a schematic diagram of a connection between a node and a node in a seamless redundant network, where node A is a master clock, node B is a slave clock, port A1 of node A is connected to port B1 of node B, and Port A2 of node A is connected to port B2 of node B.
  • Node A sends a PTP protocol message AB1 to port B1 of node B through port A1, and a port A2 of node A sends a PTP protocol message AB2 to port B2 of node B.
  • the length of the cable between port A1 and port B1 and the length of the cable between port A2 and port B2 will cause the node B to receive PTP packets from port B1 and port B2 at different times. AB1 and AB2.
  • the PTP protocol packet received is discarded, and the PTP protocol packet received is synchronized.
  • the PTP protocol received by Node B will be jittered, and the jitter level of different protocols received will be different. If the jitter level of the received PTP protocol is higher than the jitter of the received protocol, then the synchronization is based on the first received protocol packet.
  • Embodiments of the present invention provide a clock synchronization method and apparatus in a seamless redundant network, which are used to solve the problem of low synchronization accuracy of a master-slave node in the prior art.
  • a clock synchronization method in a seamless redundant network comprising:
  • the slave clock nodes in the seamless redundant network receive seamless redundancy through their different seamless redundant ports.
  • the seamless redundancy is determined according to the message identifier carried in the received seamless redundant packets. Whether the remaining message includes the message information; when the determination result is yes, the seamless redundant message including the message information is saved;
  • the stored seamless redundancy received by the different seamless redundant ports is parsed, and according to the parsed ⁇ message information, a set of ⁇ adjustment values corresponding to different seamless redundant ports is obtained;
  • a set of adjustment values is selected from the obtained set of adjustment values to adjust the local clock of the slave clock node.
  • a clock synchronization device in a seamless redundant network comprising:
  • a receiving unit for receiving seamless redundancy through different seamless redundant ports thereof
  • a determining unit configured to determine, according to the packet identifier carried in the seamless redundant packet received by the receiving unit, whether the seamless redundant packet includes the packet information
  • a saving unit configured to: when the determining result of the determining unit is yes, seamlessly including the information including the ⁇ message
  • the parsing unit is configured to parse the seamless redundancy received by the storage unit through different seamless redundant ports, and obtain corresponding seamless redundancy according to the parsed message information a set of ⁇ adjustment values for the remaining ports;
  • an adjusting unit configured to select a set of adjustment values from the set of adjustment values obtained by the parsing unit to adjust a local clock of the slave clock node.
  • FIG. 1 is a schematic diagram of a connection between a node ⁇ and a node B in a seamless redundant network;
  • FIG. 2 is a main flowchart of a clock synchronization method in a seamless redundant network according to Embodiment 1 of the present invention
  • FIG. 3 is a schematic diagram of connection between a GMC and a slave clock node in an actual application according to Embodiment 2 of the present invention
  • 4 is a specific flowchart of a method for clock synchronization in a seamless redundant network in practical applications according to Embodiment 2 of the present invention
  • FIG. 5 is a distribution diagram of an adjustment value interval according to Embodiment 2 of the present invention.
  • Embodiment 6 is a distribution state diagram of two sets of adjustment values provided by Embodiment 2 of the present invention.
  • FIG. 7 is a schematic structural diagram of a clock synchronization apparatus in a seamless redundant network according to Embodiment 3 of the present invention.
  • FIG. 8 is a schematic structural diagram of a clock synchronization system in a seamless redundant network according to Embodiment 4 of the present invention.
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to solve the problem of low synchronization accuracy of a master-slave node in the prior art, an embodiment of the present invention provides a scheme for clock synchronization in a seamless redundant network. The solution can save the seamless redundant packets containing the PTP packet information received by the different seamless redundant ports, and analyze the saved seamless redundancy 4 to obtain different correspondences respectively.
  • a set of PTP adjustment values of the seamless redundant port, and then a PTP adjustment value set is selected to adjust the local clock of the slave clock node, instead of directly receiving the seamless redundant message including the PTP message information.
  • the adjustment is performed according to the seamlessly received packet containing the PTP message information received first, so that the localization of the slave clock node can be realized according to a set of seamless redundancy that is less jittery.
  • the clock is adjusted to improve the accuracy of the master-slave clock synchronization adjustment.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 2 it is a main flow diagram of a clock synchronization method in a seamless redundant network according to Embodiment 1 of the present invention, where the method includes the following steps:
  • Step 21 The slave clock nodes in the seamless redundant network respectively receive seamless redundant packets through different seamless redundant ports;
  • the master clock node sends the same seamless redundancy to the seamless redundant ports of the slave clock nodes through its different seamless ports at the same time. Due to external factors, it is sent separately for the master clock node. The same seamless redundancy 4, the slave clock nodes will be received from different seamless redundant ports at different times. Step 22: Determine, according to the packet identifier carried in the seamlessly redundant packet, whether the seamless redundant packet includes the packet information.
  • Step 23 When the determination result is yes, the seamless redundant message including the ⁇ message information is saved; wherein, when the determination result is no, the received seamless redundant message does not include the ⁇ message
  • the information is received, it is determined whether the slave clock node stores the seamless redundant message that is the same as the data information included in the received seamless redundant message. If the judgment result is yes, the seamlessness received will be received. Redundant packets are discarded.
  • Step 24 parsing the seamlessly redundant packets received by the different seamless redundant ports, and obtaining the adjusted values corresponding to different seamless redundant ports according to the parsed packet information.
  • the saved seamless redundancy received by the different seamless redundant ports may be collected at least once, and the seamless redundant packets are collected.
  • the analysis is performed, and further, the parsed message information is obtained, and a set of adjustment values corresponding to different seamless redundant ports is obtained.
  • Step 25 Select a set of adjustment values from the obtained set of adjustment values to adjust the local clock of the slave clock node.
  • a set of ⁇ adjustment values may be selected from the obtained ⁇ adjustment value set according to the distribution state information of the ⁇ adjustment values respectively included in each obtained ⁇ adjustment value set;
  • the method may include: determining, according to a preset adjustment value interval, an adjustment value interval to which the ⁇ adjustment value is included in each set of adjustment values, and then performing, for each ⁇ adjustment value set: from the ⁇ adjustment value set In the adjustment value interval to which the ⁇ adjustment value belongs, the candidate adjustment value interval having the largest ⁇ adjustment value is determined, and finally, from the determined candidate adjustment value interval, a candidate adjustment value interval having the smallest lower limit is selected.
  • the local clock of the slave clock node may be adjusted according to an average value of the adjusted values included in the selected set of values.
  • adjusting the local clock of the slave clock node according to the selected set of ⁇ adjustment values may be, but is not limited to, the above-mentioned processing manner.
  • the average value of the ⁇ adjustment value included in the selected ⁇ adjustment value set is adjusted in such a manner as to further improve the clock synchronization accuracy.
  • Adjusting the adjustment value may make the synchronization accuracy of the slave clock node lower.
  • Embodiments of the present invention are capable of seamlessly receiving ⁇ packet information received by different seamless redundant ports
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • FIG. 3 it is a schematic diagram of a connection between a GMC (Grandmaster Clock) and a slave clock node in an actual application according to Embodiment 2 of the present invention, wherein a seamless redundant port of the GMC (hereinafter referred to as a port) A1 is connected to port B1 of the slave clock node, and port A2 of the GMC is connected to port B2 of the slave clock node.
  • a seamless redundant port of the GMC hereinafter referred to as a port
  • the basic idea of the scheme is: Save multiple seamless redundant packets containing PTP message information received by port B1 and port B2 from the clock node, and save multiple seamless redundancy 4
  • the parsing is performed to obtain a PTP adjustment value set corresponding to the port B1 and the port B2 respectively, and according to the obtained distribution state information of the two PTP adjustment value sets, an actual PTP adjustment value is obtained for the local clock of the slave clock node. Adjustment.
  • FIG. 4 it is a specific flowchart of a clock synchronization method in a seamless redundant network in an actual application according to Embodiment 2 of the present invention, where the method specifically includes:
  • Step 41 The slave clock node in the seamless redundant network receives the seamless redundancy message through port B1 and port B2, respectively.
  • Step 42 Determine, according to the packet identifier that is received by the seamlessly redundant packet, whether the PTP packet information is included. If the determination is yes, go to step 43. If the result is no, go to step 47. ;
  • the seam redundancy message contains PTP 4 message information.
  • Step 43 Save the received seamless redundant packet containing the PTP packet information.
  • step 44 the stored seamless redundancy received by the port B1 and the port B2 are collected at least once, and the seamless redundant packets are parsed and parsed according to the analysis.
  • the ⁇ message information is obtained, and the ⁇ adjustment value set corresponding to the port B1 and the port ⁇ 2 respectively is obtained;
  • the ⁇ adjustment value obtained by the parsing of the port B1 can be stored in the data area corresponding to the port B1, and the seamless redundancy received by the port ⁇ 2 is parsed.
  • the ⁇ adjustment value is stored in the data area corresponding to the port ⁇ 2, and the ⁇ adjustment values stored in the two data areas respectively constitute the ⁇ adjustment value set corresponding to the port B1 and the ⁇ adjustment value set corresponding to the port ⁇ 2.
  • Step 45 Select a set of adjustment values from the obtained set of adjusted values according to the distribution state information of the adjusted values respectively included in each obtained set of adjustment values;
  • FIG. 5 it is an adjustment value interval distribution diagram provided by an embodiment of the present invention.
  • the ⁇ adjustment value in the data area corresponding to the port B1 and the ⁇ adjustment value in the data area corresponding to the port ⁇ 2 are respectively corresponding to each adjustment value interval according to the preset adjustment value interval, and respectively determined for Port B1 contains the most adjusted value
  • the candidate adjustment value interval and the candidate adjustment value interval including the most PTP adjustment value for the port B2 then, in the above-mentioned determined candidate adjustment value intervals for the port B1 and the port B2, we consider that there is a minimum lower limit.
  • the PTP adjustment value included in the PTP adjustment value set corresponding to the candidate adjustment value interval is relatively stable, and the jitter range between the PTP adjustment value and the PTP adjustment value is small.
  • the preset adjustment value interval may be set according to the user's needs, and is not specifically limited herein.
  • the distribution state diagram of the set of values of the two PTPs wherein the abscissa is the number of adjustments, the ordinate is the PTP adjustment value, and each data point is obtained according to a seamlessly redundant message received.
  • a PTP adjustment value the hollow data point is a set of ⁇ adjustment value D1 obtained according to a set of seamless redundancy received by port B1, and the solid data point is a group received according to port ⁇ 2
  • a set of ⁇ adjustment values D2 obtained by seamlessly redundant messages. It can be seen more clearly from Figure 6 that D1 has a larger jitter range, and D2 has a smaller jitter range than D1, which indicates that D2 is more stable, so D2 is selected to adjust the local clock of the slave clock node.
  • Step 46 Adjust the local clock of the slave clock node according to an average value of the PTP adjustment values included in the selected PTP adjustment value set.
  • Step 47 For the seamless redundancy received by the different ports and containing the same data information, the seamless redundancy received first is saved, and the seamless redundancy received later is received. Discard.
  • the step may specifically include: determining whether the seamless redundant message that is the same as the data information included in the received seamless redundant message is stored, and when the determination result is yes, the received no Seated redundant packets are discarded.
  • Embodiments of the present invention are capable of seamlessly receiving ⁇ packet information received by different seamless redundant ports
  • the distribution state information of the adjustment value is selected as a set of adjustment values, and the local clock of the slave clock node is adjusted, instead of directly receiving the seamless redundant message containing the message information and receiving it first.
  • the seamless redundant packets including the ⁇ message information are adjusted, so that the local clock of the slave clock node can be adjusted according to a set of seamless redundant messages with less jitter.
  • the accuracy of the master-slave clock synchronization adjustment is selected as a set of adjustment values, and the local clock of the slave clock node is adjusted, instead of directly receiving the seamless redundant message containing the message information and receiving it first.
  • the local clock is adjusted according to the average value of the ⁇ adjustment values included in the selected ⁇ adjustment value set, which further prevents the sudden jitter of a set of seamless redundancy in the selected jitter degree. , so that the determined average adjustment value is closer to the actual adjustment value, and the synchronization adjustment precision of the master-slave clock is further improved.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • the embodiment of the present invention further provides a clock synchronization device in a seamless redundant network.
  • the following functional modules are included:
  • the receiving unit 71 is configured to receive seamless redundancy respectively through different seamless redundant ports thereof;
  • the determining unit 72 is configured to determine, according to the packet identifier carried in the seamless redundancy packet received by the receiving unit 71, whether the seamless redundancy packet includes the packet information.
  • the saving unit 73 is configured to save the seamless redundancy information including the PTP message information when the determination result of the determining unit 72 is YES;
  • the parsing unit 74 is configured to parse the seamless redundant packets respectively received by the different seamless redundant ports saved by the saving unit 73, and obtain corresponding seamless redundancy according to the parsed ⁇ message information. a set of ⁇ adjustment values for the remaining ports;
  • the adjusting unit 75 is configured to select a set of adjustment values from the set of adjustment values obtained by the parsing unit 74 to adjust the local clock of the slave clock node.
  • the device may further include:
  • the determining unit 76 is configured to: when the determining result of the determining unit 72 is negative, determine whether the seamless redundant message that is the same as the data information included in the received seamless redundant message is stored;
  • the discarding unit 77 is configured to discard the received seamless redundant message when the determining result of the determining unit 76 is YES.
  • the parsing unit 74 may be specifically configured to:
  • the seamless redundancy received by the different seamless redundant ports is stored at least once, and the seamlessly redundant 4 files are parsed.
  • the adjusting unit 75 can be specifically configured to:
  • a set of ⁇ adjustment values is selected from the ⁇ adjustment value set obtained by the parsing unit 74, and the local clock of the slave clock node is adjusted according to the average value of the ⁇ adjustment values included in the selected ⁇ adjustment value set.
  • adjusting unit 75 is further specifically configured to:
  • a set of ⁇ adjustment values is selected from the obtained ⁇ adjustment value set.
  • it may include:
  • a first determining module configured to determine, according to a preset adjustment value interval, an adjustment value interval to which the ⁇ adjustment value respectively included in each set of adjustment values belongs;
  • a second determining module configured to perform, for each set of adjustment values: determining, from the adjustment value interval to which the ⁇ adjustment value included in the ⁇ adjustment value set belongs, a candidate adjustment value interval that includes the most ⁇ adjustment value;
  • the selection module is configured to select a set of adjustment values corresponding to the candidate adjustment value interval having the smallest lower limit.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • the embodiment of the present invention further provides a clock synchronization system in a seamless redundant network, as shown in FIG. 8, which specifically includes: a master clock node 81 and a slave a clock node 82; wherein, the master clock node 81 is configured to respectively send seamless redundancy to different seamless redundant ports of the slave clock node 82; the slave clock node 82 is used for different seamless redundancy
  • the remaining ports respectively receive the seamless redundant packets sent by the primary clock node 71; and determine whether the seamless redundant packets contain the ⁇ message information according to the received packet identifiers of the seamless redundant packets; If yes, save the seamless redundant message containing the message information; save and save Parsing seamless redundant packets received by different seamless redundant ports, and obtaining PTP adjustment value sets corresponding to different seamless redundant ports according to the parsed PTP message information;
  • a set of PTP adjustment values is selected from the set of PTP adjustment values to adjust the local clock of the slave clock node 82.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the present invention can be embodied in the form of a computer program product embodied on one or more computer-usable storage interfaces (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • computer-usable storage interfaces including but not limited to disk storage, CD-ROM, optical storage, etc.
  • 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.

Abstract

Disclosed are a clock synchronization method and apparatus in a seamless redundant network, so as to solve the problem in the prior art that precision of synchronization between a primary node clock and a secondary node clock is low. The method comprises: a secondary clock node in a seamless redundant network receiving a seamless redundant packet through different seamless redundant ports of the secondary clock node separately; determining, according to a packet identifier carried by the received seamless redundant packet, whether each seamless redundant packet comprises PTP packet information; if a determining result is yes, storing the seamless redundant packets comprising the PTP packet information; parsing the stored seamless redundant packets received through different seamless redundant ports, and obtaining PTP adjustment value sets corresponding to the different seamless redundant ports according to the PTP packet information obtained by parsing; and selecting one PTP adjustment value set from the obtained PTP adjustment value sets to adjust a local clock of the secondary clock node.

Description

一种无缝冗余网络中时钟同步方法和装置 本申请要求在 2013年 4月 3日提交中国专利局、申请号为 201310114335.1、发明名称为"一 种无缝冗余网络中时钟同步方和装置"的中国专利申请的优先权, 其全部内容通过引用结合在 本申请中。 技术领域 本发明涉及无缝冗余网络技术领域, 尤其涉及一种无缝冗余网络中时钟同步方法和装 置。 背景技术 在 IEC62439-3标准中增加了关于高可用性无缝自动环 ( High Availability Seamless The invention relates to a clock synchronization method and device in a seamless redundant network. The application is filed on April 3, 2013, and the application number is 201310114333.1. The invention name is "a clock synchronization party and device in a seamless redundant network. The priority of the Chinese Patent Application, the entire contents of which is incorporated herein by reference. TECHNICAL FIELD The present invention relates to the field of seamless redundant network technologies, and in particular, to a clock synchronization method and apparatus in a seamless redundant network. BACKGROUND OF THE INVENTION A high availability seamless automatic ring has been added to the IEC62439-3 standard (High Availability Seamless)
Automation Ring, HSR ) 网络的协议内容, 该协议内容所规定的 HSR网络(又称无缝冗余 网络) 由多个双连接的节点构成, 每个节点具有两个环网接入端口 (筒称端口), 其中, 当源节点向目的节点发送报文时, 会先在 4艮文中加入 HSR标签用来标识重复 4艮文, 然后通 过其两个端口分别向目的节点的两个端口同时发送该 4艮文。 目的节点在不同的时间分别从 不同的端口会各接收到一个报文, 分别接收到的这两个报文是相同的报文, 从而目的节点 会保留接收到的第一个报文, 而丢弃接收到的第二个报文。 Automation Ring, HSR) The protocol content of the network. The HSR network (also known as the seamless redundant network) specified in the content of the protocol consists of multiple dual-connected nodes. Each node has two ring access ports. Port), wherein when the source node sends a packet to the destination node, it first adds an HSR label to the duplicated message, and then simultaneously sends the duplicated message to the two ports of the destination node through the two ports. 4 艮文. The destination node receives a packet from each port at different times, and the two received packets are the same packet, so that the destination node retains the first packet received and discards the packet. The second message received.
而精确时钟同步( Precision Timing Protocol, PTP )协议实现时钟同步通常是选定一个 节点作为主时钟, 其他节点作为从时钟。 主时钟节点周期性的通过 ·ί艮文将主时钟时间发送 给从时钟节点, 从时钟节点接收到报文后, 以主时钟时间为基准计算得到 ΡΤΡ调整值, 并 根据计算得出的 ΡΤΡ调整值进行调整, 以达到与主时钟节点同步的目的。  The Precision Timing Protocol (PTP) protocol implements clock synchronization by selecting one node as the master clock and the other nodes as the slave clock. The master clock node periodically sends the master clock time to the slave clock node through the 艮 艮 text, and after receiving the message from the clock node, the ΡΤΡ adjustment value is calculated based on the master clock time, and the ΡΤΡ adjustment is calculated according to the calculation. The value is adjusted to achieve synchronization with the primary clock node.
在现有技术中, 为了在无缝冗余网络中实现主从时钟同步, 通常是按照如下过程实现 的:  In the prior art, in order to implement master-slave clock synchronization in a seamless redundant network, it is usually implemented as follows:
如图 1所示, 为无缝冗余网络中节点 Α与节点 Β的连接示意图, 其中, 节点 A为主时钟, 节点 B为从时钟, 节点 A的端口 A1与节点 B的端口 B1连接, 以及节点 A的端口 A2与节点 B的 端口 B2连接。 节点 A通过端口 A1向节点 B的端口 B1发送 PTP协议报文 AB1 , 以及节点 A的端 口 A2向节点 B的端口 B2发送 PTP协议 4艮文 AB2。 通常由于端口 A1与端口 B 1之间的线缆长度 和端口 A2与端口 B2之间的线缆长度不同,会直接导致节点 B在不同的时间从端口 B1和端口 B2分别收到 PTP协议报文 AB1和 AB2。 在该场景下, 通常釆取的处理策略是丢弃后收到的 PTP协议报文, 而按照先收到的 PTP协议报文进行同步。 但是由于外部因素的影响, 节点 B 收到的 PTP协议 ·ί艮文会发生抖动, 并且先后收到的不同 ΡΤΡ协议 ·ί艮文的抖动程度也会不同, 若先收到的 PTP协议 ·ί艮文的抖动程度比后收到的 ΡΤΡ协议 ·ί艮文的抖动程度大,那么按照先收 到的 ΡΤΡ协议报文进行同步时,就会使得根据先收到的 ΡΤΡ协议报文确定的调整值与实际应 该调整的值相差比较大, 而导致节点 Β基于节点 Α的时钟同步精度不高。 发明内容 本发明实施例提供一种无缝冗余网络中时钟同步方法和装置, 用以解决现有技术中主 从节点时钟同步精度低的问题。 As shown in FIG. 1 , a schematic diagram of a connection between a node and a node in a seamless redundant network, where node A is a master clock, node B is a slave clock, port A1 of node A is connected to port B1 of node B, and Port A2 of node A is connected to port B2 of node B. Node A sends a PTP protocol message AB1 to port B1 of node B through port A1, and a port A2 of node A sends a PTP protocol message AB2 to port B2 of node B. Generally, the length of the cable between port A1 and port B1 and the length of the cable between port A2 and port B2 will cause the node B to receive PTP packets from port B1 and port B2 at different times. AB1 and AB2. In this scenario, the PTP protocol packet received is discarded, and the PTP protocol packet received is synchronized. However, due to the influence of external factors, the PTP protocol received by Node B will be jittered, and the jitter level of different protocols received will be different. If the jitter level of the received PTP protocol is higher than the jitter of the received protocol, then the synchronization is based on the first received protocol packet. The adjustment value determined by the ΡΤΡ protocol message is quite different from the value that should be adjusted, and the clock synchronization accuracy of the node Β based on the node 不 is not high. SUMMARY OF THE INVENTION Embodiments of the present invention provide a clock synchronization method and apparatus in a seamless redundant network, which are used to solve the problem of low synchronization accuracy of a master-slave node in the prior art.
本发明实施例釆用以下技术方案:  The following technical solutions are used in the embodiments of the present invention:
一种无缝冗余网络中时钟同步方法, 包括:  A clock synchronization method in a seamless redundant network, comprising:
无缝冗余网络中的从时钟节点通过其不同的无缝冗余端口分别接收无缝冗余 ·ί艮文; 根据接收到的无缝冗余报文携带的报文标识, 确定无缝冗余报文是否包括 ΡΤΡ报文信 息; 当确定结果为是时, 将所述包含 ΡΤΡ报文信息的无缝冗余报文进行保存; 并  The slave clock nodes in the seamless redundant network receive seamless redundancy through their different seamless redundant ports. The seamless redundancy is determined according to the message identifier carried in the received seamless redundant packets. Whether the remaining message includes the message information; when the determination result is yes, the seamless redundant message including the message information is saved;
对保存的通过不同无缝冗余端口所分别接收的无缝冗余 4艮文进行解析, 并根据解析出 的 ΡΤΡ报文信息, 得到对应于不同的无缝冗余端口的 ΡΤΡ调整值集合;  The stored seamless redundancy received by the different seamless redundant ports is parsed, and according to the parsed ΡΤΡ message information, a set of ΡΤΡ adjustment values corresponding to different seamless redundant ports is obtained;
从得到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合调整所述从时钟节点的本地时钟。 一种无缝冗余网络中时钟同步装置, 包括:  A set of adjustment values is selected from the obtained set of adjustment values to adjust the local clock of the slave clock node. A clock synchronization device in a seamless redundant network, comprising:
接收单元, 用于通过其不同的无缝冗余端口分别接收无缝冗余 ·ί艮文;  a receiving unit for receiving seamless redundancy through different seamless redundant ports thereof;
确定单元, 用于根据接收单元接收到的无缝冗余报文携带的报文标识, 确定无缝冗余 报文是否包括 ΡΤΡ报文信息;  a determining unit, configured to determine, according to the packet identifier carried in the seamless redundant packet received by the receiving unit, whether the seamless redundant packet includes the packet information;
保存单元, 用于当确定单元的确定结果为是时, 将所述包含 ΡΤΡ报文信息的无缝冗余 a saving unit, configured to: when the determining result of the determining unit is yes, seamlessly including the information including the ΡΤΡ message
•ί艮文进行保存; • 艮 进行 进行 save;
解析单元, 用于对保存单元保存的通过不同无缝冗余端口所分别接收的无缝冗余 ·ί艮文 进行解析,并根据解析出的 ΡΤΡ报文信息,得到对应于不同的无缝冗余端口的 ΡΤΡ调整值集 合;  The parsing unit is configured to parse the seamless redundancy received by the storage unit through different seamless redundant ports, and obtain corresponding seamless redundancy according to the parsed message information a set of ΡΤΡ adjustment values for the remaining ports;
调整单元,用于从解析单元得到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合调整所述 从时钟节点的本地时钟。  And an adjusting unit, configured to select a set of adjustment values from the set of adjustment values obtained by the parsing unit to adjust a local clock of the slave clock node.
本发明实施例的有益效果如下:  The beneficial effects of the embodiments of the present invention are as follows:
本发明实施例通过上述的方案, 能够将不同的无缝冗余端口分别接收到的包含 ΡΤΡ报 文信息的无缝冗余报文进行保存, 并通过对保存的无缝冗余 4艮文进行解析, 得到分别对应 于不同无缝冗余端口的 ΡΤΡ调整值集合,进而选取一个 ΡΤΡ调整值集合对该从时钟节点的 本地时钟进行调整, 而不是直接丢弃后收到的包含 ΡΤΡ报文信息的无缝冗余报文而按照先 收到的包含 ΡΤΡ报文信息的无缝冗余报文进行调整, 因此有效的保证了可以根据抖动程度 较小的一组无缝冗余 ·ί艮文来实现对从时钟节点的本地时钟进行调整, 进而提高了主从时钟 同步调整的精度。 附图说明 图 1为无缝冗余网络中节点 Α与节点 B的连接示意图; Through the foregoing solution, the embodiment of the present invention can save the seamless redundant message including the ΡΤΡ packet information received by the different seamless redundant ports, and perform the seamless redundancy of the saved After parsing, the set of ΡΤΡ adjustment values corresponding to different seamless redundant ports are respectively obtained, and then a ΡΤΡ adjustment value set is selected to adjust the local clock of the slave clock node, instead of the ΡΤΡ packet information received after being directly discarded. Seamlessly redundant packets are adjusted according to the seamlessly received packets containing the first received packet information, thus effectively ensuring the degree of jitter A smaller set of seamless redundancy is used to adjust the local clock of the slave clock node, which improves the accuracy of master-slave clock synchronization adjustment. BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic diagram of a connection between a node Α and a node B in a seamless redundant network;
图 2为为本发明实施例一提供的一种无缝冗余网络中时钟同步方法的主要流程图; 图 3为本发明实施例二提供的在实际应用中 GMC与从时钟节点的连接示意图 图 4为为本发明实施例二提供的在实际应用中无缝冗余网络中时钟同步方法的具体流 程图;  2 is a main flowchart of a clock synchronization method in a seamless redundant network according to Embodiment 1 of the present invention; FIG. 3 is a schematic diagram of connection between a GMC and a slave clock node in an actual application according to Embodiment 2 of the present invention; 4 is a specific flowchart of a method for clock synchronization in a seamless redundant network in practical applications according to Embodiment 2 of the present invention;
图 5为本发明实施例二提供的调整值区间分布图;  5 is a distribution diagram of an adjustment value interval according to Embodiment 2 of the present invention;
图 6为本发明实施例二提供的两个调整值集合的分布状态图;  6 is a distribution state diagram of two sets of adjustment values provided by Embodiment 2 of the present invention;
图 7为本发明实施例三提供的一种无缝冗余网络中时钟同步装置的结构示意图 图 8为本发明实施例四提供的一种无缝冗余网络中时钟同步系统的结构示意图。 具体实施方式 为了解决现有技术中主从节点时钟同步精度低的问题, 本发明实施例提供了一种无缝 冗余网络中时钟同步的方案。 本方案能够将不同的无缝冗余端口分别接收到的包含 PTP报 文信息的无缝冗余报文进行保存, 并通过对保存的无缝冗余 4艮文进行解析, 得到分别对应 于不同无缝冗余端口的 PTP调整值集合,进而选取一个 PTP调整值集合对该从时钟节点的本 地时钟进行调整, 而不是直接丢弃后收到的包含 PTP报文信息的无缝冗余报文而按照先收 到的包含 PTP报文信息的无缝冗余报文进行调整, 因此有效的保证了可以根据抖动程度较 小的一组无缝冗余 ·ί艮文来实现对从时钟节点的本地时钟进行调整, 进而提高了主从时钟同 步调整的精度。  FIG. 7 is a schematic structural diagram of a clock synchronization apparatus in a seamless redundant network according to Embodiment 3 of the present invention. FIG. 8 is a schematic structural diagram of a clock synchronization system in a seamless redundant network according to Embodiment 4 of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to solve the problem of low synchronization accuracy of a master-slave node in the prior art, an embodiment of the present invention provides a scheme for clock synchronization in a seamless redundant network. The solution can save the seamless redundant packets containing the PTP packet information received by the different seamless redundant ports, and analyze the saved seamless redundancy 4 to obtain different correspondences respectively. A set of PTP adjustment values of the seamless redundant port, and then a PTP adjustment value set is selected to adjust the local clock of the slave clock node, instead of directly receiving the seamless redundant message including the PTP message information. The adjustment is performed according to the seamlessly received packet containing the PTP message information received first, so that the localization of the slave clock node can be realized according to a set of seamless redundancy that is less jittery. The clock is adjusted to improve the accuracy of the master-slave clock synchronization adjustment.
下面结合各个附图对本发明实施例技术方案的主要实现原理、 具体实施方式及其对应 能够达到的有益效果进行详细的阐述。  The main implementation principles, specific implementation manners, and the corresponding beneficial effects that can be achieved by the technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
实施例一:  Embodiment 1:
如图 2所示, 为本发明实施例一提供的一种无缝冗余网络中时钟同步方法的主要流程 图, 该方法包括以下步骤:  As shown in FIG. 2, it is a main flow diagram of a clock synchronization method in a seamless redundant network according to Embodiment 1 of the present invention, where the method includes the following steps:
步骤 21 , 无缝冗余网络中的从时钟节点通过其不同的无缝冗余端口分别接收无缝冗余 报文;  Step 21: The slave clock nodes in the seamless redundant network respectively receive seamless redundant packets through different seamless redundant ports;
其中, 主时钟节点在同一时间会通过其不同的无缝冗余端口分别向从时钟节点不同的 无缝冗余端口发送相同的无缝冗余 ·ί艮文。 由于外界因素的影响, 针对主时钟节点分别发送 的同一个无缝冗余 4艮文, 从时钟节点会在不同的时间分别从不同的无缝冗余端口接收到。 步骤 22,根据接收到的无缝冗余报文携带的报文标识,确定无缝冗余报文是否包括 ΡΤΡ 报文信息; The master clock node sends the same seamless redundancy to the seamless redundant ports of the slave clock nodes through its different seamless ports at the same time. Due to external factors, it is sent separately for the master clock node. The same seamless redundancy 4, the slave clock nodes will be received from different seamless redundant ports at different times. Step 22: Determine, according to the packet identifier carried in the seamlessly redundant packet, whether the seamless redundant packet includes the packet information.
步骤 23 , 当确定结果为是时, 将包含 ΡΤΡ报文信息的无缝冗余报文进行保存; 其中, 在确定结果为否时, 即接收到的无缝冗余报文不包含 ΡΤΡ报文信息时, 判断该 从时钟节点中是否存储有与接收到的无缝冗余报文所包含的数据信息相同的无缝冗余报 文, 若判断结果为是, 则将接收到的该无缝冗余报文丢弃。  Step 23: When the determination result is yes, the seamless redundant message including the ΡΤΡ message information is saved; wherein, when the determination result is no, the received seamless redundant message does not include the ΡΤΡ message When the information is received, it is determined whether the slave clock node stores the seamless redundant message that is the same as the data information included in the received seamless redundant message. If the judgment result is yes, the seamlessness received will be received. Redundant packets are discarded.
步骤 24, 对保存的通过不同无缝冗余端口所分别接收的无缝冗余报文进行解析, 并根 据解析出的 ΡΤΡ报文信息, 得到对应于不同的无缝冗余端口的 ΡΤΡ调整值集合;  Step 24: parsing the seamlessly redundant packets received by the different seamless redundant ports, and obtaining the adjusted values corresponding to different seamless redundant ports according to the parsed packet information. Collection
可选的, 该步骤中可以对保存的通过不同无缝冗余端口所分别接收的无缝冗余 ·ί艮文分 别进行至少 1次釆集, 并对釆集到的无缝冗余报文进行解析, 进而通过解析出的 ΡΤΡ报文信 息, 得到对应于不同的无缝冗余端口的 ΡΤΡ调整值集合。  Optionally, in this step, the saved seamless redundancy received by the different seamless redundant ports may be collected at least once, and the seamless redundant packets are collected. The analysis is performed, and further, the parsed message information is obtained, and a set of adjustment values corresponding to different seamless redundant ports is obtained.
步骤 25 ,从得到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合调整从时钟节点的本地时 钟。  Step 25: Select a set of adjustment values from the obtained set of adjustment values to adjust the local clock of the slave clock node.
可选的,该步骤中可以根据得到的各 ΡΤΡ调整值集合所分别包含的 ΡΤΡ调整值的分布状 态信息, 从得到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合;  Optionally, in this step, a set of ΡΤΡ adjustment values may be selected from the obtained ΡΤΡ adjustment value set according to the distribution state information of the ΡΤΡ adjustment values respectively included in each obtained ΡΤΡ adjustment value set;
其中, 可以具体包括: 根据预先设置的调整值区间, 确定各 ΡΤΡ调整值集合所分别包 含的 ΡΤΡ调整值所属调整值区间, 然后针对每个 ΡΤΡ调整值集合执行: 从该 ΡΤΡ调整值集合 所包含的 ΡΤΡ调整值所属的调整值区间中, 确定包含的 ΡΤΡ调整值最多的候选调整值区间, 最后, 从确定出的候选调整值区间中, 选取一个具有最小下限的候选调整值区间所对应的 The method may include: determining, according to a preset adjustment value interval, an adjustment value interval to which the ΡΤΡ adjustment value is included in each set of adjustment values, and then performing, for each ΡΤΡ adjustment value set: from the ΡΤΡ adjustment value set In the adjustment value interval to which the ΡΤΡ adjustment value belongs, the candidate adjustment value interval having the largest ΡΤΡ adjustment value is determined, and finally, from the determined candidate adjustment value interval, a candidate adjustment value interval having the smallest lower limit is selected.
ΡΤΡ调整值集合。 ΡΤΡ Adjust the value set.
进一步的, 选取一个 ΡΤΡ调整值集合后, 可以根据选取的 ΡΤΡ调整值集合所包含的 ΡΤΡ 调整值的平均值, 调整该从时钟节点的本地时钟。  Further, after selecting a set of adjustment values, the local clock of the slave clock node may be adjusted according to an average value of the adjusted values included in the selected set of values.
需要说明的是, 根据选取的 ΡΤΡ调整值集合调整从时钟节点的本地时钟可以但不限于 上述这种处理方式。 比如还可以釆取下述这种方式进行调整: 根据选取的 ΡΤΡ调整值集合 中的任意一个 ΡΤΡ调整值调整该从时钟节点的本地时钟。 本发明实施例中之所以釆用选取 的 ΡΤΡ调整值集合所包含的 ΡΤΡ调整值的平均值这种方式进行调整,是为了进一步提高时钟 同步精度。 由于选取的 ΡΤΡ调整值集合中所包含的 ΡΤΡ调整值可能会存在突然抖动的情况, 比如 ΡΤΡ调整值与 ΡΤΡ调整值之间跳变范围比较大, 若使用该 ΡΤΡ调整值集合中的某个 ΡΤΡ 调整值进行调整, 可能会使该从时钟节点的同步精度比较低。  It should be noted that adjusting the local clock of the slave clock node according to the selected set of ΡΤΡ adjustment values may be, but is not limited to, the above-mentioned processing manner. For example, you can adjust the following method: Adjust the local clock of the slave clock node according to any one of the selected ΡΤΡ adjustment value sets. In the embodiment of the present invention, the average value of the ΡΤΡ adjustment value included in the selected ΡΤΡ adjustment value set is adjusted in such a manner as to further improve the clock synchronization accuracy. Due to the sudden jitter of the ΡΤΡ adjustment value contained in the selected ΡΤΡ adjustment value set, for example, the hopping range between the ΡΤΡ adjustment value and the ΡΤΡ adjustment value is relatively large, and if one of the ΡΤΡ adjustment value sets is used, Adjusting the adjustment value may make the synchronization accuracy of the slave clock node lower.
本发明实施例能够将不同的无缝冗余端口分别接收到的包含 ΡΤΡ报文信息的无缝冗余 Embodiments of the present invention are capable of seamlessly receiving ΡΤΡ packet information received by different seamless redundant ports
•ί艮文进行保存, 并通过对保存的无缝冗余 4艮文进行解析, 得到分别对应于不同无缝冗余端 口的 ΡΤΡ调整值集合, 进而选取一个 ΡΤΡ调整值集合对该从时钟节点的本地时钟进行调整, 而不是直接丢弃后收到的包含 PTP报文信息的无缝冗余报文而按照先收到的包含 PTP报文 信息的无缝冗余报文进行调整, 因此有效的保证了可以根据抖动程度较小的一组无缝冗余 报文来实现对从时钟节点的本地时钟进行调整, 进而提高了主从时钟同步调整的精度。 • 艮 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存Local clock is adjusted, Rather than directly collecting the seamlessly redundant packets containing the PTP packet information and adjusting them according to the received seamless redundant packets containing the PTP packet information, the degree of jitter can be effectively guaranteed. A smaller set of seamless redundant messages is used to adjust the local clock of the slave clock node, which improves the accuracy of master-slave clock synchronization adjustment.
实施例二:  Embodiment 2:
如图 3所示, 为本发明实施例二提供的在实际应用中 GMC ( Grandmaster Clock, 最高 级时钟) 与从时钟节点的连接示意图, 其中, GMC的无缝冗余端口 (以下筒称端口) A1 与从时钟节点的端口 B1连接, 以及 GMC的端口 A2与从时钟节点的端口 B2连接。 该方案的 基本思想为: 从时钟节点将通过端口 B1和端口 B2分别接收到的包含 PTP报文信息的多个无 缝冗余 4艮文进行保存, 并对保存的多个无缝冗余 4艮文进行解析, 得到分别对应于端口 B1和 端口 B2的 PTP调整值集合, 并根据得到的两个 PTP调整值集合的分布状态信息, 得到一个 实际 PTP调整值对该从时钟节点的本地时钟进行调整。  As shown in FIG. 3, it is a schematic diagram of a connection between a GMC (Grandmaster Clock) and a slave clock node in an actual application according to Embodiment 2 of the present invention, wherein a seamless redundant port of the GMC (hereinafter referred to as a port) A1 is connected to port B1 of the slave clock node, and port A2 of the GMC is connected to port B2 of the slave clock node. The basic idea of the scheme is: Save multiple seamless redundant packets containing PTP message information received by port B1 and port B2 from the clock node, and save multiple seamless redundancy 4 The parsing is performed to obtain a PTP adjustment value set corresponding to the port B1 and the port B2 respectively, and according to the obtained distribution state information of the two PTP adjustment value sets, an actual PTP adjustment value is obtained for the local clock of the slave clock node. Adjustment.
如图 4所示, 为本发明实施例二提供的在实际应用中的无缝冗余网络中时钟同步方法 的具体流程图, 该方法具体包括:  As shown in FIG. 4, it is a specific flowchart of a clock synchronization method in a seamless redundant network in an actual application according to Embodiment 2 of the present invention, where the method specifically includes:
步骤 41 , 无缝冗余网络中的从时钟节点通过端口 B1和端口 B2分别接收到无缝冗余报 文;  Step 41: The slave clock node in the seamless redundant network receives the seamless redundancy message through port B1 and port B2, respectively.
步骤 42, 根据接收到的无缝冗余报文所携带的报文标识, 分别确定其是否包含 PTP报 文信息, 在确定为是时, 执行步骤 43 , 在确定结果为否时, 执行步骤 47;  Step 42: Determine, according to the packet identifier that is received by the seamlessly redundant packet, whether the PTP packet information is included. If the determination is yes, go to step 43. If the result is no, go to step 47. ;
根据 IEEE 1588标准中规定的包含 PTP报文信息的无缝冗余报文的报文标识, 我们可以 判断, 若接收到的无缝冗余报文中携带的报文标识为 0x88F7 , 则该无缝冗余报文包含 PTP 4艮文信息。  According to the message identifier of the seamlessly redundant packet containing the PTP packet information specified in the IEEE 1588 standard, we can determine that if the received packet identifier in the seamless redundant packet is 0x88F7, then The seam redundancy message contains PTP 4 message information.
步骤 43 , 将接收到的包含 PTP报文信息的无缝冗余报文进行保存;  Step 43: Save the received seamless redundant packet containing the PTP packet information.
步骤 44, 对保存的通过端口 B1和端口 B2所分别接收的无缝冗余 ·ί艮文分别进行至少 1次 釆集, 并对釆集到的无缝冗余报文进行解析, 并根据解析出的 ΡΤΡ报文信息, 得到分别对 应于端口 B1和端口 Β2的 ΡΤΡ调整值集合;  In step 44, the stored seamless redundancy received by the port B1 and the port B2 are collected at least once, and the seamless redundant packets are parsed and parsed according to the analysis. The ΡΤΡ message information is obtained, and the ΡΤΡ adjustment value set corresponding to the port B1 and the port Β2 respectively is obtained;
本发明实施例中, 可以将端口 B1接收到的解析后得到的 ΡΤΡ调整值存储到与端口 B1对 应的数据区中, 以及将端口 Β2接收到的无缝冗余 ·ί艮文解析后得到的 ΡΤΡ调整值存储到与端 口 Β2对应的数据区中, 而这两个数据区中存储的 ΡΤΡ调整值分别构成与端口 B1对应的 ΡΤΡ 调整值集合和与端口 Β2对应的 ΡΤΡ调整值集合。  In the embodiment of the present invention, the ΡΤΡ adjustment value obtained by the parsing of the port B1 can be stored in the data area corresponding to the port B1, and the seamless redundancy received by the port Β2 is parsed. The ΡΤΡ adjustment value is stored in the data area corresponding to the port Β2, and the ΡΤΡ adjustment values stored in the two data areas respectively constitute the ΡΤΡ adjustment value set corresponding to the port B1 and the ΡΤΡ adjustment value set corresponding to the port Β2.
步骤 45 ,根据得到的各 ΡΤΡ调整值集合所分别包含的 ΡΤΡ调整值的分布状态信息,从得 到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合;  Step 45: Select a set of adjustment values from the obtained set of adjusted values according to the distribution state information of the adjusted values respectively included in each obtained set of adjustment values;
具体的, 如图 5所示, 为本发明实施例提供的调整值区间分布图。 其中, 按照预先设 置的调整值区间, 将与端口 B1对应的数据区中的 ΡΤΡ调整值以及与端口 Β2对应的数据区中 的 ΡΤΡ调整值分别对应到每个调整值区间中, 并分别确定针对端口 B1的包含 ΡΤΡ调整值最 多的候选调整值区间以及针对端口 B2的包含 PTP调整值最多的候选调整值区间, 那么, 在 上述确定出的分别针对端口 B1与端口 B2的候选调整值区间中,我们就认为具有最小下限的 候选调整值区间所对应的 PTP调整值集合中包含的 PTP调整值相对比较稳定, PTP调整值与 PTP调整值之间的抖动范围较小。 其中, 预先设置的调整值区间可以根据用户的需求自行 设定, 在此不作具体限定。 Specifically, as shown in FIG. 5, it is an adjustment value interval distribution diagram provided by an embodiment of the present invention. The ΡΤΡ adjustment value in the data area corresponding to the port B1 and the ΡΤΡ adjustment value in the data area corresponding to the port Β2 are respectively corresponding to each adjustment value interval according to the preset adjustment value interval, and respectively determined for Port B1 contains the most adjusted value The candidate adjustment value interval and the candidate adjustment value interval including the most PTP adjustment value for the port B2, then, in the above-mentioned determined candidate adjustment value intervals for the port B1 and the port B2, we consider that there is a minimum lower limit. The PTP adjustment value included in the PTP adjustment value set corresponding to the candidate adjustment value interval is relatively stable, and the jitter range between the PTP adjustment value and the PTP adjustment value is small. The preset adjustment value interval may be set according to the user's needs, and is not specifically limited herein.
如图 6所示, 为两个 PTP调整值集合的分布状态图, 其中, 横坐标为调整次数, 纵坐标 为 PTP调整值,每个数据点表示根据收到的一个无缝冗余报文得到的一个 PTP调整值, 空心 的数据点为根据端口 B 1接收到的一组无缝冗余 ·ί艮文得到的一组 ΡΤΡ调整值 D1 , 实心的数据 点为根据端口 Β2接收到的一组无缝冗余报文得到的一组 ΡΤΡ调整值 D2。 从图 6中可以更为 直观的看出, D1的抖动范围较大, 而 D2的抖动范围相比 D1较小, 这说明 D2较为稳定, 因 此选取 D2来调整该从时钟节点的本地时钟。  As shown in FIG. 6, the distribution state diagram of the set of values of the two PTPs, wherein the abscissa is the number of adjustments, the ordinate is the PTP adjustment value, and each data point is obtained according to a seamlessly redundant message received. A PTP adjustment value, the hollow data point is a set of ΡΤΡ adjustment value D1 obtained according to a set of seamless redundancy received by port B1, and the solid data point is a group received according to port Β2 A set of ΡΤΡ adjustment values D2 obtained by seamlessly redundant messages. It can be seen more clearly from Figure 6 that D1 has a larger jitter range, and D2 has a smaller jitter range than D1, which indicates that D2 is more stable, so D2 is selected to adjust the local clock of the slave clock node.
步骤 46 ,根据选取的 PTP调整值集合所包含的 PTP调整值的平均值,调整该从时钟节点 的本地时钟。  Step 46: Adjust the local clock of the slave clock node according to an average value of the PTP adjustment values included in the selected PTP adjustment value set.
步骤 47, 对于不同端口分别接收到的包含相同数据信息的无缝冗余 ·ί艮文, 保存先接收 到的无缝冗余 ·ί艮文, 将后接收到的无缝冗余 ·ί艮文丢弃。  Step 47: For the seamless redundancy received by the different ports and containing the same data information, the seamless redundancy received first is saved, and the seamless redundancy received later is received. Discard.
具体的, 该步骤可以具体包括: 判断是否存储有与接收到的无缝冗余报文所包含的数 据信息相同的无缝冗余报文, 并在判断结果为是时, 将接收到的无缝冗余报文丢弃。  Specifically, the step may specifically include: determining whether the seamless redundant message that is the same as the data information included in the received seamless redundant message is stored, and when the determination result is yes, the received no Seated redundant packets are discarded.
本发明实施例能够将不同的无缝冗余端口分别接收到的包含 ΡΤΡ报文信息的无缝冗余 Embodiments of the present invention are capable of seamlessly receiving ΡΤΡ packet information received by different seamless redundant ports
•ί艮文进行保存, 并通过对保存的无缝冗余 4艮文进行解析, 得到分别对应于不同无缝冗余端 口的 ΡΤΡ调整值集合,再根据得到的各 ΡΤΡ调整值集合中包含的 ΡΤΡ调整值的分布状态信息 选取一个 ΡΤΡ调整值集合, 对该从时钟节点的本地时钟进行调整, 而不是直接丢弃后收到 的包含 ΡΤΡ报文信息的无缝冗余报文而按照先收到的包含 ΡΤΡ报文信息的无缝冗余报文进 行调整, 因此有效的保证了可以根据抖动程度较小的一组无缝冗余报文来实现对从时钟节 点的本地时钟进行调整, 进而提高了主从时钟同步调整的精度。 • 艮 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 进行 艮 进行 进行 艮 艮 艮 艮 艮 进行 艮 艮 艮 艮 艮 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存 保存分布The distribution state information of the adjustment value is selected as a set of adjustment values, and the local clock of the slave clock node is adjusted, instead of directly receiving the seamless redundant message containing the message information and receiving it first. The seamless redundant packets including the ΡΤΡ message information are adjusted, so that the local clock of the slave clock node can be adjusted according to a set of seamless redundant messages with less jitter. The accuracy of the master-slave clock synchronization adjustment.
另外, 根据选取的 ΡΤΡ调整值集合中包含的 ΡΤΡ调整值的平均值进行本地时钟的调整, 更进一步地防止了选取的抖动程度较小的一组无缝冗余 4艮文中存在突然抖动的情况, 使得 确定出的平均调整值更接近实际的调整值, 进一步提高了主从时钟的同步调整精度。  In addition, the local clock is adjusted according to the average value of the ΡΤΡ adjustment values included in the selected ΡΤΡ adjustment value set, which further prevents the sudden jitter of a set of seamless redundancy in the selected jitter degree. , so that the determined average adjustment value is closer to the actual adjustment value, and the synchronization adjustment precision of the master-slave clock is further improved.
实施例三:  Embodiment 3:
基于上述的无缝冗余网络中时钟同步方法, 本发明实施例还提供了一种无缝冗余网络 中时钟同步装置, 如图 7所示, 包括以下功能模块:  Based on the clock synchronization method in the seamless redundant network, the embodiment of the present invention further provides a clock synchronization device in a seamless redundant network. As shown in FIG. 7, the following functional modules are included:
接收单元 71 , 用于通过其不同的无缝冗余端口分别接收无缝冗余 ·ί艮文;  The receiving unit 71 is configured to receive seamless redundancy respectively through different seamless redundant ports thereof;
确定单元 72, 用于根据接收单元 71接收到的无缝冗余报文携带的报文标识, 确定无缝 冗余报文是否包括 ΡΤΡ报文信息; 保存单元 73 , 用于当确定单元 72的确定结果为是时, 将包含 PTP报文信息的无缝冗余 •ί艮文进行保存; The determining unit 72 is configured to determine, according to the packet identifier carried in the seamless redundancy packet received by the receiving unit 71, whether the seamless redundancy packet includes the packet information. The saving unit 73 is configured to save the seamless redundancy information including the PTP message information when the determination result of the determining unit 72 is YES;
解析单元 74, 用于对保存单元 73保存的通过不同无缝冗余端口所分别接收的无缝冗余 报文进行解析,并根据解析出的 ΡΤΡ报文信息,得到对应于不同的无缝冗余端口的 ΡΤΡ调整 值集合;  The parsing unit 74 is configured to parse the seamless redundant packets respectively received by the different seamless redundant ports saved by the saving unit 73, and obtain corresponding seamless redundancy according to the parsed ΡΤΡ message information. a set of ΡΤΡ adjustment values for the remaining ports;
调整单元 75 ,用于从解析单元 74得到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合调整 从时钟节点的本地时钟。  The adjusting unit 75 is configured to select a set of adjustment values from the set of adjustment values obtained by the parsing unit 74 to adjust the local clock of the slave clock node.
可选的, 该装置还可以包括:  Optionally, the device may further include:
判断单元 76, 用于在确定单元 72的确定结果为否时, 判断是否存储有与接收到的无缝 冗余报文所包含的数据信息相同的无缝冗余报文;  The determining unit 76 is configured to: when the determining result of the determining unit 72 is negative, determine whether the seamless redundant message that is the same as the data information included in the received seamless redundant message is stored;
丢弃单元 77, 用于在判断单元 76的判断结果为是时, 将接收到的无缝冗余报文丢弃。 可选的, 解析单元 74可以具体用于:  The discarding unit 77 is configured to discard the received seamless redundant message when the determining result of the determining unit 76 is YES. Optionally, the parsing unit 74 may be specifically configured to:
对保存的通过不同无缝冗余端口所分别接收的无缝冗余 ·ί艮文分别进行至少 1次釆集, 并对釆集到的无缝冗余 4艮文进行解析。  The seamless redundancy received by the different seamless redundant ports is stored at least once, and the seamlessly redundant 4 files are parsed.
可选的, 调整单元 75可以具体用于:  Optionally, the adjusting unit 75 can be specifically configured to:
从解析单元 74得到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合, 并根据选取的 ΡΤΡ调 整值集合所包含的 ΡΤΡ调整值的平均值, 调整从时钟节点的本地时钟。  A set of ΡΤΡ adjustment values is selected from the ΡΤΡ adjustment value set obtained by the parsing unit 74, and the local clock of the slave clock node is adjusted according to the average value of the ΡΤΡ adjustment values included in the selected ΡΤΡ adjustment value set.
进一步的, 该调整单元 75还可以具体用于:  Further, the adjusting unit 75 is further specifically configured to:
根据解析单元 74得到的各 ΡΤΡ调整值集合所分别包含的 ΡΤΡ调整值的分布状态信息,从 得到的 ΡΤΡ调整值集合中选取一个 ΡΤΡ调整值集合。  Based on the distribution state information of the ΡΤΡ adjustment values respectively included in each set of adjustment values obtained by the analysis unit 74, a set of ΡΤΡ adjustment values is selected from the obtained ΡΤΡ adjustment value set.
具体的, 可以包括:  Specifically, it may include:
第一确定模块, 用于根据预先设置的调整值区间, 确定各 ΡΤΡ调整值集合所分别包含 的 ΡΤΡ调整值所属调整值区间;  a first determining module, configured to determine, according to a preset adjustment value interval, an adjustment value interval to which the ΡΤΡ adjustment value respectively included in each set of adjustment values belongs;
第二确定模块, 用于针对每个 ΡΤΡ调整值集合执行: 从该 ΡΤΡ调整值集合所包含的 ΡΤΡ 调整值所属的调整值区间中, 确定包含的 ΡΤΡ调整值最多的候选调整值区间;  a second determining module, configured to perform, for each set of adjustment values: determining, from the adjustment value interval to which the ΡΤΡ adjustment value included in the ΡΤΡ adjustment value set belongs, a candidate adjustment value interval that includes the most ΡΤΡ adjustment value;
选取模块, 用于选取具有最小下限的候选调整值区间所对应的 ΡΤΡ调整值集合。  The selection module is configured to select a set of adjustment values corresponding to the candidate adjustment value interval having the smallest lower limit.
实施例四:  Embodiment 4:
基于上述的无缝冗余网络中时钟同步方法和装置, 本发明实施例还提供了一种无缝冗 余网络中时钟同步系统, 如图 8所示, 其具体包括: 主时钟节点 81和从时钟节点 82; 其中, 主时钟节点 81 , 用于向从时钟节点 82的不同无缝冗余端口分别发送无缝冗余 ·ί艮文; 从时钟节点 82, 用于通过其不同的无缝冗余端口分别接收主时钟节点 71发送的无缝 冗余报文; 根据接收到的无缝冗余报文携带的报文标识, 确定无缝冗余报文是否包含 ΡΤΡ 报文信息; 当确定结果为是时, 将包含 ΡΤΡ报文信息的无缝冗余报文进行保存; 并对保存 的通过不同无缝冗余端口所分别接收的无缝冗余报文进行解析,并根据解析出的 PTP报文 信息,得到对应于不同的无缝冗余端口的 PTP调整值集合;从得到的 PTP调整值集合中选 取一个 PTP调整值集合调整从时钟节点 82的本地时钟。 Based on the clock synchronization method and apparatus in the seamless redundant network, the embodiment of the present invention further provides a clock synchronization system in a seamless redundant network, as shown in FIG. 8, which specifically includes: a master clock node 81 and a slave a clock node 82; wherein, the master clock node 81 is configured to respectively send seamless redundancy to different seamless redundant ports of the slave clock node 82; the slave clock node 82 is used for different seamless redundancy The remaining ports respectively receive the seamless redundant packets sent by the primary clock node 71; and determine whether the seamless redundant packets contain the ΡΤΡ message information according to the received packet identifiers of the seamless redundant packets; If yes, save the seamless redundant message containing the message information; save and save Parsing seamless redundant packets received by different seamless redundant ports, and obtaining PTP adjustment value sets corresponding to different seamless redundant ports according to the parsed PTP message information; A set of PTP adjustment values is selected from the set of PTP adjustment values to adjust the local clock of the slave clock node 82.
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程序产 品。 因此, 本发明可釆用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面的实 施例的形式。 而且, 本发明可釆用在一个或多个其中包含有计算机可用程序代码的计算机 可用存储介盾 (包括但不限于磁盘存储器、 CD-ROM、 光学存储器等)上实施的计算机程 序产品的形式。  Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the present invention can be embodied in the form of a computer program product embodied on one or more computer-usable storage interfaces (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序产品的流程图 和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的每一流 程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些计算机 程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器 以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用 于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的 装置。  The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each process and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方 式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括指令装 置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方框或多个 方框中指定的功能。  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.
尽管已描述了本发明的优选实施例, 但本领域内的技术人员一旦得知了基本创造性概 念, 则可对这些实施例作出另外的变更和修改。 所以, 所附权利要求意欲解释为包括优选 实施例以及落入本发明范围的所有变更和修改。  Although the preferred embodiment of the invention has been described, it will be apparent to those of ordinary skill in the art that <RTIgt; Therefore, the appended claims are intended to be construed as including the preferred embodiments and the modifications
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和 范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。  It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention

Claims

权 利 要 求 Rights request
1、 一种无缝冗余网络中时钟同步方法, 其特征在于, 包括: 1. A clock synchronization method in a seamless redundant network, characterized by including:
无缝冗余网络中的从时钟节点通过其不同的无缝冗余端口分别接收无缝 冗余报文; The slave clock nodes in the seamless redundant network receive seamless redundant messages through their different seamless redundant ports;
根据接收到的无缝冗余报文携带的报文标识, 确定无缝冗余报文是否包 括 PTP报文信息; 当确定结果为是时, 将所述包含 PTP报文信息的无缝冗余 文进行保存; 并 According to the message identifier carried by the received seamless redundant message, determine whether the seamless redundant message includes PTP message information; when the determination result is yes, the seamless redundant message containing the PTP message information is save the document; and
对保存的通过不同无缝冗余端口所分别接收的无缝冗余报文进行解析, 并根据解析出的 PTP报文信息, 得到对应于不同的无缝冗余端口的 PTP调整 值集合; Analyze the saved seamless redundant messages received through different seamless redundant ports, and obtain a set of PTP adjustment values corresponding to different seamless redundant ports based on the parsed PTP message information;
从得到的 PTP调整值集合中选取一个 PTP调整值集合调整所述从时钟节 点的本地时钟。 Select a PTP adjustment value set from the obtained PTP adjustment value set to adjust the local clock of the slave clock node.
2、 如权利要求 1所述的方法, 其特征在于, 对保存的通过不同无缝冗余 端口所分别接收的无缝冗余报文进行解析, 具体包括: 2. The method according to claim 1, characterized in that, parsing the saved seamless redundant messages received through different seamless redundant ports, specifically includes:
对保存的通过不同无缝冗余端口所分别接收的无缝冗余报文分别进行至 少 1次釆集, 并对釆集到的无缝冗余报文进行解析。 Collect the saved seamless redundant messages received through different seamless redundant ports at least once, and analyze the collected seamless redundant messages.
3、 如权利要求 1所述的方法, 其特征在于, 从得到的 PTP调整值集合中 选取一个 PTP调整值集合调整所述从时钟节点的本地时钟, 具体包括: 3. The method according to claim 1, characterized in that, selecting a PTP adjustment value set from the obtained PTP adjustment value set to adjust the local clock of the slave clock node, specifically including:
从得到的 PTP调整值集合中选取一个 PTP调整值集合,并根据选取的 PTP 调整值集合所包含的 PTP调整值的平均值,调整所述从时钟节点的本地时钟。 Select a PTP adjustment value set from the obtained PTP adjustment value set, and adjust the local clock of the slave clock node according to the average value of the PTP adjustment values included in the selected PTP adjustment value set.
4、 如权利要求 1、 2或 3所述的方法, 其特征在于, 从得到的 PTP调整 值集合中选取一个 PTP调整值集合, 具体包括: 4. The method of claim 1, 2 or 3, wherein a PTP adjustment value set is selected from the obtained PTP adjustment value set, specifically including:
根据得到的各 PTP调整值集合所分别包含的 PTP调整值的分布状态信 息, 从得到的 PTP调整值集合中选取一个 PTP调整值集合。 According to the distribution status information of the PTP adjustment values contained in each obtained PTP adjustment value set, a PTP adjustment value set is selected from the obtained PTP adjustment value set.
5、 如权利要求 4所述的方法, 其特征在于, 根据所述分布状态信息选取 一个 PTP调整值集合, 具体包括: 根据预先设置的调整值区间, 确定各 PTP调整值集合所分别包含的 PTP 调整值所属调整值区间; 5. The method according to claim 4, characterized in that, selecting a PTP adjustment value set according to the distribution status information, specifically including: According to the preset adjustment value interval, determine the adjustment value interval to which the PTP adjustment value contained in each PTP adjustment value set respectively belongs;
针对每个 PTP调整值集合执行:从该 PTP调整值集合所包含的 PTP调整 值所属的调整值区间中, 确定包含的 PTP调整值最多的候选调整值区间; 选取具有最小下限的候选调整值区间所对应的 PTP调整值集合。 Executed for each PTP adjustment value set: From the adjustment value intervals to which the PTP adjustment values contained in the PTP adjustment value set belong, determine the candidate adjustment value interval containing the most PTP adjustment values; select the candidate adjustment value interval with the smallest lower limit The corresponding set of PTP adjustment values.
6、 一种无缝冗余网络中时钟同步装置, 其特征在于, 包括: 6. A clock synchronization device in a seamless redundant network, characterized by including:
接收单元, 用于通过其不同的无缝冗余端口分别接收无缝冗余报文; 确定单元, 用于根据接收单元接收到的无缝冗余报文携带的报文标识, 确定无缝冗余报文是否包括 PTP报文信息; The receiving unit is used to receive seamless redundant messages respectively through its different seamless redundant ports; the determining unit is used to determine the seamless redundant message according to the message identifier carried by the seamless redundant message received by the receiving unit. Whether the remaining message includes PTP message information;
保存单元, 用于当确定单元的确定结果为是时, 将所述包含 PTP报文信 息的无缝冗余 文进行保存; A saving unit, configured to save the seamless redundant message containing PTP message information when the determination result of the determining unit is yes;
解析单元, 用于对保存单元保存的通过不同无缝冗余端口所分别接收的 无缝冗余报文进行解析, 并根据解析出的 PTP报文信息, 得到对应于不同的 无缝冗余端口的 PTP调整值集合; The parsing unit is used to parse the seamless redundant messages received through different seamless redundant ports saved by the storage unit, and obtain the corresponding seamless redundant ports based on the parsed PTP message information. A set of PTP adjustment values;
调整单元, 用于从解析单元得到的 PTP调整值集合中选取一个 PTP调整 值集合调整所述从时钟节点的本地时钟。 The adjustment unit is configured to select a PTP adjustment value set from the PTP adjustment value set obtained by the analysis unit to adjust the local clock of the slave clock node.
7、 如权利要求 6所述的装置, 其特征在于, 所述解析单元, 具体用于: 对保存的通过不同无缝冗余端口所分别接收的无缝冗余报文分别进行至 少 1次釆集, 并对釆集到的无缝冗余报文进行解析。 7. The device according to claim 6, wherein the parsing unit is specifically configured to: perform at least one analysis on the saved seamless redundant messages received through different seamless redundant ports. Collect, and analyze the collected seamless redundant messages.
8、 如权利要求 6所述的装置, 其特征在于, 所述调整单元, 具体用于: 从解析单元得到的 PTP调整值集合中选取一个 PTP调整值集合, 并根据 选取的 PTP调整值集合所包含的 PTP调整值的平均值, 调整所述从时钟节点 的本地时钟。 8. The device according to claim 6, wherein the adjustment unit is specifically configured to: select a PTP adjustment value set from the PTP adjustment value set obtained by the parsing unit, and select a PTP adjustment value set according to the selected PTP adjustment value set. Contains the average of the PTP adjustment values that adjust the local clock of the slave clock node.
9、 如权利要求 6、 7或 8所述的装置, 其特征在于, 所述调整单元, 具 体用于: 9. The device according to claim 6, 7 or 8, characterized in that the adjustment unit is specifically used for:
根据解析单元得到的各 PTP调整值集合所分别包含的 PTP调整值的分布 状态信息, 从得到的 PTP调整值集合中选取一个 PTP调整值集合。 According to the distribution status information of PTP adjustment values contained in each PTP adjustment value set obtained by the parsing unit, a PTP adjustment value set is selected from the obtained PTP adjustment value set.
10、 如权利要求 9所述的装置, 其特征在于, 所述调整单元, 具体包括: 第一确定模块, 用于根据预先设置的调整值区间, 确定各 PTP调整值集 合所分别包含的 PTP调整值所属调整值区间; 10. The device according to claim 9, wherein the adjustment unit specifically includes: a first determination module, configured to determine the PTP adjustment included in each PTP adjustment value set according to the preset adjustment value interval. The adjustment value range to which the value belongs;
第二确定模块, 用于针对每个 PTP调整值集合执行: 从该 PTP调整值集 合所包含的 PTP调整值所属的调整值区间中, 确定包含的 PTP调整值最多的 候选调整值区间; The second determination module is configured to perform for each PTP adjustment value set: from the adjustment value intervals to which the PTP adjustment values contained in the PTP adjustment value set belong, determine the candidate adjustment value interval containing the most PTP adjustment values;
选取模块, 用于选取具有最小下限的候选调整值区间所对应的 PTP调整 Selection module, used to select the PTP adjustment corresponding to the candidate adjustment value interval with the minimum lower limit
PCT/CN2013/075089 2013-04-03 2013-05-02 Clock synchronization method and apparatus in seamless redundant network WO2014161213A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310114335.1 2013-04-03
CN201310114335.1A CN103236894B (en) 2013-04-03 2013-04-03 Clock synchronizing method and device in a kind of seamless redundant network

Publications (1)

Publication Number Publication Date
WO2014161213A1 true WO2014161213A1 (en) 2014-10-09

Family

ID=48884914

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/075089 WO2014161213A1 (en) 2013-04-03 2013-05-02 Clock synchronization method and apparatus in seamless redundant network

Country Status (2)

Country Link
CN (1) CN103236894B (en)
WO (1) WO2014161213A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111049607B (en) * 2019-11-15 2021-06-11 中国第一汽车股份有限公司 Clock synchronization method, device and system for vehicle and storage medium
CN113556221A (en) * 2020-04-23 2021-10-26 西门子股份公司 Method and device for timing in redundant network
CN114039695A (en) * 2021-12-24 2022-02-11 浙江中控技术股份有限公司 Time synchronization method of redundant network, redundant network system and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882990A (en) * 2010-06-24 2010-11-10 中兴通讯股份有限公司 Method for selecting master clock based on PTP (Picture Transfer Protocol) and link quality, slave clock and system
CN102833061A (en) * 2012-08-31 2012-12-19 北京东土科技股份有限公司 Method for improving clock accuracy based on seamless redundancy ring network and node
CN102983960A (en) * 2012-12-06 2013-03-20 盛科网络(苏州)有限公司 Method and device for implementing rapid synchronous switching in PTP (precision time protocol)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867469B (en) * 2010-06-10 2014-09-24 北京东土科技股份有限公司 Realization method of precision synchronous clock
CN102158335B (en) * 2011-04-21 2015-04-01 中兴通讯股份有限公司 Method and device for processing time synchronization port

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101882990A (en) * 2010-06-24 2010-11-10 中兴通讯股份有限公司 Method for selecting master clock based on PTP (Picture Transfer Protocol) and link quality, slave clock and system
CN102833061A (en) * 2012-08-31 2012-12-19 北京东土科技股份有限公司 Method for improving clock accuracy based on seamless redundancy ring network and node
CN102983960A (en) * 2012-12-06 2013-03-20 盛科网络(苏州)有限公司 Method and device for implementing rapid synchronous switching in PTP (precision time protocol)

Also Published As

Publication number Publication date
CN103236894A (en) 2013-08-07
CN103236894B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
US11057136B1 (en) Time correction using extension fields
EP3079313B1 (en) Data splitting method and splitter
CN105680973B (en) The method for synchronizing time of free-running node in avionic device network
US9485045B2 (en) Communication control equipment
CN102104476B (en) Clock synchronization device and method
WO2010057398A1 (en) Device and method for implementing clock transparent transmission
US20130227008A1 (en) Clock synchronization based on predefined grandmaster
US10326613B2 (en) Method and system for processing spanning tree protocol (STP) state in a multichassis link aggregation (MLAG) domain
EP3163786B1 (en) Clock synchronization method and apparatus
EP3174237B1 (en) Time synchronization method and apparatus for network devices and time synchronization server
WO2015117501A1 (en) Time synchronization method, programmable logic device, single board and network element
US11394480B2 (en) Systems and methods for synchronizing device clocks
WO2013174025A1 (en) Transparent clock passive port election method and device based on ptp protocol
WO2016062165A1 (en) Method and apparatus for implementing operations, administration and maintenance function
WO2017177751A1 (en) Time synchronization method and apparatus
WO2014000698A1 (en) Ip layer-based network topology identification method and device
WO2011140918A1 (en) Method and apparatus for topology discovery
WO2014079092A1 (en) Real time data transmission method and node device
WO2014161213A1 (en) Clock synchronization method and apparatus in seamless redundant network
EP2775675B1 (en) Synchronization method among network devices, network device and system
CN116250299A (en) Time service method and device for coping with link abnormality
WO2014094224A1 (en) Method, network device, and virtual cluster for determining administrative domain
CN101232508B (en) Equipment and method for speeding up poly spanning tree protocol network topological convergence
CN115865246A (en) Time synchronization device, system and method
WO2012100698A1 (en) Method, device, and system for transmitting precision clock synchronization protocol message

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

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

Country of ref document: EP

Kind code of ref document: A1