[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2018153192A1 - Time synchronization method and apparatus - Google Patents

Time synchronization method and apparatus Download PDF

Info

Publication number
WO2018153192A1
WO2018153192A1 PCT/CN2018/073569 CN2018073569W WO2018153192A1 WO 2018153192 A1 WO2018153192 A1 WO 2018153192A1 CN 2018073569 W CN2018073569 W CN 2018073569W WO 2018153192 A1 WO2018153192 A1 WO 2018153192A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
network element
clock
synchronization
status
Prior art date
Application number
PCT/CN2018/073569
Other languages
French (fr)
Chinese (zh)
Inventor
都美江
罗彬�
何力
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018153192A1 publication Critical patent/WO2018153192A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration

Definitions

  • the present disclosure relates to the field of synchronization, and in particular to a time synchronization method and apparatus.
  • the clock synchronization method of the synchronous Ethernet +1 588v2 is generally used to establish the synchronization of the system frequency between the devices through the synchronous Ethernet, and the time synchronization is implemented by the Precision Time Protocol (PTP). Since the clock includes frequency and/or time, clock synchronization includes frequency synchronization and/or time synchronization.
  • PTP Precision Time Protocol
  • the source mastering mechanism of the time master synchronization network (Best Master Clock, BMC for short) is used to transmit time source quality information through the advertisement packet, and each time source in the system performs independent BMC operation.
  • the BMC algorithm includes two decision algorithms: a time state decision algorithm and a port state decision algorithm.
  • the use of BMC algorithm for network construction is not only unable to perform real-time manual intervention, but with the increase of the number of network elements, there is a problem of high complexity and easy looping, which greatly affects the efficiency of time synchronization network establishment. .
  • the stability of the network also affects the accuracy of synchronization.
  • the time synchronization BMC algorithm causes the time synchronization network to be inconsistent with the frequency synchronization network, which makes the time synchronization device and the main device clock frequency deviate, and cannot meet the sub-nanosecond time. The precision requirements for synchronization.
  • the embodiments of the present disclosure provide a time synchronization method and apparatus to solve at least the problem of poor time synchronization accuracy and being susceptible to network topology changes in the related art.
  • a time synchronization method including: performing time synchronization of the network element based on a clock synchronization result determined by a network element by a clock synchronization algorithm.
  • a time synchronization apparatus including: a synchronization module, configured to perform time synchronization of the network element based on a clock synchronization result determined by a network element by a clock synchronization algorithm.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps: time synchronization of the network element based on a clock synchronization result determined by the network element through a clock synchronization algorithm.
  • the time synchronization of the network element is performed based on the clock synchronization result determined by the network element through the clock synchronization algorithm. Therefore, the network can be quickly established, and the impact of the network topology change on the time synchronization is reduced, thereby solving the time synchronization precision. Problems that are poor and susceptible to changes in network topology can improve time accuracy and stability.
  • FIG. 1 is a block diagram showing the hardware structure of a mobile terminal according to a time synchronization method according to an embodiment of the present disclosure
  • FIG. 2 is a flow chart of a time synchronization method in accordance with an embodiment of the present disclosure
  • FIG. 3 is a structural block diagram of a time synchronization device according to an embodiment of the present disclosure.
  • FIG. 4 is a block diagram of a clock synchronization network in accordance with an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of an optional message description and interaction process according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of an optional clock decision algorithm (State Decision Algorithm, SDA for short) according to an embodiment of the present disclosure
  • FIG. 7 is a schematic diagram of a working principle of a clock time-associated synchronization state machine (Finite State Machine, FSM for short).
  • FSM Finite State Machine
  • Time deviation measurement and time synchronization After the time stamp message reply process, that is, the PTP synchronization message is continuously sent between the master device and the slave device to obtain an offset value (Offset), and the slave device can correct the local time value according to the Offset. The time to synchronize the master time with the local time.
  • Offset an offset value
  • An application scenario of the embodiment of the present application is: the network element completes frequency synchronization by using the selected frequency synchronization algorithm, and then uses the result of the frequency synchronization algorithm operation to implement time synchronization of the network.
  • the selected frequency synchronization algorithm is a Synchronization Status Message (SSM) in this solution.
  • SSM Synchronization Status Message
  • the principle of realizing the time synchronization of the network by using the result of the frequency synchronization algorithm is as follows: the master-slave relationship (that is, the port state) based on the SSM algorithm is passed through the protocol interaction mode (the middle section of the PLL in FIG.
  • time synchronization algorithm includes, but is not limited to, a Best Master Clock Algorithm (BMCA) in the embodiment of the present application. It should be noted that the “clock” core in the BMCA algorithm refers to “time”.
  • Embodiment 1 of the present application is as follows:
  • FIG. 1 is a hardware block diagram of a computer device of a time synchronization method according to an embodiment of the present disclosure.
  • computer device 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA)
  • processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA)
  • a memory 104 for storing data
  • a transmission device 106 for communication functions.
  • computer device 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the time synchronization method in the embodiment of the present disclosure, and the processor 102 executes various programs by running software programs and modules stored in the memory 104. Functional application and data processing, that is, the above method is implemented.
  • Memory 104 may include high speed random access memory and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 may include memory remotely located relative to processor 102, which may be connected to computer device 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is for receiving or transmitting data via a network.
  • the network specific examples described above may include a wireless network provided by a communication provider of computer device 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • FIG. 2 is a flowchart of a time synchronization method according to an embodiment of the present disclosure. As shown in FIG. 2, the process includes the following steps:
  • Step S202 Acquire a clock synchronization result determined by the network element by using a clock synchronization algorithm.
  • the clock synchronization result includes: a port status of the designated port in the network element, where the port status includes: a primary port status and a slave port. status.
  • the port status of the specified port in the network element is determined by: determining, according to the tracking state of the system clock of the network element, a port status of the designated port in the network element, where the tracking status includes: accepting an external Ethernet
  • the network clock that is, the above tracking status includes: accepting an external Ethernet clock and rejecting an external Ethernet clock.
  • Step S204 performing time synchronization based on the clock synchronization result.
  • step S204 may be expressed as the following implementation manner, but is not limited thereto:
  • the first port state and the second port state may be the same port state, or the second port state may follow the first port state.
  • the preset priority clock level range may be a high priority clock level range.
  • the priority data level range (Class ID) of the local data set may be any value from 0 to 127.
  • the preset priority clock level range is adjustable and is not limited to values between 0 and 127.
  • whether the class ID is set to be between 1-127 may be determined according to actual needs (whether or not the network element is designated as the top network element). Value, where the top network element refers to the device whose local clock does not track the external clock.
  • the process of determining the second port state of the specified port according to the comparison result may be implemented in the following manner, but is not limited thereto:
  • the comparison result indicates that the priority of the local data set is higher than the optimal port data set, determining the port status of the designated port as the primary port status; and the comparison result indicates that the local data set has a lower priority
  • the port status of the above designated port is determined to be a passive port status.
  • the method further includes: setting a source port ID in the Erbest to a parent port ID of the network element, where the parent port ID is And indicating a port corresponding to the specified port in the upstream device of the foregoing network element.
  • the Erbest of the specified port is obtained by: obtaining the number of route hops experienced by the specified port after receiving the specified packet; and receiving the data received by the port of the source node corresponding to the minimum route hop count of the route hop count. Stored in the above Erbest.
  • the foregoing local data set and/or the best port data set is used to store information required for time synchronization, including but not limited to: clock priority, clock level, clock type (eg, boundary clock, transparent transmission clock, etc.) ).
  • clock priority e.g., clock priority
  • clock level e.g., boundary clock, transparent transmission clock, etc.
  • clock type e.g., boundary clock, transparent transmission clock, etc.
  • the specific definition can be found in the related art, and will not be described here.
  • the source of the best port data set Erbest can be obtained by related technologies, and details are not described herein again.
  • the execution body of the foregoing steps may be a base station, a terminal, or the like, but is not limited thereto.
  • the first step is to complete the configuration of the time network with reference to the configuration of the clock source on the premise that the clock network is established.
  • time synchronization configuration is performed on the same network element port to establish a correct virtual local area network.
  • the ports in the direction of the primary ring are configured as a unified virtual LAN in the primary direction.
  • the ports in the direction of the standby ring are configured as a unified virtual LAN in the standby direction to ensure that the time synchronization is consistent with the clock synchronization network.
  • the local area network allows the standard PTP packets of the same VLAN to run on the specified virtual network. That is, the PTP packets in the primary direction can only be transmitted in the primary clock ring.
  • the PTP packets in the backup direction can only be in the backup clock ring. Transfer.
  • the second step is to be compatible with the standard PTP advertisement message, and use the information such as the port identifier of the clock node of the advertisement packet to perform the interaction of the time node information between the devices; wherein the advertisement message is transmitted in the specified virtual network, and the boundary clock is
  • a network composed of Boundary Clock (BC) devices advertisement packets are only transmitted to neighboring devices.
  • TC Transport Clock
  • the advertisement packet is transmitted to each device in the specified virtual network and transparently transmitted to each device.
  • the third step is to use the data set comparison algorithm of the BMC algorithm.
  • the data set comparison algorithm 1 is omitted, that is, all clock nodes received by the default receiving end have the same priority, and only the topological relationship between the nodes is compared.
  • the data set comparison algorithm 2 is used to traverse the number of experienced node hops of the received message on the port.
  • the source node with the shortest topology distance is used as the best port of the local port (the data exists in Erbest), that is, the data set comparison algorithm 2 is used to compare the data sets carried in each advertisement packet received by the port, and determine Erbest. Provides data support for port decision algorithms.
  • the state decision algorithm based on the clock source selection result is used to compare the PTP ports, and the port state is determined according to the SSM clock synchronization direction. If the Class ID of the local data set belongs to the number from 1 to 127, compare the local data set with Erbest. If the local data set is better, set the port to the master state. If the Erbest is better, set the port to the Passive port. If the Class ID of the local data set does not belong to the number between 1 and 127, the master/slave status of the port is controlled according to whether the device provides clock output or accepts input. If the port does not accept the external clock, it is set to the master state. If the port receives the external clock, it is set to the slave state. Even if the reference source clock is not configured, it is still set to the master state.
  • the port decision algorithm depends on the data set comparison algorithm 1 and the data set comparison algorithm 2 decision port state, except that the class ID of the local data set is 1 to 127.
  • the master-slave state of the clock source is completely used to determine the port state.
  • the Class ID of its local data set is a value from 1 to 127, so that it does not track the external device; for other devices, the Class ID of its local data set is set to a value other than 1 to 127, if not
  • the tracking external clock is set to the master state, and is set to the slave state if the external clock is tracked. If the port is not configured with a synchronous timing source, it is still set to the active state.
  • the port decision algorithm makes the top node not track the external network time, and also makes the time selection direction of the time node in the network consistent with the clock source selection direction.
  • the device port ID of the Erbest of the port is written to the parent port ID of the device, so that a logical master-slave relationship is established between the devices;
  • the device establishes a connection between the devices by using the signaling packet, and the device that is the slave port initiates a link to the master port device.
  • the master port interacts with the slave port to establish a link; for example, Node A and Node
  • the interaction between signaling packets is completed between B and clock synchronization is performed.
  • the time synchronization control is started after the clock is locked.
  • the normal PTP time synchronization deviation measurement is performed after the link is completed, and the time deviation of the master-slave clock is corrected, that is, after the time synchronization link is established, the standard PTP protocol message response measurement time deviation is adjusted and the master-slave time is adjusted.
  • a time synchronization device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a structural block diagram of a time synchronization apparatus according to an embodiment of the present disclosure. As shown in FIG. 3, the apparatus includes:
  • the obtaining module 30 is configured to obtain a clock synchronization result determined by the network element by using a clock synchronization algorithm.
  • the clock synchronization result includes: a port status of the designated port in the network element, where the port status includes: a primary port status And slave port status.
  • the port status of the specified port in the network element is determined by: determining, according to the tracking state of the system clock of the network element, a port status of the designated port in the network element, where the tracking status includes: accepting an external Ethernet
  • the network clock that is, the above tracking status includes two states: accepting an external Ethernet clock and rejecting an external Ethernet clock.
  • the synchronization module 32 is connected to the acquisition module 30 for performing time synchronization based on the clock synchronization result.
  • the synchronization module is configured to determine whether the local data set of the network element belongs to a preset priority clock level range; if the determination result is negative, triggering the following process: according to the system clock of the network element
  • the tracking state determines the state of the first port of the designated port in the network element; performs time synchronization of the network element according to the first port state; and compares the maximum value determined by the designated port of the network element when the determination result is yes
  • the priority of the local port data set and the local data set of the network element determining the second port status of the designated port according to the comparison result; performing time synchronization of the network element according to the second port status.
  • the Erbest of the network element is a data set obtained by acquiring the number of route hops that the designated port receives the specified packet, and the minimum route hop of the route hop count.
  • the data received by the port of the corresponding source node is stored in the above Erbest.
  • the synchronization module 32 is further configured to determine, according to the comparison result, that the priority of the local data set is higher than the best port data set, determine a port status of the designated port as a primary port status; When the comparison result indicates that the priority of the local data set is lower than the optimal port data set, the port status of the designated port is determined to be a passive passive port status.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination.
  • the forms are located in different processors.
  • Step 501 The clock node extracts an SSM optimal master clock according to the synchronization state information, where the SSM optimal master clock is used for the optimal master clock of the frequency synchronization;
  • Step 501 also includes:
  • the devices establish a clock synchronization network in the form of a ring network, completing the primary link (SEC1--SEC2------SEC6) and the backup link (SEC1--SEC6---- --SEC2) clock source configuration.
  • the illustration only describes the configuration of a single ring.
  • the large network is hierarchically configured according to the core layer, the aggregation layer, and the access layer.
  • the meaning of the SEC or EEC in FIG. 4 identifies the network device in the embodiment of the present application, and satisfies the clock requirement of the three-level clock.
  • Step 502 The time virtual local area network shown in FIG. 4 is configured into different virtual local area networks according to the primary link and the backup link. One is to achieve two-way time configuration independent of each other. Second, each virtual local area network includes all devices in the ring to ensure the normal delivery of packets within the ring.
  • the device in the clock synchronization network, the device enters the listening state after power-on and initialization, and listens to the received PTP advertisement packet.
  • the Node A decision is in the master state and enters the pre-active state.
  • the YES branch belongs to the content of the port decision algorithm of the original BMC standard, and the NO part is the modified content. If you decide the port by the content on the right side, you may encounter the problem that the top network element cannot decide, because the top network element does not track the devices in the network, and its clock needs special processing even if it is synchronized with the external clock source.
  • Step 601 The Node A periodically sends an advertisement packet, and the Node B updates the port data set after receiving the advertisement packet.
  • Step 602 Calculate the Erbest (Erbest) of the PTP port of the Node B according to the data set comparison algorithm 2;
  • the port status is determined for the port on which Erbest has been calculated.
  • the Node B decision is in the Slave state and enters the uncalibrated state.
  • Step 701 For the top network element, it is not desirable to track the external time, and it is also necessary to provide time output for the nodes in the network. Then, the Class of its local data set (D0) needs to be set to a value within 1 to 127, and the level of the local data set can be appropriately increased so that its local data set is larger than the data set of the remaining nodes in the network. This will assume that the local data set is larger than the port best data set Erbest, then set the port as the primary state. Even if the value is smaller than the best data set Erbest of the external network port, the port is set to the transparent transmission state, and the external time is not tracked;
  • Step 702 For a common node in the network, or even a node that hangs the branch network, the Class of the D0 needs to be set to a value other than 1 to 127, so that if the port tracks the external clock, it is set according to the port decision algorithm. Slave port; if the port does not track the best master clock, it is set to the master port. Set to the primary port even if the reference source clock is not configured.
  • the state machine of the standard PTP does not change. It is only because the SSM decides the PTP port state decision algorithm (SDA), and the condition of the original BMC decision is modified into the state machine of the SSM decision in the text description. FSM).
  • SDA PTP port state decision algorithm
  • Step 603 After completing the port decision algorithm, the Node A enters the master state, and the Node B enters the uncalibrated state after completing the port decision algorithm, and the Node B actively sends a signaling packet to the Node A to establish a link. After detecting the selection of the clock source, the Node B sends a Source Selected signaling packet to the Node A. After receiving the packet, the Node A notifies the Node B to perform the PLL START signaling packet of the phase-locked loop tracking. After detecting the phase-locked loop lock, the Node A sends a PLL LOCKED signaling message to the Node A.
  • the Node A After receiving the packet locked by the phase-locked loop, the Node A sends a TimeLock ModeOn to the Node B, and the Node B establishes the Node A after receiving the packet. Node B's time synchronization link links into the Slave state.
  • Step 604 Normally send PTP event synchronization message completion time synchronization.
  • the master sends a Sync event message to the slave (the time required to carry the estimated message transmission), and the device that enables the two-step method is further You need to send a FollowUp packet (with the current system time).
  • the slave After receiving the Sync packet, the slave sends a DelayReq event packet to the Master.
  • the Master then sends a DelayResp packet to the slave.
  • the Slave device After collecting the T1, T2, T3, and T4 timestamps, calculates the time offset offset between the slave device and the master device according to the formula, adjusts the local time, and completes the time synchronization.
  • the advertisement message is also periodically sent, and the time synchronization network is adjusted according to the change of the received data information. If the data set changes, the content is changed according to the contents of steps 601-603, and then continuously Step 604 is repeated to modify the slave time to complete the time tracking of the master device.
  • the foregoing solution provided by the embodiment improves the network construction efficiency of the time network, avoids the network looping, saves the time of the network establishment time, improves the precision of the time synchronization, and the like.
  • the existing 4G technology requires a time synchronization transmission of 1.5us.
  • next-generation mobile network technology and Pre5G high-density networking is required, and the requirements of 3GPP are once again highlighted.
  • high-real-time applications such as indoor positioning and augmented reality (AR)
  • AR augmented reality
  • higher requirements are also placed on time synchronization, and time synchronization of sub-nanoseconds has become an urgent problem to be solved. Therefore, it is necessary to adjust the original PTP network time synchronization source selection algorithm to achieve rapid network construction and reduce the impact of network topology changes on time synchronization.
  • the clock-to-phase synchronization is eliminated to eliminate the master-slave clock frequency deviation, improving the accuracy of time synchronization.
  • Embodiments of the present disclosure also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing time synchronization of the network element based on a clock synchronization result determined by the network element by a clock synchronization algorithm.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • modules or steps of the present disclosure described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. As such, the disclosure is not limited to any specific combination of hardware and software.
  • the time synchronization method provided by the embodiment of the present disclosure performs time synchronization of the network element based on a clock synchronization result determined by the network element by using a clock synchronization algorithm. Therefore, fast network construction can be implemented, and network topology change is reduced to generate time synchronization. The effect is to solve the problem that the time synchronization precision is not good and is susceptible to the network topology change, and the effect of improving time precision and stability is achieved.

Landscapes

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

Abstract

The present disclosure provides a time synchronization method and apparatus. The time synchronization method comprises: performing time synchronization of a network element according to a clock synchronization result determined by the network element by means of a clock synchronization algorithm.

Description

时间同步方法及装置Time synchronization method and device
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年02月22日递交的中国专利申请第201710097245.4号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。The present application claims priority to Chinese Patent Application No. 201710097245.4, filed on Feb. 22,,,,,,,,,,
技术领域Technical field
本公开涉及同步领域,具体而言,涉及一种时间同步方法及装置。The present disclosure relates to the field of synchronization, and in particular to a time synchronization method and apparatus.
背景技术Background technique
在分组传送网络中,一般采用同步以太网+1588v2的时钟同步的方法,通过同步以太网建立设备间系统频率的同步,通过精确时间同步协议(Precision Time Protocol,简称为PTP)实现时间同步,其中,由于时钟包括频率和/或时间,因此,时钟同步包括频率同步和/或时间同步。In the packet transmission network, the clock synchronization method of the synchronous Ethernet +1 588v2 is generally used to establish the synchronization of the system frequency between the devices through the synchronous Ethernet, and the time synchronization is implemented by the Precision Time Protocol (PTP). Since the clock includes frequency and/or time, clock synchronization includes frequency synchronization and/or time synchronization.
建立时间同步网络的最佳主时钟(Best Master Clock,简称为BMC)源选择机制通过通告报文传递时间源质量信息,系统中的每个时间源进行独立的BMC运算。BMC算法包括两个决策算法:时间状态决策算法、端口状态决策算法。The source mastering mechanism of the time master synchronization network (Best Master Clock, BMC for short) is used to transmit time source quality information through the advertisement packet, and each time source in the system performs independent BMC operation. The BMC algorithm includes two decision algorithms: a time state decision algorithm and a port state decision algorithm.
但是,利用BMC算法进行建网不仅无法进行实时人工干预,而且随着网元数量的增加呈现倍级的增长还存在算法复杂度高、容易成环的问题,大大影响了时间同步网络建立的效率。网络的稳定性也影响同步的精度,相关技术中时间同步BMC算法会导致时间同步网络与频率同步网络的不一致,使得时间同步的设备与主设备的时钟频率存在偏差,无法满足亚纳秒级时间同步的精度需求。However, the use of BMC algorithm for network construction is not only unable to perform real-time manual intervention, but with the increase of the number of network elements, there is a problem of high complexity and easy looping, which greatly affects the efficiency of time synchronization network establishment. . The stability of the network also affects the accuracy of synchronization. In the related art, the time synchronization BMC algorithm causes the time synchronization network to be inconsistent with the frequency synchronization network, which makes the time synchronization device and the main device clock frequency deviate, and cannot meet the sub-nanosecond time. The precision requirements for synchronization.
本部分为与本公开相关的背景技术信息,但是该背景技术信息不一定是现有技术。This section is background information related to the present disclosure, but the background information is not necessarily prior art.
发明内容Summary of the invention
本公开实施例提供了一种时间同步方法及装置,以至少解决相关技术中时间同步精度不佳且易受网络拓扑变化影响的问题。The embodiments of the present disclosure provide a time synchronization method and apparatus to solve at least the problem of poor time synchronization accuracy and being susceptible to network topology changes in the related art.
根据本公开的一个实施例,提供了一种时间同步方法,包括:基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步。According to an embodiment of the present disclosure, a time synchronization method is provided, including: performing time synchronization of the network element based on a clock synchronization result determined by a network element by a clock synchronization algorithm.
根据本公开的另一个实施例,提供了一种时间同步装置,包括:同步模块,用于基于 网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步。According to another embodiment of the present disclosure, a time synchronization apparatus is provided, including: a synchronization module, configured to perform time synchronization of the network element based on a clock synchronization result determined by a network element by a clock synchronization algorithm.
根据本公开的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步。According to still another embodiment of the present disclosure, a storage medium is also provided. The storage medium is arranged to store program code for performing the following steps: time synchronization of the network element based on a clock synchronization result determined by the network element through a clock synchronization algorithm.
通过本公开,基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步,因此,可以实现快速建网,减小网络拓扑改变对时间同步产生的影响,从而解决时间同步精度不佳且易受网络拓扑变化影响的问题,达到提高时间精度和稳定性的效果。Through the disclosure, the time synchronization of the network element is performed based on the clock synchronization result determined by the network element through the clock synchronization algorithm. Therefore, the network can be quickly established, and the impact of the network topology change on the time synchronization is reduced, thereby solving the time synchronization precision. Problems that are poor and susceptible to changes in network topology can improve time accuracy and stability.
本部分提供在本公开中所描述技术的各种实施方式和示例的概述,但并不是所公开技术的所有范围或所有特征的全部公开。This section provides an overview of various embodiments and examples of the techniques described in this disclosure, but not all of all or all of the features of the disclosed technology.
附图说明DRAWINGS
此处所说明的附图用来提供对本公开的进一步理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:The drawings described herein are provided to provide a further understanding of the present disclosure, which is a part of the present disclosure, and the description of the present disclosure and the description thereof are not intended to limit the disclosure. In the drawing:
图1是本公开实施例的一种时间同步方法的移动终端的硬件结构框图;1 is a block diagram showing the hardware structure of a mobile terminal according to a time synchronization method according to an embodiment of the present disclosure;
图2是根据本公开实施例的时间同步方法的流程图;2 is a flow chart of a time synchronization method in accordance with an embodiment of the present disclosure;
图3是根据本公开实施例的一种时间同步装置的结构框图;3 is a structural block diagram of a time synchronization device according to an embodiment of the present disclosure;
图4是根据本公开实施例的时钟同步网络的架构示意图;4 is a block diagram of a clock synchronization network in accordance with an embodiment of the present disclosure;
图5是根据本公开实施例的一种可选的报文描述及交互流程示意图;FIG. 5 is a schematic diagram of an optional message description and interaction process according to an embodiment of the present disclosure; FIG.
图6是根据本公开实施例的一种可选的时钟时间关联同步状态决策算法(State Decision Algorithm,简称为SDA)的原理示意图;6 is a schematic diagram of an optional clock decision algorithm (State Decision Algorithm, SDA for short) according to an embodiment of the present disclosure;
图7是时钟时间关联同步状态机(Finite State Machine,简称为FSM)的工作原理示意图。FIG. 7 is a schematic diagram of a working principle of a clock time-associated synchronization state machine (Finite State Machine, FSM for short).
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本公开。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present disclosure will be described in detail below with reference to the drawings in conjunction with the embodiments. 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.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second", and the like in the specification and claims of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在分组传送网络中采用的同步以太网+1588v2的时钟同步的方法过程的处理流程大致分成两个部分:The processing flow of the method of synchronizing Ethernet +1588v2 clock synchronization adopted in the packet transfer network is roughly divided into two parts:
(1)1588v2时间同步网络的建立:接收和认证来自其他时钟(时间)端口的通告报 文;利用BMC算法决策出端口的推荐状态;根据端口状态决策算法中进入推荐状态决策点完成端口数据集合的更新;按照推荐状态和“状态决策事件”,根据端口状态机决定端口的实际状态,建立主从关系。(1) Establishment of a 1588v2 time synchronization network: receiving and authenticating advertisement messages from other clock (time) ports; using the BMC algorithm to determine the recommended state of the outgoing port; completing the port data set according to the port state decision algorithm entering the recommended state decision point Update; according to the recommended status and "state decision event", the port state machine determines the actual state of the port, establishing a master-slave relationship.
(2)时间偏差测量和时间同步:经过时间戳消息应答过程,即主设备和从设备间不断发送PTP同步消息报文得到偏移值(Offset),从设备便可以根据Offset修正本地时间值,使本地时间同步主设备的时间。(2) Time deviation measurement and time synchronization: After the time stamp message reply process, that is, the PTP synchronization message is continuously sent between the master device and the slave device to obtain an offset value (Offset), and the slave device can correct the local time value according to the Offset. The time to synchronize the master time with the local time.
实施例1Example 1
本申请实施例的一个应用场景为:网元通过所选的频率同步算法完成频率同步,然后将通过频率同步算法运算的结果用于实现网络的时间同步。其中,所选频率同步算法,在本方案为同步状态信息算法(SSM,Synchronization Status Message)。将通过频率同步算法运算的结果用于实现网络的时间同步的实现原理如下:将基于SSM算法得出的主从关系(即为端口状态),通过协议交互方式(图6中间关于PLL的那一段交互)锁定在网元上(或者说在网元端口上进行锁定),然后基于这个(通过SSM算出的)端口状态,通过时间同步算法实现网络时间同步。上述时间同步算法,在本申请实施例中包括但不限于最佳主时钟算法(BMCA,Best Master Clock Algorithm),需要说明的是BMCA算法中的“时钟”核心指的是“时间”。An application scenario of the embodiment of the present application is: the network element completes frequency synchronization by using the selected frequency synchronization algorithm, and then uses the result of the frequency synchronization algorithm operation to implement time synchronization of the network. The selected frequency synchronization algorithm is a Synchronization Status Message (SSM) in this solution. The principle of realizing the time synchronization of the network by using the result of the frequency synchronization algorithm is as follows: the master-slave relationship (that is, the port state) based on the SSM algorithm is passed through the protocol interaction mode (the middle section of the PLL in FIG. 6) Interlocking is locked on the network element (or locked on the network element port), and then based on this port state (calculated by SSM), the network time synchronization is implemented by the time synchronization algorithm. The foregoing time synchronization algorithm includes, but is not limited to, a Best Master Clock Algorithm (BMCA) in the embodiment of the present application. It should be noted that the “clock” core in the BMCA algorithm refers to “time”.
基于上述场景,本申请实施例1采用的技术方案如下:Based on the above scenario, the technical solution adopted in Embodiment 1 of the present application is as follows:
本实施例所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在计算机设备上为例,图1是本公开实施例的一种时间同步方法的计算机设备的硬件结构框图。如图1所示,计算机设备10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,计算机设备10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided by this embodiment may be implemented in a mobile terminal, a computer terminal or the like. Taking a computer device as an example, FIG. 1 is a hardware block diagram of a computer device of a time synchronization method according to an embodiment of the present disclosure. As shown in FIG. 1, computer device 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) A memory 104 for storing data, and a transmission device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device. For example, computer device 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
存储器104可用于存储应用软件的软件程序以及模块,如本公开实施例中的时间同步方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非 易失性固态存储器。在一些实例中,存储器104可包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至计算机设备10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the time synchronization method in the embodiment of the present disclosure, and the processor 102 executes various programs by running software programs and modules stored in the memory 104. Functional application and data processing, that is, the above method is implemented. Memory 104 may include high speed random access memory and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 104 may include memory remotely located relative to processor 102, which may be connected to computer device 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机设备10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 106 is for receiving or transmitting data via a network. The network specific examples described above may include a wireless network provided by a communication provider of computer device 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
在本实施例中提供了一种运行于上述计算机设备的方法,图2是根据本公开实施例的时间同步方法的流程图,如图2所示,该流程包括如下步骤:In the embodiment, a method for operating the computer device is provided. FIG. 2 is a flowchart of a time synchronization method according to an embodiment of the present disclosure. As shown in FIG. 2, the process includes the following steps:
步骤S202,获取基于网元通过时钟同步算法确定的时钟同步结果;可选地,上述时钟同步结果包括:上述网元中指定端口的端口状态,其中,上述端口状态包括:主端口状态和从端口状态。Step S202: Acquire a clock synchronization result determined by the network element by using a clock synchronization algorithm. Optionally, the clock synchronization result includes: a port status of the designated port in the network element, where the port status includes: a primary port status and a slave port. status.
可选地,上述网元中指定端口的端口状态通过以下方式确定:依据上述网元的系统时钟的跟踪状态确定上述网元中指定端口的端口状态,其中,上述跟踪状态包括:是否接受外部以太网时钟,即上述跟踪状态包括:接受外部以太网时钟、拒绝接受外部以太网时钟。Optionally, the port status of the specified port in the network element is determined by: determining, according to the tracking state of the system clock of the network element, a port status of the designated port in the network element, where the tracking status includes: accepting an external Ethernet The network clock, that is, the above tracking status includes: accepting an external Ethernet clock and rejecting an external Ethernet clock.
步骤S204,基于上述时钟同步结果,进行时间同步。Step S204, performing time synchronization based on the clock synchronization result.
作为本申请的一个可选实施例,步骤S204可以表现为以下实现方式,但不限于此:As an optional embodiment of the present application, step S204 may be expressed as the following implementation manner, but is not limited thereto:
判断上述网元的本地数据集是否属于预设优先级时钟等级范围;在判断结果为否的情况下,触发以下处理过程:依据上述网元的系统时钟的跟踪状态确定上述网元中指定端口的第一端口状态;依据上述第一端口状态进行上述网元的时间同步;在判断结果为是的情况下,比较上述网元的指定端口所判断的最佳端口数据集与上述网元的本地数据集的优先级;根据比较结果确定上述指定端口的第二端口状态;依据上述第二端口状态进行上述网元的时间同步。需要说明的是,上述第一端口状态和第二端口状态可以是相同的端口状态,或者第二端口状态遵从第一端口状态。Determining whether the local data set of the network element belongs to the preset priority clock level range; if the determination result is no, triggering the following process: determining the designated port in the network element according to the tracking state of the system clock of the network element a first port state; performing time synchronization of the network element according to the first port state; and if the determination result is yes, comparing the optimal port data set determined by the designated port of the network element with the local data of the network element The priority of the set; determining the second port status of the designated port according to the comparison result; performing time synchronization of the network element according to the second port status. It should be noted that the first port state and the second port state may be the same port state, or the second port state may follow the first port state.
可选地,上述预设优先级时钟等级范围可以为高优先级时钟等级范围,例如本地数据集的优先级时钟等级范围(Class ID)的取值为0至127中的任意数值,当然,上述预设优先级时钟等级范围是可调的,并不限于0至127之间的数值。基于上述取值范围,在一个可选实施例中,在步骤S202之前,可以依据实际需要(是否将上述网元指定为顶端网元)确定是否将上述Class ID设置为在1-127之间取值,其中,顶端网元是指本地时钟不 跟踪外部时钟的设备。Optionally, the preset priority clock level range may be a high priority clock level range. For example, the priority data level range (Class ID) of the local data set may be any value from 0 to 127. The preset priority clock level range is adjustable and is not limited to values between 0 and 127. Based on the above-mentioned value range, in an optional embodiment, before step S202, whether the class ID is set to be between 1-127 may be determined according to actual needs (whether or not the network element is designated as the top network element). Value, where the top network element refers to the device whose local clock does not track the external clock.
可选地,“根据比较结果确定上述指定端口的第二端口状态”的处理过程可以通过以下方式实现,但不限于此:Optionally, the process of determining the second port state of the specified port according to the comparison result may be implemented in the following manner, but is not limited thereto:
在上述比较结果指示上述本地数据集的优先级高于上述最佳端口数据集的情况下,将上述指定端口的端口状态确定为主端口状态;在上述比较结果指示上述本地数据集的优先级低于上述最佳端口数据集(Erbest)的情况下,将上述指定端口的端口状态确定为被动(Passive)端口状态。When the comparison result indicates that the priority of the local data set is higher than the optimal port data set, determining the port status of the designated port as the primary port status; and the comparison result indicates that the local data set has a lower priority In the case of the above-mentioned best port data set (Erbest), the port status of the above designated port is determined to be a passive port status.
可选地,将上述指定端口的端口状态确定为被动(Passive)端口状态之后,上述方法还包括:将上述Erbest中的源端口ID设置为上述网元的父端口ID,其中,上述父端口ID用于指示上述网元的上游设备中与上述指定端口对应的端口。Optionally, after determining the port state of the specified port as a passive port state, the method further includes: setting a source port ID in the Erbest to a parent port ID of the network element, where the parent port ID is And indicating a port corresponding to the specified port in the upstream device of the foregoing network element.
可选地,上述指定端口的Erbest通过以下方式获取:获取上述指定端口收到指定报文所经历的路由跳数;将上述路由跳数中最小路由跳数对应的源节点的端口所接收的数据存储至上述Erbest中。Optionally, the Erbest of the specified port is obtained by: obtaining the number of route hops experienced by the specified port after receiving the specified packet; and receiving the data received by the port of the source node corresponding to the minimum route hop count of the route hop count. Stored in the above Erbest.
可选地,上述本地数据集和/或最佳端口数据集中用于存储进行时间同步所需要的信息,包括但不限于:时钟优先级、时钟等级、时钟类型(例如边界时钟、透传时钟等)。具体定义可以从相关技术中查询得知,此处不再赘述。其中,最佳端口数据集Erbest中的来源可以通过相关技术得到,此处不再赘述。Optionally, the foregoing local data set and/or the best port data set is used to store information required for time synchronization, including but not limited to: clock priority, clock level, clock type (eg, boundary clock, transparent transmission clock, etc.) ). The specific definition can be found in the related art, and will not be described here. The source of the best port data set Erbest can be obtained by related technologies, and details are not described herein again.
可选地,上述步骤的执行主体可以为基站、终端等,但不限于此。Optionally, the execution body of the foregoing steps may be a base station, a terminal, or the like, but is not limited thereto.
以下结合一个具体的应用场景详细说明上述方案:The following is a detailed description of the above solution in combination with a specific application scenario:
第一步,在时钟网络建立完成的前提下,参照时钟源的配置完成时间网络的配置。依照时钟网络局域网的配置,对同样的网元端口进行时间同步配置,建立正确的虚拟局域网。主用环方向内的端口配置成统一的主用方向虚拟局域网,备用环方向内的端口配置成统一的备用方向虚拟局域网,保证时间同步与时钟同步组网一致。其中,局域网使得同一VLAN的标准PTP报文只能在规定的虚拟网络中运行,即主用方向PTP报文只能在主用时钟环内传送,备用方向PTP报文只能在备用时钟环内传送。The first step is to complete the configuration of the time network with reference to the configuration of the clock source on the premise that the clock network is established. According to the configuration of the clock network LAN, time synchronization configuration is performed on the same network element port to establish a correct virtual local area network. The ports in the direction of the primary ring are configured as a unified virtual LAN in the primary direction. The ports in the direction of the standby ring are configured as a unified virtual LAN in the standby direction to ensure that the time synchronization is consistent with the clock synchronization network. The local area network allows the standard PTP packets of the same VLAN to run on the specified virtual network. That is, the PTP packets in the primary direction can only be transmitted in the primary clock ring. The PTP packets in the backup direction can only be in the backup clock ring. Transfer.
第二步,兼容标准PTP通告报文,利用通告报文收发时钟节点的端口标识等信息,进行设备间时间节点信息的交互;其中,通告报文在规定的虚拟网络内传送,在边界时钟(Boundary Clock,简称为BC)设备组成的网络中,通告报文仅传送至相邻设备。在包含透传时钟(Transfer Clock,简称为TC)设备的网络中,通告报文将传送至规定虚拟网络内相邻设备及透传到的每个设备。The second step is to be compatible with the standard PTP advertisement message, and use the information such as the port identifier of the clock node of the advertisement packet to perform the interaction of the time node information between the devices; wherein the advertisement message is transmitted in the specified virtual network, and the boundary clock is In a network composed of Boundary Clock (BC) devices, advertisement packets are only transmitted to neighboring devices. In a network that includes a Transport Clock (TC) device, the advertisement packet is transmitted to each device in the specified virtual network and transparently transmitted to each device.
第三步,使用BMC算法的数据集比较算法。省略其中的数据集比较算法1,即默认收端收到的所有的时钟节点的优先级相同,仅比较节点间的拓扑关系。使用数据集比较算法2遍历端口收到报文的经历节点跳数。将拓扑距离最短的源节点作为本端口的最佳端口(数据存在Erbest中),即数据集比较算法2用于对端口收到的每个通告报文携带的数据集进行比较,决策出Erbest,为端口决策算法提供数据支持。The third step is to use the data set comparison algorithm of the BMC algorithm. The data set comparison algorithm 1 is omitted, that is, all clock nodes received by the default receiving end have the same priority, and only the topological relationship between the nodes is compared. The data set comparison algorithm 2 is used to traverse the number of experienced node hops of the received message on the port. The source node with the shortest topology distance is used as the best port of the local port (the data exists in Erbest), that is, the data set comparison algorithm 2 is used to compare the data sets carried in each advertisement packet received by the port, and determine Erbest. Provides data support for port decision algorithms.
第四步,使用基于时钟选源结果的状态决策算法对PTP端口进行比较,依据SSM时钟同步方向决策端口状态。如果本地数据集的Class ID属于1~127之内的数,则比较本地数据集和Erbest,如果本地数据集更优则设置端口为Master状态;如果Erbest更优则设置端口为Passive端口。如果本地数据集的Class ID不属于1~127之间的数,则依据设备对外提供时钟输出或接受输入来控制端口的主从状态。如果端口不接受外来时钟则设置为Master状态,如果端口接收外来时钟则设置为Slave状态,即使没有配置参考源时钟依然设置为Master状态;In the fourth step, the state decision algorithm based on the clock source selection result is used to compare the PTP ports, and the port state is determined according to the SSM clock synchronization direction. If the Class ID of the local data set belongs to the number from 1 to 127, compare the local data set with Erbest. If the local data set is better, set the port to the master state. If the Erbest is better, set the port to the Passive port. If the Class ID of the local data set does not belong to the number between 1 and 127, the master/slave status of the port is controlled according to whether the device provides clock output or accepts input. If the port does not accept the external clock, it is set to the master state. If the port receives the external clock, it is set to the slave state. Even if the reference source clock is not configured, it is still set to the master state.
端口决策算法除了在本地数据集的Class ID是1~127之内值依赖数据集比较算法1和数据集比较算法2决策端口状态。对于本地数据集的Class ID不在1~127之内的情况,完全依靠时钟源的主从状态来决策端口状态。对于顶端设备,则将其本地数据集的Class ID是1~127的值,使其不跟踪外部设备;对于其他设备将其本地数据集的Class ID设为1~127之外的值,如果不跟踪外部时钟则设置为主用状态,如果跟踪外部时钟则设置为从状态。如果端口没有配置同步定时源,依然设置为主用状态。通过端口决策算法使得顶端节点不会跟踪外部网络时间,也使得网络内时间节点的时间选源方向与时钟选源方向一致。The port decision algorithm depends on the data set comparison algorithm 1 and the data set comparison algorithm 2 decision port state, except that the class ID of the local data set is 1 to 127. For the case where the Class ID of the local data set is not within the range of 1 to 127, the master-slave state of the clock source is completely used to determine the port state. For the top device, the Class ID of its local data set is a value from 1 to 127, so that it does not track the external device; for other devices, the Class ID of its local data set is set to a value other than 1 to 127, if not The tracking external clock is set to the master state, and is set to the slave state if the external clock is tracked. If the port is not configured with a synchronous timing source, it is still set to the active state. The port decision algorithm makes the top node not track the external network time, and also makes the time selection direction of the time node in the network consistent with the clock source selection direction.
第五步,对于决策为从(Slave)端口,会将该端口的Erbest的设备端口ID写成本设备的父端口ID,这样设备间就建立了逻辑的主从关系;In the fifth step, for the decision to be a slave port, the device port ID of the Erbest of the port is written to the parent port ID of the device, so that a logical master-slave relationship is established between the devices;
第六步,依靠信令报文建立设备间的连接,决策为从端口的设备主动向主端口设备发起链接,主端口收到报文后与从端口交互,建立链接;例如,Node A和Node B之间完成信令报文的交互,执行时钟同步。待时钟锁定后启动时间同步控制。In the sixth step, the device establishes a connection between the devices by using the signaling packet, and the device that is the slave port initiates a link to the master port device. After receiving the packet, the master port interacts with the slave port to establish a link; for example, Node A and Node The interaction between signaling packets is completed between B and clock synchronization is performed. The time synchronization control is started after the clock is locked.
第七步,链接完成后执行正常的PTP时间同步偏差测量,校正主从时钟的时间偏差,即待时间同步链路建立完成后,执行标准的PTP协议报文应答测量时间偏差和调整主从时间。In the seventh step, the normal PTP time synchronization deviation measurement is performed after the link is completed, and the time deviation of the master-slave clock is corrected, that is, after the time synchronization link is established, the standard PTP protocol message response measurement time deviation is adjusted and the master-slave time is adjusted. .
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术 做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, portions of the technical solutions of the present disclosure that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (eg, ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present disclosure.
实施例2Example 2
在本实施例中还提供了一种时间同步装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a time synchronization device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图3是根据本公开实施例的时间同步装置的结构框图,如图3所示,该装置包括:FIG. 3 is a structural block diagram of a time synchronization apparatus according to an embodiment of the present disclosure. As shown in FIG. 3, the apparatus includes:
获取模块30,用于获取基于网元通过时钟同步算法确定的时钟同步结果,可选地,上述时钟同步结果包括:上述网元中指定端口的端口状态,其中,上述端口状态包括:主端口状态和从端口状态。The obtaining module 30 is configured to obtain a clock synchronization result determined by the network element by using a clock synchronization algorithm. Optionally, the clock synchronization result includes: a port status of the designated port in the network element, where the port status includes: a primary port status And slave port status.
可选地,上述网元中指定端口的端口状态通过以下方式确定:依据上述网元的系统时钟的跟踪状态确定上述网元中指定端口的端口状态,其中,上述跟踪状态包括:是否接受外部以太网时钟,即上述跟踪状态包括:接受外部以太网时钟和拒绝接受外部以太网时钟两种状态。Optionally, the port status of the specified port in the network element is determined by: determining, according to the tracking state of the system clock of the network element, a port status of the designated port in the network element, where the tracking status includes: accepting an external Ethernet The network clock, that is, the above tracking status includes two states: accepting an external Ethernet clock and rejecting an external Ethernet clock.
同步模块32,连接至获取模块30,用于基于上述时钟同步结果,进行时间同步。The synchronization module 32 is connected to the acquisition module 30 for performing time synchronization based on the clock synchronization result.
可选地,上述同步模块,用于判断上述网元的本地数据集是否属于预设优先级时钟等级范围;在判断结果为否的情况下,触发以下处理过程:依据上述网元的系统时钟的跟踪状态确定上述网元中指定端口的第一端口状态;依据上述第一端口状态进行上述网元的时间同步;以及在判断结果为是的情况下,比较上述网元的指定端口所判断的最佳端口数据集与上述网元的本地数据集的优先级;根据比较结果确定上述指定端口的第二端口状态;依据上述第二端口状态进行上述网元的时间同步。Optionally, the synchronization module is configured to determine whether the local data set of the network element belongs to a preset priority clock level range; if the determination result is negative, triggering the following process: according to the system clock of the network element The tracking state determines the state of the first port of the designated port in the network element; performs time synchronization of the network element according to the first port state; and compares the maximum value determined by the designated port of the network element when the determination result is yes The priority of the local port data set and the local data set of the network element; determining the second port status of the designated port according to the comparison result; performing time synchronization of the network element according to the second port status.
作为本实施例的一个可选实施方式,上述网元的Erbest为通过以下方式获取的数据集:获取上述指定端口收到指定报文所经历的路由跳数;将上述路由跳数中最小路由跳数对应的源节点的端口所接收的数据存储至上述Erbest中。As an optional implementation manner of the embodiment, the Erbest of the network element is a data set obtained by acquiring the number of route hops that the designated port receives the specified packet, and the minimum route hop of the route hop count. The data received by the port of the corresponding source node is stored in the above Erbest.
可选地,上述同步模块32,还用于在上述比较结果指示上述本地数据集的优先级高于上述最佳端口数据集的情况下,将上述指定端口的端口状态确定为主端口状态;在上述比较结果指示上述本地数据集的优先级低于上述最佳端口数据集的情况下,将上述指定端 口的端口状态确定为被动Passive端口状态。Optionally, the synchronization module 32 is further configured to determine, according to the comparison result, that the priority of the local data set is higher than the best port data set, determine a port status of the designated port as a primary port status; When the comparison result indicates that the priority of the local data set is lower than the optimal port data set, the port status of the designated port is determined to be a passive passive port status.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination. The forms are located in different processors.
需要说明的是,本实施例中的优选实施方式可以参见实施例1中的相关描述,此处不再赘述。It should be noted that the preferred embodiment in this embodiment can be referred to the related description in Embodiment 1, and details are not described herein again.
实施例3Example 3
本实施例提供的时间同步方法包括以下处理步骤:The time synchronization method provided in this embodiment includes the following processing steps:
步骤501:时钟节点根据同步状态信息抽取SSM最佳主时钟,所述SSM最佳主时钟用于频率同步的最佳主时钟;Step 501: The clock node extracts an SSM optimal master clock according to the synchronization state information, where the SSM optimal master clock is used for the optimal master clock of the frequency synchronization;
步骤501还包括:Step 501 also includes:
如图4所示:设备之间依照环网的形式建立时钟同步网,完成主用链路(SEC1--SEC2------SEC6)和备用链路(SEC1--SEC6------SEC2)的时钟源配置。图例只是描述了单环的配置,大型的网络按照核心层、汇聚层和接入层分层配置。图4中的SEC或EEC所表示的含义标识本申请实施例中的网络设备,满足三级钟的时钟要求。As shown in Figure 4, the devices establish a clock synchronization network in the form of a ring network, completing the primary link (SEC1--SEC2------SEC6) and the backup link (SEC1--SEC6---- --SEC2) clock source configuration. The illustration only describes the configuration of a single ring. The large network is hierarchically configured according to the core layer, the aggregation layer, and the access layer. The meaning of the SEC or EEC in FIG. 4 identifies the network device in the embodiment of the present application, and satisfies the clock requirement of the three-level clock.
步骤502:如图4所示的时间虚拟局域网依照主用链路和备用链路配置成不同的虚拟局域网络。一则是实现双向时间配置的相互独立,二则每个虚拟局域网又包括了环内全部设备保证环内报文的正常传递。Step 502: The time virtual local area network shown in FIG. 4 is configured into different virtual local area networks according to the primary link and the backup link. One is to achieve two-way time configuration independent of each other. Second, each virtual local area network includes all devices in the ring to ensure the normal delivery of packets within the ring.
如图5所示,在时钟同步网络中,设备在上电、初始化之后进入监听状态,监听收到的PTP通告报文。依据数据集比较算法和图6所示的端口决策算法,Node A决策为Master状态,进入预主用状态。图6中,对于Class的判断,YES分支属于原有BMC标准的端口决策算法的内容,NO部分是修改的内容。如果单以右侧的内容来决策端口,可能遇到顶端网元无法决策的问题,因为顶端的网元不跟踪网络内的设备,其时钟即使同步于外部时钟源,所以需要特殊处理。As shown in Figure 5, in the clock synchronization network, the device enters the listening state after power-on and initialization, and listens to the received PTP advertisement packet. According to the data set comparison algorithm and the port decision algorithm shown in FIG. 6, the Node A decision is in the master state and enters the pre-active state. In Figure 6, for the judgment of Class, the YES branch belongs to the content of the port decision algorithm of the original BMC standard, and the NO part is the modified content. If you decide the port by the content on the right side, you may encounter the problem that the top network element cannot decide, because the top network element does not track the devices in the network, and its clock needs special processing even if it is synchronized with the external clock source.
步骤601:Node A定时发送通告报文,Node B收到通告报文后更新端口数据集;Step 601: The Node A periodically sends an advertisement packet, and the Node B updates the port data set after receiving the advertisement packet.
步骤602:依照数据集比较算法2,计算出Node B的PTP端口的Erbest(Erbest);Step 602: Calculate the Erbest (Erbest) of the PTP port of the Node B according to the data set comparison algorithm 2;
如图6所示,对已经计算出Erbest的端口,决策其端口状态。Node B决策为Slave状态,进入未标定状态。As shown in Figure 6, the port status is determined for the port on which Erbest has been calculated. The Node B decision is in the Slave state and enters the uncalibrated state.
步骤701:对于顶端网元,不希望其跟踪外部时间,而且还需要为网络内节点提供时 间输出。则需要将其本地数据集(D0)的Class设置成1~127内的数值,可适当提高本地数据集的等级,使得其本地数据集大于网络内其余节点的数据集。这样就会认为本地数据集大于端口最佳数据集Erbest,则设置端口为主用状态。即使其值小于外网端口最佳数据集Erbest,则设置端口为透传状态,并不会跟踪外部时间;Step 701: For the top network element, it is not desirable to track the external time, and it is also necessary to provide time output for the nodes in the network. Then, the Class of its local data set (D0) needs to be set to a value within 1 to 127, and the level of the local data set can be appropriately increased so that its local data set is larger than the data set of the remaining nodes in the network. This will assume that the local data set is larger than the port best data set Erbest, then set the port as the primary state. Even if the value is smaller than the best data set Erbest of the external network port, the port is set to the transparent transmission state, and the external time is not tracked;
步骤702:对于网络内普通节点,乃至于下挂支路网络的节点,需要将其D0的Class设置成1~127之外的数值,这样如果端口跟踪了外部时钟,则依据端口决策算法设置成从端口;如果端口没有跟踪最佳主时钟,则设置为主端口。即使没有配置参考源时钟,也设置为主端口。Step 702: For a common node in the network, or even a node that hangs the branch network, the Class of the D0 needs to be set to a value other than 1 to 127, so that if the port tracks the external clock, it is set according to the port decision algorithm. Slave port; if the port does not track the best master clock, it is set to the master port. Set to the primary port even if the reference source clock is not configured.
如图7所示,标准PTP的状态机并没有发生变化,仅是因为依靠SSM决策PTP端口状态决策算法(SDA),在文字描述中把原来BMC决策的条件相应修改成SSM决策的状态机(FSM)。As shown in Figure 7, the state machine of the standard PTP does not change. It is only because the SSM decides the PTP port state decision algorithm (SDA), and the condition of the original BMC decision is modified into the state machine of the SSM decision in the text description. FSM).
步骤603:Node A完成端口决策算法后进入Master状态,Node B完成端口决策算法后进入未标定状态,Node B主动向Node A发送信令报文建立链接。Node B在检测到时钟源选定之后向Node A发送Source Selected的信令报文,Node A在收到报文后通知Node B可以进行锁相环跟踪的PLL START信令报文,Node B在检测到锁相环锁定之后给Node A发送PLL LOCKED信令报文,Node A在收到锁相环锁定的报文后给Node B发送TimeLock ModeOn,Node B在收到报文后建立Node A和Node B的时间同步链路链接,进入Slave状态。Step 603: After completing the port decision algorithm, the Node A enters the master state, and the Node B enters the uncalibrated state after completing the port decision algorithm, and the Node B actively sends a signaling packet to the Node A to establish a link. After detecting the selection of the clock source, the Node B sends a Source Selected signaling packet to the Node A. After receiving the packet, the Node A notifies the Node B to perform the PLL START signaling packet of the phase-locked loop tracking. After detecting the phase-locked loop lock, the Node A sends a PLL LOCKED signaling message to the Node A. After receiving the packet locked by the phase-locked loop, the Node A sends a TimeLock ModeOn to the Node B, and the Node B establishes the Node A after receiving the packet. Node B's time synchronization link links into the Slave state.
步骤604:正常发送PTP事件同步报文完成时间同步,按照标准的执行模式,Master给Slave发送Sync事件报文(携带有预估的报文发送所需要的时间),启用两步法的设备还需要发送FollowUp报文(携带有当前系统时间),Slave在收到Sync报文后给Master回送DelayReq事件报文,Master再给Slave发送DelayResp普通报文。Slave设备在收集完成T1、T2、T3、T4时间戳后按照公式计算从设备与主设备的时间偏差offset,调整本地时间,完成时间同步。在时间同步报文交互的过程中,也会周期性地发送通告报文,根据收到数据信息的变化调整时间同步网络,如果数据集发生变化,按照步骤601~603的内容执行变更,之后不断重复步骤604即时修改从端时间完成对主端设备的时间跟踪。Step 604: Normally send PTP event synchronization message completion time synchronization. According to the standard execution mode, the master sends a Sync event message to the slave (the time required to carry the estimated message transmission), and the device that enables the two-step method is further You need to send a FollowUp packet (with the current system time). After receiving the Sync packet, the slave sends a DelayReq event packet to the Master. The Master then sends a DelayResp packet to the slave. After collecting the T1, T2, T3, and T4 timestamps, the Slave device calculates the time offset offset between the slave device and the master device according to the formula, adjusts the local time, and completes the time synchronization. During the time synchronization message exchange, the advertisement message is also periodically sent, and the time synchronization network is adjusted according to the change of the received data information. If the data set changes, the content is changed according to the contents of steps 601-603, and then continuously Step 604 is repeated to modify the slave time to complete the time tracking of the master device.
采用本实施例提供的上述方案,与相关技术相比,提升了时间网络的建网效率,避免了网络成环,节省了时间网络建立的时间,提高了时间同步的精度等等。Compared with the related technologies, the foregoing solution provided by the embodiment improves the network construction efficiency of the time network, avoids the network looping, saves the time of the network establishment time, improves the precision of the time synchronization, and the like.
现有的4G技术对时间同步的传输要求是1.5us,而随着下一代移动网络技术和Pre5G的发展,需要高密度的组网,3GPP的需求再次凸现出来。随着室内定位、增强现实(AR) 等高实时应用的发展,对时间同步也提出了更高的要求,亚纳秒的时间同步成了迫切需要解决的问题。因此需要对原有的PTP网络时间同步选源算法做出调整,实现快速建网,减小网络拓扑改变对时间同步产生的影响。通过实现时钟时间同向同步消除主从时钟频率偏差,提高时间同步的精度。The existing 4G technology requires a time synchronization transmission of 1.5us. With the development of next-generation mobile network technology and Pre5G, high-density networking is required, and the requirements of 3GPP are once again highlighted. With the development of high-real-time applications such as indoor positioning and augmented reality (AR), higher requirements are also placed on time synchronization, and time synchronization of sub-nanoseconds has become an urgent problem to be solved. Therefore, it is necessary to adjust the original PTP network time synchronization source selection algorithm to achieve rapid network construction and reduce the impact of network topology changes on time synchronization. The clock-to-phase synchronization is eliminated to eliminate the master-slave clock frequency deviation, improving the accuracy of time synchronization.
实施例4Example 4
本公开的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步。Embodiments of the present disclosure also provide a storage medium. Optionally, in this embodiment, the foregoing storage medium may be configured to store program code for performing time synchronization of the network element based on a clock synchronization result determined by the network element by a clock synchronization algorithm.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present disclosure described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. As such, the disclosure is not limited to any specific combination of hardware and software.
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above description is only a preferred embodiment of the present disclosure, and is not intended to limit the disclosure, and various changes and modifications may be made to the present disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the present disclosure are intended to be included within the scope of the present disclosure.
工业实用性Industrial applicability
本公开的实施例提供的时间同步方法,基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步,因此,可以实现快速建网,减小网络拓扑改变对时间同步产生的影响,从而解决时间同步精度不佳且易受网络拓扑变化影响的问题,达到提高时间精度和稳定性的效果。The time synchronization method provided by the embodiment of the present disclosure performs time synchronization of the network element based on a clock synchronization result determined by the network element by using a clock synchronization algorithm. Therefore, fast network construction can be implemented, and network topology change is reduced to generate time synchronization. The effect is to solve the problem that the time synchronization precision is not good and is susceptible to the network topology change, and the effect of improving time precision and stability is achieved.

Claims (7)

  1. 一种时间同步方法,包括:A time synchronization method, including:
    基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步。The time synchronization of the network element is performed based on a clock synchronization result determined by the network element by a clock synchronization algorithm.
  2. 根据权利要求1所述的方法,其中,所述时钟同步结果包括:所述网元中指定端口的端口状态,其中,所述端口状态包括:主端口状态和从端口状态。The method of claim 1, wherein the clock synchronization result comprises: a port status of a designated port in the network element, wherein the port status comprises: a primary port status and a secondary port status.
  3. 根据权利要求2所述的方法,其中,所述网元中指定端口的端口状态通过以下方式确定:依据所述网元的系统时钟的跟踪状态确定所述网元中指定端口的端口状态,其中,所述跟踪状态包括:接受外部以太网时钟、拒绝接受外部以太网时钟。The method of claim 2, wherein the port status of the designated port in the network element is determined by determining a port status of the designated port in the network element according to a tracking status of a system clock of the network element, where The tracking status includes accepting an external Ethernet clock and rejecting an external Ethernet clock.
  4. 根据权利要求1至3中任一项所述的方法,其中,基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步,包括:The method according to any one of claims 1 to 3, wherein the time synchronization of the network element is performed based on a clock synchronization result determined by a network element by a clock synchronization algorithm, including:
    判断所述网元的本地数据集是否属于预设优先级时钟等级范围;Determining whether the local data set of the network element belongs to a preset priority clock level range;
    在判断结果为否的情况下,触发以下处理过程:依据所述网元的系统时钟的跟踪状态确定所述网元中指定端口的第一端口状态;依据所述第一端口状态进行所述网元的时间同步;If the determination result is negative, the following process is triggered: determining a first port status of the designated port in the network element according to a tracking state of the system clock of the network element; performing the network according to the first port status Time synchronization of yuan;
    在判断结果为是的情况下,比较所述网元的指定端口所判断的最佳端口数据集与所述网元的本地数据集的优先级;根据比较结果确定所述指定端口的第二端口状态;依据所述第二端口状态进行所述网元的时间同步。If the result of the determination is yes, compare the priority of the best port data set determined by the designated port of the network element with the local data set of the network element; and determine the second port of the designated port according to the comparison result. Status: performing time synchronization of the network element according to the second port status.
  5. 根据权利要求4所述的方法,其中,根据比较结果确定所述指定端口的第二端口状态,包括:The method of claim 4, wherein determining the second port status of the designated port based on the comparison result comprises:
    在所述比较结果指示所述本地数据集的优先级高于所述最佳端口数据集的情况下,将所述指定端口的端口状态确定为主端口状态;在所述比较结果指示所述本地数据集的优先级低于所述最佳端口数据集的情况下,将所述指定端口的端口状态确定为被动Passive端口状态。Determining, in a case where the comparison result indicates that the priority of the local data set is higher than the optimal port data set, determining a port status of the designated port as a primary port status; indicating, in the comparison result, the local In the case where the priority of the data set is lower than the optimal port data set, the port status of the designated port is determined to be a passive passive port status.
  6. 一种时间同步装置,包括处理器以及存储有所述处理器可执行指令的存储器,当所述指令被处理器执行时,执行如下操作:A time synchronization apparatus includes a processor and a memory storing the processor-executable instructions, when the instructions are executed by the processor, performing the following operations:
    基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步。The time synchronization of the network element is performed based on a clock synchronization result determined by the network element by a clock synchronization algorithm.
  7. 一种存储介质,该存储介质设置为存储计算机程序,该计算机程序被处理器执行时实现如下方法步骤:基于网元通过时钟同步算法确定的时钟同步结果进行所述网元的时间同步。A storage medium is provided to store a computer program, the computer program being executed by the processor to implement the following method steps: performing time synchronization of the network element based on a clock synchronization result determined by a network element through a clock synchronization algorithm.
PCT/CN2018/073569 2017-02-22 2018-01-22 Time synchronization method and apparatus WO2018153192A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710097245.4 2017-02-22
CN201710097245.4A CN108462548B (en) 2017-02-22 2017-02-22 Time synchronization method and device

Publications (1)

Publication Number Publication Date
WO2018153192A1 true WO2018153192A1 (en) 2018-08-30

Family

ID=63220197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/073569 WO2018153192A1 (en) 2017-02-22 2018-01-22 Time synchronization method and apparatus

Country Status (2)

Country Link
CN (1) CN108462548B (en)
WO (1) WO2018153192A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3902164A4 (en) * 2018-12-18 2022-12-07 China Mobile Communication Co., Ltd. Research Institute Method for determining port status and network node

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100080249A1 (en) * 2007-11-30 2010-04-01 Huawei Technologies Co., Ltd. System, method and apparatus of time information synchronization
CN102036361A (en) * 2009-09-25 2011-04-27 华为技术有限公司 Processing method, device and system for clock source selection
CN102457346A (en) * 2010-10-29 2012-05-16 中兴通讯股份有限公司 Time synchronization implementation method and clock node

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399757B (en) * 2007-09-25 2011-02-02 华为技术有限公司 Method and device for tracing time clock source
GB2455702B (en) * 2007-11-29 2012-05-09 Ubidyne Inc A method and apparatus for autonomous port role assignments in master-slave networks
CN101938318B (en) * 2010-09-15 2013-02-27 中兴通讯股份有限公司 Synchronous method, system and convergent ring device among devices in convergent network
CN103023595B (en) * 2012-06-08 2017-07-21 中兴通讯股份有限公司 The implementation method and device of a kind of best master clock algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100080249A1 (en) * 2007-11-30 2010-04-01 Huawei Technologies Co., Ltd. System, method and apparatus of time information synchronization
CN102036361A (en) * 2009-09-25 2011-04-27 华为技术有限公司 Processing method, device and system for clock source selection
CN102457346A (en) * 2010-10-29 2012-05-16 中兴通讯股份有限公司 Time synchronization implementation method and clock node

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IEEE STANDARD FOR A PRECISION CLOCK SYNCHRONIZATION PROTOCOL FOR NETWORKED MEASUREMENT AND CONTROL SYSTEMS, 24 July 2008 (2008-07-24) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3902164A4 (en) * 2018-12-18 2022-12-07 China Mobile Communication Co., Ltd. Research Institute Method for determining port status and network node

Also Published As

Publication number Publication date
CN108462548A (en) 2018-08-28
CN108462548B (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US9819541B2 (en) PTP over IP in a network topology with clock redundancy for better PTP accuracy and stability
US9973601B2 (en) Fault tolerant clock network
US9705782B2 (en) Method and system for efficient graceful restart in an open shortest path first (OSPF) network
CN102457371B (en) Time synchronization method and related equipment and system
WO2020067977A1 (en) Inter-working between a time-sensitive network and a cellular communication network
US10149232B2 (en) Method for participating in nan cluster in wireless communication system and device therefor
US20130138832A1 (en) Method, router bridge, and system for trill network protection
US9974075B2 (en) Method and apparatus for NAN terminal to transceive signal in wireless communication system
US9906937B2 (en) Method and apparatus for changing state of nan terminal in wireless communication system
CN102195766B (en) Time synchronization method and clock device
WO2017157170A1 (en) Method of updating clock synchronization topology, method of determining clock synchronization path, and apparatus
US10264539B2 (en) Method and device by which NAN terminal transmits NAN service discovery frame in wireless communication system
CN104348568A (en) Time synchronization processing method and device
WO2012163172A1 (en) Clock synchronization method and device
US20220352999A1 (en) Systems and methods for synchronizing device clocks
WO2012034330A1 (en) Method, system and convergence loop apparatus for synchronization between apparatuses in convergence network
WO2017045546A1 (en) Time synchronization packet processing method and device
WO2014117489A1 (en) Clock synchronization method and device
CN103957589B (en) A kind of distributed clock synchronous method of multi-hop low overhead
CN102195996B (en) Time synchronization method for stacking system, stacking system and member equipment
CN109150358B (en) A kind of distributed clock synchronous method and system
WO2018153192A1 (en) Time synchronization method and apparatus
CN102761492B (en) Routing relearning method and device based on OSPF (Open Shortest Path First) protocol
CN104185268B (en) A kind of slot synchronization algorithm suitable for ad hoc networking
US20230199683A1 (en) Clock synchronization mode indication method and communication apparatus

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

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

Country of ref document: EP

Kind code of ref document: A1