CN117241365A - Time deviation monitoring method, device and system - Google Patents

Time deviation monitoring method, device and system Download PDF

Info

Publication number
CN117241365A
CN117241365A CN202210769926.1A CN202210769926A CN117241365A CN 117241365 A CN117241365 A CN 117241365A CN 202210769926 A CN202210769926 A CN 202210769926A CN 117241365 A CN117241365 A CN 117241365A
Authority
CN
China
Prior art keywords
port
monitoring
message
function
sending
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210769926.1A
Other languages
Chinese (zh)
Inventor
吕京飞
邵明嵩
陈聪
李�浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN117241365A publication Critical patent/CN117241365A/en
Pending legal-status Critical Current

Links

Abstract

The application provides a time deviation monitoring method, device and system, and belongs to the technical field of communication. In the scheme provided by the application, the first port of the first device can send a monitoring start request to the second port of the second device so as to request the second device to start the monitoring sending function of the second port. And, the first device can enable the monitor reception function of the first port. Therefore, the first device can monitor the time deviation between the first device and the second device in advance according to the received monitoring message, and further can ensure that the first device can accurately judge whether the first port can be changed into a new slave port when the slave port fails.

Description

Time deviation monitoring method, device and system
The present application claims priority from chinese patent application No. 202210644343.6 entitled "method, apparatus, and system for achieving synchronized performance monitoring" filed on 6/8 of 2022, the entire contents of which are incorporated herein by reference.
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for monitoring time deviation.
Background
A clock server is generally deployed in a mobile communication system, and the clock server is capable of establishing a communication connection with a base station through a plurality of transmission apparatuses that are cascaded. The plurality of transmission devices are capable of synchronizing the master clock of the clock server hop-by-hop to the base station based on a precision clock synchronization protocol (precision time protocol, PTP) to ensure a high clock accuracy of the base station.
In the related art, each transmission device has one slave port (slave port) connected to the master port (master port) of the upstream device. Each transmission device can interact with the upstream device through the slave port and synchronize with the clock of the upstream device based on the clock protocol message, i.e. track the clock of the upstream device. Each transmitting device may also have one or more master ports, each of which may be connected to a downstream device and may interact with the downstream device with a clock protocol message so that the downstream device tracks the clock of the transmitting device based on the clock protocol message.
The transmission device is also capable of automatically changing a master port to a new slave port when the slave port of the transmission device fails, and tracking the clock of the downstream device to which the new slave port is connected. However, if the time deviation between the transmission device and the downstream device connected to the new slave port is large, the time output by the transmission device will jump, which does not meet the service requirement. Therefore, a scheme for monitoring the time deviation between the transmission device and other devices in advance is needed.
Disclosure of Invention
The application provides a time deviation monitoring method, a time deviation monitoring device and a time deviation monitoring system, which can solve the technical problem that transmission equipment cannot monitor time deviation with other equipment in advance.
In a first aspect, a method for monitoring a time offset is provided and applied to a first device, where the first device has a first port. The method comprises the following steps: and sending a monitoring start request to a second port of the second device through the first port, and enabling a monitoring receiving function of the first port. The monitoring start request is used for requesting the second device to start a monitoring sending function of the second port, the monitoring sending function refers to a function of sending a monitoring message, the monitoring receiving function comprises a function of receiving the monitoring message, and the monitoring message is used for monitoring time deviation between the first device and the second device. And then, the first equipment can obtain the time deviation of the first equipment and the second equipment according to the monitoring message.
Because the first device can monitor the time deviation between the first device and the second device in advance according to the monitoring message received by the first port, the first device can be ensured to accurately judge whether the first port can be changed into a new slave port when the slave port fails.
Optionally, the process of enabling the monitor receiving function of the first port by the first device may include: and if the first port receives the monitoring start response sent by the second port, starting the monitoring receiving function of the first port. Wherein the monitor on response indicates that the monitor send function of the second port is enabled.
After the monitoring and receiving function of the first port is started, the first port can start to send a delay request message. Because the first device can start the monitoring receiving function of the first port after determining that the monitoring sending function of the second port is started, the second port can be ensured to receive the delay request message sent by the first port and feed back the delay response message.
Optionally, the monitoring start response may be carried in a first notification message, a first synchronization message, a first follow message, a first delay request message, or a first signaling message.
The first delay request message may be sent by the second port as a slave port or a passive port to the first port. The first notification message, the first synchronization message, and the first following message may be sent to the first port as a monitoring message after the second device enables the monitoring sending function of the second port. The first signaling message may be a message configured by the second device that is dedicated to carrying the monitor-on response.
Optionally, the process of enabling the monitor receiving function of the first port by the first device may include: and if the first port receives a first notification message, a first synchronization message or a first following message sent by the second port, starting a monitoring and receiving function of the first port.
The second device may not need to feed back a monitoring start response to the first port after the monitoring sending function of the second port is started. And because the second port can start to send the monitoring message after the monitoring sending function of the second port is started, the first device can also determine that the monitoring sending function of the second port is started according to the first notification message, the first synchronous message or the first following message sent by the second port, so as to start the monitoring receiving function of the first port.
Optionally, the monitoring start request includes: monitoring an opening sign and/or a packet sending rate; wherein the packet rate may include at least one of the following rates: the second port sends a first rate of notification messages; the second port sends a second rate of synchronous messages; the first port transmits a third rate of delay request messages.
By carrying the packet sending rate in the monitoring start request, the second port can send the monitoring message according to the packet sending rate designated by the first device.
Optionally, the monitoring start request may be carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message, or a second signaling message.
The second notification message, the second synchronization message, the second following message and the first delay response message may be sent by the first port as a main port to the second port, where the second signaling message is a message configured by the first device and dedicated for carrying the monitoring start request.
Optionally, the process of sending the monitor-on request to the second port of the second device by the first device through the first port may include: and when the slave backup function of the first port is started, sending a monitoring starting request to the second port of the second device through the first port. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
If the slave backup function of the first port is turned on, the first device may determine that the first port can become a new slave port when the slave port of the first device fails. Based on this, the first device may determine that the time offset of the first port needs to be monitored in advance, and thus may send a monitoring start request to the second port of the second device through the first port.
Optionally, the process of sending the monitor-on request to the second port of the second device by the first device through the first port may include: and when the slave backup function of the first port is started and the first port supports the monitoring receiving function, sending a monitoring starting request to the second port of the second device through the first port. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
Because the first device can also determine that the first port supports the monitoring receiving function before sending the monitoring start request, the monitoring receiving function of the first port can be ensured to be normally started. Furthermore, after the second device enables the monitoring and sending function of the second port, the first port can receive the monitoring message sent by the second port normally.
Optionally, the process of enabling the monitor receiving function of the first port by the first device may include: and when the slave backup function of the first port is started, enabling the monitoring receiving function of the first port. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
If the slave backup function of the first port is started, the first device may determine that the time deviation of the first port needs to be monitored in advance, so that the monitoring receiving function of the first port may be started.
It will be appreciated that the first device may first send a monitor on request via the first port and then enable the monitor receiving function of the first port. Alternatively, the monitoring receiving function of the first port may be started first, and then the monitoring start request may be sent through the first port.
Optionally, the method may further include: if the time deviation is greater than the deviation threshold, an alarm is generated, and/or the slave backup function of the first port is closed, namely: the port state of the first port does not change to a slave state or a passive state.
The alarm generated by the first device can remind an operation and maintenance person to solve the fault of the first port in time, so that the time deviation of the first port can be smaller than or equal to the deviation threshold value. The first device closes the slave backup function of the first port, and the first port cannot be selected as a new slave port of the first device, so that the influence of overlarge time deviation of the first port on the clock synchronization precision of the first device can be avoided.
Optionally, the monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages. Wherein, the following message is a message for carrying a sending time stamp of the synchronous message.
Optionally, the monitoring receiving function may further include a function of sending a delay request message.
Alternatively, the port state of the first port may be an active state or a passive state. For example, the port state of the first port may be the master state, i.e. the first port may be the master port.
In a second aspect, a method for monitoring a time offset is provided, applied to a second device, where the second device has a second port. The method comprises the following steps: and receiving a monitoring start request sent by a first port of the first device through the second port, and starting a monitoring sending function of the second port according to the monitoring start request. The monitoring and transmitting function refers to a function of transmitting a monitoring message, where the monitoring message is used for a first device to obtain a time deviation from a second device.
After the second device starts the monitoring and sending function of the second port, the second port can start sending the monitoring message. The first device can further monitor the time deviation between the first device and the second device in advance according to the monitoring message received by the first port.
Optionally, the method may further include: after the monitor transmission function of the second port is enabled, a monitor on response is transmitted to the first port through the second port.
The first device may determine that the monitor transmission function of the second port is enabled according to the received monitor on response.
Optionally, the monitoring start response is carried in a first notification message, a first synchronization message, a first follow message, a first delay request message or a first signaling message.
Optionally, the method may further include: after the monitoring and sending function of the second port is started, a first notification message, a first synchronization message, a first following message and/or a second delay response message are sent to the first port through the second port.
The first device may further determine that the monitoring sending function of the second port is enabled according to the foregoing packet sent by the second port.
Optionally, the monitoring start request may include: the turn-on flag is monitored and/or the packet rate is monitored. Wherein the packet rate comprises at least one of the following rates: the second port sends a first rate of notification messages; the second port sends a second rate of synchronous messages; the first port transmits a third rate of delay request messages.
Optionally, the method may further include: the second port sends a notification message to the first port according to the first rate; and the second port sends the synchronous message to the first port according to the second rate.
Optionally, the monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages.
Optionally, the monitoring start request may be carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message, or a second signaling message.
Alternatively, the port state of the first port may be an active state or a passive state. The port state of the second port may be a slave state, a passive state, or a master state.
In a third aspect, a method for monitoring a time offset is provided, applied to a first device, where the first device has a first port. The method comprises the following steps: according to a first condition, starting a monitoring receiving function of the first port, wherein the monitoring receiving function comprises a function of receiving a monitoring message, and the monitoring message is used for monitoring time deviation between first equipment and second equipment; and obtaining the time deviation of the first equipment and the second equipment according to the monitoring message.
After the first device starts the monitoring and receiving function of the first port, the time deviation between the first device and the second device can be monitored in advance according to the received monitoring message. Thus, it is ensured that when the slave port of the first device fails, the first device can accurately determine whether the first port needs to be changed to a new slave port.
Alternatively, the first condition may include at least one of the following conditions: the second port is a main port; the slave backup function of the first port is started, and the slave backup function refers to a function that the port state can be changed into a slave state or a passive state; the first port receives a notification message, a synchronization message, a follow message or a delay response message sent by the second port.
If the second port is the main port, or the first port receives a notification message, a synchronization message, a follow message or a delayed response message sent by the second port, the first device may determine that the second port is capable of sending a monitoring message, so that the monitoring receiving function of the first port may be directly started. If the slave backup function of the first port is turned on, the first device may determine that the time offset of the first port needs to be monitored in advance, so that the monitoring receiving function of the first port may be enabled.
Optionally, the method may further include: if the time deviation is greater than the deviation threshold, an alarm is generated and/or the slave backup function of the first port is closed.
Optionally, the monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages.
Optionally, the monitoring receiving function further includes a function of sending a delay request message.
Alternatively, the port state of the first port may be an active state or a passive state.
In a fourth aspect, a first device is provided having a first port. The first device includes:
the sending module is used for sending a monitoring start request to a second port of the second device through the first port, wherein the monitoring start request is used for requesting the second device to start a monitoring sending function of the second port, the monitoring sending function is a function of sending a monitoring message, and the monitoring message is used for monitoring time deviation between the first device and the second device;
the starting module is used for starting a monitoring receiving function of the first port, and the monitoring receiving function comprises a function of receiving the monitoring message;
and the monitoring module is used for obtaining the time deviation of the first equipment and the second equipment according to the monitoring message.
Optionally, the enabling module may be configured to enable the monitoring receiving function of the first port if the first port receives the monitoring start response sent by the second port. Wherein the monitor on response indicates that the monitor send function of the second port is enabled.
Optionally, the monitoring start response may be carried in a first notification message, a first synchronization message, a first follow message, a first delay request message, or a first signaling message.
Optionally, the enabling module may be configured to enable the monitoring receiving function of the first port if the first port receives a first notification packet, a first synchronization packet, or a first follow packet sent by the second port.
Optionally, the monitoring start request includes: monitoring an opening sign and/or a packet sending rate; wherein the packet rate may include at least one of the following rates: the second port sends a first rate of notification messages; the second port sends a second rate of synchronous messages; the first port transmits a third rate of delay request messages.
Optionally, the monitoring start request may be carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message, or a second signaling message.
Optionally, the sending module may be configured to send, when the slave backup function of the first port is turned on, a monitoring start request to the second port of the second device through the first port. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
Optionally, the sending module may be configured to send, when the slave backup function of the first port is turned on and the first port supports the monitor receiving function, a monitor start request to the second port of the second device through the first port. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
Optionally, the enabling module may be configured to enable the monitoring receiving function of the first port when the slave backup function of the first port is turned on. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
Optionally, the monitoring module may be further configured to generate an alarm if the time deviation is greater than a deviation threshold, and/or close a slave backup function of the first port.
Optionally, the monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages. Wherein, the following message is a message for carrying a sending time stamp of the synchronous message.
Optionally, the monitoring receiving function may further include a function of sending a delay request message.
Alternatively, the port state of the first port may be an active state or a passive state.
In a fifth aspect, a second device is provided having a second port. The second device includes:
the receiving module is used for receiving a monitoring start request sent by a first port of the first equipment through the second port;
and the starting module is used for starting the monitoring sending function of the second port according to the monitoring starting request, wherein the monitoring sending function refers to a function of sending a monitoring message, and the monitoring message is used for the first equipment to obtain the time deviation with the second equipment.
Optionally, the second device may further include:
and the sending module is used for sending a monitoring starting response to the first port through the second port after the monitoring sending function of the second port is started by the starting module.
Optionally, the monitoring start response is carried in a first notification message, a first synchronization message, a first follow message, a first delay request message or a first signaling message.
Optionally, the sending module is configured to send, after the enabling module enables the monitoring sending function of the second port, a first notification packet, a first synchronization packet, a first follow packet, and/or a second delayed response packet to the first port through the second port.
Optionally, the monitoring start request may include: the turn-on flag is monitored and/or the packet rate is monitored. Wherein the packet rate comprises at least one of the following rates: the second port sends a first rate of notification messages; the second port sends a second rate of synchronous messages; the first port transmits a third rate of delay request messages.
Optionally, the sending module may be configured to send, through the second port, a notification packet to the first port at the first rate, and send, through the second port, a synchronization packet to the first port at the second rate.
Optionally, the monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages.
Optionally, the monitoring start request may be carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message, or a second signaling message.
Alternatively, the port state of the first port may be an active state or a passive state. The port state of the second port may be a slave state, a passive state, or a master state.
In a sixth aspect, there is provided a first device having a first port, the first device comprising:
The starting module is used for starting a monitoring receiving function of the first port according to a first condition, wherein the monitoring receiving function comprises a function of receiving a monitoring message, and the monitoring message is used for monitoring time deviation between the first equipment and the second equipment;
and the monitoring module is used for obtaining the time deviation of the first port and the second port according to the monitoring message.
Alternatively, the first condition may include at least one of the following conditions: the second port is a main port; the slave backup function of the first port is started, and the slave backup function refers to a function that the port state can be changed into a slave state or a passive state; the first port receives a notification message, a synchronization message, a follow message or a delay response message sent by the second port.
Optionally, the monitoring module may be further configured to generate an alarm if the time deviation is greater than a deviation threshold, and/or close a slave backup function of the first port.
Optionally, the monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages.
Optionally, the monitoring receiving function further includes a function of sending a delay request message.
Alternatively, the port state of the first port may be an active state or a passive state.
In a seventh aspect, there is provided an apparatus comprising: the system comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the time deviation monitoring method provided by any aspect when executing the computer program.
In an eighth aspect, a computer readable storage medium is provided, in which instructions are stored which, when run on a processor, implement a method of monitoring time offset as provided in any of the above aspects.
In a ninth aspect, there is provided a computer program product comprising instructions which, when run on a processor, implement a method of monitoring time offset as provided in any of the above aspects.
In a tenth aspect, there is provided a communication system comprising: a first device and a second device. Wherein the first device is configured to implement the method for monitoring a time offset provided in the first aspect or the third aspect; the second device is configured to implement the method for monitoring a time offset as provided in the second aspect above.
In an eleventh aspect, a chip is provided, which can be used to implement the method for monitoring a time offset provided in any of the above aspects.
In summary, the application provides a method, a device and a system for monitoring time deviation. In the scheme provided by the application, the first port of the first device can send a monitoring start request to the second port of the second device so as to request the second device to start the monitoring sending function of the second port. And, the first device can enable the monitor reception function of the first port. Therefore, the first device can monitor the time deviation between the first device and the second device in advance according to the received monitoring message, and further can ensure that the first device can accurately judge whether the first port can be changed into a new slave port when the slave port fails.
Drawings
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a clock synchronization process according to an embodiment of the present application;
fig. 3 is a schematic diagram of a port switching according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another port switch provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a time deviation monitoring process according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another communication system according to an embodiment of the present application;
FIG. 7 is a flowchart of a method for monitoring time deviation according to an embodiment of the present application;
FIG. 8 is a flowchart of another method for monitoring time deviation according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a second notification packet according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a header in a second notification message according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a tag domain according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an extended TLV according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a second signaling packet according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a first delayed request packet according to an embodiment of the present application;
FIG. 15 is a flow chart of yet another method for monitoring time bias provided by an embodiment of the present application;
fig. 16 is a schematic structural diagram of a first device according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of a second apparatus according to an embodiment of the present application;
FIG. 18 is a schematic diagram of another first device according to an embodiment of the present application;
FIG. 19 is a schematic view of an apparatus according to an embodiment of the present application;
Fig. 20 is a schematic structural diagram of another apparatus according to an embodiment of the present application.
Detailed Description
The method, the device and the system for monitoring the time deviation provided by the embodiment of the application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application. As shown in fig. 1, the communication system may include at least one clock server 01, a plurality of transmission apparatuses in cascade, and a base station 02. For example, two clock servers 01 are shown in fig. 1, and 13 transmission devices are shown from device 1 to device 13. One of the two clock servers 01 is a primary server, the other is a standby server, and each clock server 01 can receive a standard time signal sent by the satellite 00 and can use the standard time signal as a primary clock. The plurality of transmission devices can synchronize the master clock of the clock server 01 to the base station 02 hop by hop based on a clock synchronization protocol, so as to ensure that the clock accuracy of the base station 02 is high.
The satellite 00 may be a global positioning system (global positioning system, GPS) navigation satellite or a beidou satellite, among others. Each transmission device may be a device with a message transceiving function, such as a router or a switch. The clock synchronization protocol used by the communication system may be a precision clock synchronization protocol (precision clock synchronization protocol for networked measurement and control systems), abbreviated PTP or IEEE 1588 protocol, defined by the institute of electrical and electronics engineers (institute of electrical and electronics engineers, IEEE) for network measurement and control systems. Alternatively, the clock synchronization protocol may be the G.8275.1 protocol defined by the International telecommunication Union telecommunication Standard substation (international telecommunication union telecommunication standardization sector, ITU-T).
Fig. 1 is an illustration of an example of a base station as a device that needs to perform clock synchronization. It will be appreciated that in the communication system, the devices to be clock synchronized may also be other types of devices than base stations, such as passive optical network (passive optical network, PON) devices, optical transport network (optical transport network, OTN) devices or packet transport network (packet transport network, PTN) devices, or some industrial terminals, power terminal devices.
In the IEEE 1588 protocol and the ITU-T g.8275.1 protocol, each transmission device may operate in a Boundary Clock (BC) mode, and clock synchronization between transmission devices may be performed according to a master-slave (master-slave) relationship. Referring to fig. 1, each transmission device has a slave port S which is connected to a master port M of another device (transmission device or clock server) and is capable of interacting with the master port M with clock protocol messages to synchronize with, i.e. track, the clock of the other device.
Referring to (a) in fig. 2, a process in which the slave port S of the transmitting device (hereinafter referred to as slave) tracks the clock of another device (hereinafter referred to as master) is as follows: the master device sends a notification (Announce) message and a synchronization (Sync) message to a slave port S of the slave device through a master port M, wherein the Sync message carries a sending time stamp t1 of the Sync message. The slave device may record the timestamp t2 of the Sync message received from the port S and obtain the timestamp t1 in the Sync message. And, the slave device may send a Delay request (delay_req) message to the master port M of the master device through the slave port S, and record a transmission time stamp t3 of the delay_req. After receiving the delay_req message, the master device may send a Delay response (delay_resp) message to the slave port S of the slave device through the master port M, where the delay_resp message carries a receiving timestamp t4 of the delay_req message.
After receiving the delay_resp message, the slave device can calculate the time deviation between the slave device and the master device based on the above time stamp t1, time stamp t2, time stamp t3 and time stamp t 4. The time offset can be expressed as: offset= [ (t 2-t 1) - (t 4-t 3) ]/2. The slave device may then calibrate its local clock based on the time offset, thereby achieving clock synchronization with the clock of the master device. In the embodiment of the present application, the above time deviation may also be understood as a time deviation between the slave port S of the slave device and the master port M of the master device.
With continued reference to fig. 1, each transmitting device may also have at least one active port M and/or at least one passive port (passive port) P. The master port M of each transmission device may be connected to the slave port S or the passive port P of the other transmission device, and the passive port P of each transmission device is an idle standby port, which may be connected to the master port M of the other transmission device. When a slave port S of a transmission device fails, or when a slave port S of an upstream device of the transmission device fails, an optimal master clock (best master clock, BMC) algorithm of the clock synchronization protocol may cause the transmission device to automatically take a certain master port M or a certain passive port P as a new slave port S and may track the clock of the device to which the new slave port S is connected.
By way of example, referring to fig. 1, assuming that the slave port S of the device 11 is connected to the master port M of the device 12, the device 11 can track the clock of the device 12 through its slave port S. Referring to fig. 3, if the slave port S of the device 11 fails, the device 11 may automatically select its passive port P as a new slave port S based on the BMC algorithm and may track the clock of the device 3 through the new slave port S. Alternatively, referring to fig. 4, if the slave port S of the device 4 fails, the device 4 may automatically select its master port M as a new slave port S based on the BMC algorithm. Also, the device 5 may automatically update its slave port S to the master port M based on the BMC algorithm and select its master port M connected to the device 9 as a new slave port S. Device 5 may then track the clock of device 9 through its new slave port S and device 4 may track the clock of device 5 through its new slave port S.
Based on the above analysis, the master port M and the passive port P of each transmission device can be used as backup ports for the slave port S. The transmission device can automatically select one spare port as a new slave port S based on the BMC algorithm when its slave port S fails. This ensures that the transmission device can track the clock via the new slave port S and that each transmission device can reliably transfer the master clock of the clock server 01 to the base station 02.
It will be appreciated that, after a certain standby port is changed to a new slave port S, if the time deviation between the transmission device and the device connected to the new slave port S is greater than a deviation threshold, for example greater than +/-1.5 microseconds (us), after the transmission device adjusts its own clock, the clock synchronization accuracy of the base station 02 may also be changed to be greater than the deviation threshold, so that the clock requirement of the base station may not be met, and thus the service of the base station 02 may be failed. Based on this, the transmission device can monitor the time deviation of each passive port P in advance when it is operating normally from the port S. The time deviation of the passive port P refers to: the time offset between the transmitting device and the device to which the passive port P is connected.
And the transmission equipment can generate an alarm when the time deviation of any passive port P is larger than a deviation threshold value, so that an operation and maintenance personnel can timely solve the fault of the passive port P, and the time deviation of the passive port P is smaller than or equal to the deviation threshold value. Therefore, when the transmission device changes the passive port P into a new slave port S, the time deviation of the new slave port S can be ensured to meet the requirement of clock synchronization precision.
Referring to (b) of fig. 2, the process of the transmission device monitoring the time deviation of its passive port P is as follows: and receiving an Announce message and a Sync message sent by a main port M of another device (a transmission device or a clock server) through a passive port P, and recording a time stamp t2 of the received Sync message and a time stamp t1 in the Sync message. And sending a delay_req message to the master port M through the passive port P, and recording a sending time stamp t3 of the delay_req. And receiving a delay_resp message carrying a time stamp t4 sent by the master port M through the passive port P. Then, the transmission device can calculate the time deviation between the passive port P and the master port M based on the above-mentioned time stamp t1, time stamp t2, time stamp t3 and time stamp t4, so as to realize the advanced monitoring of the time deviation of the passive port P.
However, the IEEE 1588 protocol and the ITU-T g.8275.1 protocol specify that only the host port M can send an Announce message and a Sync message, and reply to a Delay_Resp message after receiving a Delay_req message. And, only the slave port S and the passive port P can transmit delay_req message, and receive the Announce message, the Sync message, and the delay_resp message. This results in the transmission device being able to monitor in advance only the time offset of its passive port P and not its active port M.
In order to enable the transmission device to monitor in advance the time offset of its primary port M, the following two port attributes are newly defined in the ITU-T g.8275.1 standard draft of 5 months of 2022: portDS.monitor sender and portDS.monitor receiver. Where portDS represents a port (port) dataset (data set, DS), monitorSender refers to monitoring send, monitorReceiver refers to monitoring receive.
If the attribute value of the portds. Monitor sender attribute of the slave port S or the passive port P of the transmission device is set to a valid value (e.g. TRUE), the slave port S or the passive port P can also send an Announce message and a Sync message, and can reply to a Delay_Resp message after receiving a Delay_req message. That is, the transmitting device may enable the monitoring and transmitting function of the slave port S or the passive port P.
If the attribute value of the portds. Monitor receiver of the active port M or the passive port P of the transmission device is set to a valid value (e.g. TRUE), the active port M or the passive port P can also send delay_req message and can receive an Announce message, a Sync message and a delay_resp message. That is, the transmitting device may enable the monitor reception function of the master port M or the passive port P.
For example, referring to (a) in fig. 5, the master port M of the transmission device is connected with the slave port S of another transmission device. If the portds. Monitor receiver of the master port M is set to TRUE and the portds. Monitor sender of the slave port S is set to TRUE, the transmitting device may interact with the slave port S through the master port M as follows: announce messages, sync messages, delay_Resp messages, and Delay_Resp messages. And, the transmission device may calculate the time offset of the master port M based on the interacted message.
Referring to (b) of fig. 5, the master port M of the transmission apparatus is connected with the passive port P of another transmission apparatus. If the portds. Monitor receiver of the master port M is set to TRUE and the portds. Monitor sender of the passive port P is set to TRUE, the transmitting device may interact with the passive port P through the master port M with an Announce message, a Sync message, a delay_Resp message, and may calculate a time offset of the master port M based on the interacted messages.
Referring to (c) of fig. 5, a master port M of a transmission apparatus is connected with a master port M of another transmission apparatus. If the portds. Monitor receiver of the main port M of the transmission device is set to TRUE, the transmission device may interact with the main port M of another transmission device through the main port M, and may calculate the time offset of the main port M based on the interacted message.
Based on the above analysis, the transmission device can monitor the time deviation of the main port M in advance by configuring the port attribute of the main port M of the transmission device and the port attribute of the opposite port to which the main port M is connected. In a first implementation manner, if the transmission device is required to monitor the time deviation of the master port M, the port attribute portds. Monitor receiver of the master port M of the transmission device may be manually configured, and the port attribute portds. Monitor sender of the opposite port (e.g., the slave port S or the passive port P) connected to the master port M may be manually configured. However, since this implementation requires manual configuration on different transmission devices, the operation complexity is high and the configuration efficiency is low.
In a second implementation, default attribute values of the portds.monitor receiver attribute of the master port M and default attribute values of the portds.monitor sender attribute of the slave port S and the slave port P may be set to TRUE. The implementation manner can avoid the complexity of manual configuration, but when the number of ports in the transmission device is large, for example, when the number of main ports M of the transmission device exceeds 100, if each main port M enables the function of monitoring reception, not only excessive computing resources of the transmission device but also excessive bandwidth resources are occupied.
It is understood that a port of the transmission device being the master port M may refer to: the port state (portState) of the port is the master state. Accordingly, a port being a slave port S may refer to: the port state of the port is a slave state; the fact that a port is a passive port P may refer to: the port state of the port is a passive state.
The embodiment of the application provides a time deviation monitoring method which can be applied to a communication system. As shown in fig. 6, the communication system may include a first device 01 and a second device 02. The first device 01 has a first port 01a and the second device 02 has a second port 02a. The first port 01a may include a master port M or a passive port P, and the second port 02a may include a master port M, a slave port S, or a passive port P. That is, the port state of the first port 01a may be a master state or a passive state, and the port state of the second port 02a may be a master state, a slave state or a passive state. The first device 01 and the second device 02 may be any two adjacent transmission devices in the system shown in fig. 1. Referring to fig. 7, the method includes:
Step 101, the first device sends a monitoring start request to a second port of the second device through the first port.
In the embodiment of the application, if the first device determines that the time deviation between the first device and the second device needs to be monitored in advance, a monitoring start request can be sent to the second port of the second device through the first port. The monitoring start request is used for requesting the second device to start a monitoring sending function of the second port, and the monitoring sending function refers to a function of sending a monitoring message. The monitoring message is used for monitoring the time deviation between the first device and the second device, and the monitoring message may include: notification messages, synchronization messages, follow Up messages (follow_up) and/or delayed response messages. The following message is a message for carrying a transmission time stamp t1 of the synchronous message. The time offset between the first device and the second device can also be understood as: the time offset between the first port and the second port may be simply referred to as the time offset of the first port.
Step 102, the second device starts the monitoring sending function of the second port according to the monitoring starting request.
After receiving the monitoring start request sent by the first port of the first device through the second port, the second device can start the monitoring sending function of the second port according to the monitoring start request.
Step 103, the first device enables the monitoring receiving function of the first port.
The monitoring reception function includes at least a function of receiving a monitoring message, and the monitoring reception function may further include a function of transmitting a delay request message.
Step 104, the first device obtains the time deviation between the first device and the second device according to the monitoring message.
In the embodiment of the application, after the first device starts the monitoring receiving function of the first port and the second device starts the monitoring sending function of the second port, the monitoring message can be interacted between the first port and the second port. The process of the interaction monitoring message can comprise the following steps: the second port of the second device sends a synchronization message (or sends a notification message and/or a following message in addition to the synchronization message) to the first port of the first device, the first port of the first device sends a delay request message to the second port of the second device, and the second port of the second device sends a delay response message to the first port of the first device after receiving the delay request message.
In the process of monitoring the message through interaction between the first port and the second port, the first device may record the following timestamp: the second port sends a timestamp t1 of the synchronous message, the first port receives a timestamp t2 of the synchronous message, the first port sends a timestamp t3 of the delay request message, and the second port receives a timestamp t4 of the delay request message. Then, the first device may calculate, based on the time stamps t1 to t4, a time deviation between the first device and the second device.
It is understood that the step 103 may be performed before the step 101, or may be performed after the step 101. That is, the first device may first enable the monitoring receiving function of the first port, and then send a monitoring start request to the second port through the first port. Or, the first device may first send a monitoring start request to the second port through the first port, and after determining that the monitoring sending function of the second port is enabled, enable the monitoring receiving function of the first port.
In summary, the embodiment of the application provides a method for monitoring time deviation. The first port of the first device is capable of sending a monitor on request to the second port of the second device requesting the second device to enable the monitor send function of the second port. And, the first device can enable the monitor reception function of the first port. Therefore, the first device can monitor the time deviation between the first device and the second device in advance according to the received monitoring message, and further can ensure that the first device can accurately judge whether the first port can be changed into a new slave port when the slave port fails.
Fig. 8 is a schematic diagram of another method for monitoring time deviation according to an embodiment of the present application, which can be applied to a communication system such as that shown in fig. 1 or fig. 6. The following description will take the second port of the second device as the slave port S or the passive port P as an example. As shown in fig. 8, the method includes:
Step 201, when the slave backup function of the first port is started, the first device sends a monitoring start request to the second port of the second device through the first port.
The slave backup function refers to a function in which the port state can be changed to the slave state or the passive state. If the slave backup function of the first port is turned on, the first device may determine that when the slave port S of the first device fails, the first port can be changed to a new slave port S, that is, the first port can be switched to the new slave port S. Based on this, the first device may determine that the time offset of the first port needs to be monitored in advance, and thus may send a monitoring start request to the second port of the second device through the first port. The monitoring start request is used for requesting the second device to start a monitoring sending function of the second port, and the monitoring sending function refers to a function of sending a monitoring message. The monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages.
If the slave backup function of the first port is not started, the first device may determine that the first port cannot become a new slave port when the slave port of the first device fails. Based on this, the first device may determine that there is no need to monitor the time offset of the first port in advance, and thus there is no need to send a monitor-on request to the second port of the second device through the first port.
In the embodiment of the application, the first port has the slave backup attribute, and the first device can adjust the attribute value of the slave backup attribute based on the acquired configuration instruction, so as to start or close the slave backup function of the first port. The configuration instruction may be manually configured by an operator, or may be issued by the controller to the first device. By way of example, the slave backup attribute may be a master only state (masterOnly) attribute defined in the ITU-T g.8275.1 protocol. If the masterOnly attribute of the first port is configured to be invalid (FALSE), the slave backup function of the first port is turned on. If the master only attribute of the first port is configured to be valid (TRUE), then it indicates that the port state of the first port can only be the master state, i.e., the slave backup function of the first port is not turned on.
Optionally, the first device may further send a monitor start request to the second port of the second device through the first port if it is determined that the slave backup function of the first port is started and the first port supports the monitor receiving function. The monitoring receiving function comprises a function of receiving a monitoring message. Because the first device can also determine that the first port supports the monitoring receiving function before sending the monitoring start request, the monitoring receiving function of the first port can be ensured to be normally started. Furthermore, after the second device enables the monitoring and sending function of the second port, the first port can receive the monitoring message sent by the second port normally.
Optionally, the monitoring start request sent by the first port to the second port may include: the turn-on flag is monitored and/or the packet rate is monitored. Wherein the packet rate may include at least one of the following rates: the second port sends a first rate of notification messages; a second port sends a second rate of synchronous messages; the first port sends a third rate of delay request messages.
By carrying the first rate and the second rate in the monitoring start request, the second device can send the notification message according to the first rate and send the synchronization message according to the second rate. By carrying the third rate in the monitoring start request, the second device can conveniently confirm whether the second device can support receiving the delay request message according to the third rate in advance, and reply the delay response message.
It will be appreciated that the first rate and the second rate may be the same or different. The third rate may be the same as the first rate (or the second rate) or may be different.
Step 202, the second device starts the monitoring and sending function of the second port according to the monitoring and starting request.
After receiving the monitoring start request sent by the first port of the first device through the second port, the second device can start the monitoring sending function of the second port according to the monitoring start request.
Optionally, after receiving the monitoring start request through the second port, the second device may first detect whether the second port supports the monitoring sending function. If the second device determines that the second port supports the monitoring and sending function, the monitoring and sending function of the second port may be enabled. If the monitoring start request includes a packet sending rate, the second device may further detect whether the second port supports the packet sending rate. If the second device determines that the second port supports the monitoring and sending function and supports the packet sending rate, the monitoring and sending function of the second port may be enabled.
In the embodiment of the present application, the second port may have a monitoring transmission attribute, and the second device may set an attribute value of the monitoring transmission attribute to a valid value to enable a monitoring transmission function of the second port. For example, the monitoring send attribute may be a portDS.monitorsender attribute, and the default attribute value of the portDS.monitorsender attribute is FALSE. The second device may set the portds. Monitor sender attribute to TRUE according to the received monitor start request, so as to enable the monitor send function of the second port.
It will be appreciated that if the second device determines that the second port does not support the monitoring and sending function, or does not support the packet rate required by the first port, then the monitoring and sending function of the second port will not be enabled. The second port may not support the monitoring and sending function or the packet sending rate due to hardware performance and/or software version.
It will also be appreciated that the monitoring and sending function of the second port may also be enabled if the second device determines that the second port supports the monitoring and sending function, but does not support the packet rate required by the first port. And the second device may also send, through the second port, to the first port, a packet sending rate that can be supported by the second port. For example, the second device may carry in the monitor on response the packet rate that the second port can support. If the packet sending rate supported by the second port sent by the second device includes a rate at which the delay request message is sent, the first device may send the delay request message to the second port according to the rate.
Step 203, the second device sends a monitor start response to the first port through the second port.
The second device may also send a monitor on response to the first port through the second port after the monitor send function of the second port is enabled, so that the first device determines that the monitor send function of the second port is enabled.
Optionally, the monitoring start response may be carried in a first notification message, a first synchronization message, a first follow message, a first delay request message, or a first signaling message. The first delay request message may be sent from the port S or the passive port P to the first port by the second port. The first notification message, the first synchronization message, and the first following message may be sent to the first port as a monitoring message after the second device enables the monitoring sending function of the second port. The first signaling message may be a message configured by the second device that is dedicated to carrying the monitor-on response.
Step 204, the first device starts the monitoring receiving function of the first port according to the monitoring start response received by the first port.
As a possible implementation manner of the embodiment of the present application, the first device may determine, according to the monitoring start response received by the first port, that the monitoring sending function of the second port is enabled, and may further enable the monitoring receiving function of the first port. The monitoring reception function includes at least a function of receiving a monitoring message, and the monitoring reception function may further include a function of transmitting a delay request message.
As another possible implementation manner of the embodiment of the present application, after the monitoring and sending function of the second port is enabled, the second device may not need to feed back a monitoring start response to the first port of the first device, that is, the second device does not need to perform step 203. And, since the second port can start to transmit the monitoring message after the monitoring transmitting function of the second port is started, the first device can also determine that the monitoring transmitting function of the second port is started according to the first notification message, the first synchronization message or the first following message transmitted by the second port and received by the first port, so as to start the monitoring receiving function of the first port.
For example, if the first device determines that the monitoring sending function of the second port is enabled within the target duration after the first port sends the monitoring start request, the first notification message, the first synchronization message, or the first follow message sent by the second port and received through the first port. The target duration may be a fixed duration pre-configured in the first device, and the target duration may be determined according to a sending period of the monitoring message. For example, the target duration may be equal to 3 times the transmission period of the monitoring message.
It can be appreciated that, after the first device enables the monitoring and receiving function of the first port, the first device may send the delay request message through the first port. Because the first device can start the monitoring receiving function of the first port after determining that the monitoring sending function of the second port is started, the second port can be ensured to receive the delay request message and feed back the delay response message. That is, it can be avoided that the delayed request message sent by the first device cannot be normally received and responded.
It will also be appreciated that the first device may also enable the monitor receipt function of the first port prior to sending the monitor on request. For example, the first device may enable the monitor reception function of the first port if the slave backup function of the first port is turned on.
In step 205, the first device interacts with the second port of the second device through the first port to monitor the message.
After the first device starts the monitoring receiving function of the first port and the second device starts the monitoring sending function of the second port, the monitoring message can be interacted between the first port and the second port. The process of the interaction monitoring message can comprise the following steps: the second port of the second device sends a notification message and a synchronization message (or a notification message, a synchronization message and a follow message) to the first port of the first device, the first port of the first device sends a delay request message to the second port of the second device, and the second port of the second device sends a delay response message to the first port of the first device after receiving the delay request message.
Optionally, if the monitoring start request sent by the first device further includes a packet sending rate, the second port of the second device may send a monitoring packet according to the packet sending rate. For example, the second port may send a notification message to the first port at a first rate and may send a synchronization message to the first port at a second rate.
It may be understood that, if the monitoring start request sent by the first device does not include the packet sending rate, the second port of the second device may send the monitoring packet according to a preset default packet sending rate. The first port of the first device may also send the delay request message at a pre-configured default packet sending rate. For example, the default packet rate of the notification message defined in ITU-T g.8275.1 is 8 hertz (Hz), the default packet rate of the synchronization message is 16Hz, and the default packet rate of the deferred request message is 16Hz.
Step 206, the first device obtains the time deviation between the first device and the second device according to the monitoring message.
In the process of monitoring the message through interaction between the first port and the second port, the first device may record the following timestamp: the second port sends a timestamp t1 of the synchronous message, the first port receives a timestamp t2 of the synchronous message, the first port sends a timestamp t3 of the delay request message, and the second port receives a timestamp t4 of the delay request message. Then, the first device may calculate, according to the time stamps t1 to t4, a time deviation between the first device and the second device, that is, a time deviation between the first port and the second port.
Step 207, if the first device determines that the time deviation is greater than the deviation threshold, an alarm is generated, and/or the slave backup function of the first port is closed.
In the embodiment of the application, the first device may also have a deviation threshold stored in advance, where the deviation threshold may be determined according to a requirement of the communication system on clock synchronization accuracy. For example, the deviation threshold may be +/-1.5us. If the first device detects that the time deviation between the first device and the second device is greater than the deviation threshold, it can be determined that the time deviation cannot meet the requirement of clock synchronization precision of the communication system. Accordingly, the first device may generate an alarm and/or close the slave backup function of the first port.
The alarm generated by the first device can remind an operation and maintenance person to solve the fault of the first port in time, so that the time deviation of the first port can be smaller than or equal to the deviation threshold value. Therefore, when the first device changes the first port into a new slave port S, the time deviation of the new slave port S can be ensured to meet the requirement of clock synchronization precision.
The first device closes the slave backup function of the first port, so that the first port cannot become a new slave port of the first device, and the problem that the clock synchronization precision of the first device is affected due to overlarge time deviation of the first port can be avoided. The slave backup function of the first device closing the first port can also be understood as: the slave backup function of the first port is not enabled, or the master-only state function of the first port is enabled. For example, the first device may set the masterOnly attribute of the first port to active (TRUE) to thereby shut down the slave backup function of the first port.
It will be appreciated that the first device also has a slave port S, which the first device is able to track the clock of the device to which the slave port S is connected. The methods shown in steps 201 to 207 may be performed during normal operation of the slave port S. That is, the first device may monitor the time offset of its first port in advance during its normal operation from the port S.
It will also be appreciated that the first device may have at least one master port M, and/or at least one passive port P, which may each act as a spare slave port S for the first device. For each spare slave port S, the first device may monitor the time offset of the spare slave port S in advance based on the manner shown in steps 201 to 207 described above. And, when the slave port S of the first device fails, or the port of the upstream device to which the slave port S is connected fails, the first device may select a port whose time deviation is smaller than the deviation threshold value from its standby slave port S as a new slave port S. For example, the first device may select the standby slave port with the smallest time deviation as the new slave port.
The following describes a manner of sending a monitoring on request to a first device. It can be understood that if the first port is the master port M and the second port is the slave port S or the passive port P, the first port can also send a notification message, a synchronization message, and a follow message to the second port. The second port can also send a delay request message to the first port, and the first port can also send a delay response message to the second port after receiving the delay request message.
In a first alternative implementation manner, if the first port is the master port M, the first port may carry the monitoring start request in a second notification message, a second synchronization message, a second follow message, or a first delayed response message.
Alternatively, the monitoring on request may be carried in a reserved field or an extended TLV of the above-described message. The second notification message is taken as an example, and the load-bearing position of the monitoring start request is described below. Referring to fig. 9, the second notification message may include the following fields: a header, an original Timestamp, a current UTC offset, a reserved field, a master priority1, a master clock quality, a master priority2, a master identification, a hop count from the optimal clock to the local clock node, and a time source. UTC refers to coordinated universal time (universal time coordinated).
The monitoring start request may be carried in a reserved (reserved) field of the second notification message, or may be carried in a header (header) of the second notification message. Fig. 10 is a schematic structural diagram of a header of a notification message according to an embodiment of the present application, where, as shown in fig. 10, the header may include the following fields: the main standard development organization ID (majorSdoId), message type (messageType), PTP minor version (ministrationptp), PTP version (veridingtp), message length (messageLength), domain number (domainNumber), (majordoid), flag field (flag field), correction field (correction field), specific message type (messagetypespecification), source port identification (sourceportidentify), sequence identification (sequenceidentify), control field (controlField), and logarithm of message interval (logMessageInterval). The monitor start flag in the monitor start request may be carried in the flag field (flagField) of the header of fig. 10.
FIG. 11 is a schematic diagram of a flag field (FLAGField) structure according to an embodiment of the present application. Referring to FIG. 11, the first device may carry the monitor on flag through any one of the 5 th bit, the 6 th bit and the 7 th bit of the 0 th byte in the flag field (flagField). For example, the monitor-on flag may be a binary number 1. If the value of any bit is 0, it indicates that the second notification message does not carry the monitoring start flag.
The packet sending rate in the monitoring start request may be carried in a specific message type (messageTypeSpecific) field of the header shown in fig. 10. Referring to fig. 10, it can be seen that the specific message type field has a length of 4 bytes, and thus a first rate can be carried by the 1 st byte, a second rate can be carried by the 2 nd byte, and a third rate can be carried by the 3 rd byte. Wherein the packet rate carried in each byte can be referenced to the grid of the log message interval (logmessage interval) fieldThe formula is filled in. For example, if a certain byte is required to be carried at a rate of 16Hz, the value of the byte can be log 2 (1/16)=-4。
In the first implementation manner, the first device may further add an extension TLV to the second notification packet, the second synchronization packet, the second follow packet, or the first delayed response packet, and load the monitoring start request in the extension TLV. Fig. 12 is a schematic structural diagram of an extended TLV provided by an embodiment of the present application, as shown in fig. 12, where the extended TLV may include the following fields: TLV type (tlvType), length field (length field), organization ID (organizationID), organization subtype (organization subtype) and data field (dataField). The length of the data field may be N bytes, where N is a positive integer. For example, in an embodiment of the present application, the data field may be 4 bytes in length, which 4 bytes may be represented in turn as dataField [0] to dataField [3].
In the embodiment of the present application, the parameter values of the fields in the extended TLV carrying the monitoring start request may be as follows:
tlvType:0xFFF0;
length hfeld: 0xA;0x represents hexadecimal, and a represents 10, i.e., the total length of each field after the length field is 10 bytes;
organozationId: 0x0019A7 (ID of ITU-T Standard organization);
organizationSubType:0x000001;
dataField [0]: bit 0 may carry a monitor on flag, and the monitor on flag may be a binary number 1. That is, if the 0 th bit is 1, the carrying monitoring start flag is indicated; if the 0 th bit is 0, the monitoring start flag is not carried.
dataField [1]: carrying a first rate of sending an Announce message by a second port;
dataField [2]: carrying a second rate of sending Sync messages by the second port;
dataField [3]: and carrying a third rate of the first port sending delay_req message.
In a second alternative implementation, if the first port is the active port M or the passive port P, the first port may carry the monitoring start request in a second signaling (signaling) message. The second signaling message may be a message configured by the first device and dedicated to carrying the monitoring start request.
Fig. 13 is a schematic structural diagram of a second signaling packet according to an embodiment of the present application, where, as shown in fig. 13, the second signaling packet may include a header, a target port identifier (targetPortIdentity) field, and one or more TLV (one or more TLVs) fields. The structure of the header may refer to fig. 10. If the first device has acquired the port identifier (portID) of the second port, the portID of the second port may be carried in the target port identifier (targetportidentifier) field. If the first device does not acquire the port id of the second port, the target port identifier (targetPortIdentity) field may be filled with a preset value, for example, may be filled with 1 or 0. The one or more TLV fields may then be used to carry a monitoring on request. The structure of the TLV field and the carrying monitor on request may refer to fig. 12 and the related description thereof, and will not be described herein.
The following description is made in a manner of transmitting a monitor-on response to the second device. As described above, the second port, which is the slave port S or the passive port P, is capable of transmitting the delay request message to the first port. Thus, in a first alternative implementation, the second port may carry the monitor-on response in a first delayed request message that it sends to the first port.
As one possible example, the monitor-on response may be carried in a reserved field of the first deferred request message. For example, fig. 14 is a schematic structural diagram of a first delayed request packet according to an embodiment of the present application. As shown in fig. 14, the first delayed request message may include a header and an original timestamp (originTimestamp) field. The structure of the header may refer to fig. 10, and the monitoring response flag may be carried in any one of bits 5, 6 and 7 of byte 0 in a flag field (flagField). For example, the monitor response flag carried in any one of the bits may be a binary 1. If the value of any bit is 0, it indicates that the first delay request message does not carry the monitoring response flag, that is, the monitoring sending function of the second port is not enabled.
As another possible example, the second device may add an extended TLV to the first delay request message and carry the monitor on response in the extended TLV. The structure of the extension TLV may refer to fig. 12, and the parameter values of the fields in the extension TLV carrying the monitoring start response may be as follows:
tlvType:0xFFF1;
length hfeld: 0x7, representing that the total length of each field after the LengthField is 7 bytes;
organozationId: 0x0019A7 (ID of ITU-T Standard organization);
organizationSubType:0x000001;
dataField:1 byte; the 0 th bit of the 1 byte may carry a monitor on response, and the monitor on response may be a binary number 1. That is, if the 0 th bit is 1, the carrying monitoring start response is indicated; if the 0 th bit is 0, the monitoring start response is not carried.
In a second alternative implementation manner, the second port may carry the monitoring start response in the first notification message, the first synchronization message or the first following message sent to the first port after the monitoring sending function is started.
For example, the second port may carry the monitoring start response in a header in the first notification packet, the first synchronization packet, or the first follow packet, or may carry the monitoring start response in an extended TLV of the foregoing packet.
In a third alternative implementation, the second port may carry the monitor-on request in the first signaling message. The first signaling message may be a message configured by the second device that is dedicated to carrying the monitor-on response. The structure of the first signaling message may refer to fig. 13, and the second port may carry a monitoring on response in one or more TLV fields of the first signaling message.
It can be understood that the sequence of the steps of the time deviation monitoring method provided by the embodiment of the application can be properly adjusted, and the steps can be correspondingly increased or decreased according to the situation. For example, the step 203 may be deleted according to circumstances; alternatively, the step 204 may be performed before the step 203; alternatively, step 207 may be omitted as appropriate.
It will also be appreciated that the monitor send function of the second port, as well as the monitor receive function of the first port, are not enabled by default. The second device may automatically enable the monitor receiving function of the second port according to the monitor start request sent by the first device, and the first device may then start the monitor receiving function of the first port according to the slave backup function of the first port, or automatically enable the monitor receiving function of the first port according to the monitor start response sent by the second device. Therefore, on one hand, the problem of high operation complexity caused by manual configuration can be avoided, and on the other hand, the problem of wasting the computing resources of equipment and the transmission resources of a communication system caused by starting the monitoring function of each port in advance can be avoided.
In summary, the embodiment of the application provides a method for monitoring time deviation. The first port of the first device is capable of sending a monitor on request to the second port of the second device requesting the second device to enable the monitor send function of the second port. And, the first device can enable the monitor reception function of the first port. Therefore, the first device can monitor the time deviation between the first device and the second device in advance according to the received monitoring message, and further can ensure that the first device can accurately judge whether the first port can be changed into a new slave port when the slave port fails.
In addition, the method provided by the embodiment of the application does not need to enable the monitoring sending function and the monitoring receiving function of the port in a manual configuration mode, so that the operation complexity is effectively reduced. And the monitoring function of each port does not need to be set to be in an enabling state by default, so that the waste of the computing resource of the equipment and the transmission resource of the communication system can be avoided.
Fig. 15 is a schematic diagram of another method for monitoring time deviation according to an embodiment of the present application, which can be applied to a communication system such as that shown in fig. 1 or fig. 6. The following description will take the first port of the first device as the main port M or the passive port P, and the second port of the second device as the main port M as an example. As shown in fig. 15, the method includes:
Step 301, the first device enables a monitoring receiving function of the first port according to the first condition.
The monitoring receiving function comprises a function of receiving a monitoring message, wherein the monitoring message is used for monitoring the time deviation of the first equipment and the second equipment. The monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages. The monitoring reception function may further include a function of transmitting a delay request message.
Alternatively, the first condition may include at least one of the following conditions:
condition 1, the second port is the master port M;
condition 2, the slave backup function of the first port is started, where the slave backup function refers to a function that the port state can be changed into a slave state or a passive state;
and 3, the first port receives a notification message, a synchronous message or a following message sent by the second port.
In the above condition 1, if the first device determines that the second port to which the first port is connected is the master port M, it may be determined that the second port is capable of sending the monitoring message, so that the monitoring receiving function of the first port may be enabled. For example, the first device may determine, according to a message interacted between the first port and the second port, whether the second port is the master port M.
In the above condition 2, if the first device determines that the slave backup function of the first port is turned on, it may be determined that the first port can be used as the backup port of the slave port S of the first device, so the monitoring receiving function of the first port may be directly enabled.
In the above condition 3, if the first device receives the notification message, the synchronization message, the follow message, or the delayed response message sent by the second port through the first port, it can determine that the second port is the master port M, so that the monitoring and receiving function of the first port can be started.
For example, the notification message, the synchronization message, the follow message, and the delayed response message sent by the second port may carry a standby master flag (alternateMasterFlag). If the second port is the main port M, the standby main flag (alternateMasterFlag) may be a first flag, such as FALSE; if the second port is not the primary port M, the alternate primary flag (alternateMasterFlag) may be a second flag, such as TRUE. Correspondingly, the first device may determine whether the second port is the master port M according to a standby master flag (alternateMasterFlag) in the foregoing message sent by the second port.
Step 302, the first device obtains a time deviation between the first device and the second device according to the monitoring message.
After the first device starts the monitoring receiving function of the first port, the first device can interact with the second port of the second device to monitor messages, and the time deviation between the first device and the second device can be obtained according to the monitoring messages.
Step 303, if the time deviation is greater than the deviation threshold, the first device generates an alarm, and/or closes the slave backup function of the first port.
The implementation process of this step 302 and step 303 may refer to the descriptions related to the above step 206 and step 207, which are not repeated here.
In summary, the embodiment of the application provides a method for monitoring time deviation. The first device can enable the monitoring receiving function of the first port, and can monitor the time deviation between the first device and the second device in advance according to the monitoring message. Thus, it is ensured that the first device can accurately judge whether or not it can change the first port to a new slave port when its slave port fails. And, the first device may automatically enable the monitor reception function of the first port upon detecting the first condition. Therefore, on one hand, the problem of high operation complexity caused by manual configuration can be avoided, and on the other hand, the problem of wasting the computing resource of the first equipment and the transmission resource of the communication system caused by starting the monitoring receiving function of the first port in advance can be avoided.
The embodiment of the present application provides a first device, where the first device has a first port, and may implement the steps performed by the first device in the method for monitoring a time offset provided by the method embodiment (for example, the method embodiment shown in fig. 7 or fig. 8). As shown in fig. 16, the first device includes:
and the sending module 401 is configured to send a monitoring start request to the second port of the second device through the first port. The monitoring start request is used for requesting the second device to start a monitoring sending function of the second port, and the monitoring sending function refers to a function of sending a monitoring message. The monitoring message is used for monitoring the time deviation between the first equipment and the second equipment. The functional implementation of the sending module 401 may refer to the relevant descriptions of step 101 and step 201 in the above method embodiments.
An enabling module 402, configured to enable a monitoring receiving function of the first port, where the monitoring receiving function includes a function of receiving a monitoring message. The functional implementation of the enabling module 402 may refer to the relevant descriptions of steps 103 and 204 in the above method embodiments.
The monitoring module 403 is configured to obtain the time deviation between the first device and the second device according to the monitoring message. The functional implementation of the monitoring module 403 may refer to the relevant descriptions of steps 104 and 206 in the method embodiment described above.
Optionally, the enabling module 402 may be configured to enable the monitor receiving function of the first port if the first port receives a monitor on response sent by the second port. Wherein the monitor on response indicates that the monitor send function of the second port is enabled.
Optionally, the monitoring start response may be carried in a first notification message, a first synchronization message, a first follow message, a first delay request message, or a first signaling message.
Optionally, the enabling module 402 may be configured to enable the monitoring receiving function of the first port if the first port receives a notification message, a synchronization message, or a follow message sent by the second port.
Optionally, the monitoring start request may include: the turn-on flag is monitored and/or the packet rate is monitored. Wherein the packet rate comprises at least one of the following rates: the second port sends a first rate of notification messages; the second port sends a second rate of synchronous messages; the first port transmits a third rate of delay request messages.
Optionally, the monitoring start request may be carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message, or a second signaling message.
Optionally, the sending module 401 may be configured to send, when the slave backup function of the first port is started, a monitor start request to the second port of the second device through the first port. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
Optionally, the sending module 401 may be configured to send, when the slave backup function of the first port is turned on and the first port supports the monitor receiving function, a monitor start request to the second port of the second device through the first port. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
Alternatively, the enabling module 402 may be configured to enable the monitor receiving function of the first port when the slave backup function of the first port is turned on. The slave backup function is a function in which the port state can be changed to the slave state or the passive state.
Optionally, the monitoring module 403 may be further configured to generate an alarm if the time deviation is greater than the deviation threshold, and/or close the slave backup function of the first port. The functional implementation of the monitoring module 403 may also refer to the relevant description of step 207 in the method embodiment described above.
Optionally, the monitoring packet may include: notification messages, synchronization messages, follow messages, and/or delayed response messages.
Optionally, the monitoring receiving function further includes a function of sending a delay request message.
Alternatively, the port state of the first port may be an active state or a passive state.
In summary, the embodiment of the application provides a first device. The first port of the first device is capable of sending a monitor on request to the second port of the second device requesting the second device to enable the monitor send function of the second port. And, the first device can enable the monitor reception function of the first port. Therefore, the first device can monitor the time deviation between the first device and the second device in advance according to the received monitoring message, and further can ensure that the first device can accurately judge whether the first port can be changed into a new slave port when the slave port fails.
The embodiment of the application provides second equipment which is provided with a second port, and the steps executed by the second equipment in the time deviation monitoring method provided by the embodiment of the method can be realized. As shown in fig. 17, the second apparatus includes:
The receiving module 501 is configured to receive, through the second port, a monitor start request sent by the first port of the first device. The functional implementation of the receiving module 501 may refer to the relevant descriptions of step 101 and step 201 in the above method embodiments.
And the enabling module 502 is configured to enable the monitoring sending function of the second port according to the monitoring start request. The monitoring and transmitting function refers to a function of transmitting a monitoring message, where the monitoring message is used for a first device to obtain a time deviation from a second device. The functional implementation of the enabling module 502 may refer to the relevant descriptions of steps 102 and 202 in the method embodiments described above.
Optionally, as shown in fig. 17, the second device may further include:
a sending module 503, configured to send a monitoring start response to the first port through the second port after the enabling module 502 enables the monitoring sending function of the second port. The functional implementation of the sending module 503 may refer to the relevant description of step 203 in the above method embodiment.
Optionally, the monitoring start response may be carried in a first notification message, a first synchronization message, a first follow message, a first delay request message, or a first signaling message.
Optionally, the sending module 503 may be further configured to send a first notification packet, a first synchronization packet, a first follow packet, and/or a second delayed response packet to the first port through the second port after the enabling module 502 enables the monitoring sending function of the second port.
Optionally, the monitoring start request includes: monitoring an opening sign and/or a packet sending rate; wherein the packet rate comprises at least one of the following rates: the second port sends a first rate of notification messages; the second port sends a second rate of synchronous messages; the first port transmits a third rate of delay request messages.
Optionally, the sending module 503 may be further configured to: sending a notification message to the first port through the second port according to the first rate; and sending the synchronous message to the first port through the second port according to the second rate.
Optionally, the monitoring message may include: notification messages, synchronization messages, follow messages, and/or delayed response messages.
Optionally, the monitoring start request may be carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message, or a second signaling message.
Alternatively, the port state of the first port may be an active state or a passive state.
In summary, the embodiment of the application provides a second device. The second device can start the monitoring sending function of the second port, namely the function of sending the monitoring message, according to the monitoring starting request sent by the first device. Therefore, the first device can monitor the time deviation between the first device and the second device in advance according to the monitoring message, and further can ensure that the first device can accurately judge whether the first port can be changed into a new slave port when the slave port fails.
The embodiment of the application provides another first device, which is provided with a first port, and can realize the time deviation monitoring method provided by the embodiment of the method shown in fig. 15. As shown in fig. 18, the first device includes:
an enabling module 601, configured to enable a monitor receiving function of the first port according to the first condition. The monitoring receiving function comprises a function of receiving a monitoring message, wherein the monitoring message is used for monitoring the time deviation of the first equipment and the second equipment. The functional implementation of the enabling module 601 may refer to the relevant description of step 301 in the above-described method embodiment.
The monitoring module 602 is configured to obtain a time deviation between the first device and the second device according to the monitoring message. The functional implementation of the monitoring module 602 may refer to the relevant descriptions of steps 104, 206 and 302 in the above method embodiments.
Alternatively, the first condition may include at least one of the following conditions: the second port is a main port; the slave backup function of the first port is started, and the slave backup function refers to a function that the port state can be changed into a slave state or a passive state; the first port receives a notification message, a synchronization message, a follow message or a delay response message sent by the second port.
Optionally, the monitoring module 602 may be further configured to generate an alarm if the time deviation is greater than a deviation threshold, and/or close a slave backup function of the first port. The functional implementation of the monitoring module 602 may also refer to the relevant descriptions of step 207 and step 303 in the above method embodiments.
Optionally, the monitoring message includes: notification messages, synchronization messages, follow messages, and/or delayed response messages.
Optionally, the monitoring receiving function further includes a function of sending a delay request message.
Alternatively, the port state of the first port may be an active state or a passive state.
In summary, the embodiment of the present application provides a first device, which can enable a monitoring receiving function of a first port, and can monitor, in advance, a time deviation between the first device and a second device according to a monitoring message. Thus, it is ensured that the first device can accurately judge whether or not it can change the first port to a new slave port when its slave port fails. And, the first device may automatically enable the monitor reception function of the first port upon detecting the first condition. Therefore, on one hand, the problem of high operation complexity caused by manual configuration can be avoided, and on the other hand, the problem of wasting the computing resource of the first equipment and the transmission resource of the communication system caused by starting the monitoring receiving function of the first port in advance can be avoided.
It may be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the first device, the second device and the modules may refer to the corresponding processes in the foregoing method embodiments, which are not described herein again.
It should be appreciated that the first device and the second device provided by the embodiments of the present application may also be implemented as application-specific integrated circuits (ASICs), or programmable logic devices (programmable logic device, PLDs), which may be complex program logic devices (complex programmable logical device, CPLDs), field-programmable gate arrays (FPGAs), general-purpose array logic (generic array logic, GAL), or any combinations thereof. In addition, the method for monitoring time deviation provided in the foregoing method embodiment may also be implemented by software, and when the method for monitoring time deviation provided in the foregoing method embodiment is implemented by software, each functional module in the first device and the second device may also be a software module.
Fig. 19 is a schematic structural diagram of an apparatus according to an embodiment of the present application. The device may be applied in a communication system such as that shown in fig. 1 or fig. 6, and may be the first device or the second device provided in the above embodiments. Referring to fig. 19, the apparatus includes: a processor 701, a memory 702, a network interface 703 and a bus 704.
In which a computer program 7021 is stored in the memory 702, the computer program 7021 is used to realize various application functions. The processor 701 is configured to execute the computer program 7021 to implement the steps performed by the first device or the second device in the method for monitoring time deviation provided by the above method embodiment. For example, the processor 701 is configured to execute the computer program 7021 to implement the functions of the sending module 401, the enabling module 402, and the monitoring module 403, or implement the functions of the receiving module 501, the enabling module 502, and the sending module 503, or implement the functions of the enabling module 601 and the monitoring module 602.
The processor 701 may be a central processing unit (central processing unit, CPU), and the processor 701 may also be other general purpose processors, digital signal processors (digital signal processor, DSP), ASIC, FPGA, graphics processor (graphics processing unit, GPU) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or any conventional processor.
The memory 702 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
The network interface 703 may be plural and the network interface 703 is used to enable a communication connection (which may be wired or wireless) with other devices. In this embodiment of the present application, the network interface 703 is used for receiving and transmitting a message. The other devices may be terminals, servers, VMs, etc. or other electronic devices.
A bus 704 is used to connect the processor 701, the memory 702, and the network interface 703. Also, the bus 704 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. But for clarity of illustration, the various buses are labeled as bus 704 in the figures.
Fig. 20 is a schematic structural diagram of another apparatus according to an embodiment of the present application. The device may be applied in a communication system such as that shown in fig. 1 or fig. 6, and may be the first device or the second device provided in the above embodiments. As shown in fig. 20, the apparatus may include: a main control board 801 and at least one interface board (interface board is also called line card or service board), for example interface board 802 and interface board 803 are shown in fig. 20. The electronic device may further comprise a switching fabric 804 in case of multiple interface boards, the switching fabric 804 being adapted to perform data exchange between the interface boards.
The main control board 801 is also called a main processing unit (main processing unit, MPU) or a routing processing card (route processor card), and the main control board 801 is used for performing functions such as system management, equipment maintenance and protocol processing. The main control board 801 is mainly provided with 3 types of functional units: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 801 includes: a central processor 8011 and a memory 8012.
The interface boards 802 and 803 are also called line interface unit cards (line processing unit, LPU), line cards (line cards) or service boards, and are used to provide various service interfaces and implement forwarding of messages. The service interface provided by the interface board may include: SONET/SDH based packet (packet over SONET/SDH, POS) interfaces, gigabit Ethernet (GE) interfaces, and asynchronous transfer mode (asynchronous transfer mode, ATM) interfaces, among others. Where SONET refers to synchronous optical network (synchronous optical network), SDH refers to synchronous digital hierarchy (synchronous digital hierarchy). The main control board 801, the interface board 802 and the interface board 803 are connected with the system backboard through a system bus to realize intercommunication. As shown in fig. 20, the interface board 802 includes one or more central processing units 8021 thereon. The central processor 8021 is used for controlling and managing the interface board 802 and communicating with the central processor 8011 on the main control board 801, and the interface board 802. The memory 8024 on the interface board 802 is used for storing forwarding table entries, and the network processor 8022 can forward the message by looking up the forwarding table entries stored in the memory 8024. Memory 8024 may also be used for storing program codes.
The interface board 802 further includes one or more physical interface cards 8023, where the one or more physical interface cards 8023 are configured to receive a message sent by a previous hop node, and send a processed message to a next hop node according to an instruction of the central processor 8021.
Furthermore, it is understood that the central processor 8021 and/or the network processor 8022 in the interface board 802 in fig. 20 may be dedicated hardware or chips, such as ASIC, to implement the above functions, i.e., a manner known as a forwarding plane processing by dedicated hardware or chips. In other embodiments, the central processor 8021 and/or the network processor 8022 may also employ a general purpose processor, such as a general purpose CPU, to perform the functions described above.
It should be further understood that the master control board 801 may have one or more blocks, and that the multiple blocks may include a primary master control board and a backup master control board. The interface board may have one or more pieces, the more data processing capabilities the electronic device is, the more interface boards are provided. As shown in fig. 20, the electronic device includes an interface board 802 and an interface board 803. When the distributed forwarding mechanism is adopted, the structure of the interface board 803 is basically the same as that of the interface board 802, and the operation on the interface board 803 is basically similar to that of the interface board 802, so that the description is omitted for brevity. In the case of an electronic device having multiple interface boards, the multiple interface boards may communicate with one another through one or more switch fabric 804, and load sharing and redundancy backup may be implemented to provide high capacity data exchange and processing capabilities.
Under the centralized forwarding architecture, the electronic device may not need the switch board 804, and the interface board bears the processing function of the service data of the whole system. Therefore, the data access and processing power of the electronic device of the distributed architecture is greater than that of the electronic device of the centralized architecture. The specific architecture employed is not limited in any way herein, depending on the specific networking deployment scenario.
In an embodiment of the application, memory 8012 and Memory 8024 may be, but are not limited to, ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, EEPROM, compact disk read-only Memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 8024 in the interface board 802 may be stand alone and connected to the central processor 8021 by a communication bus; alternatively, the memory 8024 may be integrated with the central processor 8021. The memory 8012 in the main control board 801 may exist independently and be connected to the central processing unit 8011 through a communication bus; alternatively, the memory 8012 may be integrated with the central processor 8011.
The program code stored in the memory 8024 is controlled to be executed by the central processor 8021, and the program code stored in the memory 8012 is controlled to be executed by the central processor 8011. The central processor 8021 and/or the central processor 8011 may implement the time deviation monitoring method provided by the above method embodiment by executing a program code. The memory 8024 and/or the program code stored by the memory 8012 may include one or more software elements. The one or more software elements may be functional modules as shown in any of figures 16-18.
In an embodiment of the present application, the physical interface card 8023 may be a device using any transceiver or the like for communicating with other devices or communication networks, such as ethernet, radio access network (radio access network, RAN), wireless local area network (wireless local area networks, WLAN), etc.
Embodiments of the present application also provide a computer readable storage medium having instructions stored therein which, when executed on a processor, cause the processor to perform steps performed by a first device or a second device as in the method embodiments described above.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a processor, cause the processor to perform the steps performed by the first device or the second device as in the method embodiments described above.
The embodiment of the application also provides a communication system, as shown in fig. 6, which comprises a first device 01 and a second device 02. Wherein the first device 01 is configured to implement the steps performed by the first device in the above-described method embodiment, and the second device 02 is configured to implement the steps performed by the second device in the above-described method embodiment.
The structure of the first device 01 may refer to fig. 16, and any one of fig. 18 to 20, and the structure of the second device 02 may refer to fig. 17, 19 or 20.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
In embodiments of the present application, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The term "and/or" in the present application is merely an association relation describing the association object, and indicates that three kinds of relations may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; these modifications or substitutions do not depart from the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present invention.

Claims (35)

1. A method for monitoring time offset, applied to a first device, the first device having a first port, the method comprising:
sending a monitoring start request to a second port of a second device through the first port, wherein the monitoring start request is used for requesting the second device to start a monitoring sending function of the second port, the monitoring sending function is a function of sending a monitoring message, and the monitoring message is used for monitoring time deviation between the first device and the second device;
enabling a monitoring receiving function of the first port, wherein the monitoring receiving function comprises a function of receiving the monitoring message;
And obtaining the time deviation of the first equipment and the second equipment according to the monitoring message.
2. The method of claim 1, wherein the enabling the monitor reception function of the first port comprises:
and if the first port receives a monitoring start response sent by the second port, enabling the monitoring receiving function of the first port, wherein the monitoring start response indicates that the monitoring sending function of the second port is enabled.
3. The method of claim 2, wherein the monitoring initiation response is carried in a first notification message, a first synchronization message, a first follow message, a first delay request message, or a first signaling message.
4. The method of claim 1, wherein the enabling the monitor reception function of the first port comprises:
and if the first port receives a first notification message, a first synchronization message or a first following message sent by the second port, starting the monitoring and receiving function of the first port.
5. The method of any one of claims 1 to 4, wherein monitoring for an on request comprises: monitoring an opening sign and/or a packet sending rate; wherein the packet sending rate comprises at least one of the following rates:
The second port sends a first rate of notification messages;
the second port sends a second rate of synchronous messages;
and the first port sends a third rate of delay request messages.
6. The method according to any one of claims 1 to 5, wherein the monitoring start request is carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message or a second signaling message.
7. The method according to any one of claims 1 to 6, wherein the sending, through the first port, a monitor-on request to a second port of a second device, comprises:
and when the slave backup function of the first port is started, sending a monitoring starting request to a second port of the second device through the first port, wherein the slave backup function refers to a function of which the port state can be changed into a slave state or a passive state.
8. The method according to any one of claims 1 to 6, wherein the sending, through the first port, a monitor-on request to a second port of a second device, comprises:
and when the slave backup function of the first port is started and the first port supports the monitoring receiving function, sending a monitoring starting request to the second port of the second device through the first port, wherein the slave backup function refers to a function of which the port state can be changed into a slave state or a passive state.
9. The method of any of claims 1 to 6, wherein the enabling the monitor reception function of the first port comprises:
and when the slave backup function of the first port is started, starting the monitoring and receiving function of the first port, wherein the slave backup function refers to a function of which the port state can be changed into a slave state or a passive state.
10. The method according to any one of claims 1 to 9, further comprising:
and if the time deviation is larger than a deviation threshold, generating an alarm and/or closing the slave backup function of the first port.
11. The method according to any one of claims 1 to 10, wherein the monitoring message comprises: notification messages, synchronization messages, follow messages, and/or delayed response messages.
12. The method according to any one of claims 1 to 11, wherein the monitoring and receiving function further comprises a function of transmitting a delay request message.
13. The method of any one of claims 1 to 12, wherein the port state of the first port is either an active state or a passive state.
14. A method of monitoring time offset, applied to a second device, the second device having a second port, the method comprising:
Receiving a monitoring start request sent by a first port of first equipment through the second port;
and starting a monitoring sending function of the second port according to the monitoring starting request, wherein the monitoring sending function refers to a function of sending a monitoring message, and the monitoring message is used for the first equipment to obtain time deviation with the second equipment.
15. The method of claim 14, wherein the method further comprises:
and after the monitoring and sending function of the second port is started, sending a monitoring and starting response to the first port through the second port.
16. The method of claim 15, wherein the monitoring initiation response is carried in a first notification message, a first synchronization message, a first follow message, a first delay request message, or a first signaling message.
17. The method of claim 14, wherein the method further comprises:
and after the monitoring and sending function of the second port is started, sending a first notification message, a first synchronization message, a first following message and/or a second delay response message to the first port through the second port.
18. The method according to any one of claims 14 to 17, wherein monitoring for an on request comprises: monitoring an opening sign and/or a packet sending rate; wherein the packet sending rate comprises at least one of the following rates:
the second port sends a first rate of notification messages;
the second port sends a second rate of synchronous messages;
and the first port sends a third rate of delay request messages.
19. The method of claim 18, wherein the method further comprises:
the second port sends the notification message to the first port according to the first rate;
and the second port sends the synchronous message to the first port according to the second rate.
20. The method according to any one of claims 14 to 19, wherein the monitoring message comprises: notification messages, synchronization messages, follow messages, and/or delayed response messages.
21. The method according to any one of claims 14 to 20, wherein the monitoring start request is carried in a second notification message, a second synchronization message, a second follow message, a first delayed response message or a second signaling message.
22. The method of any one of claims 14 to 21, wherein the port state of the first port is an active state or a passive state.
23. A method for monitoring time offset, applied to a first device, the first device having a first port, the method comprising:
according to a first condition, starting a monitoring receiving function of the first port, wherein the monitoring receiving function comprises a function of receiving a monitoring message, and the monitoring message is used for monitoring time deviation between the first equipment and the second equipment;
and obtaining the time deviation of the first equipment and the second equipment according to the monitoring message.
24. The method of claim 23, wherein the first condition comprises at least one of:
the second port is a main port;
the slave backup function of the first port is started, and the slave backup function refers to a function that the port state can be changed into a slave state or a passive state;
and the first port receives a notification message, a synchronous message, a follow message or a delayed response message sent by the second port.
25. The method according to claim 23 or 24, characterized in that the method further comprises:
And if the time deviation is larger than a deviation threshold, generating an alarm and/or closing the slave backup function of the first port.
26. The method according to any one of claims 23 to 25, wherein the monitoring message comprises: notification messages, synchronization messages, follow messages, and/or delayed response messages.
27. The method according to any one of claims 23 to 26, wherein the monitoring and receiving function further comprises a function of transmitting a delay request message.
28. The method of any one of claims 23 to 27, wherein the port state of the first port is an active state or a passive state.
29. A first device, the first device having a first port, the first device comprising:
a sending module, configured to send a monitoring start request to a second port of a second device through the first port, where the monitoring start request is used to request the second device to enable a monitoring sending function of the second port, where the monitoring sending function is a function of sending a monitoring packet, and the monitoring packet is used to monitor a time deviation between the first device and the second device;
the starting module is used for starting a monitoring receiving function of the first port, and the monitoring receiving function comprises a function of receiving the monitoring message;
And the monitoring module is used for obtaining the time deviation of the first equipment and the second equipment according to the monitoring message.
30. A second device, the second device having a second port, the second device comprising:
the receiving module is used for receiving a monitoring start request sent by a first port of first equipment through the second port;
and the starting module is used for starting the monitoring sending function of the second port according to the monitoring starting request, wherein the monitoring sending function is a function of sending a monitoring message, and the monitoring message is used for the first equipment to obtain the time deviation with the second equipment.
31. A first device, the first device having a first port, the first device comprising:
the starting module is used for starting a monitoring receiving function of the first port according to a first condition, wherein the monitoring receiving function comprises a function of receiving a monitoring message, and the monitoring message is used for monitoring time deviation between the first equipment and the second equipment;
and the monitoring module is used for obtaining the time deviation of the first port and the second port according to the monitoring message.
32. An apparatus, the apparatus comprising: a memory, a processor and a computer program stored on the memory and capable of running on the processor, the processor implementing the method of any one of claims 1 to 28 when the computer program is executed.
33. A computer readable storage medium having instructions stored therein which, when executed on a processor, implement the method of any one of claims 1 to 28.
34. A computer program product comprising instructions which, when run on a processor, implement the method of any of claims 1 to 28.
35. A communication system, the communication system comprising: a first device and a second device, wherein the first device is configured to implement the method of any one of claims 1 to 13, or the method of any one of claims 23 to 28;
the second device being adapted to implement the method of any of claims 14 to 22.
CN202210769926.1A 2022-06-08 2022-06-30 Time deviation monitoring method, device and system Pending CN117241365A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2022106443436 2022-06-08
CN202210644343 2022-06-08

Publications (1)

Publication Number Publication Date
CN117241365A true CN117241365A (en) 2023-12-15

Family

ID=89089921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210769926.1A Pending CN117241365A (en) 2022-06-08 2022-06-30 Time deviation monitoring method, device and system

Country Status (1)

Country Link
CN (1) CN117241365A (en)

Similar Documents

Publication Publication Date Title
US11496235B2 (en) Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP
EP3334068B1 (en) Method, node and system for detecting clock synchronization path
US9749073B2 (en) Clock recovery in a packet based network
US10892884B2 (en) Method for updating clock synchronization topology, method for determining clock synchronization path, and device
WO2021233313A1 (en) Port state configuration method, apparatus, system, and storage medium
US11212068B1 (en) Carrying a timestamp in radio over ethernet
EP2458757B1 (en) A method for transmitting IEEE 1588V2 synchronization packets over ethernet in link-by-link mode, via network elements having a transparent clock, and associated help device
CN117241365A (en) Time deviation monitoring method, device and system
US11223437B1 (en) Differential clock recovery using a global reference time
US20230262625A1 (en) Time Synchronization Fault Processing Method, Apparatus, And System
US20240080122A1 (en) Packet transmission method and apparatus, device, and storage medium
US20230208544A1 (en) Method, apparatus, and system for processing time synchronization fault and storage medium
US20220337384A1 (en) Clock Port Attribute Recovery Method, Device, and System
WO2023029669A1 (en) Time synchronization monitoring method
US20230208545A1 (en) Message processing method, apparatus, and system, device, and storage medium
US20230057463A1 (en) Network timing topology discovery and visualization using Interior Gateway Protocols
CN115632736A (en) Method, device and equipment for supporting high-precision clock service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication