WO2014086254A1 - 时钟保护方法、系统和相关普通时钟设备 - Google Patents

时钟保护方法、系统和相关普通时钟设备 Download PDF

Info

Publication number
WO2014086254A1
WO2014086254A1 PCT/CN2013/088328 CN2013088328W WO2014086254A1 WO 2014086254 A1 WO2014086254 A1 WO 2014086254A1 CN 2013088328 W CN2013088328 W CN 2013088328W WO 2014086254 A1 WO2014086254 A1 WO 2014086254A1
Authority
WO
WIPO (PCT)
Prior art keywords
ptp
slave
passive
port
ptp port
Prior art date
Application number
PCT/CN2013/088328
Other languages
English (en)
French (fr)
Inventor
王勇
张迪
李玲
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2014086254A1 publication Critical patent/WO2014086254A1/zh

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/0685Clock or time synchronisation in a node; Intranode synchronisation
    • H04J3/0688Change 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

  • a typical PTP device includes: an ordinary clock (English name is ordinary clock, hereinafter referred to as 0C), a boundary clock (English name is boundary clock, hereinafter referred to as BC), and an end-to-end transparent clock (English name is end-to-end).
  • 0C ordinary clock
  • BC boundary clock
  • end-to-end transparent clock English name is end-to-end
  • Transparent clock point-to-point transparent clock
  • management node English name is called management node
  • a logical access point for PTP communication is called a PTP port.
  • 0C can only have one PTP port
  • BC can have multiple PTP ports.
  • the PTP port status includes the following: Table 1.
  • Passive in English is passive.
  • the port can only process some specified types of packets, such as management packets in response to other management messages.
  • Uncalibrated (in English) This is a transient state when the primary clock port is selected and the local clock port is about to be synchronized to the uncal ibrated state of the selected primary clock port.
  • the port From (English full name slave) in slave state, the port will be synchronized to the selected master clock port
  • the above PTP port can be state-converted by running a state machine (English full name state machine).
  • 0C is designed to be only a slave (slave-only) clock or not only as a slave (non-slave-only) clock.
  • slave-only 0C when the PTP port status is triggered for conversion, the slave-only state machine shown in Figure 1 is running. In the slave-only state machine, the master pre-master and passive are clipped. That is, when slave-only 0C is working normally, the PTP port status can only be slave or listening.
  • the PTP port status when the PTP port status is triggered for conversion, it runs the full state machine as shown in Figure 2.
  • the PTP port status includes all of the states in Table 1 above.
  • the PTP port status may be master, slave, or other status.
  • the embodiments of the present invention provide a clock protection method, a system, a non-slave-only OC device, and a slave-only OC device to provide protection for the clock of the OC device.
  • One aspect of the present invention provides a clock protection method, including:
  • Running a slave-only extended full state machine determining that one of the at least two PTP ports is a slave PTP port, and the other is a passive PTP port;
  • the slave-only extended full-state state machine determines that one of the at least two PTP ports is a slave PTP port, and the other is a passive PTP port, including:
  • the recommended status of the at least two PTP ports is obtained; Correction page (Article 91) According to the recommended state, the slave-only extended full state machine is run to determine the slave PTP port and the passive PTP port.
  • determining a new slave PTP port in the passive PTP port includes:
  • the BMC algorithm is used to obtain the recommended state of the multiple passive PTP ports.
  • the slave-only extended full state machine is run to determine a new slave PTP port.
  • a clock protection method including:
  • Running a full state machine or a non-slave-only extended full state machine determining that one of the at least two PTP ports is a master PTP port, and the other is a passive PTP port;
  • the running full state machine or the non-slave-only extended full state machine determines that one of the at least two PTP ports is a master PTP port, and the others are passive PTP ports, including:
  • the full state machine is run to determine the master PTP port and the passive PTP port.
  • the running full state machine or the non-slave-only extended full state machine determines that one of the at least two PTP ports is a master PTP port, and the others are passive PTP ports, including:
  • the non-slave-only extended full state machine is operated to determine the master PTP port and the passive PTP port.
  • determining a new master PTP port in the passive PTP port includes:
  • the full state machine is run to determine a new master PTP port.
  • determining a new master PTP port in the passive PTP port includes:
  • the non-slave-only extended full state machine is operated to determine a new master PTP port.
  • a still further aspect of the present invention provides a clock protection system, including: a non-slave-only 0C device and a slave-only OC device, the non-slave-only OC device enabling at least two PTP ports, one of which is a master PTP port, the other is a passive PTP port; the slave-only 0C device enables at least two PTP ports, one of which is a slave PTP port and the other is a passive PTP port;
  • the slave-only 0C device receives the PTP packet sent by the non-slave-only 0C device through the master PTP port through the slave PTP port.
  • a new master PTP port is determined in the passive PTP port of the non-slave-only 0C device; when the slave PTP port of the slave-only 0C device In the event of a failure, the new slave PTP port is determined in the passive PTP port of the slave-only 0C device.
  • slave-only 0C device including:
  • a first PTP port enabling module configured to enable at least two PTP ports on the slave-only 0C device
  • a first state determining module configured to run a slave-only extended full-state state machine, determine the at least two One of the PTP ports is a slave PTP port, and the other is a passive PTP port.
  • the first protection module is configured to determine a new slave PTP port in the passive PTP port when the slave PTP port fails.
  • the first state determining module includes:
  • a first algorithm unit configured to obtain a recommended state of the at least two PTP ports by using a BMC algorithm, where the first determining unit is configured to run a slave-only extended full-state state machine according to the recommended state of the at least two PTP ports Determining the slave PTP port and the passive PTP port.
  • the first protection module includes:
  • a second algorithm unit configured to use a BMC algorithm to obtain a recommended state of the multiple passive PTP ports when a slave PTP port fails;
  • the first update unit is configured to run a slave-only extended full state machine according to the recommended state of the multiple passive PTP ports to determine a new slave PTP port.
  • a non-slave-only 0C device including:
  • a second PTP port enable module configured to enable at least two PTP ends on the non-slave-only 0C device
  • a second state determining module configured to run a full state machine or extend a non-slave-only full state machine, and determine that one of the at least two PTP ports is a master PTP port, and the other is a passive PTP port;
  • a second protection module configured to determine a new master PTP port in the passive PTP port when the master PTP port fails.
  • the second state determining module includes:
  • a third algorithm unit configured to use a partial state determining algorithm to obtain a recommended state of the at least two PTP ports, where the recommended state is master or passive;
  • a second determining unit configured to run a full state machine according to the recommended state of the at least two PTP ports, and determine a master PTP port and a passive PTP port.
  • the second state determining module includes:
  • a fourth algorithm unit configured to obtain a recommended state of the at least two PTP ports by using a BMC algorithm
  • a third determining unit configured to run a non-slave-only extension according to a recommended state of the at least two PTP ports State machine, determine the master PTP port and the passive PTP port.
  • the second protection module includes:
  • a fifth algorithm unit configured to use a partial state determination algorithm to obtain a recommended state of the passive PTP port, where the recommended state is master or passive;
  • a second update unit configured to run a full state machine according to the recommended state of the passive PTP port, and determine a new master PTP port.
  • the second protection module includes:
  • a sixth algorithm unit configured to obtain a recommended state of the passive PTP port by using a BMC algorithm
  • a third update unit configured to run a non-slave-only extended full state machine according to the recommended state of the passive PTP port, and determine New master PTP port.
  • Figure 1 is a schematic diagram of a slave-only state machine
  • Figure 2 is a schematic diagram of a full state machine
  • FIG. 3 is a schematic flowchart of a clock protection method according to an embodiment of the present invention.
  • Figure 4 is a schematic flow chart of the state determination algorithm
  • FIG. 5 is a schematic flowchart of a specific implementation process of an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a slave-only extended full-state state machine according to an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a specific implementation process of 103 in an embodiment of the present invention.
  • FIG. 8 is a schematic flowchart of a clock protection method according to another embodiment of the present invention.
  • FIG. 9 is a schematic flowchart of a specific implementation process of 202 in an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a partial state determination algorithm according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of still another specific implementation process of 202 in an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of a non-slave-only extended full-state state machine according to an embodiment of the present invention
  • FIG. 13 is a schematic diagram of a specific implementation process of a 203 according to an embodiment of the present invention.
  • FIG. 14 is a schematic diagram of still another specific implementation process of 203 according to an embodiment of the present invention.
  • FIG. 15 is a schematic diagram of a clock protection system according to an embodiment of the present invention.
  • FIG. 16 to FIG. 18 are schematic diagrams of a slave-only 0C device according to an embodiment of the present invention
  • FIG. 19 to FIG. 23 are schematic diagrams of a non-slave-only 0C device according to still another embodiment of the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • An embodiment of the present invention provides a clock protection method. As shown in FIG. 3, the method includes:
  • the at least two PTP ports are enabled, and the at least two ports of the slave-only 0C are enabled to receive/transmit PTP packets.
  • the PTP port status can be the initial state in Table 1, and then the PTP port status is converted to the listening status in Table 1.
  • Step 102 Run a slave-only extended full-state state machine, determine that one of the at least two PTP ports is a slave PTP port, and the other is a passive PTP port.
  • the PTP port with a status of slave is called For the "slave PTP port”
  • the PTP port with the status of passive is called "passive PTP port”.
  • the running state machine, the transition PTP port state may occur naturally or may be triggered by an event. There are many events that can trigger the PTP port to run the state machine for state transitions.
  • These events include but are not limited to: Power-on event (English full name powerup event): Power on the device or restart the device;
  • Initialization event English full name initial ize event: Received initialization management message (English full name initial ize management Message ) Specifies the enable event (English name designatecLenabled event): Receives the enable port management message (English is the enable-port management message); specifies the disable event (English name designatecdisabled event): Received The port management message is not enabled (English is the disable-port management message); the fault clearing event (English full name is fault-cleared event): The fault condition that affects the normal operation of the port is cleared; the fault detection event (English full name Fault-detected event ) : An internal condition that affects the normal operation of the port; a state-determining event (English name: state-decision-event): Receives an announcement message, and uses the optimal master clock based on the data carried in the announcement message.
  • the r clock determines the optimal master clock and determines if the local port needs to change state.
  • the BMC algorithm consists of two parts, one part is a data set comparison algorithm, which is used to determine which of the two clock ports is better. The other part is the state decision
  • the method is used to calculate the recommended state of the port (in English), as shown in Figure 4; where Erbest represents the data set of the optimal clock on a certain PTP port, DO represents the default data set of the device, and Ebest represents The optimal clock data set in Erbest for all ports.
  • the recommended status event (English referred to as the introduced state event): The state determines the recommended status of the BMC calculated by the event.
  • the announcement of the receiving timeout period expires (in English, pronounced_receipt_timeout_expires event): Within the specified timeout period , did not receive an announcement message. Therefore, in the embodiment of the present invention, after at least two PTP ports are enabled on the slave-only 0C, the event may be triggered by any of the above events, and the slave-only extended full state machine is executed to convert the PTP port state. 103. When a slave PTP port fails, determine a new slave PTP port in the passive PTP port.
  • the slave-only 0C may receive a PTP packet sent by the master (which may be a non-slave-only 0C or a BC) through the slave PTP port, to implement a clock for the master. track.
  • the slave PTP port fails, for example, the PTP packet cannot be sent or received, the new slave PTP port is determined in the passive PTP port, so that the master clock can be continuously tracked through the new slave PTP port to implement the pair.
  • the protection of the slave-only 0C clock As shown in FIG. 5, running a slave-only extended full-state state machine, determining that one of the at least two PTP ports is a slave PTP port, and the other is a passive PTP port (102), which may include:
  • 1021 Using a BMC algorithm, obtaining a recommended state of the at least two PTP ports. 1022. Run a slave-only extended full state machine according to the recommended state, and determine a slave PTP port and a passive PTP port.
  • the slave-only extended full state machine is derived based on the full state machine shown in FIG. If the full state machine shown in Figure 2 is running, the final PTP port state may be any of the states in Table 1. If the state of the PTP port of the slave-only 0C is determined to be the master, it will cause other PTP devices to track the wrong clock, which will cause a network clock error. In order to avoid the above situation, in the embodiment of the present invention, as shown in FIG.
  • the slave-only extended full state machine is operated, and when the obtained PTP port status is master or pre-master, it is forcibly converted to Passive.
  • the state of the PTP port of the slave-only 0C being determined to be master or pre-master.
  • determining a new slave PTP port (103) in the passive PTP port includes:
  • Another embodiment of the present invention provides a clock protection method. As shown in FIG. 8, the method includes:
  • Run a full state machine or a non-slave-only extended full state machine determine that one of the at least two PTP ports is a master PTP port, and the other is a passive PTP port; for convenience of description, in the present invention, the state is The PTP port for the master is called the "master PTP port”.
  • the master PTP port fails, determine a new master PTP port in the passive PTP port.
  • the recommended state can only be master or Passive; and run the full state machine as shown in Figure 2 according to the recommended state of the master or passive, the PTP port state can only be master or passive.
  • running a non-slave-only extended full state machine determining that one of the at least two PTP ports is a master PTP port, and the other is a passive PTP port (202), which may be:
  • the non-slave-only extended full state machine is also derived based on the full state machine shown in FIG. As shown in Figure 12, if the obtained PTP port status is slave or uncal ibrated, it is forcibly converted to passive; if the obtained PTP port status is master, compare Erbest with D0, and if Erbest is better than D0, forcibly convert to passive Conversely, if D0 is better than Erbest, the PTP port status is determined to be master.
  • determining a new master PTP port (203) in the passive PTP port may include:
  • determining a new master PTP port (203) in the passive PTP port may include:
  • Non-slave-only 0C clock protection Further, in the embodiment of the present invention, the state of the non-slave-only 0C PTP port can only be master or passive. Therefore, the non-slave-only 0C error is prevented from tracking the clocks of other PTP devices, and the network clock is guaranteed. The accuracy.
  • An embodiment of the present invention further provides a clock protection system. As shown in FIG. 15, the system specifically includes: a non-slave-only 0C device and a slave-only 0C device.
  • the non-slave-only 0C device enables at least two PTP ports, one of which is a master PTP port, and the other is a passive PTP port; for example, a non-slave-only 0C device can perform FIG. 8 or FIG. Or the method shown in Fig. 11 or Fig. 13 or Fig. 14.
  • the slave-only 0C device enables at least two PTP ports, one of which is a slave PTP port and the other is a passive PTP port; for example, the slave-only 0C device can perform the operations shown in FIG. 3 or FIG. 5 or FIG. method.
  • the slave-only 0C device receives the PTP packet sent by the non-slave-only 0C device through the master PTP port through the slave PTP port, so that the clock synchronization of the slave-only 0C device is implemented.
  • Non-slave-only 0C device clock When the master PTP port of the non-slave-only 0C device fails, a new master PTP port is determined in the passive PTP port of the non-slave-only 0C device; when the slave PTP port of the slave-only 0C device In the event of a failure, the new slave PTP port is determined in the passive PTP port of the slave-only 0C device.
  • an intermediate device may exist between the non-slave-only 0C device and the slave-only 0C device, for example, may be a BC device.
  • the intermediate device After receiving the PTP packet sent by the non-slave-only 0C device, the intermediate device synchronizes its own clock to the clock of the non-slave-only 0C device and sends the PTP packet to the slave-only 0C device.
  • the intermediate device may not synchronize its own clock to the clock of the non-slave-only 0C device. In this case, the intermediate device only needs to transparently transmit the PTP packet of the non-slave-only 0C device to the intermediate device.
  • Slave-only 0C device can be.
  • multiple PTP ports are enabled on a non-slave-only 0C device/slave-only 0C device.
  • the slave-only 0C device may include: a first PTP port enable module 301, configured to be in the slave-only 0C.
  • the device is enabled with at least two PTP ports.
  • the first state determining module 302 is configured to run a slave-only extended full state machine, and determine that one of the at least two PTP ports is a slave PTP port, and the other is a passive PTP port.
  • the first protection module 303 is configured to determine a new slave PTP port in the passive PTP port when the slave PTP port fails.
  • the first state determining module 302 may include: a first algorithm unit 3021, configured to obtain a recommended state of the at least two PTP ports by using a BMC algorithm; and a first determining unit 3022, And configured to run a slave-only extended full state machine according to the recommended state of the at least two PTP ports, and determine the slave PTP port and the passive PTP port.
  • the slave-only extended full-state state machine in this embodiment is the slave-only extended full-state state machine shown in FIG. 6.
  • the first protection module 303 may include: a second algorithm unit 3031, when the slave PTP port fails.
  • the BMC algorithm is used to obtain the recommended status of the multiple passive PTP ports.
  • the first update unit 3032 is configured to run a slave-only extended full state machine according to the recommended status of the multiple passive PTP ports to determine a new slave PTP. port.
  • a new slave PTP port is determined in the passive PTP port, thereby implementing a clock to the slave-only 0C device. protection of.
  • the non-slave-only 0C device may include: a second PTP port enable module 401, configured to Enable at least two PTP ports on the non-slave-only 0C device.
  • the second state determining module 402 is configured to run the full state machine or expand the non-slave-only full state machine, determine that one of the at least two PTP ports is a master PTP port, and the other is a passive PTP port; the second protection module 403. Determine, when the master PTP port fails, determine a new master PTP port in the passive PTP port.
  • the second state determining module 402 may include: a third algorithm unit 4021, configured to obtain, by using a partial state determining algorithm, a recommended state of the at least two PTP ports, where the recommendation The state is master or passive; the second determining unit 4022 is configured to run the full state machine according to the recommended state of the at least two PTP ports, and determine the master PTP port and the passive PTP port.
  • the partial state determination algorithm in this embodiment is the partial state determination algorithm shown in FIG.
  • the second state determining module 402 may include: a fourth algorithm unit 4023, configured to obtain a recommended state of the at least two PTP ports by using a BMC algorithm; and a third determining unit 4024 , configured to operate according to a recommended state of the at least two PTP ports
  • the non-slave-only extended full state machine determines the master PTP port and the passive PTP port.
  • the non-slave-only extended full state machine in this embodiment is the non-slave-only extended full state machine shown in FIG.
  • the second protection module 403 may include: a fifth algorithm unit 4031, configured to obtain a recommended state of the passive PTP port by using a partial state determination algorithm, where the recommended state is a master
  • the second update unit 4032 is configured to run the full state machine according to the recommended state of the passive PTP port to determine a new master PTP port.
  • the second protection module 403 may include: a sixth algorithm unit 4033, configured to obtain a recommended state of the passive PTP port by using a BMC algorithm, and a third update unit 4034, configured to: Running according to the recommended state of the passive PTP port
  • the non-slave-only extends the full state machine to determine the new master PTP port.
  • the master PTP port fails, a new master PTP port is determined in the passive PTP port, thereby implementing non-slave-only 0C device clock protection.
  • the device embodiments described above are merely illustrative, and the units/modules described as separate components may be physically separate or may not be physically separate.
  • the component displayed as a unit/module may be a physical unit or may not be a physical unit. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
  • a further embodiment of the present invention further provides a slave-only 0C device, including: a memory and a processor; wherein: the memory is configured to store an instruction; the processor is configured to execute the instruction, where the instruction is used to Enabling at least two PTP ports on the slave-only 0C device; running a slave-only extended full state machine, determining that one of the at least two PTP ports is a slave PTP port, and the other is a passive PTP port; when the slave When the PTP port fails, a new slave PTP port is determined in the passive PTP port.
  • a further embodiment of the present invention further provides a non-slave-only 0C device, including: a memory and a processor; wherein: the memory is configured to store an instruction; the processor is configured to execute the instruction, the instruction For enabling at least two PTP ports on the non-slave-only 0C device; for running a full state machine or extending a non-slave-only extended full state machine, determining one of the at least two PTP ports For the master PTP port, the other is the passive PTP port; when the master PTP port fails, the new master PTP port is determined in the passive PTP port.

Landscapes

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

Abstract

本发明实施例公开了一种时钟保护方法、系统、non-slave-only OC设备和slave-only OC设备。其中,所述时钟保护方法包括:在slave-only OC上使能至少两个PTP端口;运行slave-only扩展全量状态机,确定所述至少两个PTP端口中的一个为slave PTP端口,其他为passive PTP端口;当slave PTP端口出现故障时,在所述passive PTP端口中确定新的slave PTP端口。通过本发明实施例,能够为OC设备的时钟提供保护。

Description

时钟保护方法、 系统和相关普通时钟设备 本申请要求于 2012年 12月 6日提交中国专利局、 申请号为 201210519954. 4、发明 名称为 "时钟保护方法、 系统和相关普通时钟设备"的中国专利申请的优先权, 其全部 内容通过引用结合在本申请中。 技术领域 本发明涉及通信技术领域, 更具体地说, 涉及一种时钟保护方法、 系统和相关普通 时钟设备。 背景技术 精确时间协议 (英文全称为 precision time protocol , 以下简称为 PTP) 是一种 应用于分布式系统的时钟同步协议。 典型的 PTP 设备包括: 普通时钟 (英文全称为 ordinary clock, 以下简称为 0C)、 边界时钟 (英文全称为 boundary clock, 以下简称 为 BC)、 端到端透明时钟 (英文全称为 end-to- end transparent clock), 点到点透明 时钟 (英文全称为 peer- to- peer transparent clock ) 以及管理节点 (英文全称为 management node)o
PTP设备中, PTP通信的逻辑接入点称为 PTP端口。 上述 PTP设备中, 0C仅能有一 个 PTP端口, 而 BC则可以有多个 PTP端口。 如表 1所示, PTP端口状态包括以下几种: 表 1、 PTP端口状态描述
Figure imgf000002_0001
更正页 (细则第 91条) 主 (英文全称为 master) 端口将作为主时钟端口
被动 (英文全称为 passive ) 处于被动状态, 端口只能处理为了响应其他管理报文的管理报文等 一些指定类型的报文
未校 准 ( 英 文 全 称 为 这是一个瞬态, 当主时钟端口被选出, 本地时钟端口即将同步至该 uncal ibrated) 被选出的主时钟端口时的状态
从 (英文全称为 slave) 处于从状态, 端口将同步至被选出的主时钟端口
当受到事件触发时,上述 PTP端口可以通过运行状态机(英文全称为 state machine ) 进行状态转换。
在现有技术中, 0C被设计成仅能作为从属 (英文全称为 slave-only) 时钟或非仅 能作为从属 (英文全称为 non-slave- only) 时钟。
对于 slave-only 0C, 当 PTP端口状态被触发进行转换时, 运行的是如图 1所示的 slave-only状态机。 在该 slave-only状态机中, master pre- master、 passive被裁 剪掉。 即, 在 slave-only 0C正常工作时, PTP端口状态只能是 slave或 listening。
而对于 non-slave-only 0C, 当 PTP端口状态被触发进行转换时, 运行的是如图 2 所示的全量状态机。在该全量状态机中, PTP端口状态包括上述表 1中的所有状态。 g卩, 在 non- slave- only 0C正常工作时, PTP端口状态可能是 master, 也可能是 slave, 也 可能是其他状态。
由于 0C仅能有一个 PTP端口, 因此, 不管是 slave- only 0C,还是 non- slave-only OC, 当该 OC的 PTP端口出现故障时, 都将会导致该 OC的时钟故障。 发明内容
有鉴于此, 本发明实施例提供一种时钟保护方法、 系统、 non- slave-only OC设备 和 slave-only OC设备, 以为 OC设备的时钟提供保护。
本发明的一个方面提供一种时钟保护方法, 包括:
在 slave-only 0C上使能至少两个 PTP端口;
运行 slave-only扩展全量状态机, 确定所述至少两个 PTP端口中的一个为 slave PTP 端口, 其他为 passive PTP端口;
当 slave PTP端口出现故障时, 在所述 passive PTP端口中确定新的 slave PTP端口。 优选的, 所述运行 slave-only扩展全量状态机, 确定所述至少两个 PTP端口中的一 个为 slave PTP端口, 其他为 passive PTP端口, 包括:
使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态; 更正页 (细则第 91条) 根据所述推荐状态,运行 slave-only扩展全量状态机,确定 slave PTP端口和 passive PTP端口。
优选的, 当所述 passive PTP端口有多个时, 所述当 slave PTP端口出现故障时, 在 所述 passive PTP端口中确定新的 slave PTP端口, 包括:
当 slave PTP端口出现故障时, 使用 BMC算法, 得到上述多个 passive PTP端口的推 荐状态;
根据所述推荐状态, 运行 slave-only扩展全量状态机, 确定新的 slave PTP端口。 本发明的又一个方面提供一种时钟保护方法, 包括:
在 non-slave-only 0C上使能至少两个 PTP端口。
运行全量状态机或者 non-slave-only扩展全量状态机, 确定所述至少两个 PTP端口 中的一个为 master PTP端口, 其他为 passive PTP端口;
当 master PTP端口出现故障时, 在所述 passive PTP端口中确定新的 master PTP端 曰。
优选的, 所述运行全量状态机或者 non-slave-only扩展全量状态机, 确定所述至少 两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口, 包括:
使用部分状态决定算法, 得到所述至少两个 PTP端口的推荐状态, 所述推荐状态为 master或者 passive;
根据所述推荐状态, 运行全量状态机, 确定 master PTP端口和 passive PTP端口。 优选的, 所述运行全量状态机或者 non-slave-only扩展全量状态机, 确定所述至少 两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口, 包括:
使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态;
根据所述推荐状态, 运行 non-slave-only扩展全量状态机, 确定 master PTP端口和 passive PTP端口。
优选的, 所述当 master PTP端口出现故障时, 在所述 passive PTP端口中确定新的 master PTP端口, 包括:
使用部分状态决定算法, 得到所述 passive PTP端口的推荐状态, 所述推荐状态为 master或者 passive;
根据所述 passive PTP端口的推荐状态, 运行全量状态机, 确定新的 master PTP端 曰。 优选的, 所述当 master PTP端口出现故障时, 在所述 passive PTP端口中确定新的 master PTP端口, 包括:
使用 BMC算法, 得到所述 passive PTP端口的推荐状态;
根据所述 passive PTP端口的推荐状态, 运行 non-slave-only扩展全量状态机, 确 定新的 master PTP端口。
本发明的又一个方面提供一种时钟保护系统, 包括: non-slave-only 0C设备和 slave-only OC设备, 所述 non-slave-only OC设备使能至少两个 PTP端口, 其中一个为 master PTP端口, 其他为 passive PTP端口; 所述 slave-only 0C设备使能至少两个 PTP 端口, 其中一个为 slave PTP端口, 其他为 passive PTP端口;
所述 slave-only 0C设备通过 slave PTP端口接收所述 non-slave-only 0C设备通过 master PTP端口发送的 PTP报文。
当所述 non-slave-only 0C设备的 master PTP端口出现故障时,在 non-slave-only 0C 设备的 passive PTP端口中确定新的 master PTP端口; 当所述 slave-only 0C设备的 slave PTP端口出现故障时, 在 slave-only 0C设备的 passive PTP端口中确定新的 slave PTP端 口。
本发明的又一个方面提供一种 slave-only 0C设备, 包括:
第一 PTP端口使能模块, 用于在所述 slave-only 0C设备上使能至少两个 PTP端口; 第一状态确定模块, 用于运行 slave-only扩展全量状态机, 确定所述至少两个 PTP 端口中的一个为 slave PTP端口, 其他为 passive PTP端口;
第一保护模块, 用于当 slave PTP端口出现故障时, 在 passive PTP端口中确定新的 slave PTP端口。
优选的, 所述第一状态确定模块, 包括:
第一算法单元, 用于使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态; 第一确定单元, 用于根据所述至少两个 PTP端口的推荐状态, 运行 slave-only扩展 全量状态机, 确定所述 slave PTP端口和所述 passive PTP端口。
优选的, 所述第一保护模块, 包括:
第二算法单元, 用于当 slave PTP端口出现故障时, 使用 BMC算法, 得到上述多个 passive PTP端口的推荐状态;
第一更新单元, 用于根据所述多个 passive PTP端口的推荐状态, 运行 slave-only 扩展全量状态机, 确定新的 slave PTP端口。 本发明的又一个方面提供一种 non-slave-only 0C设备, 包括:
第二 PTP端口使能模块, 用于在所述 non-slave-only 0C设备上使能至少两个 PTP端
Π ;
第二状态确定模块, 用于运行全量状态机或者扩展 non-slave-only全量状态机, 确 定所述至少两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口;
第二保护模块, 用于当 master PTP端口出现故障时, 在所述 passive PTP端口中确 定新的 master PTP端口。
优选的, 所述第二状态确定模块包括:
第三算法单元, 用于使用部分状态决定算法, 得到所述至少两个 PTP端口的推荐状 态, 所述推荐状态为 master或者 passive;
第二确定单元, 用于根据所述至少两个 PTP端口的推荐状态, 运行全量状态机, 确 定 master PTP端口和 passive PTP端口。
优选的, 所述第二状态确定模块包括:
第四算法单元, 用于使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态; 第三确定单元, 用于根据所述至少两个 PTP端口的推荐状态, 运行 non-slave-only 扩展全量状态机, 确定 master PTP端口和 passive PTP端口。
优选的, 所述第二保护模块包括:
第五算法单元, 用于使用部分状态决定算法, 得到所述 passive PTP端口的推荐状 态, 所述推荐状态为 master或者 passive;
第二更新单元, 用于根据所述 passive PTP端口的推荐状态, 运行全量状态机, 确 定新的 master PTP端口。
优选的, 所述第二保护模块包括:
第六算法单元, 用于使用 BMC算法, 得到所述 passive PTP端口的推荐状态; 第三更新单元, 用于根据所述 passive PTP端口的推荐状态, 运行 non-slave-only 扩展全量状态机, 确定新的 master PTP端口。 本发明实施例通过在 non-slave-only OC/slave-only 0C上使能多个 PTP端口, 当 master/slave PTP端口出现故障时, 在 passive PTP端口中确定新的 master /slave PTP 端口, 从而实现对 0C的时钟的保护。 附图说明 为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技术描述中所 需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实 施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些 附图获得其他的附图。
图 1为 slave-only状态机示意图;
图 2为全量状态机示意图;
图 3为本发明一个实施例提供的一种时钟保护方法流程示意图;
图 4为状态决定算法流程示意图;
图 5为本发明一个实施例中 102的一种具体实现流程示意图;
图 6为本发明一个实施例提供的 slave-only扩展全量状态机示意图;
图 7为本发明一个实施例中 103的一种具体实现流程示意图;
图 8为本发明又一个实施例提供的一种时钟保护方法流程示意图;
图 9为本发明一个实施例中 202的一种具体实现流程示意图;
图 10为本发明一个实施例提供的部分状态决定算法示意图;
图 11为本发明一个实施例中 202的又一种具体实现流程示意图;
图 12为本发明一个实施例提供的 non-slave-only扩展全量状态机示意图; 图 13为本发明一个实施例中 203的一种具体实现流程示意图;
图 14为本发明一个实施例中 203的又一种具体实现流程示意图;
图 15为本发明的一个实施例提供的一种时钟保护系统示意图;
图 16〜图 18为本发明的一个实施例提供的一种 slave-only 0C设备示意图; 图 19〜图 23为本发明的又一个实施例提供的一种 non-slave-only 0C设备示意图。 具体实施方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整 地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基 于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有 其他实施例, 都属于本发明保护的范围。 本发明的一个实施例提供一种时钟保护方法, 如图 3所示, 该方法包括:
101、 在 slave-only 0C上使能至少两个 PTP端口。 可选的,在本发明的实施例中,使能至少两个 PTP端口,可以为:使能所述 slave-only 0C的至少两个端口对 PTP报文的收 /发功能。 刚使能的时候, PTP端口状态可以是表 1中的 初始状态, 然后 PTP端口状态会转换成表 1中的监听状态。
102、运行 slave-only扩展全量状态机,确定所述至少两个 PTP端口中的一个为 slave PTP端口, 其他为 passive PTP端口; 为便于描述, 在本发明中, 将状态为 slave的 PTP端口称为 " slave PTP端口" , 将 状态为 passive的 PTP端口称为 "passive PTP端口" 。 在本发明的实施例中, 运行状态机, 转换 PTP端口状态可以是自然发生, 也可以是 由事件触发。 有很多事件能够触发 PTP端口运行状态机, 进行状态转换。 这些事件包括 但不限于: 上电事件 (英文全称为 powerup event ) : 开启设备的电源或者重启设备; 初始化事件 (英文全称为 initial ize event ) : 接收到初始化管理报文 (英文全称 为 initial ize management message ) 指定使能事件 (英文全称为 designatecLenabled event ) : 接收到使能端口管理报 文 (英文全禾尔为 enable—port management message ) ; 指定不使能事件 (英文全称为 designatecLdisabled event ) : 接收到不使能端口 管理报文 (英文全禾尔为 disable—port management message ) ; 故障清除事件 (英文全称为 fault—cleared event ) : 影响端口正常运行的故障条 件被清除; 故障检测事件 (英文全称为 fault—detected event ) : 发生了影响端口正常运行的 内部条件; 状态决定事件(英文全称为 state—decision—event ) : 收到宣告报文, 根据宣告报 文中携带的数据, 使用最优主时钟 (英文全称为 best master clock, 以下简称为 BMC) 算法, 确定最优主时钟以及确定本地端口是否需要改变状态。 BMC算法包括两部分, 一 部分是数据集比较算法, 用于确定两个时钟端口哪一个比较好。 另一部分是状态决定算 法, 用于计算端口的推荐状态 (英文全称为 recommended state ) , 如图 4所示; 其中, Erbest表示在某一个 PTP端口上, 最优时钟的数据集, DO表示设备默认数据集, Ebest表 示在所有端口的 Erbest中, 最优的时钟的数据集。 推荐状态事件 (英文全称为 ecommended state event ) : 状态决定事件使用的 BMC 计算得到的推荐状态弓 I发本事件; 宣告接收超时时间到期事件 (英文全称为 announce_receipt_timeout_expires event ) : 在指定的超时时间内, 没有收到宣告报文。 因此, 在本发明的实施例中, 在 slave-only 0C上使能至少两个 PTP端口后, 可能受 到上述任意一种事件的触发, 运行 slave-only扩展全量状态机, 转换 PTP端口状态。 103、 当 slave PTP端口出现故障时, 在所述 passive PTP端口中确定新的 slave PTP 端口。 本发明实施例中, 所述 slave-only 0C可以通过 slave PTP端口接收 master (可以是 non-slave-only 0C, 或者也可以是 BC) 发送的 PTP报文, 以实现对所述 master的时钟的 跟踪。 当 slave PTP端口出现故障, 如: 无法收发 PTP报文时, 在所述 passive PTP端口 中确定新的 slave PTP端口, 从而, 可以继续通过新的 slave PTP端口跟踪所述 master的 时钟, 以实现对所述 slave-only 0C的时钟的保护。 可选的, 如图 5所示, 运行 slave-only扩展全量状态机, 确定所述至少两个 PTP端口 中的一个为 slave PTP端口, 其他为 passive PTP端口 (102 ) , 可以包括:
1021、 使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态; 1022、 根据所述推荐状态, 运行 slave-only扩展全量状态机, 确定 slave PTP端口 和 passive PTP端口。 在本发明的实施例中, slave-only扩展全量状态机是基于图 2所示的全量状态机得 到的。 如果运行的是图 2所示的全量状态机, 最终的 PTP端口状态可能是表 1中的任意一 种状态。 如果 slave-only 0C的 PTP端口状态被确定成 master, 会导致其他 PTP设备跟踪 到错误的时钟, 将引起网络时钟的错误。 为了避免上述情况的出现,在本发明的实施例中,如图 6所示,运行的是 slave-only 扩展全量状态机, 当得到的 PTP端口状态是 master或 pre-master时, 均强制转换为 passive。 以避免 slave-only 0C的 PTP端口状态被确定成 master或 pre- master。 可选的, 如图 7所示, 如果 102中确定的 passive PTP端口有多个, 则当 slave PTP端 口出现故障时, 在所述 passive PTP端口中确定新的 slave PTP端口 (103 ) 包括:
1031、 当 slave PTP端口出现故障时, 使用 BMC算法, 得到上述多个 passive PTP端 口的推荐状态;
1032、 根据所述上述多个 passive PTP端口的推荐状态, 运行 slave-only扩展全量 状态机, 确定新的 slave PTP端口。 本发明实施例中通过在 slave-only 0C上使能多个 PTP端口, 当 slave PTP端口出现 故障时, 在 passive PTP端口中确定新的 slave PTP端口, 从而实现对 slave-only 0C的 时钟的保护。
本发明的另一个实施例提供一种时钟保护方法, 如图 8所示, 该方法包括:
201、 在 non-slave-only 0C上使能至少两个 PTP端口。
202、 运行全量状态机或者 non-slave-only扩展全量状态机, 确定所述至少两个 PTP 端口中的一个为 master PTP端口, 其他为 passive PTP端口; 为便于描述, 在本发明中, 将状态为 master的 PTP端口称为 "master PTP端口" 。
203、当 master PTP端口出现故障时,在所述 passive PTP端口中确定新的 master PTP 端口。 可选的,如图 9所示,运行全量状态机,确定所述至少两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口 ( 202 ) , 可以是: 2021、 使用部分状态决定算法, 得到所述至少两个 PTP端口的推荐状态, 所述推荐 状态为 master或者 passive;
2022、 根据所述推荐状态, 运行全量状态机, 确定 master PTP端口和 passive PTP 端口。 在本发明的实施例中, 如图 10所示的部分状态决定算法是图 4所示的状态决定算法 的一个分支 (D0=广 127分支) , 在这个分支中, 推荐状态只能为 master或者 passive; 而根据 master或者 passive的推荐状态运行如图 2所示的全量状态机, PTP端口状态就只 能是 master或者是 passive。 可选的,如图 11所示,运行 non-slave-only扩展全量状态机,确定所述至少两个 PTP 端口中的一个为 master PTP端口, 其他为 passive PTP端口 (202 ) , 可以是:
2023、 使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态;
2024、 根据所述推荐状态, 运行 non-slave-only扩展全量状态机, 确定 master PTP 端口和 passive PTP端口。 在本发明的实施例中, non-slave-only扩展全量状态机也是基于图 2所示的全量状 态机得到的。 如图 12所示, 如果得到的 PTP端口状态为 slave或者 uncal ibrated, 则强制 转换为 passive; 如果得到的 PTP端口状态为 master, 则比较 Erbest与 D0, 如果 Erbest优 于 D0, 则强制转换为 passive, 反之, 如果 D0优于 Erbest, PTP端口状态确定为 master。 可选的, 如图 13所示, 如果 202中确定的 passive PTP端口有多个, 则当 master PTP 端口出现故障时, 在所述 passive PTP端口中确定新的 master PTP端口 (203 )可以包括:
2031、 使用部分状态决定算法, 得到所述 passive PTP端口的推荐状态, 所述推荐 状态为 master或者 passive;
2032、根据所述 passive PTP端口的推荐状态,运行全量状态机,确定新的 master PTP 端口。 可选的, 如图 14所示, 如果 202中确定的 passive PTP端口有多个, 则当 master PTP 端口出现故障时, 在所述 passive PTP端口中确定新的 master PTP端口 (203 )可以包括:
2033、 使用 BMC算法, 得到所述 passive PTP端口的推荐状态;
2034、 根据所述 passive PTP端口的推荐状态, 运行 non-slave-only扩展全量状态 机, 确定新的 master PTP端口。 本发明实施例中通过在 non-slave-only 0C上使能多个 PTP端口, 当 master PTP端口 出现故障时, 在 passive PTP端口中确定新的 master PTP端口, 从而实现对
non-slave-only 0C的时钟的保护。进一步的, 由于本发明实施例中, non-slave-only 0C 的 PTP端口状态只能为 master或者 passive, 因此, 避免了 non-slave-only 0C错误的跟 踪其他 PTP设备的时钟, 保证了网络时钟的准确性。 本发明的一个实施例还提供了一种时钟保护系统, 如图 15所示, 该系统具体包括: non-slave-only 0C设备和 slave-only 0C设备。 其中: 所述 non-slave-only 0C设备使能至少两个 PTP端口, 其中一个为 master PTP端口, 其他为 passive PTP端口; 示例性的, non-slave-only 0C设备可以执行图 8或图 9或图 11或图 13或图 14所示的 方法。
所述 slave-only 0C设备使能至少两个 PTP端口, 其中一个为 slave PTP端口, 其他 为 passive PTP端口; 示例性的, slave-only 0C设备可以执行图 3或图 5或图 7所示的方法。 所述 slave-only 0C设备通过 slave PTP端口接收所述 non-slave-only 0C设备通过 master PTP端口发送的 PTP报文, 以实现 slave-only 0C设备的时钟同步至
non-slave-only 0C设备的时钟。 当所述 non-slave-only 0C设备的 master PTP端口出现故障时,在 non-slave-only 0C 设备的 passive PTP端口中确定新的 master PTP端口; 当所述 slave-only 0C设备的 slave PTP端口出现故障时, 在 slave-only 0C设备的 passive PTP端口中确定新的 slave PTP端 曰。 可选的, 在图 15所示的系统中, non-slave-only 0C设备和 slave-only 0C设备之间 还可以存在中间设备, 例如, 可以是 BC设备。 中间设备接收到 non-slave-only 0C设备 发送的 PTP报文后, 将自身的时钟同步至 non-slave-only 0C设备的时钟, 并将 PTP报文 发送给 slave-only 0C设备。 可选的, 上述中间设备也可以不将自身的时钟同步至 non-slave-only 0C设备的时 钟, 这种情况下, 中间设备只需将 non-slave-only 0C设备的 PTP报文透传给 slave-only 0C设备即可。 本发明实施例中通过在 non-slave-only 0C设备 /slave-only 0C设备上使能多个 PTP 端口, 当 master /slave PTP端口出现故障时, 在 passive PTP端口中确定新的 master /slave PTP端口, 从而实现对 0C设备的时钟的保护。 本发明的一个实施例还提供了一种 slave-only 0C设备,如图 16所示,该 slave-only 0C设备可以包括: 第一 PTP端口使能模块 301,用于在所述 slave-only 0C设备上使能至少两个 PTP端口; 第一状态确定模块 302, 用于运行 slave-only扩展全量状态机, 确定所述至少两个 PTP端口中的一个为 slave PTP端口, 其他为 passive PTP端口; 第一保护模块 303, 用于当 slave PTP端口出现故障时, 在 passive PTP端口中确定 新的 slave PTP端口。 可选的, 如图 17所示, 上述第一状态确定模块 302可以包括: 第一算法单元 3021, 用于使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态; 第一确定单元 3022, 用于根据所述至少两个 PTP端口的推荐状态, 运行 slave-only 扩展全量状态机, 确定所述 slave PTP端口和所述 passive PTP端口。 本实施例中的 slave-only扩展全量状态机即为图 6所示的 slave-only扩展全量状态 机。
可选的, 如图 18所示, 如果第一状态确定模块 302确定的 passive PTP端口有多个, 则第一保护模块 303可以包括: 第二算法单元 3031, 用于当 slave PTP端口出现故障时, 使用 BMC算法, 得到上述多 个 passive PTP端口的推荐状态; 第一更新单元 3032, 用于根据所述多个 passive PTP端口的推荐状态, 运行 slave-only扩展全量状态机, 确定新的 slave PTP端口。 本发明实施例中通过在 slave-only 0C设备上使能多个 PTP端口, 当 slave PTP端口 出现故障时, 在 passive PTP端口中确定新的 slave PTP端口, 从而实现对 slave-only 0C 设备的时钟的保护。
本发明的一个实施例还提供了一种 non-slave-only 0C设备, 如图 19所示, 该 non-slave-only 0C设备可以包括: 第二 PTP端口使能模块 401, 用于在所述 non-slave-only 0C设备上使能至少两个 PTP 端口; 第二状态确定模块 402,用于运行全量状态机或者扩展 non-slave-only全量状态机, 确定所述至少两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口; 第二保护模块 403, 用于当 master PTP端口出现故障时, 在所述 passive PTP端口中 确定新的 master PTP端口。 可选的, 如图 20所示, 所述第二状态确定模块 402可以包括: 第三算法单元 4021, 用于使用部分状态决定算法, 得到所述至少两个 PTP端口的推 荐状态, 所述推荐状态为 master或者 passive; 第二确定单元 4022, 用于根据所述至少两个 PTP端口的推荐状态, 运行全量状态机, 确定 master PTP端口和 passive PTP端口。 本实施例中的部分状态决定算法即为图 10所示的部分状态决定算法。 可选的, 如图 21所示, 所述第二状态确定模块 402可以包括: 第四算法单元 4023, 用于使用 BMC算法, 得到所述至少两个 PTP端口的推荐状态; 第三确定单元 4024, 用于根据所述至少两个 PTP端口的推荐状态, 运行
non-slave-only扩展全量状态机, 确定 master PTP端口和 passive PTP端口。 本实施例中的 non-slave-only扩展全量状态机即为图 12所示的 non-slave-only扩 展全量状态机。
可选的, 如图 22所示, 所述第二保护模块 403可以包括: 第五算法单元 4031, 用于使用部分状态决定算法, 得到所述 passive PTP端口的推 荐状态, 所述推荐状态为 master或者 passive; 第二更新单元 4032, 用于根据所述 passive PTP端口的推荐状态, 运行全量状态机, 确定新的 master PTP端口。 可选的, 如图 23所示, 所述第二保护模块 403可以包括: 第六算法单元 4033, 用于使用 BMC算法, 得到所述 passive PTP端口的推荐状态; 第三更新单元 4034, 用于根据所述 passive PTP端口的推荐状态, 运行
non-slave-only扩展全量状态机, 确定新的 master PTP端口。 本发明实施例中通过在 non-slave-only 0C设备上使能多个 PTP端口, 当 master PTP 端口出现故障时, 在 passive PTP端口中确定新的 master PTP端口, 从而实现对 non-slave-only 0C设备的时钟的保护。
以上所描述的设备实施例仅仅是示意性的, 其中作为分离部件说明的单元 /模块可 以是物理上分开的, 或者也可以不是物理上分开的。 作为单元 /模块显示的部件可以是 是物理单元, 或者也可以不是物理单元。 可以根据实际的需要选择其中的部分或者全部 模块来实现本实施例方案的目的。 本领域普通技术人员在不付出创造性劳动的情况下, 即可以理解并实施。
本发明的又一实施例还提供了一种 slave-only 0C设备, 包括: 存储器和处理器; 其中: 所述存储器用于存储指令; 所述处理器用于执行所述指令, 所述指令用于在所述 slave-only 0C设备上使能至 少两个 PTP端口; 运行 slave-only扩展全量状态机, 确定所述至少两个 PTP端口中的一个 为 slave PTP端口,其他为 passive PTP端口;当 slave PTP端口出现故障时,在所述 passive PTP端口中确定新的 slave PTP端口。 本发明的又一实施例还提供了一种 non-slave-only 0C设备, 包括: 存储器和处理 器; 其中: 所述存储器用于存储指令; 所述处理器用于执行所述指令, 所述指令用于在所述 non-slave-only 0C设备上使 能至少两个 PTP端口; 用于运行全量状态机或者扩展 non-slave-only扩展全量状态机, 确定所述至少两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口; 当 master PTP端口出现故障时, 在所述 passive PTP端口中确定新的 master PTP端口。
对所公开的实施例的上述说明, 使本领域专业技术人员能够实现或使用本发明。 对 这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的 一般原理可以在不脱离本发明实施例的精神或范围的情况下, 在其它实施例中实现。 因 此, 本发明实施例将不会被限制于本文所示的这些实施例, 而是要符合与本文所公开的 原理和新颖特点相一致的最宽的范围。

Claims

权利要求
1、 一种时钟保护方法, 其特征在于, 包括:
在仅能作为从属的普通时钟 slave-only 0C上使能至少两个精确时间协议 PTP端口; 运行 slave-only扩展全量状态机, 确定所述至少两个 PTP端口中的一个为从 slave PTP端口, 其他为被动 passive PTP端口;
当 slave PTP端口出现故障时, 在所述 passive PTP端口中确定新的 slave PTP端口。
2、根据权利要求 1所述的方法,其特征在于,所述运行 slave-only扩展全量状态机, 确定所述至少两个 PTP端口中的一个为 slave PTP端口, 其他为 passive PTP端口, 包括: 使用最优主时钟 BMC算法, 得到所述至少两个 PTP端口的推荐状态;
根据所述推荐状态, 运行 slave-only扩展全量状态机, 确定所述 slave PTP端口和 所述 passive PTP端口。
3、根据权利要求 1或 2所述的方法, 其特征在于, 当所述 passive PTP端口有多个时, 所述当 slave PTP端口出现故障时, 在所述 passive PTP端口中确定新的 slave PTP端口, 包括:
当所述 slave PTP端口出现故障时, 使用 BMC算法, 得到所述多个 passive PTP端口 的推荐状态;
根据所述多个 passive PTP端口的推荐状态, 运行 slave-only扩展全量状态机, 确 定新的 slave PTP端口。
4、 一种时钟保护方法, 其特征在于, 包括:
在非仅能作为从属 non-slave-only 0C上使能至少两个精确时间协议 PTP端口。 运行全量状态机或者 non-slave-only扩展全量状态机, 确定所述至少两个 PTP端口 中的一个为主 master PTP端口, 其他为被动 passive PTP端口;
当 master PTP端口出现故障时, 在所述 passive PTP端口中确定新的 master PTP端 曰。
5、 根据权利要求 4所述的方法, 其特征在于, 所述运行全量状态机, 确定所述至少 两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口, 包括:
使用部分状态决定算法, 得到所述至少两个 PTP端口的推荐状态, 所述推荐状态为 master或者 passive;
根据所述推荐状态, 运行全量状态机, 确定所述 master PTP端口和所述 passive PTP 端口。
6、 根据权利要求 4所述的方法, 其特征在于, 所述运行 non-slave-only扩展全量状 态机, 确定所述至少两个 PTP端口中的一个为 master PTP端口, 其他为 passive PTP端口, 包括:
使用最优主时钟 BMC算法, 得到所述至少两个 PTP端口的推荐状态;
根据所述推荐状态, 运行 non-slave-only扩展全量状态机, 确定所述 master PTP端 口和所述 passive PTP端口。
7、 根据权利要求 4-6中任一项所述的方法, 其特征在于, 所述当 master PTP端口出 现故障时, 在所述 passive PTP端口中确定新的 master PTP端口, 包括:
使用部分状态决定算法, 得到所述 passive PTP端口的推荐状态, 所述推荐状态为 master或者 passive;
根据所述 passive PTP端口的推荐状态, 运行全量状态机, 确定新的 master PTP端 曰。
8、 根据权利要求 4-6中任一项所述的方法, 其特征在于, 所述当 master PTP端口出 现故障时, 在所述 passive PTP端口中确定新的 master PTP端口, 包括:
使用 BMC算法, 得到所述 passive PTP端口的推荐状态;
根据所述 passive PTP端口的推荐状态, 运行 non-slave-only扩展全量状态机, 确 定新的 master PTP端口。
9、 一种仅能作为从属的普通时钟 slave-only 0C设备, 其特征在于, 包括: 第一 PTP端口使能模块, 用于在所述 slave-only 0C设备上使能至少两个精确时间协 议 PTP端口;
第一状态确定模块, 用于运行 slave-only扩展全量状态机, 确定所述至少两个 PTP 端口中的一个为从 slave PTP端口, 其他为被动 passive PTP端口;
第一保护模块, 用于当 slave PTP端口出现故障时, 在 passive PTP端口中确定新的 slave PTP端口。
10、 根据权利要求 9所述的设备, 其特征在于, 所述第一状态确定模块, 包括: 第一算法单元, 用于使用最优主时钟 BMC算法, 得到所述至少两个 PTP端口的推荐状 态;
第一确定单元, 用于根据所述至少两个 PTP端口的推荐状态, 运行 slave-only扩展 全量状态机, 确定所述 slave PTP端口和所述 passive PTP端口。
11、 根据权利要求 9或 10所述的设备, 其特征在于, 当所述 passive PTP端口有多个 时, 所述第一保护模块, 包括:
第二算法单元 3031, 用于当 slave PTP端口出现故障时, 使用 BMC算法, 得到所述多 个 passive PTP端口的推荐状态;
第一更新单元 3032, 用于根据所述多个 passive PTP端口的推荐状态, 运行 slave-only扩展全量状态机, 确定新的 slave PTP端口。
12、 一种非仅能作为从属的普通时钟 non-slave-only 0C设备, 其特征在于, 包括: 第二 PTP端口使能模块, 用于在所述 non-slave-only 0C设备上使能至少两个精确时 间协议 PTP端口;
第二状态确定模块, 用于运行全量状态机或者扩展 non-slave-only全量状态机, 确 定所述至少两个 PTP端口中的一个为主 master PTP端口, 其他为被动 passive PTP端口; 第二保护模块, 用于当 master PTP端口出现故障时, 在所述 passive PTP端口中确 定新的 master PTP端口。
13、 根据权利要求 12所述的设备, 其特征在于, 所述第二状态确定模块包括: 第三算法单元, 用于使用部分状态决定算法, 得到所述至少两个 PTP端口的推荐状 态, 所述推荐状态为 master或者 passive;
第二确定单元, 用于根据所述至少两个 PTP端口的推荐状态, 运行全量状态机, 确 定 master PTP端口和 passive PTP端口。
14、 根据权利要求 12所述的设备, 其特征在于, 所述第二状态确定模块包括: 第四算法单元, 用于使用最优主时钟 BMC算法, 得到所述至少两个 PTP端口的推荐状 态;
第三确定单元, 用于根据所述至少两个 PTP端口的推荐状态, 运行 non-slave-only 扩展全量状态机, 确定 master PTP端口和 passive PTP端口。
15、 根据权利要求 12-14中任一项所述的设备, 其特征在于, 所述第二保护模块包 括:
第五算法单元, 用于使用部分状态决定算法, 得到所述 passive PTP端口的推荐状 态, 所述推荐状态为 master或者 passive;
第二更新单元, 用于根据所述 passive PTP端口的推荐状态, 运行全量状态机, 确 定新的 master PTP端口。
16、 根据权利要求 12-14中任一项所述的设备, 其特征在于, 所述第二保护模块包 括:
第六算法单元, 用于使用 BMC算法, 得到所述 passive PTP端口的推荐状态; 第三更新单元, 用于根据所述 passive PTP端口的推荐状态, 运行 non-slave-only 扩展全量状态机, 确定新的 master PTP端口。
17、一种时钟保护系统,包括:如权利要求 12-16中任一项所述的 non-slave-only 0C 设备和如权利要求 9-11中任一项所述的 slave-only 0C设备; 其中, 所述 slave-only 0C 设备通过 slave PTP端口接收所述 non-slave-only 0C设备通过 master PTP端口发送的 PTP 报文。
PCT/CN2013/088328 2012-12-06 2013-12-02 时钟保护方法、系统和相关普通时钟设备 WO2014086254A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210519954.4 2012-12-06
CN201210519954.4A CN103051407B (zh) 2012-12-06 2012-12-06 时钟保护方法、系统和相关普通时钟设备

Publications (1)

Publication Number Publication Date
WO2014086254A1 true WO2014086254A1 (zh) 2014-06-12

Family

ID=48063919

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/088328 WO2014086254A1 (zh) 2012-12-06 2013-12-02 时钟保护方法、系统和相关普通时钟设备

Country Status (2)

Country Link
CN (1) CN103051407B (zh)
WO (1) WO2014086254A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051407B (zh) * 2012-12-06 2015-07-22 华为技术有限公司 时钟保护方法、系统和相关普通时钟设备
US9270395B2 (en) * 2014-05-05 2016-02-23 Telefonaktiebolaget L M Ericsson (Publ) Method for robust PTP synchronization with default 1588V2 profile
KR101596759B1 (ko) * 2014-11-26 2016-03-07 현대자동차주식회사 차량용 이더넷 통신망에서의 시간 동기화 제공 방법 및 장치

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873243A (zh) * 2010-06-21 2010-10-27 中兴通讯股份有限公司 1588实现协同时间同步方法和装置
US20120179404A1 (en) * 2011-01-12 2012-07-12 Lee Tony J System and apparatus for measuring the accuracy of a backup time source
CN102761407A (zh) * 2012-07-16 2012-10-31 中兴通讯股份有限公司 跨机框系统及其时间和频率透传的实现方法和装置
CN103051407A (zh) * 2012-12-06 2013-04-17 华为技术有限公司 时钟保护方法、系统和相关普通时钟设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102355396B (zh) * 2011-07-21 2017-03-15 中兴通讯股份有限公司 高精度时间协议端口的创建方法、边界时钟设备和普通时钟设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873243A (zh) * 2010-06-21 2010-10-27 中兴通讯股份有限公司 1588实现协同时间同步方法和装置
US20120179404A1 (en) * 2011-01-12 2012-07-12 Lee Tony J System and apparatus for measuring the accuracy of a backup time source
CN102761407A (zh) * 2012-07-16 2012-10-31 中兴通讯股份有限公司 跨机框系统及其时间和频率透传的实现方法和装置
CN103051407A (zh) * 2012-12-06 2013-04-17 华为技术有限公司 时钟保护方法、系统和相关普通时钟设备

Also Published As

Publication number Publication date
CN103051407A (zh) 2013-04-17
CN103051407B (zh) 2015-07-22

Similar Documents

Publication Publication Date Title
US10075287B2 (en) Time synchronization method and device
JP5874815B2 (ja) 高可用性グランド・マスタ・クロックを実装するためのネットワークおよび方法
EP2144400B1 (en) Distributed ethernet system and method for detecting fault based thereon
US20160156427A1 (en) Clock recovery in a packet based network
WO2013010417A1 (zh) 一种时钟源的选择方法
WO2014169458A1 (en) Node and method for selecting synchronization source
WO2013029441A1 (zh) 一种时钟同步方法及装置
WO2009043299A1 (en) A determining method and device for the synchronization port of a transparent clock equipment
WO2011134371A1 (zh) 一种同步时钟的方法和时钟同步装置
WO2012071910A1 (zh) 一种实现时间同步的方法及装置
US9288075B2 (en) Method and system for auto-configuration, and network node
CN102158335B (zh) 时间同步端口的处理方法及装置
WO2019000953A1 (zh) 一种实现Mux机的方法、设备及系统
US10090952B2 (en) Master/slave negotiation associated with a synchronous ethernet network
WO2014086254A1 (zh) 时钟保护方法、系统和相关普通时钟设备
US20090100193A1 (en) Synchronization of state information to reduce APS switchover time
JP6383232B2 (ja) 中継システムおよびスイッチ装置
US9705823B2 (en) Port status synchronization method, related device, and system
WO2012152124A1 (zh) 外接时间端口的倒换方法及装置
EP3573298B1 (en) Multi-node device and method for micro server built-in switch uplink port backup
US8661106B2 (en) Method of correction of network synchronisation
JP6805938B2 (ja) 仮想lanの時刻同期方法
JP2019110410A (ja) ネットワーク機器
JP7451721B2 (ja) クロックポート属性回復方法、デバイス、およびシステム
JP2014033384A (ja) ルータ機能冗長化システム、ルータ機能冗長化方法およびルータ装置

Legal Events

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

Ref document number: 13859766

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

Country of ref document: EP

Kind code of ref document: A1