WO2014101669A1 - 时间同步方法及系统 - Google Patents

时间同步方法及系统 Download PDF

Info

Publication number
WO2014101669A1
WO2014101669A1 PCT/CN2013/089288 CN2013089288W WO2014101669A1 WO 2014101669 A1 WO2014101669 A1 WO 2014101669A1 CN 2013089288 W CN2013089288 W CN 2013089288W WO 2014101669 A1 WO2014101669 A1 WO 2014101669A1
Authority
WO
WIPO (PCT)
Prior art keywords
clock
priority
ptp
layer
advertisement message
Prior art date
Application number
PCT/CN2013/089288
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 中兴通讯股份有限公司
Priority to US14/758,619 priority Critical patent/US9577774B2/en
Priority to EP13867348.8A priority patent/EP2941065A4/en
Publication of WO2014101669A1 publication Critical patent/WO2014101669A1/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/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0641Change of the master or reference, e.g. take-over or failure of the master

Definitions

  • the present invention relates to the field of communications, and in particular, to a time synchronization method and system.
  • PTP Precision Time Protocol
  • GPS Global Position System
  • the time synchronization technologies adopted by operators include PTP, Network Time Protocol (NTP) NTP and China Mobile High-precision time synchronization (second pulse + day time, 1PPS+TOD), which adopt different Protocol format.
  • NTP Network Time Protocol
  • 1PPS+TOD Second pulse + day time, 1PPS+TOD
  • 1PPS+TOD is commonly used for interworking.
  • some synchronous devices have different types of time interfaces, for example, having both a 1PPS+TOD interface and a PTP interface, and then it is necessary to support mixed source selection.
  • the 1PPS+TOD protocol can only carry time information and second pulse status, it cannot carry more time source information, for example, Grand Master Identity priority parameters, hop count, time source type, etc., therefore, After the 1PPS+TOD synchronization interface, the upstream time source information is lost, so there are timing loops (Timing Loop) in some scenarios.
  • FIG. 1 is a schematic diagram of generating a timing loop in a time ring network scenario according to the related art.
  • the time ring network exists.
  • Four synchronization devices are: network device 1 (NE1), network device 2 (NE2), network device 3 (NE3), and network device 4 (NE4).
  • NE1 network device 1
  • NE2 network device 2
  • NE3 network device 3
  • NE4 network device 4
  • the device clock parameters need to be configured in the time network, including: clock identifier (ID) (for example, the clock identifiers of NE1, NE2, NE3, and B NE4 can be uniquely identified by their respective MAC addresses), priority 1 (priorityl) ), priority 2 (priority2) and clock class (Clock Class).
  • clock identifier for example, the clock identifiers of NE1, NE2, NE3, and B NE4 can be uniquely identified by their respective MAC addresses
  • priority 1 priorityl
  • priority 2 priority2
  • clock class Clock Class
  • the device When the device has both 1PPS+TOD sync input interface and PTP input port, it should support selecting the current best master time source among multiple PTP and 1PPS+TOD input sources; (2) If the device selects 1PPS+TOD as the current The best master time source, and the output port type is PTP, which requires parameter remapping.
  • the data set of the 1PPS+TOD reference source should be constructed at the local node, including the parameters: Grandmaster Identity, Priority 1 ( Priorityl ), priority 2 (priority2), clock class (Clock Class), port number (portNumber), hop count (stepRemoved), clock accuracy (clockAccuracy) clock shake cloud force (offsetScaledLogVariance) time source (timesource), and time stamp (TimeScale);
  • the NE1 device has two PTP ports and one B1 1PPS+TOD interface. If NE1 selects PTP port 1 as a slave port, then other PTP ports are master ports, and then the ptp port. 2
  • the PTP advertisement packet (ptp announce packet) will be sent to NE3.
  • the parameters include the GMid, priority 1, priority2, clockClass, hop count, timesource and other parameters of the upstream time source. These parameters are transmitted from the upstream reference source.
  • the upstream second pulse state and time information can be carried, wherein the tod second pulse state is mapped to the ptp ClockClass, and the time information includes the number of weeks and the number of seconds in the week; it can be found that the 1PPS+TOD interface cannot be transmitted.
  • Other parameters of the upstream time source such as GMid, priorityl, priority2, hop count, timesource, etc. These parameters can only be built locally, that is, the 1PPS+TOD interface is mapped to a common PTP port.
  • the upstream time source and the downstream ptp announce message are received, but after the BMC algorithm is compared, the NE2 will select the 1PPS+TOD interface as the master clock. At this time, the NE2 will send the PTP announce message to NE1, NE3, and B NE4 respectively.
  • the PTP port receives the information sent from two time sources. After BMC comparison, NE1 selects PTP port 2 as the master clock, thus forming a timing loop. Referring to Figure 1, it can be seen that the specific process of the timing loop is as follows: Step 1.
  • Best Master Clock Best Master Clock
  • the clock parameters carried in the message are: grandmasterldentity is the MAC address of NE2, priority 1 is 10, priority2 is 10, and ClockClass is the value corresponding to the TOD second pulse state.
  • NE3 will synchronize to NE2;
  • NE 1 will synchronize to NE3, and NE 1 -NE2-NE3 form a timing loop.
  • a time synchronization method including: dividing a first network device (NE1) in a time network and an upstream node of NE1 into a first level, and dividing a downstream node of the NE1 into a second level.
  • the first layer has a higher priority than the second layer for time synchronization, and the output port of the NE1 is connected to the 1PPS+TOD synchronous link;
  • the third network device (NE3) connected to the NE1 through the Precise Time Protocol (PTP) synchronization link in the node receives the first PTP advertisement message from the NE1, where the first PTP advertisement message carries the first device priority of the NE1.
  • PTP Precise Time Protocol
  • the NE3 after receiving the second PTP advertisement message sent by the second network device (NE2) connected to the NE1 through the 1PPS+TOD synchronization link in the downstream node, the NE3 according to the first PTP advertisement message and The second PTP advertisement message determines that the clock parameter of the NE1 is optimal, and synchronizes the local clock to the NE1 according to the first PTP advertisement message, where the second PTP advertisement message carries the NE2
  • the device priority and the priority of the second layer, the first priority is higher than a second equipment device priority.
  • the method includes: configuring, for the NE1, the first clock identifier, the first layer priority, the first device priority, and the clock level.
  • the first clock is identified as a medium access control layer (MAC) address of the NE1; the second clock identifier, the second layer priority, the second device priority, and the clock level are configured for the NE2, where the second clock identifier is The MAC address of the NE2; the third clock identifier, the second layer priority, the third device priority, and the clock level are configured for the NE3, wherein the third clock identifier is the MAC address of the NE2; wherein, the second device has a higher priority than the first Three device priority.
  • MAC medium access control layer
  • the method further includes: mapping the 1PPS+TOD synchronization input interface of the NE2 to PTP sync input port.
  • the mapping of the 1PPS+TOD synchronization input interface of the NE2 to the PTP synchronization input port includes: constructing a data set of the 1PPS+TOD reference source for the NE2, where the data set includes: a second clock identifier, a second layer priority, Second device priority, clock level, port number, hop count, clock accuracy, clock jitter, clock source, and time stamp.
  • the first PTP advertisement message further includes: a first clock identifier and a clock level; and the second PTP advertisement message further includes: a second clock identifier and a clock level.
  • the NE3 determines that the clock parameter of the NE1 is optimal according to the first PTP advertisement message and the second PTP advertisement message, and synchronizes the local clock to the NE1 according to the first PTP advertisement message, including: NE3 determines that the first layer has a high priority. After the second layer priority, and the first device priority is higher than the second device priority, determining that the clock parameter of the NE1 is optimal; the NE3 is based on the first layer priority, the first device priority, the first clock identifier, and the clock.
  • a time synchronization system comprising: a layering module configured to divide an upstream node of a first network device NE1 and NE1 in a time network into a first layer, and a downstream node of the NE1 Divided into the second level, where the first layer performs time synchronization and the first layer priority is higher than the second layer requires time synchronization.
  • the output port of NE1 is synchronized with 1PPS+TOD.
  • the receiving module located in the downstream node, on the third network device NE3 connected to the NE1 through the precise time protocol PTP synchronization link, configured to receive the first PTP advertisement message from the NE1 and the pass through the 1PPS+ in the downstream node a second PTP advertisement message sent by the second network device NE2 that is connected to the NE1 by the TOD synchronization link, where the first PTP advertisement message carries the first device priority and the first layer priority of the NE1; the determining module is located at the NE3 And determining, according to the first PTP advertisement message and the second PTP advertisement message, that the clock parameter of the NE1 is optimal; the synchronization module, located on the NE3, is set to be according to the first PTP Message to the local clock synchronized On the NEl, the second PTP advertisement message carries the second device priority and the second layer priority of the NE2, where the first device priority is higher than the second device priority.
  • the system further includes: a configuration module, configured to configure a first clock identifier, a first layer priority, a first device priority, and a clock level for the NE1, where the first clock identifier is the media access control layer of the NE1
  • the configuration module is further configured to configure the second clock identifier, the second layer priority, the second device priority, and the clock level for the NE2, where the second clock identifier is the MAC address of the NE2; the configuration module is further configured to be the NE3.
  • the third clock identifier, the second layer priority, the third device priority, and the clock level are configured, where the third clock identifier is the MAC address of the NE2, and the second device priority is higher than the third device priority.
  • the system further comprises: a mapping module configured to map the 1PPS+TOD synchronization input interface of the NE2 to the PTP synchronization input port.
  • the mapping module comprises: a building unit, configured to construct a data set of the 1PPS+TOD reference source for the NE2, wherein the data set comprises: a second clock identifier, a second layer priority, a second device priority, a clock level, Port number, hop count, clock precision, clock jitter, clock source, and time stamp.
  • the first PTP advertisement message further includes: a first clock identifier and a clock level; and the second PTP advertisement message further includes: a second clock identifier and a clock level.
  • the determining module includes: a determining unit, configured to determine that the clock parameter of the NE1 is optimal after determining that the first layer priority is higher than the second layer priority, and the first device priority is higher than the second device priority;
  • the synchronization module includes: a synchronization unit configured to synchronize the local clock to NE1 according to the first layer priority, the first device priority, the first clock identifier, and the clock level in conjunction with the best master clock (BMC) algorithm.
  • BMC best master clock
  • the upstream node of NE1 and the downstream node of NE1 are divided into different levels with different priorities.
  • the NE3 of the downstream node except the NE2 whose output port is connected with the 1PPS+TOD synchronization link receives the time synchronization of NE1 and NE2 transmission.
  • the time synchronization parameter of the NE1 is determined to be optimal, and the local clock is synchronized to the NE1, which solves the problem that the timing loop is easily caused when the different time synchronization technologies are mixed and selected in the related art, thereby achieving the problem.
  • FIG. 1 is a schematic diagram of generating a timing loop in a time ring network scenario according to the related art
  • FIG. 2 is a flowchart of a time synchronization method according to an embodiment of the present invention
  • FIG. 3 is a time according to a preferred embodiment of the present invention.
  • FIG. 4 is a schematic diagram of time synchronization in a time ring network scenario according to a preferred embodiment of the present invention;
  • FIG. 5 is a structural block diagram of a time synchronization system according to an embodiment of the present invention
  • BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
  • 2 is a flowchart of a time synchronization method according to an embodiment of the present invention. As shown in FIG. 2, the method mainly includes the following steps (step S202 - step S206): Step S202, the first network device (NE1) in the time network is used.
  • Step S204 the third network device (NE3) that is connected to the NE1 by the PTP synchronization link in the downstream node receives the first PTP advertisement message from the NE1, where the first PTP advertisement message carries the NE1 First device priority and first layer priority.
  • Step S206 after receiving the second PTP advertisement message sent by the second network device NE2 connected to the NE1 through the 1PPS+TOD synchronization link in the downstream node, the NE3 determines the NE1 according to the first PTP advertisement message and the second PTP advertisement message.
  • the clock parameter is optimal, and the local clock is synchronized to the NE1 according to the first PTP advertisement message, where the second PTP advertisement message carries the second device priority and the second layer priority of the NE2, and the first device priority Higher than the second device priority.
  • the method may further include: configuring a first clock identifier, a first layer priority, a first device priority, and a clock level for the NE1, where the first clock is identified as the media of the NE1. Accessing the control layer MAC address; configuring the second clock identifier, the second layer priority, the second device priority, and the clock level for the NE2, wherein the second clock identifier is the MAC address of the NE2; the third clock identifier is configured for the NE3, The second device priority, the third device priority, and the clock level, wherein the third clock is identified as the MAC address of the NE2; wherein, the second device priority is higher than the third device priority.
  • the 1PPS+TOD synchronization input interface of NE2 is also mapped to the PTP synchronization input port.
  • the mapping of the 1PPS+TOD synchronization input interface of the NE2 to the PTP synchronization input port includes: constructing a data set of the 1PPS+TOD reference source for the NE2, where the data set includes: a second clock identifier, a second layer priority, Second device priority, clock level, port number, hop count, clock accuracy, clock jitter, clock source, and time stamp.
  • the first PTP advertisement message further includes: a first clock identifier and a clock level; and the second PTP advertisement message further includes: a second clock identifier and a clock level.
  • the NE3 determines that the clock parameter of the NE1 is optimal according to the first PTP advertisement message and the second PTP advertisement message, and synchronizes the local clock to the NE1 according to the first PTP advertisement message, the following manner can be implemented: After determining that the first layer priority is higher than the second layer priority, and the first device priority is higher than the second device priority, the NE3 determines that the clock parameter of the NE1 is optimal; the NE3 is based on the first layer priority and the first device.
  • the priority, the first clock flag, and the clock level are combined with the best master clock BMC algorithm to synchronize the local clock to NE1.
  • the 1PPS+TOD synchronous input interface is mapped to a PTP port, that is, the data set of the 1PPS+TOD reference source is constructed on the local node (synchronous device with multiple types of synchronous interfaces, the same below), and the data set includes Grandmasterldentity, priority 1, priority2, clockClass, portNumber, stepsRemoved, clockAccuracy offsetScaledLogVariance timesource, TimeScale;
  • the 1PPS+T0D interface configure priority1 and priority2 to be mixed with the PTP interface; on the local node, configure Parameters such as grandmasterldentity, ClockClass, priority 1 priority2, but the priority of the configuration must be lower than that of the upstream node, that is, the PTP priorityl is used for synchronization network layering/classification, and the same level synchronization network Priority 1 is
  • the same level/level device uses Priority2 for active/standby switchover.
  • the priority parameter ( grandmasterPriorityl/ grandmasterPriority2) in the sent PTP Announce packet can be the priority parameter configured for the local node. (riority l/priority2) ;
  • the upstream node receives the PTP Announce packet sent by the local node, it finds the priority parameter in the packet.
  • the time synchronization method provided by the above embodiment is further described below with reference to FIG. 3, FIG. 4 and a preferred embodiment.
  • the time synchronization method provided by the preferred embodiment can avoid the timing loop problem that is easily caused by the current method when performing hybrid source selection in different time technologies.
  • the general steps are as follows: (1) Layering the time network by using clock priority parameters (2) When the 1PPS+TOD interface is selected as the master clock, the priority of the clock carried in the PTP announce message sent downstream is lower than the clock priority of the upstream reference source and the upstream node.
  • FIG. 3 is a flowchart of a time synchronization method in a time ring network scenario according to a preferred embodiment of the present invention
  • FIG. 4 is a schematic diagram of time synchronization in a time ring network scenario according to a preferred embodiment of the present invention.
  • the NE2 runs the BMC (Best Master Clock) algorithm, and selects the 1PPS+TOD interface as the primary time source. In this case, the 1PPS+TOD interface is in the Slave state, and the other PTP interfaces are in the Master state.
  • BMC Best Master Clock
  • the NE2 sends a PTP Announce message to the NE3 and the NE4 through the PTP port, and the clock parameters carried in the message are: the grandmasterldentity is the MAC address of the NE2, and the priority1 and the priority2 are the clock parameters of the NE2 device; In the message, priority 1 is 30, priority2 is 22, and ClockClass is still the value corresponding to the TOD second pulse state.
  • the NE3 receives the PTP Announce message from the NE2 and the NE1, and finds that the NE1 clock parameter is optimal. According to the BMC algorithm, the NE3 will be synchronized to the NE1 and will not be synchronized to the NE2.
  • FIG. 5 is a structural block diagram of a time synchronization system according to an embodiment of the present invention.
  • the system is used to implement the time synchronization method provided by the foregoing embodiment. As shown in FIG. 5, the system mainly includes: a layering module 10, a receiving module 20, The module 30 and the synchronization module 40 are determined.
  • the layering module 10 is configured to divide the first network device (NE1) in the time network and the upstream node of the NE1 into a first layer, and divide the downstream node of the NE1 into a second layer, where the first layer performs time.
  • the first layer priority required for synchronization is higher than the second layer priority required for time synchronization in the second layer; the receiving module 20 is located in the downstream node and connected to the NE1 through the precise time protocol PTP synchronization link.
  • the third network device (NE3) is configured to receive a first PTP advertisement message from the NE1 and a second PTP advertisement message sent by the second network device (NE2) connected to the NE1 through the 1PPS+TOD synchronization link in the downstream node,
  • the first PTP advertisement message carries the first device priority of the NE1 and the first layer priority.
  • the determining module 30 is located on the NE3, and is configured to determine the clock of the NE1 according to the first PTP advertisement message and the second PTP advertisement message.
  • FIG. 6 is a structural block diagram of a time synchronization system according to a preferred embodiment of the present invention.
  • the time synchronization system provided by the preferred embodiment further includes: a configuration module 50 configured to configure a first clock identifier for NE1.
  • the time synchronization system may further include: a mapping module 60 configured to map the 1PPS+TOD synchronization input interface of NE2 to a PTP synchronization input port.
  • the mapping module 60 includes: a building unit 62 configured to construct a data set of the 1PPS+TOD reference source for the NE2, where the data set includes: a second clock identifier, a second layer priority, and a second device Priority, clock level, port number, hop count, clock accuracy, clock jitter, clock source, and time stamp.
  • the first PTP advertisement message further includes: a first clock identifier and a clock level
  • the second PTP advertisement message further includes: a second clock identifier and a clock level.
  • the determining module 30 includes: a determining unit 32, configured to determine NE1 after determining that the first layer priority is higher than the second layer priority, and the first device priority is higher than the second device priority Clock reference
  • the synchronization module 40 includes: a synchronization unit 42 configured to synchronize the local clock to NE1 according to the first layer priority, the first device priority, the first clock identifier, and the clock level in combination with the best master clock BMC algorithm.
  • an upstream node of the first network device (NE1) and B NE1 that connects the output port in the time network with the 1PPS+TOD synchronization link
  • the downstream node of NE1 is divided into different levels with different priorities.
  • the NE3 of the downstream node except the NE2 whose output port is connected to the 1PPS+TOD synchronization link is judged after receiving the time synchronization message sent by NE1 and NE2.
  • the time synchronization parameter of NE1 is optimal, and the local clock is synchronized to NE1.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • Industrial Applicability According to the technical solution of the present invention, the upstream node and the downstream node of NE1 and NE1 connected to the 1PPS+TOD synchronous link in the time network can be divided into different levels with different priorities, and the downstream nodes are divided. After receiving the time synchronization message sent by NE1 and NE2, the NE3 of the output port is connected to the 1PPS+TOD synchronization link.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

本发明公开了一种时间同步方法及系统。其中,该方法包括:将输出端口与1PPS+TOD同步链路连接的NE1和其上游节点划分为第一层次,将NE1的下游节点划分为第二层次,其中,第一层次的第一层优先级高于第二层次的第二层优先级;下游节点中的通过PTP同步链路与NE1连接的NE3接收来自NE1的NE1的第一设备优先级和第一层优先级;NE3在接收到下游节点中的通过1PPS+TOD同步链路与NE1连接的NE2发送的NE2的第二设备优先级和第二层优先级之后,确定NE1的时钟参数最优,并将本地时钟同步到NE1上。通过本发明,达到了提高时间同步网的可靠性,扩大不同的时间同步技术的混和应用领域的效果。

Description

时间同步方法及系统
技术领域 本发明涉及通信领域, 具体而言, 涉及一种时间同步方法及系统。 背景技术 随着 3G网络的高速发展, 精确时间协议 (Precision Time Protocol, 简称为 PTP) 在分组网络中得到越来越多的重视和广泛的应用。 国内外运营商不断地使用 PTP协议 进行时间同步, 逐步代替了使用全球定位系统 (Global Position System, 简称为 GPS) 进行时间同步的方式。 目前,运营商采用的时间同步技术有 PTP、网络时间协议(Network Time Protocol, 简称为 NTP) NTP和中国移动高精度时间同步 (秒脉冲 +日时间, 1PPS+TOD), 它们 分别采用了不同的协议格式。 随着时间网应用的不断扩大, 不同时间同步技术之间需 要进行互通, 例如, 光传送网 (Optical Transport Network, 简称为 OTN) 同步网和分 组传送网 (Packet Transport Network, 简称为 PTN) 同步网目前普遍采用 1PPS+TOD 进行互通。 另外, 在一个同步网内部, 某些同步设备具有不同类型时间接口, 例如, 同时具有 1PPS+TOD接口和 PTP接口,这时就需要支持混合选源。但由于 1PPS+TOD 协议只能携带时间信息和秒脉冲状态, 不能携带更多的时间源信息, 例如, 祖母时钟 标识 (Grand Master Identity ) 优先级参数、 跳数、 时间源类型等信息, 因此, 经过 1PPS+TOD同步接口后, 上游时间源信息就丢失了, 从而在某些场景下存在定时环路 (Timing Loop)。 以下对时间环网场景下产生的定时环路的过程进行具体的介绍: 图 1是根据相关技术的时间环网场景下产生定时环路的示意图, 如图 1所示, 该 时间环网中存在 4个同步设备 (网络设备), 分别为: 网络设备 1 (NE1 )、 网络设备 2 (NE2)、 网络设备 3 (NE3 ) 和网络设备 4 (NE4)。 其中, NE1禾 B NE2之间有一条 1PPS+TOD链路, 其它相邻设备间都为 PTP链路。 首先, 需要在时间网内配置设备时 钟参数, 主要包括: 时钟标识 (ID) (例如, NE1, NE2, NE3禾 B NE4的时钟标识可 以分别用各自的 MAC地址唯一标识), 优先级 1 (priorityl ), 优先级 2 (priority2)和 时钟等级 (Clock Class )。 具体地,如图 1所示, NE2配置的时钟 ID为 NE2 Mac, priorityl=20, priority2=22, 其它 NE类推, 现有时间同步方法要求:
( 1 ) 设备同时具有 1PPS+TOD同步输入接口和 PTP输入端口时, 应支持在多个 PTP和 1PPS+TOD输入源中选择当前最佳主时间源; (2)如果设备选择 1PPS+TOD作为当前最佳主时间源, 而输出端口类型为 PTP, 需要进行参数重映射,即应在本地节点构建 1PPS+TOD参考源的数据集,包含的参数: 祖母时钟标识(Grandmaster Identity )、 优先权 1 (priorityl )、 优先权 2 (priority2)、 时 钟等级 ( Clock Class )、 端口号 (portNumber )、 跳数 ( stepsRemoved )、 时钟精度 ( clockAccuracy) 时钟抖云力 ( offsetScaledLogVariance ) 时间源 (timesource), 以及 时标 (TimeScale);
( 3 ) grandmasterldentity priority 1、 priority2 应能在网管上配置, 其他参数可以 采用设备默认值, 其中, Timesource默认为 0x20, stepsRemoved默认为 0。 请参考图 1, NE1设备具有 2个 PTP端口禾 B 1个 1PPS+TOD接口; 假如 NE1选 择 PTP端口 1为从端口 (slave), 这时其它 PTP端口为主端口 (master), 这时 ptp端 口 2将向 NE3发送 PTP通告报文(ptp announce报文),参数包括上游时间源的 GMid, priority 1 , priority2, ClockClass, 跳数, timesource等参数, 这些参数是从上游参考源 传送过来的。但对 1PPS+TOD接口,只能携带上游的秒脉冲状态和时间信息,其中 tod 秒脉冲状态映射为 ptp 的 ClockClass, 时间信息包括周数和周内秒数; 可以发现, 1PPS+TOD接口不能传递上游时间源其它参数, 比如 GMid, priorityl , priority2,跳数, timesource等参数, 这些参数只能在本地构建, 即把 1PPS+TOD接口映射为一个普通 的 PTP端口。 对 NE2,假如选择了 1PPS+TOD接口作为主时间接口,配置的参数为 priorityl=10, priority2=10, 优于上游时间源 priorityl=10, priority2=12; 另夕卜, NE2从其它 PTP端 口也收到上游时间源和下游的 ptp announce报文, 但经过 BMC算法比较, NE2将选 择 1PPS+TOD接口作为主时钟, 这时, NE2将分别向 NE1、 NE3禾 B NE4发送 PTP announce报文; 其中, 发送的 ptp announce报文携带的参数是 GMid=NE2, pl=10, p2=10, 跳数 =0, timesource=0x20; 这时, NE3将同步至 lj NE2; 对 NE1设备; 它从 2 个 PTP端口, 分别收到两个时间源发来的信息, 经过 BMC比较, NE1将选择 PTP端 口 2作为主时钟, 从而形成了定时环路。 参考图 1可以看那出, 定时环路产生的具体 过程如下: 步骤 1、对 NE2设备, 把 1PPS+TOD同步输入接口映射为 PTP接口, 即在本地节 点构建 1PPS+TOD参考源的数据集, 假如配置的 priorityl=10, priority2=10; 步骤 2、 NE2运行 BMC (Best Master Clock最佳主时钟)算法,将选择 1PPS+TOD 接口作为主时间源, 这时, 1PPS+TOD接口为 Slave状态, 其它 PTP接口为 Master状 态; 步骤 3、 NE2通过 PTP端口, 分别向 NE3, NE4发送 PTP Announce消息, 消息 中携带的时钟参数分别为: grandmasterldentity为 NE2的 MAC地址, priority 1为 10, priority2为 10, ClockClass为 TOD秒脉冲状态对应的值。 步骤 4、 NE3收到 NE2的 PTP Announce消息, 发现时钟参数优于本身 (因为自 身时钟参数为 priorityl=20, priority2=21 , 而来自 NE2 的时钟参数 priorityl=10, priority2=10), 根据 BMC算法, NE3将同步到 NE2; 步骤 5、 NE1从 NE3收到 Announce消息, priorityl=10, priority2=10, 根据 BMC 算法, NE 1将同步到 NE3, 至此 NE 1 -NE2-NE3形成了定时环路。 针对相关技术中不同时间同步技术进行混合选源时容易导致定时环路的问题, 目 前尚未提出有效的解决方案。 发明内容 本发明提供了一种时间同步方法及系统, 以至少解决上述问题。 根据本发明的一个方面, 提供了一种时间同步方法, 包括: 将时间网中的第一网 络设备(NE1 )和 NE1的上游节点划分为第一层次, 将 NE1的下游节点划分为第二层 次, 其中, 第一层次进行时间同步需要用到的第一层优先级高于第二层次进行时间同 步需要用到的第二层优先级, NE1的输出端口与 1PPS+TOD同步链路连接; 下游节点 中的通过精确时间协议 (PTP) 同步链路与 NE1连接的第三网络设备 (NE3 ) 接收来 自 NE1的第一 PTP通告消息, 其中, 第一 PTP通告消息中携带有 NE1的第一设备优 先级和第一层优先级; NE3在接收到下游节点中的通过 1PPS+TOD 同步链路与 NE1 连接的第二网络设备 (NE2)发送的第二 PTP通告消息之后, 根据第一 PTP通告消息 和第二 PTP通告消息确定 NE1的时钟参数最优, 并根据第一 PTP通告消息将本地时 钟同步到 NE1上, 其中, 第二 PTP通告消息中携带有 NE2的第二设备优先级和第二 层优先级, 第一设备优先级高于第二设备优先级。 优选地, 在将时间网中的第一网络设备 NE1和 NE1 的上游节点划分为第一层次 之前, 包括: 为 NE1配置第一时钟标识、 第一层优先级、 第一设备优先级以及时钟等 级, 其中, 第一时钟标识为 NE1的媒体接入控制层 (MAC) 地址; 为 NE2配置第二 时钟标识、第二层优先级、第二设备优先级以及时钟等级,其中,第二时钟标识为 NE2 的 MAC地址; 为 NE3配置第三时钟标识、 第二层优先级、 第三设备优先级以及时钟 等级, 其中, 第三时钟标识为 NE2的 MAC地址; 其中, 第二设备优先级高于第三设 备优先级。 优选地,在下游节点中的通过精确时间协议 PTP同步链路与 NE1连接的第三网络 设备 NE3接收来自 NE1的第一时间同步消息之前, 还包括: 将 NE2的 1PPS+TOD同 步输入接口映射为 PTP同步输入端口。 优选地, 将 NE2的 1PPS+TOD同步输入接口映射为 PTP同步输入端口, 包括: 为 NE2构建 1PPS+TOD参考源的数据集, 其中, 数据集包括: 第二时钟标识、 第二 层优先级、 第二设备优先级、 时钟等级、 端口号、 跳数、 时钟精度、 时钟抖动、 时钟 源以及时标。 优选地, 第一 PTP通告消息还包括: 第一时钟标识以及时钟等级; 第二 PTP通告 消息还包括: 第二时钟标识以及时钟等级。 优选地, NE3根据第一 PTP通告消息和第二 PTP通告消息确定 NE1的时钟参数 最优, 并根据第一 PTP通告消息将本地时钟同步到 NE1上, 包括: NE3在确定第一 层优先级高于第二层优先级、 且第一设备优先级高于第二设备优先级后, 确定 NE1的 时钟参数最优; NE3根据第一层优先级、 第一设备优先级、 第一时钟标识以及时钟等 级结合最佳主时钟 BMC算法将本地时钟同步到 NE1上。 根据本发明的另一方面, 提供了一种时间同步系统, 包括: 分层模块, 设置为将 时间网中的第一网络设备 NE1和 NE1的上游节点划分为第一层次, 将 NE1的下游节 点划分为第二层次, 其中, 第一层次进行时间同步需要用到的第一层优先级高于第二 层次进行时间同步需要用到的第二层优先级, NE1的输出端口与 1PPS+TOD同步链路 连接;接收模块,位于下游节点中的通过精确时间协议 PTP同步链路与 NE1连接的第 三网络设备 NE3上, 设置为接收来自 NE1的第一 PTP通告消息和下游节点中的通过 1PPS+TOD同步链路与 NE1连接的第二网络设备 NE2发送的第二 PTP通告消息, 其 中, 第一 PTP通告消息中携带有 NE1的第一设备优先级和第一层优先级; 确定模块, 位于 NE3上, 设置为根据第一 PTP通告消息和第二 PTP通告消息确定 NE1的时钟参 数最优; 同步模块, 位于 NE3上, 设置为根据第一 PTP通告消息将本地时钟同步到 NEl上, 其中, 第二 PTP通告消息中携带有 NE2的第二设备优先级和第二层优先级, 第一设备优先级高于第二设备优先级。 优选地, 该系统还包括: 配置模块, 设置为为 NE1配置第一时钟标识、 第一层优 先级、 第一设备优先级以及时钟等级, 其中, 第一时钟标识为 NE1的媒体接入控制层 MAC地址; 配置模块还设置为为 NE2配置第二时钟标识、 第二层优先级、 第二设备 优先级以及时钟等级, 其中, 第二时钟标识为 NE2的 MAC地址; 配置模块还设置为 为 NE3配置第三时钟标识、 第二层优先级、 第三设备优先级以及时钟等级, 其中, 第 三时钟标识为 NE2的 MAC地址; 其中, 第二设备优先级高于第三设备优先级。 优选地, 该系统还包括: 映射模块, 设置为将 NE2的 1PPS+TOD同步输入接口 映射为 PTP同步输入端口。 优选地, 映射模块包括: 构建单元, 设置为为 NE2构建 1PPS+TOD参考源的数 据集, 其中, 数据集包括: 第二时钟标识、 第二层优先级、 第二设备优先级、 时钟等 级、 端口号、 跳数、 时钟精度、 时钟抖动、 时钟源以及时标。 优选地, 第一 PTP通告消息还包括: 第一时钟标识以及时钟等级; 第二 PTP通告 消息还包括: 第二时钟标识以及时钟等级。 优选地, 确定模块包括: 确定单元, 设置为在确定第一层优先级高于第二层优先 级、 且第一设备优先级高于第二设备优先级后, 确定 NE1的时钟参数最优; 同步模块 包括: 同步单元, 设置为根据第一层优先级、 第一设备优先级、 第一时钟标识以及时 钟等级结合最佳主时钟 (BMC) 算法将本地时钟同步到 NE1上。 通过本发明, 采用将时间网中的输出端口与 1PPS+TOD同步链路连接的 NE1和
NE1的上游节点、 以及 NE1的下游节点划分为具有不同优先级的不同层次, 下游节点 中除输出端口与 1PPS+TOD同步链路连接的 NE2之外的 NE3在接收到 NE1和 NE2 发送的时间同步消息后进行判断,确定 NE1的时间同步参数为最优后将本地时钟同步 到 NE1上的方式,解决了相关技术中不同时间同步技术进行混合选源时容易导致定时 环路的问题, 进而达到了提高时间同步网的可靠性, 扩大不同的时间同步技术的混和 应用领域的效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中- 图 1是根据相关技术的时间环网场景下产生定时环路的示意图; 图 2是根据本发明实施例的时间同步方法流程图; 图 3是根据本发明优选实施例的时间环网场景下的时间同步方法流程图; 图 4是根据本发明优选实施例的时间环网场景下的时间同步示意图; 图 5是根据本发明实施例的时间同步系统的结构框图; 以及 图 6是根据本发明优选实施例的时间同步系统的结构框图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 图 2是根据本发明实施例的时间同步方法流程图, 如图 2所示, 该方法主要包括 以下步骤 (步骤 S202-步骤 S206): 步骤 S202, 将时间网中的第一网络设备(NE1 )和 NE1的上游节点划分为第一层 次, 将 NE1的下游节点划分为第二层次, 其中, 第一层次进行时间同步需要用到的第 一层优先级高于第二层次进行时间同步需要用到的第二层优先级。 步骤 S204, 下游节点中的通过精确时间协议(PTP) 同步链路与 NE1连接的第三 网络设备 (NE3 ) 接收来自 NE1 的第一 PTP通告消息, 其中, 第一 PTP通告消息中 携带有 NE1的第一设备优先级和第一层优先级。 步骤 S206, NE3在接收到下游节点中的通过 1PPS+TOD同步链路与 NE1连接的 第二网络设备 NE2发送的第二 PTP通告消息之后,根据第一 PTP通告消息和第二 PTP 通告消息确定 NE1的时钟参数最优,并根据第一 PTP通告消息将本地时钟同步到 NE1 上, 其中, 第二 PTP通告消息中携带有 NE2的第二设备优先级和第二层优先级, 第一 设备优先级高于第二设备优先级。 在本实施例中, 在步骤 S202之前, 该方法还可以包括: 为 NE1配置第一时钟标 识、 第一层优先级、 第一设备优先级以及时钟等级, 其中, 第一时钟标识为 NE1的媒 体接入控制层 MAC地址; 为 NE2配置第二时钟标识、 第二层优先级、 第二设备优先 级以及时钟等级, 其中, 第二时钟标识为 NE2的 MAC地址; 为 NE3配置第三时钟标 识、 第二层优先级、 第三设备优先级以及时钟等级, 其中, 第三时钟标识为 NE2 的 MAC地址; 其中, 第二设备优先级高于第三设备优先级。 在本实施例中, 在执行步骤 S202 之后且在执行步骤 S204 之前, 还将 NE2 的 1PPS+TOD同步输入接口映射为 PTP同步输入端口。 优选地, 将 NE2的 1PPS+TOD同步输入接口映射为 PTP同步输入端口, 包括: 为 NE2构建 1PPS+TOD参考源的数据集, 其中, 数据集包括: 第二时钟标识、 第二 层优先级、 第二设备优先级、 时钟等级、 端口号、 跳数、 时钟精度、 时钟抖动、 时钟 源以及时标。 在本实施例中,第一 PTP通告消息还包括:第一时钟标识以及时钟等级;第二 PTP 通告消息还包括: 第二时钟标识以及时钟等级。 在本实施例中, 当 NE3根据第一 PTP通告消息和第二 PTP通告消息确定 NE1的 时钟参数最优,并根据第一 PTP通告消息将本地时钟同步到 NE1上,可以通过以下方 式来实现: NE3在确定第一层优先级高于第二层优先级、 且第一设备优先级高于第二 设备优先级后,确定 NE1的时钟参数最优; NE3根据第一层优先级、第一设备优先级、 第一时钟标识以及时钟等级结合最佳主时钟 BMC算法将本地时钟同步到 NE1上。 在实际应用中, 首先, 把 1PPS+TOD同步输入接口映射为 PTP端口, 即在本地节 点 (具有多种类型同步接口的同步设备, 下同) 构建 1PPS+TOD参考源的数据集, 数 据集包括 grandmasterldentity、 priority 1、 priority2、 ClockClass、 portNumber、 stepsRemoved、 clockAccuracy offsetScaledLogVariance timesource、 TimeScale; 进一 步地, 在 1PPS+T0D接口上, 配置 priorityl、 priority2, 用于和 PTP接口进行混合选 源; 在本地节点上, 配置 grandmasterldentity, ClockClass, priority 1 priority2等参数, 但配置的优先级必须低于上游节点, 即采用 PTP priorityl进行同步网分层 /分级, 同级 同步网络 Priority 1相同; PTP Priority 2用于区分主备, 即同层 /级设备采用 Priority2 进行主备倒换。 这时, 如果设备选择 1PPS+T0D作为当前最佳主时间源, 而输出端口 类型为 PTP, 则发送的 PTP Announce 报文中的优先级参数 ( grandmasterPriorityl/ grandmasterPriority2) 可以为本地节点配置的优先级参数 ( riority l/priority2); 最后, 当上游节点收到本节点发出的 PTP Announce 报文, 发现报文中的优先级参数 ( grandmasterPriority 1 / grandmasterPriority2 ) 低 于 自 身 时钟优先 级参数 (priority l/priority2), 则不会选择其作为最佳主时间源; 从而避免了定时环路。 下面结合图 3、 图 4 以及一个优选实施例对上述实施例提供的时间同步方法进行 进一步的描述。 通过该优选实施例提供的时间同步方法, 能够避免当前方法在不同时 间技术进行混合选源时容易导致的定时环路问题, 大致步骤为: (1 ) 通过时钟优先级 参数对时间网进行分层; (2)当选中 1PPS+TOD接口作为主时钟后, 向下游发送的 PTP announce消息中携带的时钟优先级低于上游参考源和上游节点的时钟优先级。 请同时参考图 3和图 4, 图 3是根据本发明优选实施例的时间环网场景下的时间 同步方法流程图,图 4是根据本发明优选实施例的时间环网场景下的时间同步示意图。 如图 3所示,该优选实施例提供的时间同步方法包括以下步骤(步骤 S302-步骤 S310): 步骤 S302, 通过时钟优先级参数, 对时间网进行分层, 将时间网分为 2个层次; 层次 1包括 NE1及其上游节点, 对应的优先级 1=20; 层次 2包括 NE2, NE3和 NE4, 对应的优先级 1=30。 步骤 S304, 对 NE2设备, 把 1PPS+TOD同步输入接口映射为 PTP接口, 即在本 地节点构建 1PPS+TOD参考源的数据集, 配置 priorityl=10, priority2=10。 步骤 S306, NE2 运行 BMC (Best Master Clock, 最佳主时钟) 算法, 将选择 1PPS+TOD接口作为主时间源; 这时, 1PPS+TOD接口为 Slave状态, 其它 PTP接口 为 Master状态。 步骤 S308, NE2通过 PTP端口, 分别向 NE3, NE4发送 PTP Announce消息, 消 息中携带的时钟参数分别为: grandmasterldentity为 NE2的 MAC地址, priority 1和 priority2为 NE2设备自身的时钟参数; 即发送的 Announce消息中, priority 1为 30, priority2为 22, ClockClass仍为 TOD秒脉冲状态对应的值。 步骤 S310, NE3收到 NE2和 NE1的 PTP Announce消息, 发现 NE1时钟参数最 优; 根据 BMC算法, NE3将同步到 NE1, 而不会同步到 NE2; 从而 NE1, NE2和 NE3之间不会形成定时环路 (请参考图 4)。 采用上述实施例提供的时间同步方法, 能够解决相关技术中不同时间同步技术进 行混合选源时容易导致定时环路的问题, 进而达到了提高时间同步网的可靠性, 扩大 不同的时间同步技术的混和应用领域的效果。 图 5是根据本发明实施例的时间同步系统的结构框图, 该系统用以实现上述实施 例提供的时间同步方法, 如图 5所示, 该系统主要包括: 分层模块 10、 接收模块 20、 确定模块 30以及同步模块 40。 其中, 分层模块 10, 设置为将时间网中的第一网络设 备 (NE1 ) 和 NE1的上游节点划分为第一层次, 将 NE1的下游节点划分为第二层次, 其中, 第一层次进行时间同步需要用到的第一层优先级高于第二层次进行时间同步需 要用到的第二层优先级; 接收模块 20,位于下游节点中的通过精确时间协议 PTP同步 链路与 NE1连接的第三网络设备 (NE3 ) 上, 设置为接收来自 NE1的第一 PTP通告 消息和下游节点中的通过 1PPS+TOD同步链路与 NE1连接的第二网络设备(NE2)发 送的第二 PTP通告消息, 其中, 第一 PTP通告消息中携带有 NE1的第一设备优先级 和第一层优先级; 确定模块 30, 位于 NE3上, 设置为根据第一 PTP通告消息和第二 PTP通告消息确定 NE1的时钟参数最优; 同步模块 40, 位于 NE3上, 设置为根据第 一 PTP通告消息将本地时钟同步到 NE1上, 其中, 第二 PTP通告消息中携带有 NE2 的第二设备优先级和第二层优先级, 第一设备优先级高于第二设备优先级。 图 6是根据本发明优选实施例的时间同步系统的结构框图优选地, 如图 6所示, 该优选实施例提供的时间同步系统还包括:配置模块 50,设置为为 NE1配置第一时钟 标识、 第一层优先级、 第一设备优先级以及时钟等级, 其中, 第一时钟标识为 NE1的 媒体接入控制层 MAC地址; 配置模块 50还设置为为 NE2配置第二时钟标识、 第二 层优先级、第二设备优先级以及时钟等级, 其中, 第二时钟标识为 NE2的 MAC地址; 配置模块 50还设置为为 NE3配置第三时钟标识、 第二层优先级、 第三设备优先级以 及时钟等级, 其中, 第三时钟标识为 NE2的 MAC地址; 其中, 第二设备优先级高于 第三设备优先级。 该优选实施例中提供的时间同步系统还可以包括: 映射模块 60, 设置为将 NE2 的 1PPS+TOD同步输入接口映射为 PTP同步输入端口。 在该优选实施例中,映射模块 60包括:构建单元 62,设置为为 NE2构建 1PPS+TOD 参考源的数据集, 其中, 数据集包括: 第二时钟标识、 第二层优先级、 第二设备优先 级、 时钟等级、 端口号、 跳数、 时钟精度、 时钟抖动、 时钟源以及时标。 优选地, 第一 PTP通告消息还包括: 第一时钟标识以及时钟等级; 第二 PTP通告 消息还包括: 第二时钟标识以及时钟等级。 在该优选实施例中, 确定模块 30包括: 确定单元 32, 设置为在确定第一层优先 级高于第二层优先级、 且第一设备优先级高于第二设备优先级后, 确定 NE1的时钟参 数最优; 同步模块 40包括: 同步单元 42, 设置为根据第一层优先级、 第一设备优先 级、第一时钟标识以及时钟等级结合最佳主时钟 BMC算法将本地时钟同步到 NE1上。 采用上述实施例提供的时间同步系统, 能够解决相关技术中不同时间同步技术进 行混合选源时容易导致定时环路的问题, 进而达到了提高时间同步网的可靠性, 扩大 不同的时间同步技术的混和应用领域的效果。 从以上的描述中, 可以看出, 本发明实现了如下技术效果: 通过将时间网中的输 出端口与 1PPS+TOD同步链路连接的第一网络设备(NE1 )禾 B NE1的上游节点、 以及 NE1 的下游节点划分为具有不同优先级的不同层次, 下游节点中除输出端口与 1PPS+TOD同步链路连接的 NE2之外的 NE3在接收到 NE1和 NE2发送的时间同步消 息后进行判断, 确定 NE1的时间同步参数为最优后将本地时钟同步到 NE1上的方式, 解决了相关技术中不同时间同步技术进行混合选源时容易导致定时环路的问题, 进而 达到了提高时间同步网的可靠性, 扩大不同的时间同步技术的混和应用领域的效果。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 工业实用性 通过本发明的技术方案, 可以将时间网中的输出端口与 1PPS+TOD同步链路连接 的 NE1和 NE1 的上游节点、 下游节点划分为具有不同优先级的不同层次, 下游节点 中除输出端口与 1PPS+TOD同步链路连接的 NE2之外的 NE3在接收到 NE1和 NE2 发送的时间同步消息后进行判断,确定 NE1的时间同步参数为最优后将本地时钟同步 到 NE1上。 通过这种方式, 达到了提高时间同步网的可靠性的效果。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种时间同步方法, 包括:
将时间网中的第一网络设备 NE1和所述 NE1的上游节点划分为第一层次, 将所述 NE1的下游节点划分为第二层次, 其中, 所述第一层次进行时间同步需 要用到的第一层优先级高于所述第二层次进行时间同步需要用到的第二层优先 级, 所述 NE1的输出端口与 1PPS+TOD同步链路连接;
所述下游节点中的通过精确时间协议 PTP同步链路与所述 NE1连接的第 三网络设备 NE3接收来自所述 NE1的第一 PTP通告消息,其中,所述第一 PTP 通告消息中携带有所述 NE1的第一设备优先级和所述第一层优先级;
所述 NE3在接收到所述下游节点中的通过所述 1PPS+TOD同步链路与所 述 NE1连接的第二网络设备 NE2发送的第二 PTP通告消息之后, 根据所述第 一 PTP通告消息和所述第二 PTP通告消息确定所述 NE1的时钟参数最优, 并 根据所述第一 PTP通告消息将本地时钟同步到所述 NE1上, 其中, 所述第二 PTP通告消息中携带有所述 NE2的第二设备优先级和所述第二层优先级,所述 第一设备优先级高于所述第二设备优先级。
2. 根据权利要求 1所述的方法, 其中, 在将时间网中的第一网络设备 NE1和所述 NE1的上游节点划分为第一层次之前, 包括:
为所述 NE1配置第一时钟标识、所述第一层优先级、所述第一设备优先级 以及时钟等级, 其中, 所述第一时钟标识为所述 NE1的媒体接入控制层 MAC 地址;
为所述 NE2配置第二时钟标识、所述第二层优先级、所述第二设备优先级 以及所述时钟等级, 其中, 所述第二时钟标识为所述 NE2的 MAC地址; 为所述 NE3配置第三时钟标识、所述第二层优先级、第三设备优先级以及 所述时钟等级, 其中, 所述第三时钟标识为所述 NE2的 MAC地址;
其中, 所述第二设备优先级高于所述第三设备优先级。
3. 根据权利要求 2所述的方法,其中,在所述下游节点中的通过精确时间协议 PTP 同步链路与所述 NE1连接的第三网络设备 NE3接收来自所述 NE1的第一时间 同步消息之前, 还包括:
将所述 NE2的 1PPS+TOD同步输入接口映射为 PTP同步输入端口。
4. 根据权利要求 3所述的方法, 其中, 将所述 NE2的 1PPS+TOD同步输入接口 映射为 PTP同步输入端口, 包括:
为所述 NE2构建 1PPS+TOD参考源的数据集, 其中, 所述数据集包括: 所述第二时钟标识、所述第二层优先级、所述第二设备优先级、所述时钟等级、 端口号、 跳数、 时钟精度、 时钟抖动、 时钟源以及时标。
5. 根据权利要求 2所述的方法, 其中,
所述第一 PTP通告消息还包括: 所述第一时钟标识以及所述时钟等级; 所述第二 PTP通告消息还包括: 所述第二时钟标识以及所述时钟等级。
6. 根据权利要求 2至 5中任一项所述的方法, 其中, 所述 NE3根据所述第一 PTP 通告消息和所述第二 PTP通告消息确定所述 NE1 的时钟参数最优, 并根据所 述第一 PTP通告消息将本地时钟同步到所述 NE1上, 包括:
所述 NE3在确定所述第一层优先级高于所述第二层优先级、且所述第一设 备优先级高于所述第二设备优先级后, 确定所述 NE1的时钟参数最优;
所述 NE3根据所述第一层优先级、所述第一设备优先级、所述第一时钟标 识以及所述时钟等级结合最佳主时钟 BMC 算法将本地时钟同步到所述 NE1 上。
7. 一种时间同步系统, 包括:
分层模块, 设置为将时间网中的第一网络设备 NE1和所述 NE1 的上游节 点划分为第一层次, 将所述 NE1的下游节点划分为第二层次, 其中, 所述第一 层次进行时间同步需要用到的第一层优先级高于所述第二层次进行时间同步需 要用到的第二层优先级, 所述 NE1的输出端口与 1PPS+TOD同步链路连接; 接收模块,位于所述下游节点中的通过精确时间协议 PTP同步链路与所述 NE1连接的第三网络设备 NE3上, 设置为接收来自所述 NE1的第一 PTP通告 消息和所述下游节点中的通过所述 1PPS+TOD同步链路与所述 NE1连接的第 二网络设备 NE2发送的第二 PTP通告消息, 其中, 所述第一 PTP通告消息中 携带有所述 NE1的第一设备优先级和所述第一层优先级;
确定模块, 位于所述 NE3上, 设置为根据所述第一 PTP通告消息和所述 第二 PTP通告消息确定所述 NE1的时钟参数最优;
同步模块, 位于所述 NE3上, 设置为根据所述第一 PTP通告消息将本地 时钟同步到所述 NE1上, 其中, 所述第二 PTP通告消息中携带有所述 NE2的 第二设备优先级和所述第二层优先级, 所述第一设备优先级高于所述第二设备 优先级。
8. 根据权利要求 7所述的系统, 其中,
所述系统还包括: 配置模块, 设置为为所述 NE1配置第一时钟标识、 所述 第一层优先级、 所述第一设备优先级以及时钟等级, 其中, 所述第一时钟标识 为所述 NE1的媒体接入控制层 MAC地址;
所述配置模块还设置为为所述 NE2 配置第二时钟标识、 所述第二层优先 级、 所述第二设备优先级以及所述时钟等级, 其中, 所述第二时钟标识为所述 NE2的 MAC地址;
所述配置模块还设置为为所述 NE3 配置第三时钟标识、 所述第二层优先 级、 第三设备优先级以及所述时钟等级, 其中, 所述第三时钟标识为所述 NE2 的 MAC地址;
其中, 所述第二设备优先级高于所述第三设备优先级。
9. 根据权利要求 8所述的系统, 其中, 所述系统还包括:
映射模块, 设置为将所述 NE2的 1PPS+TOD同步输入接口映射为 PTP同 步输入端口。
10. 根据权利要求 9所述的系统, 其中, 所述映射模块包括:
构建单元, 设置为为所述 NE2构建 1PPS+TOD参考源的数据集, 其中, 所述数据集包括: 所述第二时钟标识、 所述第二层优先级、 所述第二设备优先 级、 所述时钟等级、 端口号、 跳数、 时钟精度、 时钟抖动、 时钟源以及时标。
11. 根据权利要求 8所述的系统, 其中,
所述第一 PTP通告消息还包括: 所述第一时钟标识以及所述时钟等级; 所述第二 PTP通告消息还包括: 所述第二时钟标识以及所述时钟等级。
12. 根据权利要求 7至 11中任一项所述的系统, 其中, 所述确定模块包括: 确定单元, 设置为在确定所述第一层优先级高于所述 第二层优先级、 且所述第一设备优先级高于所述第二设备优先级后, 确定所述 NE1的时钟参数最优; 所述同步模块包括: 同步单元, 设置为根据所述第一层优先级、 所述第一 设备优先级、 所述第一时钟标识以及所述时钟等级结合最佳主时钟 BMC算法 将本地时钟同步到所述 NE1上。
PCT/CN2013/089288 2012-12-31 2013-12-12 时间同步方法及系统 WO2014101669A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/758,619 US9577774B2 (en) 2012-12-31 2013-12-12 Time synchronization method and system
EP13867348.8A EP2941065A4 (en) 2012-12-31 2013-12-12 TIME SYNCHRONIZATION PROCESS AND DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210591677.8A CN103916950B (zh) 2012-12-31 2012-12-31 时间同步方法及系统
CN201210591677.8 2012-12-31

Publications (1)

Publication Number Publication Date
WO2014101669A1 true WO2014101669A1 (zh) 2014-07-03

Family

ID=51019869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/089288 WO2014101669A1 (zh) 2012-12-31 2013-12-12 时间同步方法及系统

Country Status (4)

Country Link
US (1) US9577774B2 (zh)
EP (1) EP2941065A4 (zh)
CN (1) CN103916950B (zh)
WO (1) WO2014101669A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105356990A (zh) * 2015-10-30 2016-02-24 国网冀北电力有限公司信息通信分公司 时间同步方法

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6390239B2 (ja) * 2014-07-25 2018-09-19 富士ゼロックス株式会社 情報処理装置、及びプログラム
CN105471538B (zh) * 2014-09-10 2019-01-01 中国移动通信集团公司 一种实现时间同步的方法及装置
EP3032785B1 (en) * 2014-12-12 2022-04-06 Net Insight AB Transport method in a communication network
US9531530B2 (en) 2015-03-31 2016-12-27 Alcatel Lucent Faster synchronization time and better master selection based on dynamic accuracy information in a network of IEEE 1588 clocks
CN106301647B (zh) * 2015-06-05 2019-04-19 中兴通讯股份有限公司 一种实现交替bmc的方法及装置
CN106533597B (zh) * 2015-09-10 2019-05-10 华为技术有限公司 一种时间源的选择方法及网元节点
WO2017130034A1 (en) * 2016-01-27 2017-08-03 Telefonaktiebolaget Lm Ericsson (Publ) A method of timing loop prevention for the precision time protocol (ptp) with g.8275.1 profile
JP6820586B2 (ja) * 2016-08-31 2021-01-27 株式会社メディアリンクス 時刻同期システム
US10257825B2 (en) 2016-09-30 2019-04-09 Intel Corporation Reducing hardware precision time measurement inaccuracy
CN108123773B (zh) * 2016-11-30 2021-07-06 中国移动通信有限公司研究院 一种时间同步方法及设备
CN107171762B (zh) * 2017-05-09 2019-04-02 烽火通信科技股份有限公司 一种1pps+tod信息单总线传送同步系统及方法
US10666372B2 (en) * 2017-06-30 2020-05-26 Qualcomm Incorporated Precision time protocol over cellular
CN109327273B (zh) * 2018-01-02 2021-03-05 中国移动通信有限公司研究院 同步信息传输方法、同步方法、网络节点及存储介质
US10887037B2 (en) 2018-05-17 2021-01-05 Juniper Networks, Inc. Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP
US10820290B2 (en) 2018-08-13 2020-10-27 At&T Intellectual Property I, L.P. Over the air synchronization by means of a protocol in a next generation wireless network
CN112715019B (zh) * 2018-09-21 2022-07-08 三菱电机株式会社 通信装置、通信系统、通信方法及计算机可读取的记录介质
WO2020059138A1 (ja) 2018-09-21 2020-03-26 三菱電機株式会社 通信装置、通信システム、通信方法および通信プログラム
JP6800390B2 (ja) 2018-09-21 2020-12-16 三菱電機株式会社 通信装置、通信システム、通信方法および通信プログラム
CN111277349B (zh) * 2018-12-04 2023-12-22 深圳市中兴微电子技术有限公司 一种时钟同步的方法及系统
WO2020129219A1 (ja) * 2018-12-20 2020-06-25 三菱電機株式会社 ネットワーク装置、ネットワークシステム、ネットワーク方法、およびネットワークプログラム
CN111479318B (zh) * 2019-01-23 2022-03-29 中国移动通信有限公司研究院 一种跨链路干扰回避方法、装置和可读介质
US10958727B2 (en) 2019-02-07 2021-03-23 International Business Machines Corporation Facilitating precision time protocol use in a coordinated timing network
US10903924B2 (en) * 2019-02-07 2021-01-26 International Business Machines Corporation Setting primary reference time of server time protocol facility of a coordinated timing network to a precision-time-protocol source
CN110138490A (zh) * 2019-05-14 2019-08-16 浙江国利网安科技有限公司 一种时钟竞争的方法与装置
US11064449B2 (en) 2019-08-16 2021-07-13 At&T Intellectual Property I, L.P. Over the air synchronization of network nodes
US11502767B2 (en) * 2019-08-16 2022-11-15 Arista Networks, Inc. VLAN-aware clock synchronization
CN113904747A (zh) * 2021-05-25 2022-01-07 北京卫星导航中心 一种基于多网系的时间同步方法、系统和介质
CN114173367B (zh) * 2021-12-23 2023-11-03 烽火通信科技股份有限公司 时间同步路径保护方法、装置及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100780670B1 (ko) * 2006-03-28 2007-11-30 포스데이타 주식회사 무선통신 시스템에서의 샘플링 클록 신호 선택 방법 및장치
CN101222403A (zh) * 2008-01-29 2008-07-16 杭州华三通信技术有限公司 在任意拓扑的相交环网上实现时间同步的方法和节点
CN102006135A (zh) * 2010-12-03 2011-04-06 北京华环电子股份有限公司 一种选择同步时钟源的方法及装置
CN102130736A (zh) * 2011-03-18 2011-07-20 华为技术有限公司 处理时钟信息的方法、装置和系统
CN102368696A (zh) * 2011-09-14 2012-03-07 杭州华三通信技术有限公司 一种选择同步时钟源的方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7986700B2 (en) * 2006-09-25 2011-07-26 Futurewei Technologies, Inc. Multiplexed data stream circuit architecture
US20090029645A1 (en) * 2007-07-25 2009-01-29 Teenay Wireless, Inc. Multi-Tier Backhaul Network System with Traffic Differentiation and Advanced Processing Capabilities and Methods Therefor
FR2939587B1 (fr) * 2008-12-09 2011-04-08 Alcatel Lucent Horloge pour un noeud d'un reseau a commutation de paquets et procede de synchronisation associe.
JP5560706B2 (ja) * 2009-12-28 2014-07-30 富士通株式会社 ノード装置
US8630315B2 (en) * 2010-02-17 2014-01-14 Ciena Corporation Ethernet network synchronization systems and methods
CN102420688A (zh) * 2011-12-13 2012-04-18 中兴通讯股份有限公司 一种时钟频率同步方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100780670B1 (ko) * 2006-03-28 2007-11-30 포스데이타 주식회사 무선통신 시스템에서의 샘플링 클록 신호 선택 방법 및장치
CN101222403A (zh) * 2008-01-29 2008-07-16 杭州华三通信技术有限公司 在任意拓扑的相交环网上实现时间同步的方法和节点
CN102006135A (zh) * 2010-12-03 2011-04-06 北京华环电子股份有限公司 一种选择同步时钟源的方法及装置
CN102130736A (zh) * 2011-03-18 2011-07-20 华为技术有限公司 处理时钟信息的方法、装置和系统
CN102368696A (zh) * 2011-09-14 2012-03-07 杭州华三通信技术有限公司 一种选择同步时钟源的方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105356990A (zh) * 2015-10-30 2016-02-24 国网冀北电力有限公司信息通信分公司 时间同步方法

Also Published As

Publication number Publication date
EP2941065A1 (en) 2015-11-04
US9577774B2 (en) 2017-02-21
CN103916950A (zh) 2014-07-09
CN103916950B (zh) 2018-11-23
US20160013876A1 (en) 2016-01-14
EP2941065A4 (en) 2016-06-29

Similar Documents

Publication Publication Date Title
WO2014101669A1 (zh) 时间同步方法及系统
EP2782290A1 (en) Method, system and apparatus for implementing hybrid networking of multiple clock synchronization technologies
EP2802097B1 (en) Clock synchronization method and device
WO2013189176A2 (zh) 一种多同步域的时间同步系统、方法及跨域设备
JP2016502790A (ja) 時間同期方法及び装置
CN104145435A (zh) 使用精确时间协议的频率分配
US20160156427A1 (en) Clock recovery in a packet based network
WO2013152700A1 (zh) 微波网元的时钟源选择方法及装置
WO2012034330A1 (zh) 汇聚式网络中设备间的同步方法、系统和汇聚环设备
WO2011160595A1 (zh) 基于ptp及链路质量选取主时钟节点的方法、从时钟节点及系统
CN103595494B (zh) 一种适用于无线自组网的无中心时分多址同步方法
WO2012071910A1 (zh) 一种实现时间同步的方法及装置
WO2012163172A1 (zh) 一种时钟同步方法及设备
WO2011011932A1 (zh) 精确时间传递协议报文处理方法及装置
CN102457346A (zh) 时间同步实现方法及时钟节点
WO2015131350A1 (zh) 时钟同步方法、设备及通信系统
WO2013178148A1 (zh) 通信网络时钟同步方法和装置
CN102342051B (zh) 用于通过经由至少一个时间分发协议分开传输第一和第二数据来同步时钟的方法和相关的系统及模块
CN104092528A (zh) 一种时钟同步方法和装置
JP6437587B2 (ja) クロックを同期するための方法、システム、および装置
JP6555445B1 (ja) 時刻同期システム、タイムマスタ、管理マスタおよび時刻同期方法
CN102611546A (zh) 一种ptp时钟单播组播混合时钟系统及时钟同步方法
CN114584246B (zh) 基于fpga的无线自组网时间同步方法、系统及介质
WO2012152124A1 (zh) 外接时间端口的倒换方法及装置
WO2012136085A1 (zh) 以太网同步中的同步状态信息的传输方法和系统

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2013867348

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14758619

Country of ref document: US