WO2016106908A1 - Method and system for synchronizing clocks in sdh network - Google Patents

Method and system for synchronizing clocks in sdh network Download PDF

Info

Publication number
WO2016106908A1
WO2016106908A1 PCT/CN2015/071528 CN2015071528W WO2016106908A1 WO 2016106908 A1 WO2016106908 A1 WO 2016106908A1 CN 2015071528 W CN2015071528 W CN 2015071528W WO 2016106908 A1 WO2016106908 A1 WO 2016106908A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock device
master
slave
slave clock
delay
Prior art date
Application number
PCT/CN2015/071528
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 WO2016106908A1 publication Critical patent/WO2016106908A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements

Abstract

A method and system for synchronizing clocks in an SDH network. In the method, a slave clock device determines, according to a PTP synchronization message transmitted between itself and a primary master clock device and stored time delay between itself and the primary master clock device, a master and slave clock deviation value between itself and the primary master clock device, and performs time tick with the primary master clock device when it is determined that the master and slave clock deviation value is within the range of a set first threshold value, and otherwise performs time tick with other standby master clock devices. Since in the embodiments of the present invention the slave clock device establishes a time tick channel with master clock devices in a plurality of different SDH paths at the same time, during the time tick, it can be determined whether the current time tick process is accurate according to the currently calculated master and slave clock deviation value, so as to determine whether a fault occurs to the time tick channel and the master clock devices, thereby ensuring the accuracy of the time tick.

Description

一种SDH网络中的时钟同步方法及系统Clock synchronization method and system in SDH network
本申请要求在2014年12月31日提交中国专利局、申请号为201410857121.8、发明名称为“一种基于分布式FTP的数据传输方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201410857121.8, entitled "A Data Transmission Method and System Based on Distributed FTP", filed on December 31, 2014, the entire contents of which are hereby incorporated by reference. Combined in this application.
技术领域Technical field
本发明涉及工业以太网技术领域,尤其涉及一种环形同步数字体系(Synchronous Digital Hierarchy,SDH)网络中的时钟同步方法及系统。The present invention relates to the field of industrial Ethernet technologies, and in particular, to a clock synchronization method and system in a Synchronous Digital Hierarchy (SDH) network.
背景技术Background technique
图1为目前SDH网络中进行PTP时钟同步时的结构示意图,在最初搭建主、从时钟设备时,主时钟设备和从时钟设备都连接上GPS天线,由于此时主时钟设备和从时钟设备都是与GPS卫星进行通信,因此主时钟设备和从时钟设备此时是同步的。此时主时钟设备持续的向从时钟设备发送同步报文,从时钟设备接收同步报文,经过一段时间的测量,根据收发时间戳,确定主时钟设备到从时钟设备的链路延时Delay,并将该Delay保存下来,作为之后主时钟设备到从时钟设备的固有链路延时。Figure 1 is a schematic diagram of the structure of the PTP clock synchronization in the current SDH network. When the primary and secondary clock devices are initially set up, both the master clock device and the slave clock device are connected to the GPS antenna, because both the master clock device and the slave clock device are at this time. It is communicating with the GPS satellite, so the master clock device and the slave clock device are synchronized at this time. At this time, the master clock device continuously sends the synchronization packet to the slave clock device, and receives the synchronization packet from the clock device. After a period of measurement, the link delay of the master clock device to the slave clock device is determined according to the sending and receiving time stamp. The Delay is saved as the inherent link delay of the master clock device to the slave clock device.
当去掉从时钟设备上的GPS天线后,从时钟设备再接收到主时钟设备发送的同步报文时,通过与保存的Delay的比较,确定出与主时钟设备的偏差,从而实现对时。When the GPS antenna on the slave clock device is removed, and the synchronization packet sent by the master clock device is received from the clock device, the deviation from the master clock device is determined by comparison with the saved Delay, thereby realizing the timing.
当SDH链路发生变化时,主时钟设备出现了故障,或者从时钟设备自身出现了问题,之前测量出的Delay将会失去意义,此时从时钟设备无法确定自身此时是否需要进行时钟调整,从而导致从时钟设备对时失败。When the SDH link changes, the primary clock device fails, or the clock device itself has a problem. The previously measured Delay will lose its meaning. At this time, the slave clock device cannot determine whether it needs to adjust the clock at this time. As a result, the slave clock device fails.
虽然在现有的PTP网络中存在多个主时钟设备,在一个时刻只有一个作为主时钟设备,其他的都是备用主时钟设备,作为备用主时钟设备,在其未升级为主时钟设备之前其不向外发送PTP同步报文,备用主时钟设备的存在也无法在链路发生变化时,对从时钟设备进行对时。因此,现有的在SDH网络中的时钟对时方法存在一定的弊端,无法保证从时钟设备的准确对时。 Although there are multiple master clock devices in the existing PTP network, only one of them is the master clock device at a time, and the other is the standby master clock device. As the standby master clock device, before it is upgraded to the master clock device, The PTP synchronization packet is not sent out. The existence of the standby primary clock device cannot be used to time the slave clock device when the link changes. Therefore, the existing clock timing method in the SDH network has certain drawbacks, and the accurate timing of the slave clock device cannot be guaranteed.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种SDH网络中的时钟同步方法及系统。In view of the above problems, the present invention has been made in order to provide a clock synchronization method and system in an SDH network that overcomes the above problems or at least partially solves the above problems.
本发明实施例提供了一种SDH网络中的时钟同步方法,从时钟设备与至少三条SDH路径中的主时钟设备建立对时通道,该方法包括:An embodiment of the present invention provides a clock synchronization method in an SDH network, where a clock device establishes a time channel with a master clock device in at least three SDH paths, and the method includes:
从时钟设备根据与主时钟设备之间传输的PTP同步报文,及保存的主用主时钟设备到自身的延时Delay0,确定主用主时钟设备和自身间的主从时钟偏差值offset0;The slave clock device determines the master-slave clock offset value offset0 between the master master clock device and itself according to the PTP synchronization message transmitted between the primary clock device and the saved primary master clock device to its own delay Delay0;
判断该主从时钟偏差值offset0是否在设定的第一阈值范围内;Determining whether the master-slave clock offset value offset0 is within a set first threshold range;
当其在设定的第一阈值范围内时,根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时;When it is within the set first threshold range, the timing is performed according to the master-slave clock offset value saved for the master master clock device;
否则,确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时。Otherwise, determining the master-slave clock offset value between the other standby master clock device and itself, and determining that the master-slave clock offset value is within the set first threshold range, according to the master-slave clock saved for the standby master clock device The deviation value is timed.
为了保证时钟对时的准确性,当原主用主时钟设备恢复时仍能作为备用主时钟对整个对时过程进行检测,所述方法还包括:In order to ensure the accuracy of the clock pairing, the entire mastering process can be detected as the standby master clock when the original master clock device is restored. The method further includes:
所述从时钟设备与所述主用主时钟设备多次传输PTP同步报文;Transmitting a PTP synchronization message by the slave clock device and the primary master clock device multiple times;
根据所述多次PTP同步报文,确定每次所述主用主时钟设备与自身的延时;Determining, according to the multiple PTP synchronization messages, a delay of the primary master clock device and itself;
当连续预设次数延时的差的绝对值位于设定的延时阈值范围内时,针对所述主用主时钟设备更新其对应的延时。When the absolute value of the difference of the consecutive preset number of delays is within the set delay threshold range, the corresponding master clock device is updated for its corresponding delay.
为了有效的提高链路故障、从时钟设备故障检测的及时性,所述方法还包括:In order to effectively improve the link fault and the timeliness of the fault detection of the clock device, the method further includes:
主用主时钟设备根据与从时钟设备之间传输的PTP报文,确定从时钟设备与自身的延时;The active primary clock device determines the delay of the slave clock device and itself according to the PTP packet transmitted between the slave clock device and the slave clock device;
判断该延时与保存的从时钟设备与自身之间的延时的差是否在设定的第二阈值范围内;Determining whether the difference between the delay and the saved delay between the slave clock device and itself is within a set second threshold range;
当所述差超过设定的第二阈值范围时,向所述从时钟设备发送链路变化的通知信息。When the difference exceeds the set second threshold range, the notification information of the link change is sent to the slave clock device.
为了保证时钟对时的准确性,在本发明实施例中所述方法还包括:In order to ensure the accuracy of the clock pair, the method in the embodiment of the present invention further includes:
主用主时钟设备根据与从时钟设备之间多次传输的PTP报文,确定每次从时钟设备与自身之间的延时;The active primary clock device determines the delay between each slave clock device and itself according to the PTP message transmitted multiple times with the slave clock device;
当连续预设次数延时之间的差位于设定的第三阈值范围之内时,所述主用主时钟设备停止向从时钟设备发送通知信息,并针对所述从时钟设备更新其对应的延时。When the difference between consecutive preset number of times delays is within a set third threshold range, the primary master clock device stops transmitting notification information to the slave clock device and updates its corresponding for the slave clock device Delay.
为了保证对时的准确性,所述确定其他备用主时钟设备和自身间的主从时钟偏差值包 括:In order to ensure the accuracy of the time alignment, the determining the master-slave clock offset value package between the other standby master clock devices and themselves include:
所述从时钟设备根据基于BMC算法,确定出的各主时钟设备的优先级,按照各备用主时钟设备的优先级,依次确定每个备用主时钟设备和自身间的主从时钟偏差值。The slave clock device sequentially determines the master-slave clock offset value between each slave master clock device and itself according to the priority of each master clock device according to the priority of each master clock device determined according to the BMC algorithm.
本发明实施例提供了一种SDH网络中的时钟同步系统,所述系统包括:从时钟设备和通过不同的对时通道与所述从时钟对时的主时钟设备;An embodiment of the present invention provides a clock synchronization system in an SDH network, where the system includes: a slave clock device and a master clock device when the slave clock is paired through different time channels;
从时钟设备,用于根据与主时钟设备之间传输的PTP同步报文,及保存的主用主时钟设备到自身的延时Delay0,确定主用主时钟设备和自身间的主从时钟偏差值offset0;判断该主从时钟偏差值offset0是否在设定的第一阈值范围内;当其在设定的第一阈值范围内时,根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时;否则,确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时;The slave clock device is configured to determine a master-slave clock offset value between the master master clock device and itself according to the PTP synchronization message transmitted between the primary clock device and the saved primary master clock device to its own delay Delay0. Offset0; determining whether the master-slave clock offset value offset0 is within a set first threshold range; when it is within the set first threshold range, according to the master-slave clock offset value saved for the master master clock device Performing the counterclockwise; otherwise, determining the master-slave clock offset value between the other standby master clock device and itself, and determining that the master-slave clock bias value is within the set first threshold range, according to the saved for the standby master clock device The master-slave clock bias value is timed;
各主时钟设备,用于与所述从时钟设备进行PTP同步报文的传输。Each master clock device is configured to perform PTP synchronization packet transmission with the slave clock device.
为了保证时钟对时的准确性,当原主用主时钟设备恢复时仍能作为备用主时钟对整个对时过程进行检测,所述从时钟设备,还用于与所述主用主时钟设备多次传输PTP同步报文;根据所述多次PTP同步报文,确定每次所述主用主时钟设备与自身的延时;当连续预设次数延时的差的绝对值位于设定的延时阈值范围内时,针对所述主用主时钟设备更新其对应的延时。In order to ensure the accuracy of the clock pairing time, the entire timing process can be detected as the standby master clock when the original master clock device is restored, and the slave clock device is also used for multiple times with the master master clock device. Transmitting a PTP synchronization message; determining, according to the plurality of PTP synchronization messages, a delay each time the primary master clock device and itself are; when the absolute value of the difference of the preset preset number of delays is at a set delay When the threshold is within the range, the corresponding primary clock device is updated for its corresponding delay.
为了有效的提高链路故障、从时钟设备故障检测的及时性,所述主时钟设备,还用于根据与从时钟设备之间传输的PTP报文,确定从时钟设备与自身的延时;判断该延时与保存的从时钟设备与自身之间的延时的差是否在设定的第二阈值范围内;当所述差超过设定的第二阈值范围时,向所述从时钟设备发送链路变化的通知信息。The master clock device is further configured to determine the delay of the slave clock device and itself according to the PTP packet transmitted between the slave clock device and the time delay for detecting the fault of the slave device. Whether the difference between the delay and the saved delay between the slave clock device and itself is within a set second threshold range; when the difference exceeds the set second threshold range, the difference is sent to the slave clock device Notification information for link changes.
为了保证时钟对时的准确性,所述主时钟设备,还用于根据与从时钟设备之间多次传输的PTP报文,确定每次从时钟设备与自身之间的延时;当连续预设次数延时之间的差位于设定的第三阈值范围之内时,所述主用主时钟设备停止向从时钟设备发送通知信息,并针对所述从时钟设备更新其对应的延时。In order to ensure the accuracy of the clock pairing, the master clock device is further configured to determine a delay between each slave clock device and itself according to a PTP message transmitted multiple times with the slave clock device; When the difference between the set times delay is within the set third threshold range, the primary master clock device stops transmitting the notification information to the slave clock device and updates its corresponding delay for the slave clock device.
为了保证对时的准确性,所述从时钟设备,具体用于根据基于BMC算法,确定出的各主时钟设备的优先级,按照各备用主时钟设备的优先级,依次确定每个备用主时钟设备和自身间的主从时钟偏差值。The slave clock device is specifically configured to determine, according to the priority of each master clock device based on the BMC algorithm, the priority of each standby master clock device, and sequentially determine each spare master clock according to the priority of each master clock device. The master-slave clock offset value between the device and itself.
本发明实施例提供了一种SDH网络中的时钟同步方法及系统,该方法中从时钟设备与至少三条SDH路径中的主时钟设备建立了对时通道,从时钟设备根据与当前的主用主时钟设备之间传输PTP同步报文,及保存的该主用主时钟设备到自身的延时Delay0,确定 该主用主时钟设备和自身间的主从时钟偏差值offset0,判断该主从时钟偏差值offset0是否在设定的第一阈值范围内,当其在设定的第一阈值范围内时,根据针对该主用主时钟设备保存的进行对时,否则,确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时。由于在本发明实施例中从时钟设备同时与多条不同SDH路径中的主时钟设备建立了对时通道,并且针对每个主时钟设备保存了该主时钟设备到自身的延时和主从时钟偏差值,因此在对时的过程中可以根据当前计算的主从时钟偏差值,确定当前的对时过程是否准确,从而确定对时通道及主时钟设备是否出现故障,并且在对时出现问题时也能及时的采用其他的备用主时钟进行对时,从而保证了对时的准确性。The embodiment of the invention provides a clock synchronization method and system in an SDH network, in which a clock channel is established from a clock device and a master clock device in at least three SDH paths, and the slave clock device is based on the current master. Transmitting a PTP synchronization message between the clock devices, and saving the time delay Delay0 of the primary master clock device to its own, determining Determining whether the master-slave clock offset value offset0 is within a set first threshold range, and when the master-slave clock offset value offset0 is within a set first threshold range, according to Performing a check for the primary master clock device to save, otherwise, determining a master-slave clock offset value between the other slave master clock device and itself, and determining that the master-slave clock offset value is within the set first threshold range, The timing is based on the master-slave clock offset value saved for the alternate master clock device. Since in the embodiment of the present invention, the clock device establishes a time channel simultaneously with the master clock device in the plurality of different SDH paths, and the delay and the master-slave clock of the master clock device to itself are saved for each master clock device. The deviation value, so in the process of the time, it can determine whether the current timing process is accurate according to the currently calculated master-slave clock deviation value, thereby determining whether the time channel and the master clock device are faulty, and when there is a problem in the time alignment It is also possible to use other alternate master clocks in time to ensure the accuracy of the time.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明DRAWINGS
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1为目前SDH网络中进行PTP时钟同步时的结构示意图;FIG. 1 is a schematic structural diagram of a PTP clock synchronization in an SDH network;
图2为本发明实施例提供的从时钟设备与多个主时钟设备建立对时通道的结构图;FIG. 2 is a structural diagram of establishing a time channel of a slave clock device and multiple master clock devices according to an embodiment of the present disclosure;
图3为本发明实施例提供的一种SDH网络中的时钟同步过程;FIG. 3 is a schematic diagram of a clock synchronization process in an SDH network according to an embodiment of the present invention;
图4为本发明实施例提供的SDH网络中的时钟同步详细过程;4 is a detailed process of clock synchronization in an SDH network according to an embodiment of the present invention;
图5为本发明实施例提供了一种SDH网络中的时钟同步系统的结构示意图。FIG. 5 is a schematic structural diagram of a clock synchronization system in an SDH network according to an embodiment of the present invention.
具体实施方式detailed description
为了有效保证对时的准确性,本发明实施例提供了一种SDH网络中的时钟同步方法及系统。In order to effectively ensure the accuracy of the time alignment, the embodiment of the invention provides a clock synchronization method and system in an SDH network.
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed.
下面结合说明附图,对本发明实施例进行说明。 The embodiments of the present invention will be described below with reference to the accompanying drawings.
在本发明实施例中为了实现对从时钟设备的准确对时,从时钟设备与至少三条SDH路径中的主时钟设备建立了对时通道,如图2所示的该从时钟设备与多个主时钟设备建立对时通道的结构图。如图2所示,从时钟设备分别与走不同SDH网络路径的三台主时钟设备建立了对时通道。In the embodiment of the present invention, in order to achieve accurate timing of the slave clock device, the slave clock device establishes a time channel with the master clock device in at least three SDH paths, as shown in FIG. 2, the slave clock device and the plurality of masters. The clock device establishes a structure diagram of the time channel. As shown in FIG. 2, the slave clock device establishes a time channel with three master clock devices that travel different SDH network paths.
在对时之初,从时钟设备和三台主时钟设备都连接有GPS天线,由于此时主时钟设备和从时钟设备都是与GPS卫星进行通信,因此主时钟设备和从时钟设备此时是同步的。At the beginning of the time, the slave clock device and the three master clock devices are connected with a GPS antenna. Since the master clock device and the slave clock device both communicate with the GPS satellite, the master clock device and the slave clock device are Synchronous.
三台主时钟设备都通过其对应的对时通道向从时钟设备发送PTP同步报文,经过一段时间后,从时钟设备将会学习到其与各个主时钟设备所在链路的延时,将学习到的各个延时针对每个主时钟设备保存到本地。具体的,如图2所示,在从时钟设备中针对主用主时钟设备保存有与其之间的延时Delay0,并针对第一备用主时钟设备和第二备用主时钟设备,分别保存有与其之间的延时Delay1和Delay2。The three master clock devices send PTP synchronization packets to the slave clock device through their corresponding time channels. After a period of time, the slave clock device learns the delay of the link between the master clock devices and the master clock device. The individual delays are saved locally for each master clock device. Specifically, as shown in FIG. 2, a delay Delay0 between the slave clock device and the master master clock device is saved, and the first standby master clock device and the second standby master clock device are respectively saved The delay between Delay1 and Delay2.
另外,为了保证对时的准确性,在本发明实施例中从时钟设备根据针对每台主时钟设备记录的每台主时钟设备与自身的延时,确定每台主时钟设备与自身间的主从时钟偏差值offset,其中offset=T1-T2-Delay,其中T1为主时钟设备发送sync报文的时间,T2为从时钟设备接收到sync报文的时间,Delay为主时钟设备到从时钟设备的延时。由于此时,主时钟设备与从时钟设备都连接有GPS天线,即主时钟设备与从时钟设备之间同步,因此此时该主从时钟偏差值offset为0。In addition, in order to ensure the accuracy of time alignment, in the embodiment of the present invention, the slave clock device determines the master between each master clock device and itself according to the delay of each master clock device recorded for each master clock device and itself. The slave clock offset value offset, where offset=T1-T2-Delay, where T1 is the time at which the master clock device sends a sync message, and T2 is the time at which the slave clock device receives the sync message, and the delay is the master clock device to the slave clock device. Delay. At this time, the master clock device and the slave clock device are connected with a GPS antenna, that is, the master clock device and the slave clock device are synchronized, so the master-slave clock offset value offset is 0 at this time.
由于从时钟设备同时与多台主时钟设备建立了对时通道,为了在进行对时时,保证对时的准确性,在本发明实施例中针对多台主时钟设备,基于BMC算法,确定主时钟设备的优先级,将优先级最高的主时钟设备作为主用主时钟设备,将其他优先级的主时钟设备作为备用主时钟设备,并且记录每台备用主时钟设备的优先级,以便后续在进行对时时使用。In the embodiment of the present invention, the master clock is determined based on the BMC algorithm for the multiple master clock devices in the embodiment of the present invention, because the slave clock device establishes a time channel with the master clock device at the same time. Priority of the device. The master clock device with the highest priority is used as the master clock device. The master clock devices of other priorities are used as the backup master clock device. The priority of each standby master clock device is recorded for subsequent operations. Used for all time.
相应的,为了便于后续对时的准确性,及识别对时过程出现误差的原因,准确定位对时过程出现的故障,在本发明实施例中每台主时钟设备根据与从时钟设备之间传输的PTP同步报文,确定从时钟设备到自身的链路延时,并且每台主时钟设备将确定的该从时钟设备到自身的延时记录下来,例如对于主用主时钟设备,确定从时钟设备到自身的延时,在本地记录有该延时为Delay_sm0,第一备用主时钟设备确定从时钟到自身的延时,在本地记录有该延时为Delay_sm1,相应的第二备用主时钟设备在本地记录从时钟设备到自身的延时为Delay_sm2。Correspondingly, in order to facilitate the accuracy of the subsequent timing, and to identify the cause of the error in the timing process, and accurately locate the fault that occurs in the timing process, in the embodiment of the present invention, each master clock device transmits between the slave clock device and the slave clock device. PTP synchronization message, determining the link delay from the clock device to itself, and each master clock device records the determined delay of the slave clock device to itself, for example, for the primary master clock device, determining the slave clock The delay of the device to itself is recorded locally as Delay_sm0. The first standby master clock device determines the delay from the clock to itself. The delay is locally recorded as Delay_sm1, and the corresponding second standby master clock device The delay in locally recording the slave clock device to itself is Delay_sm2.
图3为本发明实施例提供的一种SDH网络中的时钟同步过程,该过程包括以下步骤:FIG. 3 is a schematic diagram of a clock synchronization process in an SDH network according to an embodiment of the present invention, where the process includes the following steps:
S301:从时钟设备根据与主时钟设备之间传输的PTP同步报文,及保存的主用主时钟 设备到从时钟设备的延时Delay0,确定主用主时钟设备和自身间的主从时钟偏差值offset0。S301: The slave clock device synchronizes the packet according to the PTP transmitted between the master clock device and the saved master master clock. The delay Delay0 of the device to the slave clock device determines the master-slave clock offset value offset0 between the master master clock device and itself.
具体的,在本发明实施例中某一时刻只有一台主用主时钟设备,其他的与从时钟设备建立对时通道的主时钟设备为备用主时钟设备。在进行对时的过程中,主用主时钟设备与备用主时钟设备都会与从时钟设备进行PTP同步报文的传输。Specifically, in the embodiment of the present invention, only one primary clock device is used at a certain time, and other master clock devices that establish a time channel with the slave clock device are standby master clock devices. During the time synchronization process, both the primary master clock device and the standby master clock device perform PTP synchronization packet transmission with the slave clock device.
因为主从时钟偏差值offset=T1-T2-Delay,其中T1为主时钟设备发送sync报文的时间,T2为从时钟设备接收到sync报文的时间,Delay为主时钟设备到从时钟设备的延时,因此从时钟设备根据与每台主时钟设备之间传输的PTP同步报文中的sync同步报文,可以确定与每台主时钟设备的主从时钟偏差值offset。其中,该主用主时钟设备与从时钟设备之间的主从时钟偏差值为offset0,offset0=T1-T2-Delay0。Because the master-slave clock offset value is offset=T1-T2-Delay, where T1 is the time at which the master clock device sends a sync message, and T2 is the time at which the slave clock device receives the sync message, and the delay is the master clock device to the slave clock device. The delay, so the slave clock device can determine the master-slave clock offset value offset from each master clock device according to the sync synchronization message in the PTP synchronization message transmitted between each master clock device. The master-slave clock deviation between the master master clock device and the slave clock device is offset0, offset0=T1-T2-Delay0.
S302:判断该主从时钟偏差值offset0是否在设定的第一阈值范围内,当判断结果为是时,进行步骤S303,否则,进行步骤S304。S302: Determine whether the master-slave clock offset value offset0 is within the set first threshold range. If the determination result is yes, proceed to step S303; otherwise, proceed to step S304.
从时钟设备中针对每台主时钟设备保存有针对该主时钟设备的主从时钟偏差值。如图2所示,在从时钟设备中保存有主用主时钟设备与自身的主从时钟偏差值,第一备用主时钟设备与自身的主从时钟偏差值及第二备用主时钟设备与自身的主从时钟偏差值。由于此时该主从时钟偏差值为在主从时钟设备连接有GPS天线时测量的,因此在从时钟设备中保存的该每个主从时钟偏差值都为0。The slave clock device stores a master-slave clock offset value for the master clock device for each master clock device. As shown in FIG. 2, in the slave clock device, the master-slave clock device has its own master-slave clock offset value, the first slave master clock device has its own master-slave clock offset value, and the second slave master clock device and itself. The master-slave clock bias value. Since the master-slave clock offset value is measured at the time when the master-slave clock device is connected to the GPS antenna, each of the master-slave clock offset values stored in the slave clock device is zero.
S303:根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时。S303: Perform timing according to the master-slave clock offset value saved for the master master clock device.
当其在设定的第一阈值范围内时,可以确定主用主时钟设备与从时钟设备间的对时通道正常,主用主时钟设备和从时钟设备也都正常,也可以依据该主用主时钟设备进行对时,具体的为了保证对时的准确性,在本发明实施例中根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时,该主从时钟偏差值为主用主时钟设备和从时钟设备之间的偏差值。When it is within the set first threshold range, it may be determined that the time channel between the primary master clock device and the slave clock device is normal, and the master master clock device and the slave clock device are also normal, and may also be used according to the master device. When the master clock device performs the pairing, in order to ensure the accuracy of the time alignment, in the embodiment of the present invention, when the master-slave clock offset value is saved for the master master clock device, the master-slave clock offset value is The offset between the primary master clock device and the slave clock device.
S304:确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时。S304: Determine a master-slave clock offset value between the other standby master clock device and itself, and determine that the master-slave clock offset value is within a set first threshold range, according to the master slave clock saved for the standby master clock device The deviation value is timed.
因为在本发明实施例中从时钟设备同时与至少三条SDH路径中的主时钟设备建立了对时通道,依据BMC算法,确定的三台主时钟设备的优先级分别为主用主时钟设备、第一备用主时钟设备和第二备用主时钟设备。当从时钟设备与每台主时钟设备上连接GPS天线时,确定并保存每台主时钟设备到自身的延时Delay。In the embodiment of the present invention, the clock device establishes a time channel with the master clock device in at least three SDH paths at the same time. According to the BMC algorithm, the priorities of the three master clock devices are respectively used as the master clock device. An alternate primary clock device and a second alternate primary clock device. When the slave GPS device is connected to the clock device and each master clock device, the delay mask of each master clock device to itself is determined and saved.
在进行对时时,每台主时钟设备都与从时钟设备之间传输PTP同步报文,因此从时钟设备可以根据保存的每台主时钟设备到自身的延时,分别与主用主时钟设备和每台备用主 时钟设备,确定主时钟设备到自身的主从时钟偏差值offset。例如,如图2所示,从时钟设备确定的主用主时钟设备与其之间的主从时钟偏差值为offset0,第一备用主时钟设备与从时钟设备之间的主从时钟偏差值为offset1,第二备用主时钟设备与从时钟设备之间的主从时钟偏差值为offset2。During the time-to-time, each master clock device transmits a PTP synchronization message to and from the slave clock device. Therefore, the slave clock device can separately synchronize with the master master clock device according to the saved delay time of each master clock device to itself. Each standby master The clock device determines the master-slave clock offset value offset of the master clock device to itself. For example, as shown in FIG. 2, the master-slave clock device determined from the clock device has a master-slave clock offset value of offset0, and the master-slave clock offset value between the first slave master clock device and the slave clock device is offset1. The master-slave clock offset value between the second standby master clock device and the slave clock device is offset2.
首先,从时钟设备对该进行判断,确定该offset0是否在设定的第一阈值范围内,当offset0在设定的第一阈值范围内时,说明主用主时钟设备与从时钟设备之间的对时通道正常,主用主时钟设备与从时钟设备都正常,可以依据该主用主时钟设备进行对时。在依据该主用主时钟设备进行对时时,为了保证对时的准确性,依据保存的该主用主时钟设备与自身间的主从时钟偏差值进行对时。First, determining from the clock device, determining whether the offset0 is within a set first threshold range, and when offset0 is within the set first threshold range, indicating between the primary master clock device and the slave clock device The time channel is normal, the master clock device and the slave clock device are both normal, and can be timed according to the master master clock device. In order to ensure the accuracy of the time according to the master master clock device, the time-dependent deviation between the master master clock device and the master-slave clock is saved.
当该offset0超过设定的第一阈值范围时,说明主用主时钟设备与从时钟设备间的对时通道出现故障,或主用主时钟设备故障,或从时钟设备出现故障,在本发明实施例中为了保证对时的准确性,该从时钟设备与其他备用主时钟设备进行对时。When the offset 0 exceeds the set first threshold range, it indicates that the time channel between the primary master clock device and the slave clock device is faulty, or the master master clock device is faulty, or the slave clock device is faulty, and is implemented in the present invention. In order to ensure the accuracy of the time alignment, the slave clock device performs time alignment with other standby master clock devices.
具体的,由于在本发明实施例中依据BMC算法,确定了每台主时钟设备的优先级,因此在备用主时钟设备中选择优先级最高的,如图2所示的,第一备用主时钟设备的优先级高于第二备用主时钟设备,则从时钟设备判断是否能够与第一备用主时钟设备进行对时。从时钟设备在进行判断时,根据保存的该备用主时钟设备到自身的延时,确定该备用主时钟设备和自身间的主从时钟偏差值,判断确定的该主从时钟偏差值是否在设定的第一阈值范围内,当该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时,否则,选择下一优先级的备用主时钟设备,判断是否采用该下一优先级的备用主时钟设备进行对时,直至选择到满足条件的备用主时钟设备进行对时。Specifically, in the embodiment of the present invention, the priority of each primary clock device is determined according to the BMC algorithm, so the highest priority is selected in the standby primary clock device, as shown in FIG. 2, the first standby primary clock. If the priority of the device is higher than that of the second standby primary clock device, it is determined from the clock device whether it can be timed with the first standby primary clock device. When the slave clock device makes a judgment, according to the saved delay of the standby master clock device to itself, the master-slave clock deviation value between the slave master clock device and itself is determined, and it is determined whether the determined master-slave clock offset value is set. Within the first threshold range, when the master-slave clock offset value is within the set first threshold range, the time is determined according to the master-slave clock offset value saved for the standby master clock device; otherwise, the next step is selected. The standby primary clock device of the priority determines whether the standby primary clock device of the next priority is used for the time synchronization until the standby primary clock device that meets the condition is selected for the time synchronization.
在上述过程中,按照每个备用主时钟设备的优先级,依次判断每个备用主时钟设备与从时钟设备的主从时钟偏差值是否在设定的第一阈值范围内,当某一备用主时钟设备对应的主从时钟偏差值在设定的第一阈值范围内时,采用该备用主时钟设备进行对时,此时说明该主用主时钟设备对应的对时通道故障,或者该主用主时钟设备故障;当所有的主时钟设备与该从时钟设备的主从时钟偏差值都超过设定的第一阈值范围时,很可能是该从时钟出现了故障,当然也不排除每个对时通道都出现了故障,或者每个主时钟设备都出现故障的可能。In the above process, according to the priority of each standby master clock device, it is sequentially determined whether the value of the master-slave clock deviation of each of the standby master clock devices and the slave clock device is within a set first threshold range, when a certain standby master When the master/slave clock offset value corresponding to the clock device is within the set first threshold range, the standby master clock device is used for the time alignment. At this time, the time channel corresponding to the master master clock device is faulty, or the master device is used. The master clock device is faulty; when the master-slave clock deviation values of all the master clock devices and the slave clock device exceed the set first threshold range, it is likely that the slave clock has failed, and of course, each pair is not excluded. The time channel has failed, or every master clock device has failed.
由于在本发明实施例中从时钟设备同时与多条不同SDH路径中的主时钟设备建立了对时通道,并且针对每个主时钟设备保存了该主时钟设备到自身的延时和主从时钟偏差值,因此在对时的过程中可以根据当前计算的主从时钟偏差值,确定当前的对时过程是否 准确,从而确定对时通道及主时钟设备是否出现故障,并且在对时出现问题时也能及时的采用其他的备用主时钟进行对时,从而保证了对时的准确性。Since in the embodiment of the present invention, the clock device establishes a time channel simultaneously with the master clock device in the plurality of different SDH paths, and the delay and the master-slave clock of the master clock device to itself are saved for each master clock device. Deviation value, so in the process of the time, it can be determined according to the current calculated master-slave clock deviation value to determine whether the current timing process is Accurate to determine whether the time channel and the master clock device are faulty, and when other problems occur, the other standby master clocks can be used in time to ensure the accuracy of the time.
在本发明实施例中为了在SDH网络中实现对从时钟设备的准确对时,从时钟设备同时与至少三条SDH路径中的主时钟设备建立了对时通道,通过BMC算法,确定了每台主时钟设备的优先级。当主时钟设备和从时钟设备都连接GPS天线时,从时钟设备与每台主时钟设备之间传输PTP同步报文,从时钟设备确定每台主时钟设备与自身的延时delay,并在本地针对每台主时钟设备保存该延时,根据确定的该延时,确定每台主时钟设备和自身间的主从时钟偏差值,并针对每台主时钟设备保存该主从时钟偏差值。由于主从时钟设备都连接有GPS天线,因此针对每台主时钟设备保存的该主从时钟偏差值都为0。并且,每台主时钟设备也会确定从时钟设备与自身的延时delay_sm,每台主时钟设备将确定的该延时保存在本地。In the embodiment of the present invention, in order to implement an accurate pairing of the slave clock device in the SDH network, the slave clock device simultaneously establishes a time channel with the master clock device in at least three SDH paths, and each host is determined by the BMC algorithm. The priority of the clock device. When both the master clock device and the slave clock device are connected to the GPS antenna, the slave clock device transmits a PTP synchronization message to each master clock device, and the slave clock device determines the delay delay of each master clock device and itself, and locally targets Each master clock device saves the delay, determines the master-slave clock offset value between each master clock device and itself according to the determined delay, and saves the master-slave clock offset value for each master clock device. Since the master and slave clock devices are connected to the GPS antenna, the master-slave clock offset value saved for each master clock device is zero. Moreover, each master clock device also determines the delay delay_sm of the slave clock device and itself, and the delay determined by each master clock device is stored locally.
将主时钟设备与从时钟设备上连接的GPS去掉后,每台主时钟设备向从时钟设备发送sync报文,从时钟设备接收到每台主时钟设备发送的sync报文后,根据自身针对每个主时钟设备保存的延时Delay,确定自身与每台主时钟设备的主从时钟偏差值offset。由于当前存在一台主用主时钟设备,其他的主时钟设备都为备用主时钟设备,从时钟设备当前与主用主时钟设备进行时钟同步,与备用主时钟设备之间传输的PTP同步报文,用于对该对时过程进行监控。After the master clock device is removed from the GPS connected to the slave clock device, each master clock device sends a sync message to the slave clock device. After receiving the sync message sent by each master clock device, the slave clock device The delay delay saved by the master clock device determines the master-slave clock offset value offset of itself and each master clock device. The PVR synchronization packet transmitted between the secondary clock device and the active primary clock device is synchronized with the primary master clock device. Used to monitor the timing process.
当从时钟设备确定了每台主时钟设备到自身的主从时钟偏差值后,判断主用主时钟设备到自身的主从时钟偏差值offset0是否在设定的第一阈值范围内。当该offset0在设定的第一阈值范围内时,说明主用主时钟设备与从时钟设备之间的对时通道正常,主用主时钟设备与从时钟设备都正常,可以依据该主用主时钟设备进行对时。在依据该主用主时钟设备进行对时时,为了保证对时的准确性,依据保存的该主用主时钟设备与自身间的主从时钟偏差值进行对时。After the slave clock device determines the master-slave clock offset value of each master clock device to itself, it is determined whether the master master clock device to its own master-slave clock offset value offset0 is within the set first threshold range. When the offset0 is within the set first threshold range, it indicates that the time channel between the primary master clock device and the slave clock device is normal, and the master master clock device and the slave clock device are both normal, according to the master owner. The clock device is timed. In order to ensure the accuracy of the time according to the master master clock device, the time-dependent deviation between the master master clock device and the master-slave clock is saved.
当该offset0超过设定的第一阈值范围时,说明主用主时钟设备与从时钟设备间的对时通道出现故障,或主用主时钟设备故障,或从时钟设备出现故障,在本发明实施例中为了保证对时的准确性,该从时钟设备与其他备用主时钟设备进行对时。并将该主用主时钟设备降级为备用主时钟设备When the offset 0 exceeds the set first threshold range, it indicates that the time channel between the primary master clock device and the slave clock device is faulty, or the master master clock device is faulty, or the slave clock device is faulty, and is implemented in the present invention. In order to ensure the accuracy of the time alignment, the slave clock device performs time alignment with other standby master clock devices. Downgrading the primary master clock device to the alternate primary clock device
具体的,由于在本发明实施例中依据BMC算法,确定了每台主时钟设备的优先级,因此在备用主时钟设备中选择优先级最高的,如图2所示的,第一备用主时钟设备的优先级高于第二备用主时钟设备,则从时钟设备判断是否能够与第一备用主时钟设备进行对时。从时钟设备在进行判断时,根据保存的该备用主时钟设备到自身的延时,确定该备用 主时钟设备和自身间的主从时钟偏差值,确定该主从时钟偏差值是否在设定的第一阈值范围内,当该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时,否则,选择下一优先级的备用主时钟设备,判断是否采用该下一优先级的备用主时钟设备进行对时,直至选择到满足条件的备用主时钟设备进行对时。将进行对时的备用主时钟设备升级为主用主时钟设备,后续从时钟设备与该升级后的备用主时钟设备进行对时。Specifically, in the embodiment of the present invention, the priority of each primary clock device is determined according to the BMC algorithm, so the highest priority is selected in the standby primary clock device, as shown in FIG. 2, the first standby primary clock. If the priority of the device is higher than that of the second standby primary clock device, it is determined from the clock device whether it can be timed with the first standby primary clock device. When the slave clock device makes a judgment, it determines the backup according to the saved delay of the standby master clock device to itself. Determining the master-slave clock deviation value between the master clock device and itself, determining whether the master-slave clock bias value is within a set first threshold range, and when the master-slave clock bias value is within a set first threshold range, according to The master-slave clock offset value saved by the standby master clock device is matched. Otherwise, the standby master clock device of the next priority is selected to determine whether to use the next-priority standby master clock device for timing, until selection The time is up to the alternate primary clock device that meets the conditions. The standby master clock device is upgraded to the master clock device, and the subsequent slave clock device is timed with the upgraded standby master clock device.
当主用主时钟设备降级为备用主时钟设备后,从时钟设备依然与该降级后的主用主时钟设备进行PTP同步报文的传输,所述方法还包括:After the primary master clock device is degraded to the standby master clock device, the slave clock device still performs the PTP synchronization packet transmission with the degraded primary master clock device. The method further includes:
所述从时钟设备与所述主用主时钟设备多次传输PTP同步报文;Transmitting a PTP synchronization message by the slave clock device and the primary master clock device multiple times;
根据所述多次PTP同步报文,确定每次所述主用主时钟设备与自身的延时;Determining, according to the multiple PTP synchronization messages, a delay of the primary master clock device and itself;
当连续预设次数延时的差的绝对值位于设定的延时阈值范围内时,针对所述主用主时钟设备更新其对应的延时。When the absolute value of the difference of the consecutive preset number of delays is within the set delay threshold range, the corresponding master clock device is updated for its corresponding delay.
即该降级后的主用主时钟设备继续与从时钟设备之间进行PTP同步报文的传输,从时钟设备确定该降级后的主用主时钟设备到从时钟设备的延时Delay0’,当该延时Delay0’保存在某个恒定的值不再变化时,则将Delay0’代替原来的Delay0保存。That is, the degraded primary master clock device continues to transmit PTP synchronization messages with the slave clock device, and the slave clock device determines the delayed Delay Delay of the primary master clock device to the slave clock device. Delay Delay0' is saved when a constant value does not change, then Delay0' is saved instead of the original Delay0.
图4为本发明实施例提供的SDH网络中的时钟同步详细过程,该过程包括以下步骤:FIG. 4 is a detailed process of clock synchronization in an SDH network according to an embodiment of the present invention, where the process includes the following steps:
S401:从时钟设备根据与主时钟设备之间传输的PTP同步报文,及保存的主用主时钟设备到从时钟设备的延时Delay0,确定主用主时钟设备和自身间的主从时钟偏差值offset0。S401: The slave clock device determines a master-slave clock deviation between the master master clock device and itself according to the PTP synchronization message transmitted between the primary clock device and the saved delay time from the primary master clock device to the slave clock device. The value is offset0.
S402:判断该主从时钟偏差值offset0是否在设定的第一阈值范围内,当判断结果为是时,进行步骤S403,否则,进行步骤S404。S402: Determine whether the master-slave clock offset value offset0 is within the set first threshold range. When the determination result is yes, proceed to step S403; otherwise, proceed to step S404.
S403:根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时。之后进行步骤S405。S403: Perform timing according to the master-slave clock offset value saved for the master master clock device. Then, step S405 is performed.
S404:将该主用主时钟设备降级为备用主时钟设备。确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时。S404: Downgrade the primary master clock device to an alternate master clock device. Determining the master-slave clock offset value between the other standby master clock device and itself, and determining that the master-slave clock offset value is within the set first threshold range, according to the master-slave clock offset value saved for the standby master clock device Make the right time.
S405:从时钟设备与该降级后的主用主时钟设备之间多次传输PTP同步报文,根据所述多次PTP同步报文,确定每次所述主用主时钟设备与自身的延时。S405: The PTP synchronization packet is transmitted multiple times between the slave clock device and the degraded primary master clock device, and the delay of the primary master clock device and itself is determined according to the multiple PTP synchronization packets. .
S406:判断连续预设次数延时的差的绝对值是否位于设定的延时阈值范围内,当判断结果为是时,进行步骤S407,否则,继续进行步骤S405。S406: Determine whether the absolute value of the difference of the consecutive preset number of times delay is within the set delay threshold range. When the determination result is yes, proceed to step S407; otherwise, proceed to step S405.
S407:从时钟设备针对该降级后的主用主时钟设备更新其对应的延时。S407: The slave clock device updates its corresponding delay for the downgraded primary master clock device.
在本发明实施例中从时钟设备与降级后的主用主时钟设备继续进行PTP同步报文的传 输,并在确定与该降级后的主用主时钟设备之间的延时保持在恒定值时,更新该降级后的主用主时钟设备对应的延时,从而可以保证当降级后的主用主时钟设备升级为主用主时钟设备时,可以采用该主用主时钟设备进行对时。In the embodiment of the present invention, the slave device continues to perform PTP synchronization packet transmission from the degraded primary master clock device. Transmitting, and after determining that the delay between the degraded main master clock device is kept at a constant value, updating the delay corresponding to the degraded main master clock device, thereby ensuring the main use after degrading When the master clock device is upgraded to the master clock device, the master master clock device can be used for timing.
在本发明实施例中当某一备用主时钟设备升级为主用主时钟设备,在采用该当前主用主时钟设备进行对时的期间,当降级后的主用主时钟设备对应的链路恢复了,或该主用主时钟设备的故障恢复了,而确定的当前主用主时钟设备对应的主从时钟偏差值位于设定的第一阈值范围内,从时钟设备还会一直采用该当前的主用主时钟设备进行对时,只有当其超出了设定的第一阈值范围,该从时钟设备才在备用主时钟设备中升级一个作为主用主时钟设备,并将该当前的主时钟设备降级为备用主时钟设备,从而可以有效的避免主备主时钟设备的频繁切换导致的时钟抖动。In the embodiment of the present invention, when a standby primary clock device is upgraded to be the primary clock device, the link corresponding to the primary master clock device after the downgrade is restored during the time when the current primary master clock device is used for the timeout. The fault of the primary master clock device is restored, and the determined master-slave clock offset value of the current active master clock device is within a set first threshold range, and the slave clock device always uses the current When the primary master clock device performs the pairing, the slave clock device upgrades one of the standby master clock devices as the master master clock device and the current master clock device only when it exceeds the set first threshold range. Degraded to the standby primary clock device, which can effectively avoid the clock jitter caused by frequent switching between the primary and backup primary clock devices.
在本发明实施例中由于每个主时钟设备中都保存有从时钟设备与自身之间的延时delay_sm,为了及时有效的监控从时钟设备与主时钟设备之间的对时通道,在本发明实施例中还包括:In the embodiment of the present invention, since the delay delay_sm between the slave clock device and itself is stored in each master clock device, in order to timely and effectively monitor the time channel between the slave clock device and the master clock device, the present invention The embodiment also includes:
主用主时钟设备根据与从时钟设备之间传输的PTP报文,确定从时钟设备与自身的延时;The active primary clock device determines the delay of the slave clock device and itself according to the PTP packet transmitted between the slave clock device and the slave clock device;
判断该延时与保存的从时钟设备与自身的延时的差是否在设定的第二阈值范围内;Determining whether the difference between the delay and the saved slave clock device and its own delay is within a set second threshold range;
当所述差超过设定的第二阈值范围时,向所述从时钟设备发送链路变化的通知信息。When the difference exceeds the set second threshold range, the notification information of the link change is sent to the slave clock device.
当主用主时钟设备发现确定从时钟设备与自身之间的延时,较自身保存的该从时钟设备与自身之间的延时delay_sm发生较大变化时,为了使从时钟设备及时了解链路的变化,主用主时钟设备向从时钟设备发送链路变化的通知信息。When the primary master clock device finds that the delay between the slave clock device and itself is greater than the delay delay_sm between the slave clock device and itself, in order to make the slave clock device know the link in time. Change, the primary master clock device sends a notification of the link change to the slave clock device.
具体的,主用主时钟设备通过Announce报文中的TLV字段携带异常信息,通知从时钟设备链路变化。当从时钟设备接收到该Announce报文后,从时钟设备不再相信该主用主时钟设备,不再依照该主用主时钟设备进行对时,将该主用主用主时钟设备降级为备用主时钟设备,按照备用主时钟设备的优先级将备用主时钟设备中的一个升级为主用主时钟设备。Specifically, the active primary clock device carries the abnormal information in the TLV field in the Announce packet to notify the slave device of the link change. After receiving the Announce message from the clock device, the slave clock device no longer believes that the master master clock device is no longer in accordance with the master master clock device, and demotes the master master master clock device to standby. The master clock device upgrades one of the standby master clock devices to the master clock device according to the priority of the standby master clock device.
在本发明实施例中,所述方法还包括:In the embodiment of the present invention, the method further includes:
主用主时钟设备根据与从时钟设备之间多次传输的PTP报文,确定每次从时钟设备与自身之间的延时;The active primary clock device determines the delay between each slave clock device and itself according to the PTP message transmitted multiple times with the slave clock device;
当连续预设次数延时之间的差位于设定的第三阈值范围之内时,所述主用主时钟设备停止向从时钟设备发送通知信息,并针对所述从时钟设备更新其对应的延时。When the difference between consecutive preset number of times delays is within a set third threshold range, the primary master clock device stops transmitting notification information to the slave clock device and updates its corresponding for the slave clock device Delay.
该降级后的主用主时钟设备继续与从时钟设备进行PTP同步报文的传输,确定从时钟 设备与自身之间的延时delay_sm0,当该延时持续的稳定在一个值delay_sm,虽然与最初的delay_sm0有一定的差距,但其对应的对时通道,或其自身已经稳定,降级后的主用主时钟设备不再向从时钟设备发送异常信息。由于从时钟设备不再接收到该主时钟设备发送的异常信息,该从时钟设备不再认为该主时钟设备不可信,重新根据与该主时钟设备间传输的PTP同步报文,确定该主时钟设备与自身的延时,如果该延时值也持续的稳定在一个值附近,则采用该稳定后的延时替换之前确定的延时。The degraded primary master clock device continues to transmit PTP synchronization messages with the slave clock device to determine the slave clock. The delay between the device and itself delay_sm0, when the delay continues to stabilize at a value of delay_sm, although there is a certain gap with the initial delay_sm0, but its corresponding time channel, or its own has been stabilized, the main after the downgrade The master clock device no longer sends exception information to the slave clock device. Since the slave device no longer receives the abnormal information sent by the master clock device, the slave clock device no longer considers that the master clock device is untrusted, and determines the master clock according to the PTP synchronization message transmitted between the master clock device and the master clock device. The delay between the device and itself, if the delay value continues to stabilize near a value, the previously determined delay is replaced by the stabilized delay.
图5为本发明实施例提供的一种SDH网络中的时钟同步系统的结构示意图,所述系统包括:从时钟设备51和通过不同的对时通道与所述从时钟对时的主时钟设备52;FIG. 5 is a schematic structural diagram of a clock synchronization system in an SDH network according to an embodiment of the present invention, where the system includes: a slave clock device 51 and a master clock device 52 that passes the different time channels and the slave clock pair ;
从时钟设备51,用于根据与主时钟设备之间传输的PTP同步报文,及保存的主用主时钟设备到自身的延时Delay0,确定主用主时钟设备和自身间的主从时钟偏差值offset0;判断该主从时钟偏差值offset0是否在设定的第一阈值范围内;当其在设定的第一阈值范围内时,根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时;否则,确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时;The slave clock device 51 is configured to determine a master-slave clock deviation between the master master clock device and itself according to the PTP synchronization message transmitted between the primary clock device and the saved primary master clock device to its own delay Delay0. a value of offset0; determining whether the master-slave clock offset value offset0 is within a set first threshold range; and when it is within a set first threshold range, according to the master-slave clock offset held for the master master clock device The value is timed; otherwise, the master-slave clock offset value between the other standby master clock device and itself is determined, and when the master-slave clock offset value is within the set first threshold range, the save is performed according to the standby master clock device. The master slave clock bias value is timed;
各主时钟设备52,用于与所述从时钟设备进行PTP同步报文的传输。Each master clock device 52 is configured to perform PTP synchronization message transmission with the slave clock device.
为了保证时钟对时的准确性,当原主用主时钟设备恢复时仍能作为备用主时钟对整个对时过程进行检测,所述从时钟设备51,还用于与所述主用主时钟设备多次传输PTP同步报文;根据所述多次PTP同步报文,确定每次所述主用主时钟设备与自身的延时;当连续预设次数延时的差的绝对值位于设定的延时阈值范围内时,针对所述主用主时钟设备更新其对应的延时。In order to ensure the accuracy of the clock pair, the entire time synchronization process can be detected as the standby master clock when the original master clock device is restored, and the slave clock device 51 is also used to be more than the master master clock device. Transmitting a PTP synchronization message; determining, according to the multiple PTP synchronization message, a delay each time the primary master clock device and itself; when the absolute value of the difference of the preset preset number of delays is at a set delay When the threshold is within the threshold, the corresponding primary clock device is updated for its corresponding delay.
为了有效的提高链路故障、从时钟设备故障检测的及时性,所述主时钟设备52,还用于根据与从时钟设备之间传输的PTP报文,确定从时钟设备与自身的延时;判断该延时与保存的从时钟设备与自身之间的延时的差是否在设定的第二阈值范围内;当所述差超过设定的第二阈值范围时,向所述从时钟设备发送链路变化的通知信息。The master clock device 52 is further configured to determine a delay of the slave clock device and itself according to the PTP packet transmitted between the slave clock device and the time slot for detecting the fault of the slave device. Determining whether the difference between the delay and the saved delay between the slave clock device and itself is within a set second threshold range; when the difference exceeds the set second threshold range, to the slave clock device Send notification information about link changes.
为了保证时钟对时的准确性,所述主时钟设备52,还用于根据与从时钟设备之间多次传输的PTP报文,确定每次从时钟设备与自身之间的延时;当连续预设次数延时之间的差位于设定的第三阈值范围之内时,所述主用主时钟设备停止向从时钟设备发送通知信息,并针对所述从时钟设备更新其对应的延时。In order to ensure the accuracy of the clock pairing, the master clock device 52 is further configured to determine a delay between each slave clock device and itself according to a PTP message transmitted multiple times with the slave clock device; When the difference between the preset number of times delay is within the set third threshold range, the primary master clock device stops transmitting the notification information to the slave clock device, and updates the corresponding delay for the slave clock device. .
为了保证对时的准确性,所述从时钟设备51,具体用于根据基于BMC算法,确定出的各主时钟设备的优先级,按照各备用主时钟设备的优先级,依次确定每个备用主时钟设备和自身间的主从时钟偏差值。 The slave clock device 51 is specifically configured to determine the priority of each master clock device according to the BMC algorithm according to the priority of each standby master clock device, and sequentially determine each standby master according to the priority of each standby master clock device. The master-slave clock offset value between the clock device and itself.
本发明实施例提供了一种SDH网络中的时钟同步方法及系统,该方法中从时钟设备与至少三条SDH路径中的主时钟设备建立了对时通道,从时钟设备根据与当前的主用主时钟设备之间传输PTP同步报文,及保存的该主用主时钟设备到自身的延时Delay0,确定该主用主时钟设备和自身间的主从时钟偏差值offset0,判断该主从时钟偏差值offset0是否在设定的第一阈值范围内,当其在设定的第一阈值范围内时,根据针对该主用主时钟设备保存的进行对时,否则,确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时。由于在本发明实施例中从时钟设备同时与多条不同SDH路径中的主时钟设备建立了对时通道,并且针对每个主时钟设备保存了该主时钟设备到自身的延时和主从时钟偏差值,因此在对时的过程中可以根据当前计算的主从时钟偏差值,确定当前的对时过程是否准确,从而确定对时通道及主时钟设备是否出现故障,并且在对时出现问题时也能及时的采用其他的备用主时钟进行对时,从而保证了对时的准确性。The embodiment of the invention provides a clock synchronization method and system in an SDH network, in which a clock channel is established from a clock device and a master clock device in at least three SDH paths, and the slave clock device is based on the current master. The PTP synchronization message is transmitted between the clock devices, and the saved main master clock device reaches its own delay Delay0, and the master-slave clock offset value offset0 between the master main clock device and itself is determined to determine the master-slave clock deviation. Whether the value offset0 is within the set first threshold range, when it is within the set first threshold range, according to the time saved for the primary master clock device, otherwise determining the other standby master clock device and itself The master-slave clock offset value between the master and slave clocks is determined according to the master-slave clock offset value saved for the standby master clock device when the master-slave clock offset value is within the set first threshold range. Since in the embodiment of the present invention, the clock device establishes a time channel simultaneously with the master clock device in the plurality of different SDH paths, and the delay and the master-slave clock of the master clock device to itself are saved for each master clock device. The deviation value, so in the process of the time, it can determine whether the current timing process is accurate according to the currently calculated master-slave clock deviation value, thereby determining whether the time channel and the master clock device are faulty, and when there is a problem in the time alignment It is also possible to use other alternate master clocks in time to ensure the accuracy of the time.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems can also be used with the teaching based on the teachings herein. The structure required to construct such a system is apparent from the above description. Moreover, the invention is not directed to any particular programming language. It is to be understood that the invention may be embodied in a variety of programming language, and the description of the specific language has been described above in order to disclose the preferred embodiments of the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, the various features of the invention are sometimes grouped together into a single embodiment, in the above description of the exemplary embodiments of the invention, Figure, or a description of it. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed herein. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合 对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination may be employed All of the features disclosed in this specification, including the accompanying claims, abstract and drawings, and all processes or elements of any method or apparatus so disclosed are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of different embodiments are intended to be within the scope of the present invention. Different embodiments are formed and formed. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的SDH网络中的时钟同步系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components of the clock synchronization system in an SDH network in accordance with embodiments of the present invention may be implemented in practice using a microprocessor or digital signal processor (DSP). . The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 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 (10)

  1. 一种SDH网络中的时钟同步方法,其特征在于,从时钟设备与至少三条SDH路径中的主时钟设备建立对时通道,该方法包括:A method for synchronizing a clock in an SDH network, wherein the slave clock device establishes a time channel with the master clock device in the at least three SDH paths, and the method includes:
    从时钟设备根据与主时钟设备之间传输的PTP同步报文,及保存的主用主时钟设备到自身的延时Delay0,确定主用主时钟设备和自身间的主从时钟偏差值offset0;The slave clock device determines the master-slave clock offset value offset0 between the master master clock device and itself according to the PTP synchronization message transmitted between the primary clock device and the saved primary master clock device to its own delay Delay0;
    判断该主从时钟偏差值offset0是否在设定的第一阈值范围内;Determining whether the master-slave clock offset value offset0 is within a set first threshold range;
    当其在设定的第一阈值范围内时,根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时;When it is within the set first threshold range, the timing is performed according to the master-slave clock offset value saved for the master master clock device;
    否则,确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时。Otherwise, determining the master-slave clock offset value between the other standby master clock device and itself, and determining that the master-slave clock offset value is within the set first threshold range, according to the master-slave clock saved for the standby master clock device The deviation value is timed.
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 wherein the method further comprises:
    所述从时钟设备与所述主用主时钟设备多次传输PTP同步报文;Transmitting a PTP synchronization message by the slave clock device and the primary master clock device multiple times;
    根据所述多次PTP同步报文,确定每次所述主用主时钟设备与自身的延时;Determining, according to the multiple PTP synchronization messages, a delay of the primary master clock device and itself;
    当连续预设次数延时的差的绝对值位于设定的延时阈值范围内时,针对所述主用主时钟设备更新其对应的延时。When the absolute value of the difference of the consecutive preset number of delays is within the set delay threshold range, the corresponding master clock device is updated for its corresponding delay.
  3. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 wherein the method further comprises:
    主用主时钟设备根据与从时钟设备之间传输的PTP报文,确定从时钟设备与自身的延时;The active primary clock device determines the delay of the slave clock device and itself according to the PTP packet transmitted between the slave clock device and the slave clock device;
    判断该延时与保存的从时钟设备与自身的延时的差是否在设定的第二阈值范围内;Determining whether the difference between the delay and the saved slave clock device and its own delay is within a set second threshold range;
    当所述差超过设定的第二阈值范围时,向所述从时钟设备发送链路变化的通知信息。When the difference exceeds the set second threshold range, the notification information of the link change is sent to the slave clock device.
  4. 如权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, wherein the method further comprises:
    主用主时钟设备根据与从时钟设备之间多次传输的PTP报文,确定每次从时钟设备与自身之间的延时;The active primary clock device determines the delay between each slave clock device and itself according to the PTP message transmitted multiple times with the slave clock device;
    当连续预设次数延时之间的差位于设定的第三阈值范围之内时,所述主用主时钟设备停止向从时钟设备发送通知信息,并针对所述从时钟设备更新其对应的延时。When the difference between consecutive preset number of times delays is within a set third threshold range, the primary master clock device stops transmitting notification information to the slave clock device and updates its corresponding for the slave clock device Delay.
  5. 如权利要求1所述的方法,其特征在于,所述确定其他备用主时钟设备和自身间的主从时钟偏差值包括:The method of claim 1 wherein said determining a master-slave clock offset value between the other alternate master clock device and itself comprises:
    所述从时钟设备根据基于BMC算法,确定出的各主时钟设备的优先级,按照各备用主时钟设备的优先级,依次确定每个备用主时钟设备和自身间的主从时钟偏差值。 The slave clock device sequentially determines the master-slave clock offset value between each slave master clock device and itself according to the priority of each master clock device according to the priority of each master clock device determined according to the BMC algorithm.
  6. 一种SDH网络中的时钟同步系统,其特征在于,所述系统包括:从时钟设备和通过不同的对时通道与所述从时钟对时的主时钟设备;A clock synchronization system in an SDH network, characterized in that the system comprises: a slave clock device and a master clock device when the slave clock is paired through different time channels;
    从时钟设备,用于根据与主时钟设备之间传输的PTP同步报文,及保存的主用主时钟设备到自身的延时Delay0,确定主用主时钟设备和自身间的主从时钟偏差值offset0;判断该主从时钟偏差值offset0是否在设定的第一阈值范围内;当其在设定的第一阈值范围内时,根据针对该主用主时钟设备保存的该主从时钟偏差值进行对时;否则,确定其他备用主时钟设备和自身间的主从时钟偏差值,并确定该主从时钟偏差值在设定的第一阈值范围内时,根据针对该备用主时钟设备保存的该主从时钟偏差值进行对时;The slave clock device is configured to determine a master-slave clock offset value between the master master clock device and itself according to the PTP synchronization message transmitted between the primary clock device and the saved primary master clock device to its own delay Delay0. Offset0; determining whether the master-slave clock offset value offset0 is within a set first threshold range; when it is within the set first threshold range, according to the master-slave clock offset value saved for the master master clock device Performing the counterclockwise; otherwise, determining the master-slave clock offset value between the other standby master clock device and itself, and determining that the master-slave clock bias value is within the set first threshold range, according to the saved for the standby master clock device The master-slave clock bias value is timed;
    各主时钟设备,用于与所述从时钟设备进行PTP同步报文的传输。Each master clock device is configured to perform PTP synchronization packet transmission with the slave clock device.
  7. 如权利要求6所述的系统,其特征在于,所述从时钟设备,还用于与所述主用主时钟设备多次传输PTP同步报文;根据所述多次PTP同步报文,确定每次所述主用主时钟设备与自身的延时;当连续预设次数延时的差的绝对值位于设定的延时阈值范围内时,针对所述主用主时钟设备更新其对应的延时。The system according to claim 6, wherein the slave clock device is further configured to transmit a PTP synchronization message to the primary master clock device multiple times; and determine, according to the multiple PTP synchronization message, each The time delay of the primary master clock device and itself; when the absolute value of the difference of the preset preset number of delays is within the set delay threshold range, updating the corresponding delay for the primary master clock device Time.
  8. 如权利要求6所述的系统,其特征在于,所述主时钟设备,还用于根据与从时钟设备之间传输的PTP报文,确定从时钟设备与自身的延时;判断该延时与保存的从时钟设备与自身之间的延时的差是否在设定的第二阈值范围内;当所述差超过设定的第二阈值范围时,向所述从时钟设备发送链路变化的通知信息。The system according to claim 6, wherein the master clock device is further configured to determine a delay of the slave clock device and itself according to a PTP message transmitted between the slave clock device; and determine the delay and Whether the difference of the delay between the saved slave clock device and itself is within a set second threshold range; when the difference exceeds the set second threshold range, sending a link change to the slave clock device Notification information.
  9. 如权利要求8所述的系统,其特征在于,所述主时钟设备,还用于根据与从时钟设备之间多次传输的PTP报文,确定每次从时钟设备与自身之间的延时;当连续预设次数延时之间的差位于设定的第三阈值范围之内时,所述主用主时钟设备停止向从时钟设备发送通知信息,并针对所述从时钟设备更新其对应的延时。The system according to claim 8, wherein the master clock device is further configured to determine a delay between each slave clock device and itself according to a PTP message transmitted multiple times with the slave clock device. When the difference between successive preset number of times delays is within a set third threshold range, the primary master clock device stops transmitting notification information to the slave clock device and updates its correspondence with the slave clock device Delay.
  10. 如权利要求6所述的系统,其特征在于,所述从时钟设备,具体用于根据基于BMC算法,确定出的各主时钟设备的优先级,按照各备用主时钟设备的优先级,依次确定每个备用主时钟设备和自身间的主从时钟偏差值。 The system according to claim 6, wherein the slave clock device is specifically configured to sequentially determine the priority of each master clock device according to the priority of each standby master clock device according to the BMC algorithm. The master-slave clock offset value between each alternate master clock device and itself.
PCT/CN2015/071528 2014-12-31 2015-01-26 Method and system for synchronizing clocks in sdh network WO2016106908A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410857121.8 2014-12-31
CN201410857121.8A CN104579534B (en) 2014-12-31 2014-12-31 Clock synchronizing method and system in a kind of SDH network

Publications (1)

Publication Number Publication Date
WO2016106908A1 true WO2016106908A1 (en) 2016-07-07

Family

ID=53094847

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/071528 WO2016106908A1 (en) 2014-12-31 2015-01-26 Method and system for synchronizing clocks in sdh network

Country Status (2)

Country Link
CN (1) CN104579534B (en)
WO (1) WO2016106908A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355569A (en) * 2020-02-27 2020-06-30 无锡华云数据技术服务有限公司 Time synchronization method, device, system, node and readable storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112715019B (en) * 2018-09-21 2022-07-08 三菱电机株式会社 Communication device, communication system, communication method, and computer-readable recording medium
CN113574826B (en) 2019-03-11 2023-06-02 华为技术有限公司 Method and device for synchronizing messages by interactive clock
TWI748902B (en) * 2020-05-19 2021-12-01 瑞昱半導體股份有限公司 Control method and time aware bridge device for seamless precision time protocol
CN112039719B (en) * 2020-07-20 2022-07-12 河北汉光重工有限责任公司 PTP clock synchronization precision testing method for linux system
CN114650113A (en) * 2020-12-18 2022-06-21 华为技术有限公司 Method and device for selecting clock source
CN113206719B (en) * 2021-03-16 2023-04-11 网络通信与安全紫金山实验室 Clock synchronization method, system and storage medium based on SDN master clock
CN114362866A (en) * 2021-11-25 2022-04-15 北京卓越信通电子股份有限公司 Hot standby system of time synchronization master clock of TSN network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103001720A (en) * 2012-11-12 2013-03-27 中兴通讯股份有限公司 Time synchronization method and device
CN103188064A (en) * 2011-12-28 2013-07-03 中兴通讯股份有限公司 Clock synchronization method and clock synchronization device
CN103312428A (en) * 2013-05-23 2013-09-18 华为技术有限公司 Method and device used for precise clock protocol synchronous network
CN104113386A (en) * 2014-07-09 2014-10-22 北京东土科技股份有限公司 Method and device for monitoring Ethernet clock synchronization

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227246A (en) * 2008-01-28 2008-07-23 中兴通讯股份有限公司 Method and apparatus for master-salve clock synchronization
CN102291232B (en) * 2011-09-01 2017-04-12 中兴通讯股份有限公司 Clock synchronization method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188064A (en) * 2011-12-28 2013-07-03 中兴通讯股份有限公司 Clock synchronization method and clock synchronization device
CN103001720A (en) * 2012-11-12 2013-03-27 中兴通讯股份有限公司 Time synchronization method and device
CN103312428A (en) * 2013-05-23 2013-09-18 华为技术有限公司 Method and device used for precise clock protocol synchronous network
CN104113386A (en) * 2014-07-09 2014-10-22 北京东土科技股份有限公司 Method and device for monitoring Ethernet clock synchronization

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355569A (en) * 2020-02-27 2020-06-30 无锡华云数据技术服务有限公司 Time synchronization method, device, system, node and readable storage medium
CN111355569B (en) * 2020-02-27 2024-01-09 华云数据控股集团有限公司 Time synchronization method, device, system, node and readable storage medium

Also Published As

Publication number Publication date
CN104579534A (en) 2015-04-29
CN104579534B (en) 2017-10-10

Similar Documents

Publication Publication Date Title
WO2016106908A1 (en) Method and system for synchronizing clocks in sdh network
US11838110B2 (en) Method of remotely monitoring the timing performance of a PTP slave
US9923656B2 (en) Methods, systems, and computer readable media for testing recovered clock quality
CN104113386B (en) It is a kind of to monitor the synchronous method and device of ethernet clock
CN105680973B (en) The method for synchronizing time of free-running node in avionic device network
CA2675644C (en) Facilitating recovery in a coordinated timing network
US9876596B2 (en) Method and device for detecting fault in synchronization link
EP2770678A1 (en) Clock synchronization method and system in 1588-2008 protocol
WO2013023530A1 (en) Implementation method and device for automatically detecting asymmetry time delay of 1588 link
WO2008092764A1 (en) Facilitating synchronization of servers in a coordinated timing network
CN108599888A (en) A kind of distributed network clock synchronizing system
US10320507B2 (en) Method for determining a propagation time of a telegram in a communication network, and corresponding network components
WO2008092781A2 (en) Defining a stratum-1 configuration in a coordinated timing network
US20160095078A1 (en) Ring-shaped synchronous network system and time slave station
CN104243079A (en) Microsecond clock synchronization method for real-time Ethernet
WO2018099375A1 (en) Synchronization method, synchronization device, synchronization apparatus and communication system
CN106647228B (en) Converter station master clock fault judgment system
JP2015179999A (en) Time synchronization device, backup device therefor and time synchronization system
CN114258126A (en) Data processing method and device
JP6021233B2 (en) Synchronization method and synchronization device for synchronizing devices connected to a communication network
WO2022151993A1 (en) Method, device and system for detecting time synchronization performance
EP3068076A1 (en) Automatic determination of asymmetrical delay in transmission networks
JP2011151530A (en) Synchronization method of communication system, communication system, and master station
US10931434B2 (en) Relay apparatus, communication system, and failure detection method
US11445341B2 (en) Dynamic weighing device

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

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

Country of ref document: EP

Kind code of ref document: A1