Method, device and system for handling time synchronization failure

By managing the time synchronization status of converters in 5G networks, the problem of converter time synchronization failure is solved, ensuring accurate time synchronization between TSN devices and 5G GM.

CN114080017BActive Publication Date: 2025-10-03HUAWEI TECH CO LTD

Patent Information

Application Number
CN202010843351.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-20
Publication Date
2025-10-03
Estimated Expiration
2040-08-20

AI Technical Summary

Technical Problem

Converters may experience time synchronization failures in 5G networks, causing TSN devices to receive incorrect time and affecting time synchronization accuracy.

Method used

By stopping sending time synchronization messages to converters that are not synchronized with the 5G GM, setting the port status to the fault state or listening state, and using the fault flag and recovery flag to manage the time synchronization status of the converter, the device is ensured not to receive incorrect time.

Benefits of technology

This prevents devices from receiving incorrect time, prevents time synchronization errors, and ensures the accuracy of time synchronization between TSN devices and 5G GM.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114080017B_ABST
    Figure CN114080017B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for handling time synchronization failures, pertaining to the field of communications. The method includes: when the time of a first converter in a first network is not synchronized with a clock source in the first network, stopping the transmission of time synchronized with a clock source in a second network to a device communicating with the first converter, the device being located in the second network. This application prevents synchronization from being caused by incorrect time acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a method, device, and system for handling time synchronization failures. Background Art

[0002] Currently, time-sensitive network (TSN) services can be carried on 5G networks. 5G networks are connected to multiple TSN devices and require the 5G network to support the transmission of time between TSN devices. For example, a first TSN device is connected to a first switch on the 5G network, and a second TSN device is connected to a second switch on the 5G network. In this case, the 5G network needs to transmit the time sent by the first TSN device to the second TSN device.

[0003] The 5G network also includes a grandfather clock (5G GM). Both the first converter and the second converter are synchronized with the 5G GM, and the first TSN device is synchronized with the TSN clock source. The first TSN device sends message 1 to the first converter. Message 1 includes a first time synchronized with the TSN clock source. The first converter sends message 2 to the second converter via the 5G network, including the first time, the reception time of message 1, and a first transmission delay. The first transmission delay is the transmission delay between the first TSN device and the first converter. When the second converter needs to send message 3, it calculates the second transmission delay based on the reception time and the current time. The second converter accumulates the first time, the first transmission delay, and the second transmission delay to obtain a second time, and sends message 3 including the second time to the second TSN device.

[0004] In the process of implementing this application, the inventors discovered that the prior art has at least the following problems:

[0005] A converter may experience a time synchronization failure, preventing it from synchronizing with the 5G GM time, resulting in the TSN device receiving an incorrect second time. For example, if the first or second converter fails to synchronize with the 5G GM time, the second converter's calculated second transmission delay will be inaccurate, causing the second converter's accumulated second time to be inaccurate, and the second TSN device will receive an incorrect time. Summary of the Invention

[0006] This application provides a method, device, and system for handling time synchronization failures to avoid obtaining incorrect time. The technical solution is as follows:

[0007] In a first aspect, the present application provides a method for handling time synchronization failures. In the method, when the time of a first converter in a first network is not synchronized with a clock source in the first network, transmission of time synchronized with a clock source in a second network to a device communicating with the first converter is stopped. Because transmission of time synchronized with the clock source in the second network to the device is stopped, the device does not receive erroneous time, thereby preventing the device from obtaining erroneous time. When the device is a terminal, the device does not adjust its local time based on the erroneous time, thereby preventing synchronization errors.

[0008] In a possible implementation, the second network includes a first subnetwork and a second subnetwork, the device is located in the first subnetwork or the second subnetwork, the clock source in the second network is located in the second subnetwork, and the first network connects the first subnetwork and the second subnetwork.

[0009] In another possible implementation, the second network is a delay-sensitive network TSN.

[0010] In another possible implementation, the first network is a 5G network.

[0011] In another possible implementation, the device stops sending a first message, where the first message is an Announce message, a Sync message, or a Follow_up message. This stops sending the time synchronized with the clock source of the second network to the device.

[0012] In another possible implementation, a port state of a port on the first converter that communicates with the device is set to a first state, where the first state is a fault state, a listening state, a disabled state, or a specified state, so as to prevent the port from sending the first message to the device.

[0013] In another possible implementation, a fault identifier is sent to a configuration device in the first network, where the fault identifier is used to indicate that the time of the first converter is not synchronized with the clock source in the first network; a first state sent by the configuration device based on the fault identifier is received; and a port state of a port on the first converter that communicates with the device is set to the first state, thereby preventing the port from sending a first message to the device.

[0014] In another possible implementation, the fault flag is further used to configure the device to set the state of a port on the second converter in the first network to a slave state. This allows the second converter to obtain time synchronized with a clock source in the second network through the port in the slave state. The first network can then send time synchronized with the clock source to other devices in the second network through the second converter, so that other devices in the second network can also synchronize with the clock source.

[0015] In another possible implementation, a second message is received, where the second message is used for the first converter to synchronize time with a clock source in the first network; and whether the time of the first converter is synchronized with the clock source in the first network is determined based on the second message. This allows determining whether the first converter is synchronized with the clock source in the first network.

[0016] In another possible implementation, the second message includes a clock level, and when the clock level is lower than a first threshold, it is determined that the time of the first converter is not synchronized with the clock source in the first network, thereby determining whether the first converter is synchronized with the clock source in the first network.

[0017] In another possible implementation, the second message includes a clock level identifier. Whether the clock level is lower than a first threshold is determined based on the clock level identifier. When the clock level is lower than the first threshold, it is determined that the time of the first converter is not synchronized with the clock source in the first network. This allows determining whether the first converter is synchronized with the clock source in the first network.

[0018] In another possible implementation, the second message carries time information. When the time deviation between the first converter and the clock source in the first network, calculated based on the second message, exceeds a second threshold, the first converter is determined to be out of synchronization with the clock source in the first network. This allows for determining whether the first converter is synchronized with the clock source in the first network.

[0019] In another possible implementation, when the first converter fails to obtain the second message within a timeout period, it is determined that the time of the first converter is not synchronized with the clock source in the first network, and the second message is used for the first converter to synchronize time with the clock source in the first network.

[0020] In another possible implementation, a recovery identifier is sent to a configuration device in the first network, where the recovery identifier is used to indicate that the time of the first converter is restored to be synchronized with the clock source in the first network, and the recovery identifier is used by the configuration device to configure the port status of the ports on each converter in the first network.

[0021] On the second aspect, the present application provides a method for handling time synchronization failures, in which: when a first converter in a first network does not receive a first message sent by a second converter in the first network within a timeout period, the method stops sending time synchronized with a clock source in the second network to a device communicating with the first converter, the device is located in the second network, and the type of the first message includes a notification Announce message, a synchronization Sync message, or a follow-up Follow_Up message. Since the time synchronized with the clock source in the second network is stopped from being sent to the device, the first converter knows how to handle the situation when it does not receive the first message sent by the second converter in the first network within a timeout period. In addition, since the time synchronized with the clock source in the second network is stopped from being sent to the device, the device will not receive the wrong time. In the case where the device is a terminal station, the device will not adjust the local time of the device based on the wrong time, thereby avoiding synchronization errors.

[0022] In one possible implementation, the second message is stopped from being sent to the device, where the second message is an Announce message, a Sync message, or a Follow_Up message. Thus, by stopping the second message, the time synchronized with the clock source of the second network is stopped from being sent to the device.

[0023] In another possible implementation, the port state of the port on the first converter that communicates with the device is set to a first state, which is a fault state, a listening state, a disabled state, or a specified state, to prevent the port from sending a second message to the device.

[0024] In another possible implementation, a fault identifier is sent to a configuration device in the first network, where the fault identifier is used to indicate that the time of the first converter is not synchronized with the clock source of the first network; a first state sent by the configuration device based on the fault identifier is received; and a port state of a port on the first converter that communicates with the device is set to the first state, thereby preventing the port from sending the first message to the device.

[0025] In another possible implementation, the fault flag is further used by the configuration device to set the state of a port on a third converter in the first network to a slave state. This allows the third converter to obtain time synchronized with a clock source in the second network through the port in the slave state. The first network can then send time synchronized with the clock source to other devices in the second network through the third converter, so that the other devices in the second network can also synchronize with the clock source.

[0026] In a third aspect, the present application provides a method for handling time synchronization failures. In this method, when the time of a control device of a first converter is not synchronized with a clock source in a first network, the control device of the first converter controls the first converter to stop transmitting time synchronized with a clock source in a second network to a device communicating with the first converter, the device being located in the second network. By stopping transmission of time synchronized with the clock source in the second network to the device, the device does not receive erroneous time, thereby preventing the device from obtaining erroneous time. When the device is a terminal, the device does not adjust its local time based on the erroneous time, thereby avoiding synchronization errors.

[0027] In one possible implementation, the first converter is controlled to stop sending a first message to the device, where the first message is an Announce message, a Sync message, or a Follow_up message. By stopping sending the first message, the device stops sending time synchronized with the clock source of the second network.

[0028] In another possible implementation, a control message is sent to the first converter, instructing the first converter to set a port state of a port communicating with the device to a first state, where the first state is a fault state, a listening state, a disabled state, or a specified state. This prevents the port from sending the first message to the device.

[0029] In another possible implementation, a fault indicator is sent to a configuration device in the first network, indicating that the time of the first converter is not synchronized with a clock source in the first network. A configuration command is received from the configuration device based on the fault indicator, the configuration command including the first state. A control message is sent to the first converter based on the configuration command.

[0030] In another possible implementation, a second message is received, where the second message is used to control the device to synchronize time with a clock source in the first network; and whether the time of the control device is synchronized with the clock source in the first network is determined based on the second message.

[0031] In a fourth aspect, the present application provides a method for handling time synchronization failures, in which: a configuration device receives a fault identifier, the fault identifier being used to indicate that the time of a first converter in a first network is not synchronized with a clock source in the first network, or being used to indicate that the time of a control device of the first converter is not synchronized with a clock source in the first network. The configuration device sends a configuration command based on the fault identifier, the configuration command including a first state, the configuration command being used to set the port state of a port on the first converter that communicates with the device to a first state, so as to prevent the port from sending time synchronized with a clock source in a second network to the device, the device being located in the second network. In this way, the device will not receive erroneous time, thereby preventing the device from obtaining erroneous time. When the device is a terminal station, the device will not adjust the local time of the device based on the erroneous time, thereby avoiding synchronization errors.

[0032] In one possible implementation, based on the fault identifier, the state of a port on the second converter in the first network is set to a slave state. This allows the second converter to obtain time synchronized with a clock source in the second network through the port in the slave state. The first network can then send time synchronized with the clock source to other devices in the second network through the second converter, allowing the other devices in the second network to also synchronize with the clock source.

[0033] In another possible implementation, a recovery flag is received, where the recovery flag is used to indicate that the time of the first converter has recovered and is synchronized with the clock source in the first network, or is used to indicate that the time of a control device of the first converter is not synchronized with the clock source in the first network; and a port state of a port on each converter in the first network is configured according to the recovery flag.

[0034] In a fifth aspect, the present application provides an apparatus for handling time synchronization failures, configured to execute the method in the first aspect or any possible implementation of the first aspect. Specifically, the apparatus includes a unit for executing the method in the first aspect or any possible implementation of the first aspect.

[0035] In a sixth aspect, the present application provides an apparatus for handling time synchronization failures, configured to execute the method in the second aspect or any possible implementation of the second aspect. Specifically, the apparatus includes a unit for executing the method in the second aspect or any possible implementation of the second aspect.

[0036] In a seventh aspect, the present application provides an apparatus for handling time synchronization failures, configured to execute the method in the third aspect or any possible implementation of the third aspect. Specifically, the apparatus includes a unit for executing the method in the third aspect or any possible implementation of the third aspect.

[0037] In an eighth aspect, the present application provides an apparatus for handling time synchronization failures, configured to execute the method in the fourth aspect or any possible implementation of the fourth aspect. Specifically, the apparatus includes a unit for executing the method in the fourth aspect or any possible implementation of the fourth aspect.

[0038] In a ninth aspect, the present application provides an apparatus for handling time synchronization failures, the apparatus comprising a transceiver, a processor, and a memory. The transceiver, the processor, and the memory may be connected via an internal connection. The memory is configured to store programs, instructions, or code, and the processor is configured to execute the programs, instructions, or code in the memory and cooperate with the transceiver, so that the apparatus performs the method of the first aspect or any possible implementation of the first aspect.

[0039] In a tenth aspect, the present application provides an apparatus for handling time synchronization failures, the apparatus comprising a transceiver, a processor, and a memory. The transceiver, the processor, and the memory may be connected via an internal connection. The memory is configured to store programs, instructions, or code, and the processor is configured to execute the programs, instructions, or code in the memory and cooperate with the transceiver, so that the apparatus performs the method of the second aspect or any possible implementation of the second aspect.

[0040] In an eleventh aspect, the present application provides an apparatus for handling time synchronization failures, the apparatus comprising a transceiver, a processor, and a memory. The transceiver, the processor, and the memory may be connected via an internal connection. The memory is configured to store programs, instructions, or code, and the processor is configured to execute the programs, instructions, or code in the memory and cooperate with the transceiver, so that the apparatus performs the method of the third aspect or any possible implementation of the third aspect.

[0041] In a twelfth aspect, the present application provides an apparatus for handling time synchronization failures, the apparatus comprising a transceiver, a processor, and a memory. The transceiver, the processor, and the memory may be connected via an internal connection. The memory is configured to store programs, instructions, or code, and the processor is configured to execute the programs, instructions, or code in the memory and cooperate with the transceiver, so that the apparatus performs the method of the fourth aspect or any possible implementation of the fourth aspect.

[0042] In the thirteenth aspect, the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium, and the computer program is loaded by a processor to implement the above-mentioned first aspect, second aspect, third aspect, fourth aspect, any possible implementation of the first aspect, any possible implementation of the second aspect, any possible implementation of the third aspect or any possible implementation of the fourth aspect.

[0043] In the fourteenth aspect, the present application provides a computer-readable storage medium for storing a computer program, which is loaded by a processor to execute instructions of the method of the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.

[0044] In the fifteenth aspect, the present application provides a system for processing time synchronization failures, the system including the apparatus described in the fifth aspect and the apparatus described in the eighth aspect, or the system including the apparatus described in the sixth aspect and the apparatus described in the eighth aspect, or the system including the apparatus described in the seventh aspect and the apparatus described in the eighth aspect, or the system including the apparatus described in the ninth aspect and the apparatus described in the twelfth aspect, or the system including the apparatus described in the tenth aspect and the apparatus described in the twelfth aspect, or the system including the apparatus described in the eleventh aspect and the apparatus described in the twelfth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;

[0046] Figure 2 This is another network architecture diagram provided by an embodiment of the present application;

[0047] Figure 3 This is another network architecture diagram provided by an embodiment of the present application;

[0048] Figure 4 This is a flow chart of a synchronization method provided by an embodiment of the present application;

[0049] Figure 5 This is a flow chart of another synchronization method provided in an embodiment of the present application;

[0050] Figure 6 This is a flow chart of another synchronization method provided in an embodiment of the present application;

[0051] Figure 7 This is another network architecture diagram provided by an embodiment of the present application;

[0052] Figure 8This is a flow chart of a method for handling time synchronization failures provided by an embodiment of the present application;

[0053] Figure 9 This is a flow chart of another method for handling time synchronization failures provided by an embodiment of the present application;

[0054] Figure 10 This is a flow chart of another method for handling time synchronization failures provided by an embodiment of the present application;

[0055] Figure 11 This is a schematic diagram of the structure of a device for handling time synchronization failures provided by an embodiment of the present application;

[0056] Figure 12 This is a schematic diagram of the structure of another device for handling time synchronization failures provided by an embodiment of the present application;

[0057] Figure 13 This is a schematic diagram of the structure of another device for handling time synchronization failures provided by an embodiment of the present application;

[0058] Figure 14 This is a schematic diagram of the structure of another device for handling time synchronization failures provided by an embodiment of the present application;

[0059] Figure 15 This is a schematic diagram of the structure of another device for handling time synchronization failures provided by an embodiment of the present application;

[0060] Figure 16 This is a schematic diagram of the structure of another device for handling time synchronization failures provided by an embodiment of the present application;

[0061] Figure 17 This is a schematic diagram of the structure of another device for handling time synchronization failures provided by an embodiment of the present application;

[0062] Figure 18 This is a schematic diagram of a system structure for processing time synchronization failures provided by an embodiment of the present application;

[0063] Figure 19 This is another schematic diagram of the system structure for handling time synchronization failures provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

[0065] The terms in the embodiments of the present application, including the port of the converter, the port data set of the converter, the port state of the converter, the optimal data set, the port number of the converter and the clock level, are all applicable to the Precision Time Protocol (PTP) (IEEE 1588 protocol and the corresponding 1588 profile, such as IEEE 802.1AS).

[0066] See also Figure 1 , an embodiment of the present application provides a network architecture, which includes a first network and a second network.

[0067] A first network includes multiple converters and at least one clock source. For each converter in the first network, a network connection is established between the converter and one of the clock sources in the first network, and the converter is time-synchronized with the clock source. If the first network includes multiple clock sources, the multiple clock sources in the first network are also time-synchronized with each other.

[0068] The second network includes multiple devices and at least one clock source, each device in the second network can communicate with a converter in the first network, and each clock source in the at least one clock source can establish a network connection with one or more devices in the second network.

[0069] Among the at least one clock source in the second network, one is the master clock source, and the other clock sources are backup clock sources. That is, if the second network includes multiple clock sources, one of the multiple clock sources is the master clock source, and the other clock sources are backup clock sources. The clock level of the master clock source is higher than or equal to the clock level of the backup clock source. If the second network includes only one clock source, that one clock source is the master clock source.

[0070] A device in the second network has a network connection established with a master clock source in the second network. For a device that has a network connection with the master clock source in the second network, the device may or may not synchronize time with the master clock source in the second network. The device may send a time synchronized with the master clock source in the second network to other devices in the second network via a converter in the first network. For any other device, if the other device has a network connection with a clock source in the second network, the other device may synchronize time with the master clock source in the second network based on the time, or the device may synchronize time with the clock source instead of synchronizing time with the master clock source in the second network based on the time.

[0071] Optionally, the device in the second network communicates with the converter in the first network by establishing a network connection between the device and the converter, or by directly connecting the device to the converter. The network connection may be a wireless connection or a wired connection.

[0072] For example, a first network includes converter 1, converter 2, converter 3, clock source 1, and clock source 2. Clock source 1 and clock source 2 are generally synchronized. A network connection is established between converter 1 and clock source 1, and converter 1 and clock source 1 are synchronized. Converter 2 and clock source 2 are also connected to a network, and converter 3 and clock source 2 are also connected to a network. Converters 2 and 3 are synchronized with clock source 2. Therefore, converters 1, 2, and 3 are synchronized.

[0073] The second network includes device 1, device 2, device 3, device 4, device 5, device 6, clock source 3, and clock source 4. Clock source 3 is the primary clock source of the second network (located in the second subnetwork of the second network), and clock source 4 is the backup clock source of the second network (located in the first subnetwork of the second network). Devices 1 and 2 in the second network communicate with converter 1, devices 3 and 4 in the second network communicate with converter 2, and devices 5 and 6 in the second network communicate with converter 3. A network connection is established between device 1 and primary clock source 3. Device 5 has a network connection with backup clock source 4.

[0074] Converter 1 can establish a network connection with converter 2, and converter 1 can establish a network connection with converter 3. Device 1 can send a time synchronized with a master clock source 3 in a second network to device 2 via converter 1, send a time synchronized with a master clock source 3 in a second network to devices 3 and 4 via converters 1 and 2, and send a time synchronized with a master clock source 3 in a second network to devices 5 and 6 via converters 1 and 3. Devices 2, 3, 4, 5, and 6 can all synchronize with the master clock source 3 in the second network based on this time. Alternatively, device 5 can synchronize with a backup clock source 4 in the second network instead of with the master clock source 3 in the second network based on this time.

[0075] For each converter in the first network, the converter includes at least one port, the at least one port being a PTP port.

[0076] Optionally, the communication between the device in the second network and the converter in the first network is implemented by establishing a network connection between the device and a port on the converter, or connecting the device to a port on the converter.

[0077] A converter in a first network includes a port in slave state. Other ports on the converter may be ports in master state. Ports on other converters in the first network may also be ports in master state. A device that has a network connection to a master clock source in a second network communicates with the port in slave state on the converter.

[0078] A port in slave state can be used to receive time synchronized with the master clock source in the second network. A port in master state can be used to send time synchronized with the master clock source in the second network. Therefore, a device with a network connection to the master clock source in the second network can send time synchronized with the master clock source in the second network to other devices in the second network through the converter in the first network.

[0079] For example, see Figure 1 In the first network, only converter 1 has a port in the slave state; the other ports on converter 1 are ports in the master state. Ports on converters 2 and 3 in the first network are also ports in the master state. Device 1, which has established a network connection with master clock source 3 in the second network, transmits time synchronized with master clock source 3 in the second network to devices 2, 3, 4, 5, and 6 in the second network via converters 1, 2, and 3 in the first network.

[0080] Optionally, the first network is a 4G network or a 5G network, etc. The second network may be a TSN network or a power network, etc., and the devices in the second network may be TSN devices or power devices.

[0081] Optionally, the second network includes a first subnetwork and a second subnetwork. The first network connects the first subnetwork and the second subnetwork, the master clock source in the second network is located in the second subnetwork, and the device establishing a network connection with the master clock source in the second network is also located in the second subnetwork.

[0082] Optionally, the clock source in the first network is a 5G GM. For any converter in the first network, the converter is a network-side time sensitive network translator (NW-TT) or a terminal-side time sensitive network translator (DS-TT).

[0083] Optionally, the clock source in the second network is a TSN GM. The device in the second network is an end station or a TSN bridge.

[0084] Optionally, in the second network, one or more devices may be connected to the converter in the first network through a TSN switch. The TSN switch may be used to forward messages sent from the converter to the one or more devices, or forward messages sent from the one or more devices to the converter.

[0085] Optionally, for any converter in the first network, the converter may be a standalone device or a dedicated device, or the converter may be a module integrated into a device. In the case where the converter is a module integrated into a device, "the converter includes at least one port" means that the device where the converter is located includes at least one port.

[0086] Optionally, the first network further includes user equipment (UE), user plane function (UPF) and other equipment.

[0087] Optional, see Figure 2 , one or more converters may be integrated into the UE, and / or, one or more converters may be integrated into the UPF; for example, Figure 2 In the example, converter 1 is integrated into the UPF, converter 2 is integrated into the first UE, and converter 3 is integrated into the second UE. Or,

[0088] Optional, see Figure 3 , the UE may communicate with one or more converters, and / or the UPF may communicate with one or more converters; for example, Figure 3 In the embodiment, converter 1 communicates with the UPF, converter 2 communicates with the first UE, and converter 3 communicates with the second UE.

[0089] Optional, see Figure 2 , the converter integrated in the UPF can be NW-TT, and the converter integrated in the UE can be DS-TT. Alternatively, see Figure 3 The converter for communicating with the UPF may be NW-TT, and the converter for communicating with the UE may be DS-TT.

[0090] Optional, see Figures 1 to 3 The first network further includes a configuration device, which can be used to manage the converter in the first network.

[0091] Optionally, the configuration device is an independent device, or is integrated into a converter in the first network (not shown in the figure), or is located in the same device as one or more converters in the first network (not shown in the figure). When the first network is a 5G network, the configuration device can be a 5g-gPTP device.

[0092] In the above Figure 1 In the network architecture, device 1 in the second network establishes a network connection with the master clock source 3 of the second network. Device 1 sends the time synchronized with the master clock source 3 to allow other devices in the second network to synchronize with the master clock source 3. Figure 4 , the synchronization process can be:

[0093] Step 401: Device 1 sends a message 1 to converter 1, where the message 1 includes a first time, which is synchronized with the time of a master clock source 3 in a second network.

[0094] Optionally, the first time is the time of the main clock source 3 of the second network when the device 1 sends the message 1.

[0095] Optionally, the type of message 1 includes a synchronization (Sync) message or a follow (Follow_up) message.

[0096] The local clock of device 1 is synchronized with the master clock source 3 of the second network. Device 1 obtains the current time generated by the local clock of device 1 as the first time and sends message 1 including the first time. Since the local clock of device 1 is synchronized with the master clock source 3, the first time is synchronized with the current time of the master clock source 3. Alternatively, device 1 receives a time message including the time of master clock source 3 from the master clock source 3 of the second network. Device 1 calculates the transmission delay of the time message from the master clock source 3 to device 1. When it is necessary to send message 1, device 1 calculates the time difference between the reception time of the time message and the current time, accumulates the time included in the time message, the transmission delay, and the time difference to obtain the first time. The first time is synchronized with the current time of the master clock source 3, and message 1 including the first time is sent.

[0097] The so-called sending of time synchronized with the master clock source 3 means that the time is the same as the time of the master clock source 3, or the time difference between the time and the master clock source 3 is less than the difference threshold. For example, the synchronization of the first time with the current time of the master clock source 3 means that the first time is the same as the current time of the master clock source 3, or the time difference between the first time and the current time of the master clock source 3 is less than the difference threshold.

[0098] Step 402: Converter 1 receives message 1 and sends message 2 to other converters in the first network. Message 2 includes a second time and a third time. The second time is the time when converter 1 is synchronized with the master clock source 3 of the second network when receiving message 1. The third time is the time of converter 1 when converter 1 receives message 1.

[0099] Converter 1 receives message 1 through a port in the Slave state, and obtains a first transmission delay when receiving message 1. The first transmission delay is the delay for transmitting message 1 from device 1 to converter 1. The first transmission delay is added to the first time to obtain a second time. The second time is the same as the current time of the master clock source 3 of the second network, or the time difference between the second time and the current time of the master clock source 3 of the second network is less than the difference threshold.

[0100] The local clock of converter 1 is synchronized with the clock source 1 of the first network. When receiving message 1, converter 1 obtains the current time generated by the local clock of converter 1 as the third time.

[0101] The type of message 2 is the same as that of message 1, that is, the type of message 2 includes a Sync message or a Follow_up message.

[0102] Optionally, converter 1 may also include a port in Master state. This Master state port may communicate with other devices in the second network besides device 1. When converter 1 needs to send message 3 to this other device, it obtains the current time of converter 1's local clock, calculates converter 1's forwarding delay based on this current time and a third time, and adds this forwarding delay to the second time to obtain a fourth time synchronized with master clock source 3. Converter 1 also sends message 3 including the fourth time to the other device via this Master state port. The other device receives message 3. If the other device is a TSN switch, the TSN switch sends message 3 to the device connected to it. If the other device is a TSN terminal, the other device synchronizes with master clock source 3 of the second network based on the fourth time in message 3.

[0103] It should be noted that the destination address of message 2 sent by converter 1 to another converter is the address of the other converter. The source port number of message 2 sent by converter 1 to another device through the port in the master state is the port number of the port in the master state, and the source address is the address of the port in the master state.

[0104] For example, see Figures 1 to 3, converter 1 sends message 2 to converter 2 and sends message 2 to converter 3. Converter 1 includes port 1 in Master state (M1 in the figure). This Master state port 1 may communicate with device 2 in the second network. When sending message 3 to device 2, converter 1 obtains the current time generated by converter 1's local clock, calculates converter 1's forwarding delay based on this current time and a third time, and adds this forwarding delay to the second time to obtain a fourth time synchronized with master clock source 3. Converter 1 then sends message 3 to device 2 via port 1 in Master state, message 3 including the fourth time. Device 2 receives message 3 and synchronizes with master clock source 3 of the second network based on the fourth time included in message 3. The destination address of message 2 sent by converter 1 to converter 2 is converter 2's address, and the destination address of message 2 sent to converter 3 is converter 3's address. The source port number of message 2 sent to device 2 is the port number of port 1 in Master state, and the source address is the address of port 1 in Master state.

[0105] Optionally, upon receiving message 1, converter 1 may not accumulate the first time and the first transmission delay, but may instead include the first time, the first transmission delay, and the third time in message 2, and include the first time, the first transmission delay, and the forwarding delay in message 3. Device 2 receives message 3 and accumulates the first time, the first transmission delay, and the forwarding delay in message 3 to obtain a fourth time synchronized with master clock source 3.

[0106] Step 403: Converter 2 receives message 2 and sends message 4 to the device communicating with converter 2. Message 4 includes a fifth time, which is the time when converter 2 synchronizes with the master clock source 3 of the second network when sending message 4. Converter 2 is a converter other than converter 1 in the second network.

[0107] In this step, converter 2's local clock synchronizes with clock source 2 of the first network. After receiving message 2, converter 2, when sending message 4 to a device communicating with converter 2, obtains the current time generated by converter 2's local clock as the sixth time. Message 2 includes the second time and the third time. A second transmission delay is calculated based on the third time and the sixth time. The second transmission delay is the time difference between the time converter 1 receives message 2 and the current time. The second transmission delay is added to the second time to obtain the fifth time currently synchronized with master clock source 3 of the second network. Converter 2 includes a port in Master state, and converter 2 sends message 4 including the fifth time to the device communicating with converter 2 via the Master port.

[0108] For example, see Figures 1 to 3, converter 2 includes port 1 in the Master state (M1 in the figure) and port 2 in the Master state (M2 in the figure). Converter 2 sends message 4 to device 3 communicating with converter 2 through port 1 in the Master state, and sends message 4 to device 4 communicating with converter 2 through port 2 in the Master state. Device 3 receives message 4, synchronizes time with the master clock source 3 of the second network based on the fifth time in message 4, and device 4 performs operations similar to those of device 3. The source port number of message 4 sent to device 3 is the port number of port 1 in the Master state, and the source address is the address of port 1 in the Master state; the source port number of message 4 sent to device 4 is the port number of port 2 in the Master state, and the source address is the address of port 2 in the Master state.

[0109] Optionally, if message 2 includes the first time, the third time, and the first transmission delay, then when converter 2 needs to send message 4, it obtains the current time generated by converter 2's local clock as the sixth time. The second transmission delay is calculated based on the third time and the sixth time. Converter 2 sends message 4, including the first time, the first transmission delay, and the second transmission delay, to a device communicating with converter 2 via a port in the Master state. The device receives message 4, accumulates the first time, the first transmission delay, and the second transmission delay in message 4 to obtain a fifth time, and synchronizes with master clock source 3 of the second network based on the fifth time.

[0110] It should be noted that clock source 1 and clock source 2 in the first network may be the same device or different devices. When clock source 1 and clock source 2 in the first network are different devices, the times of clock source 1 and clock source 2 are generally synchronized. Since converter 1's local clock is synchronized with clock source 1 in the first network, and converter 2's local clock is synchronized with clock source 2 in the first network, the third time obtained by converter 1 and the sixth time obtained by converter 2 are both referenced to the same clock source. The second transmission delay calculated based on the third time and the sixth time is the time difference between the time converter 1 receives message 2 and the current time converter 2 needs to send message 4. The second transmission delay has high accuracy. Therefore, the second transmission delay is added to the second time to obtain a fifth time. The fifth time is the time synchronization between converter 2 and the master clock source 3 of the second network when sending message 4. That is, when converter 2 sends message 4, the fifth time is the same as the current time of the master clock source 3 of the second network, or the time difference between the fifth time and the current time of the master clock source 3 of the second network is less than a difference threshold.

[0111] For other converters in the first network except converter 1 and converter 2 , the other converters also perform the same operation as converter 2 .

[0112] For example, see Figures 1 to 3 For converter 3 in the first network, converter 3 receives message 2 and sends message 5 to the device communicating with converter 3. Message 5 includes the seventh time, which is the time when converter 3 synchronizes with the master clock source 3 of the second network when it needs to send message 5. During implementation:

[0113] Converter 3's local clock is synchronized with clock source 2 of the first network. When converter 3 needs to send message 5, it obtains the current time generated by its local clock as the eighth time. Message 2 includes the second time and the third time. A third transmission delay is calculated based on the third time and the eighth time. The third transmission delay is the time difference between the time converter 1 receives message 2 and the current time converter 3 needs to send message 5. The third transmission delay is added to the second time to obtain the seventh time.

[0114] Converter 3 includes Port 1 (M1 in the figure) in Master state and Port 2 (M2 in the figure) in Master state. Converter 3 sends message 5 to device 5 communicating with converter 3 via Port 1 in Master state, and sends message 5 to device 6 communicating with converter 3 via Port 2 in Master state. The source port number of message 5 sent to device 5 is the port number of Port 1 in Master state, and the source address is the address of Port 1 in Master state. The source port number of message 5 sent to device 6 is the port number of Port 2 in Master state, and the source address is the address of Port 2 in Master state.

[0115] It should be noted that the types of message 3, message 4 and message 5 are the same as the type of message 2, that is, the types of message 3, message 4 and message 5 include Sync messages or Follow_up messages.

[0116] Step 404: The device communicating with the converter 2 receives the message 4 and performs time synchronization with the master clock source in the second network according to the fifth time in the message 4.

[0117] Optionally, the device communicating with converter 2 is a terminal. This device may be directly connected to converter 2 and receive message 4 sent by converter 2. Alternatively, this device may communicate with converter 2 through a TSN switch and receive message 4 from converter 2 forwarded by the TSN switch.

[0118] For example, see Figures 1 to 3, device 3 receives message 4, and synchronizes with the master clock source 3 of the second network according to the fifth time in message 4. And, device 4 receives message 4, and synchronizes with the master clock source 3 of the second network according to the fifth time in message 4.

[0119] Similarly, for other converters in the first network except converter 1 and converter 2, the devices communicating with the other converters also synchronize time with the master clock source of the second network, just like devices 3 and 4. For example, see Figures 1 to 3 For device 5 and device 6 communicating with converter 3, device 5 receives message 5 and synchronizes time with the master clock source 3 of the second network according to the seventh time in message 5, and device 6 receives message 5 and synchronizes time with the master clock source 3 of the second network according to the seventh time in message 5.

[0120] It should be noted that: for the device 5 that has established a network connection with the backup clock source 4 in the second network, the device 5 may also synchronize time with the backup clock source 4 instead of the master clock source 3 in the second network.

[0121] It should also be noted that: for any one of the above-mentioned devices 3, 4, 5 and 6, if the device is a TSN switch, when the TSN switch receives a message (message 4 or message 5), it sends the message to the device connected to the TSN switch in the second network.

[0122] It should be noted that the time of converter 1 and converter 2 both need to be synchronized with the clock source of the first network. This ensures that converter 2 can accurately calculate the second transmission delay and then accurately calculate the fifth time, so that the device connected to converter 2 can obtain the correct fifth time, and then synchronize with the master clock source 3 of the second network based on the fifth time without time step errors.

[0123] Therefore, each converter in the first network needs to be synchronized with a clock source in the first network. A network connection is established between the converter and the clock source in the first network. The network connection may or may not pass through at least one network device.

[0124] Optional, see Figure 5 In the case where the network connection does not pass through a network device, the process of synchronizing the converter with the clock source in the first network may be:

[0125] Step 501: The clock source in the first network sends an Announce message and a Synchronization message to the converter via the network connection. The Announce message includes the clock level information of the clock source, and the Synchronization message includes the time of the clock source.

[0126] Optionally, the clock level information may be the clock level of the clock source or a clock level identifier used to indicate the clock level.

[0127] Optionally, the clock level identifier is used to indicate whether the clock level is lower than a first threshold, and one bit may be used to indicate whether the clock level is lower than the first threshold. The one bit is the clock level identifier, for example, bit 1 may be used to indicate that the clock level is lower than the first threshold, and bit 0 may be used to indicate that the clock level is not lower than the first threshold.

[0128] Optionally, the type of the synchronization message includes a Sync message, a Follow_up message, a delay request (delay_request, Delay_Req) ​​message, a delay response (delay_response, Delay_Resp) message, a peer delay request (peer delay_request, Pdelay_Req) ​​message, a peer delay response (peer delay_response, Pdelay_Resp) message or a peer delay response follow (peer delay_response_follow_up, Pdelay_Resp_Follow_up) message.

[0129] Optionally, if the clock level of the clock source is higher than or equal to the first threshold, it indicates that the clock source is normal. If the clock level of the clock source is lower than the first threshold, it indicates that the clock source is abnormal.

[0130] For example, assume the first threshold is 6. A larger clock level value indicates a higher clock level. If the clock level of the clock source is 6 or greater, it indicates that the clock level of the clock source is greater than or equal to the first threshold, indicating that the clock source is in a normal state. If the clock level of the clock source is less than 6, it indicates that the clock level of the clock source is less than the first threshold, indicating that the clock source is in an abnormal state.

[0131] In the case where a smaller clock level value indicates a higher clock level, if the clock level of the clock source is level 6 or less, it means that the clock level of the clock source is equal to or greater than the first threshold, indicating that the clock source status is normal. If the clock level of the clock source is greater than level 6, it means that the clock level of the clock source is less than the first threshold, indicating that the clock source status is abnormal.

[0132] Optionally, when the clock source fails, the clock level included in the Announce message sent by the clock source may be lower than the first threshold.

[0133] For example, see Figures 1 to 3 For converter 1 in the first network, the clock source that has established a network connection with converter 1 is clock source 1 in the first network. Clock source 1 sends an Announce message and / or the synchronization message to converter 1. The Announce message includes the clock level information of clock source 1, and the synchronization message includes the time of clock source 1.

[0134] Step 502: The converter receives the Announce message and the synchronization message, determines the clock level according to the clock level information in the Announce message, and when the clock level is higher than or equal to the first threshold, performs time synchronization with the clock source according to the time included in the synchronization message.

[0135] Optionally, when the clock level information is a clock level, the operation of determining the clock level is to read the clock level from the Announce message. When the clock level information is a clock level identifier, whether the clock level is lower than the first threshold is determined directly according to the clock level identifier.

[0136] Optionally, when the clock level is lower than a first threshold, the converter does not perform time synchronization with the time source.

[0137] For example, see Figures 1 to 3 , converter 1 receives the Announce message and the synchronization message, and when the clock level determined according to the clock level information in the Announce message is higher than or equal to the first threshold, performs time synchronization with the clock source according to the time included in the synchronization message.

[0138] Optional, see Figure 6 When the network connection passes through at least one network device, the process of synchronizing the converter with the clock source in the first network may be:

[0139] Step 601: A clock source in a first network sends an Announce message and a Synchronize message to a downstream device on the network connection. The Announce message includes the clock level information of the clock source, and the Synchronize message includes the time of the clock source.

[0140] For example, see Figure 7Assume that the converter is converter 1 in the first network. A network connection is established between converter 1 and clock source 1 in the first network, and the network connection passes through network device 1 and network device 2. Clock source 1 sends an Announce message and a Synchronize message on the network connection. The Announce message includes the clock level information of the clock source, and the Synchronize message includes the time of the clock source.

[0141] Step 602: The first network device receives an Announce message and a synchronization message on the network connection. When the clock level determined according to the clock level information included in the Announce message is higher than or equal to the first threshold, the first network device performs time synchronization with the clock source according to the time in the synchronization message and executes step 603.

[0142] The first network device is any network device through which the network connection between the clock source and the first converter passes.

[0143] Optionally, when the clock level determined by the first network device based on the clock level information included in the Announce message is lower than a first threshold, the first network device generates a time that may have a large deviation from the time of the clock source. The first network device generates a third message including the clock level information and a fourth message including the generated time, and sends the generated third message and fourth message to the downstream device on the network connection.

[0144] The type of the third message may be an Announce message, and the type of the fourth message may be a Synchronization message. Alternatively, the type of the third message and the type of the fourth message may be message types defined by the communication protocol used between the first network device and the converter.

[0145] It should be noted that the reason why the clock level determined by the first network device based on the clock level information in the Announce message is lower than the first threshold may be that the second network device did not receive the Announce message and the synchronization message on the network connection within the timeout period, and the second network device is the network device through which the network connection between the clock source and the first network device passes. After the timeout period expires, the second network device generates an Announce message including the clock level information of the second network device and a synchronization message including the generated time based on the local clock generation time, which may have a large deviation from the time of the clock source. The clock level information of the second network device is a clock level identifier of the clock level of the second network device or a clock level identifier used to indicate a clock failure of the second network device. The clock level of the second network device is lower than the first threshold, and the generated Announce message and the synchronization message are sent to the downstream device on the network connection.

[0146] For example, see Figure 7, assuming that the first network device is network device 2 and the second network device is network device 1. Network device 1 does not receive the Announce message and the synchronization message within the timeout period. According to the local clock generation time, the time may have a large deviation from the time of the clock source. An Announce message including the clock level information of network device 1 and a synchronization message including the generated time are generated. The clock level information is the clock level of network device 1 or a clock level identifier used to indicate the clock level of network device 1. The clock level of network device 1 is lower than the first threshold. The generated Announce message and the synchronization message are sent to the downstream device (network device 2). Network device 2 receives the Announce message and the synchronization message. At this time, the clock level determined by network device 2 based on the clock level information included in the Announce message is lower than the first threshold.

[0147] The reason why the second network device fails to receive the Announce message and the Synchronize message within the timeout period may be that a link between the second network device and an upstream device of the second network device fails.

[0148] Optionally, the second network device's failure to receive an Announce message and a Sync message on the network connection within the timeout period may refer to the duration of the second network device failing to receive the Announce message and the Sync message exceeding the timeout period. The expiration of the timeout period may refer to the duration of the second network device failing to receive the Announce message and the Sync message reaching the timeout period. The meaning of the timeout period will not be detailed in the subsequent content.

[0149] Step 603: The first network device generates a time synchronized with the clock source based on the synchronized local clock, generates a third message including the clock level information and a fourth message including the generated time, and sends the generated third message and fourth message to the downstream device on the network connection.

[0150] Upon receiving the messages (the Announce message and the Synchronize message, or the third message and the fourth message), other network devices along the network connection between the clock source and the converter perform the same operations as the first network device. The upstream device connected to the converter also performs the same operations as the first network device and sends the converter a third message including clock level information and a fourth message including the time generated by the upstream device.

[0151] For example, see Figure 7, network device 1 receives the Announce message and the synchronization message on the network connection, and the clock level determined according to the clock level information included in the Announce message is higher than or equal to the first threshold. Therefore, time synchronization is performed with the clock source according to the time included in the synchronization message, and time synchronized with the clock source is generated according to the local clock, and a third message 1 including the clock level information and a fourth message 1 including the generated time are generated, and the generated third message 1 and fourth message 1 are sent on the network connection.

[0152] Network device 2 (an upstream device of converter 1) receives a third message 1 and a fourth message 1 on the network connection, and when the clock level determined according to the clock level information included in the third message 1 is higher than or equal to the first threshold, performs time synchronization with the clock source according to the time included in the fourth message 1, generates a time synchronized with the clock source according to the local clock, generates a third message 2 including the clock level information and a fourth message 2 including the generated time, and sends the third message 2 including the clock level information and the fourth message 2 including the generated time on the network connection.

[0153] Step 604: The converter receives the third message and the fourth message, and when the clock level determined according to the clock level information in the third message is higher than or equal to the first threshold, performs time synchronization with the clock source according to the time included in the fourth message.

[0154] Optionally, when the clock level determined according to the clock level information in the third message is lower than a first threshold, the converter stops time synchronization with the clock source.

[0155] For example, see Figure 7 Converter 1 receives the third message 2 and the fourth message 2, determines that the clock level included in the third message 2 is higher than or equal to the first threshold according to the clock level information, and synchronizes with the clock source according to the time included in the fourth message 2.

[0156] For another example, suppose that the link between network device 1 and clock source 1 fails, resulting in network device 1 not receiving the Announce message and the Synchronization message within the timeout period. After the timeout period expires, network device 1 generates a time based on the local clock, which may have a large deviation from the time of clock source 1. It generates a third message 1 including the clock level information of network device 1 and a fourth message 1 including the generated time. The clock level of network device 1 is lower than the first threshold, and the generated third message 1 and fourth message 1 are sent on the network connection. In this way, the clock level information included in the third message 2 sent by network device 2 is also the clock level information of network device 1, and the time included in the fourth message 2 sent may also have a large deviation from the time of clock source 1. As a result, converter 1 will not synchronize with clock source 1.

[0157] See also Figure 8 , the embodiment of the present application provides a method for handling time synchronization failure, which can be applied to Figure 1 、 Figure 2 、 Figure 3 or Figure 7 In the network architecture shown, the execution subject of the method can be any converter in the first network, the device where the converter is located, or a device in the first network connected to the converter. The method includes:

[0158] Step 801: Determine whether the time of a first converter is synchronized with a clock source in a first network, where the first converter is any converter in the first network.

[0159] The first converter may be any converter in the first network (may be NW-TT or DS-TT). The first converter may include a port in the Slave state or may not include a port in the Slave state.

[0160] In this step, whether the time of the first converter is synchronized with the clock source in the first network can be determined in the following two ways:

[0161] In the first method, at least one second message is received, each second message is used for the first converter to synchronize time with the clock source in the first network, and whether the time of the first converter is synchronized with the clock source in the first network is determined based on the at least one second message.

[0162] The at least one second message includes clock level information and / or time, etc. The clock level information may be clock level information of a clock source in the first network, or may not be clock level information of the clock source. The time may be synchronized with the time of the clock source, or may not be synchronized with the time of the clock source.

[0163] The type of the second message includes an Announce message, a Sync message, a Follow_up message, a Delay_Req message, a Delay_Resp message, a Pdelay_Req message, a Pdelay_Resp message, or a Pdelay_Resp_Follow_up message. Alternatively, the type of the second message is the third message or the fourth message.

[0164] A network connection is established between the first converter and a clock source in the first network. The network connection between the first converter and the clock source may pass through at least one network device or may not pass through any network device.

[0165] In a case where the network connection does not pass through a network device, the at least one second message received is the Announce message and / or the synchronization message sent by the clock source to the first converter.

[0166] For example, see Figures 1 to 3 Assume that the first converter is converter 1, and the clock source that has established a network connection with converter 1 is clock source 1 in the first network. Clock source 1 sends an Announce message and / or the synchronization message to converter 1. The Announce message includes clock level information of clock source 1, and the synchronization message includes the time of clock source 1. In this case, the at least one received second message is the Announce message and / or the synchronization message sent by clock source 1 to converter 1.

[0167] In a case where the network connection passes through at least one network device, the at least one received second message includes the third message and / or the fourth message sent by the upstream device connected to the first converter.

[0168] For example, see Figure 7 , assuming that the first converter is converter 1 in the first network, the at least one second message received includes a third message 2 and / or a fourth message 2 sent by network device 2 (an upstream device connected to converter 1).

[0169] Optionally, after receiving the at least one second message, the operation of determining whether the time of the first converter is synchronized with the clock source in the first network according to the at least one second message may be:

[0170] If the at least one second message includes a message including clock level information, the clock level is determined based on the clock level information included in the message, and when the clock level is lower than a first threshold, it is determined that the time of the first converter is not synchronized with the clock source in the first network. And / or,

[0171] In the case where the at least one second message includes a message including clock level information, when the clock level information is not synchronized, it is determined that the time of the first converter is not synchronized with the clock source in the first network. And / or,

[0172] The at least one second message includes a message including time; a time deviation between the first converter and a clock source in the first network is calculated based on the message, and when the time deviation exceeds a second threshold, it is determined that the time of the first converter is not synchronized with the clock source in the first network.

[0173] Optionally, the time generated when the first converter receives a message including time may be obtained, and the time offset between the first converter and the clock source in the first network may be calculated based on the time included in the message and the time generated by the first converter.

[0174] The reason why the time deviation exceeds the second threshold may be: a module for time synchronization of the first converter fails, resulting in the time deviation between the first converter and the clock source exceeding the second threshold; or it may be: a module for time synchronization of the upstream device of the first converter fails, resulting in the time deviation between the first converter and the clock source exceeding the second threshold.

[0175] In the second method, when the first converter fails to obtain the second message within the timeout period, it is determined that the time of the first converter is not synchronized with the clock source in the first network, and the second message is used for the first converter to synchronize time with the clock source in the first network.

[0176] When the upstream device is not the clock source, the second message may be a third message and / or a fourth message sent by the upstream device connected to the first converter. The second message type includes an Announce message, a Sync message, a Follow_up message, a Delay_Req message, a Delay_Resp message, a Pdelay_Req message, a Pdelay_Resp message, or a Pdelay_Resp_Follow_up message. Alternatively, the second message type may be the third message or the fourth message.

[0177] When the upstream device is a clock source, the second message may be an Announce message and / or a synchronization message sent by the clock source connected to the first converter, that is, the type of the second message in the second method includes an Announce message, a Sync message, a Follow_up message, a Delay_Req message, a Delay_Resp message, a Pdelay_Req message, a Pdelay_Resp message or a Pdelay_Resp_Follow_up message.

[0178] The reason why the first converter fails to obtain the second message within the timeout period may be that a link between the first converter and an upstream device connected to the first converter fails, resulting in failure of the message sent by the upstream device to be transmitted to the first converter via the link.

[0179] Step 802: When the time of the first converter is not synchronized with the clock source in the first network, stop sending the time synchronized with the clock source in the second network to a device communicating with the first converter, the device being located in the second network.

[0180] Optionally, the clock source in the second network in this step is a master clock source in the second network.

[0181] When the device is a terminal, upon receiving time synchronized with a clock source in the second network, the device synchronizes with the clock source in the second network based on the time. When the device is a TSN switch, upon receiving time synchronized with a clock source in the second network, the device transmits the time synchronized with the clock source in the second network to other devices connected to the device in the second network.

[0182] Optionally, the clock source in the second network is located in a second sub-network in the second network, and the device communicating with the first converter is located in the first sub-network or the second sub-network in the second network.

[0183] Optionally, in this step, the sending of the first message to the device is stopped, where the type of the first message includes an Announce message, a Sync message, or a Follow_up message.

[0184] Optionally, when the first message type is an Announce message, the device stops sending Announce messages to the device. Because Announce messages include clock levels, if the device does not receive an Announce message, even if it receives a Sync message or Follow_up message containing time synchronized with the clock source in the second network, it will not synchronize time with the clock source in the second network based on the Sync message or Follow_up message. This effectively stops sending time synchronized with the clock source in the second network to the device communicating with the first converter.

[0185] For example, see above Figures 1 to 3 In the network architecture shown, assuming that the first converter is converter 1, the first message is stopped from being sent to device 1 and device 2 communicating with the port of converter 1. In this case, the first message is an Announce message or the above-mentioned Figure 4 The message 3 in the embodiment shown is a Sync message or a Follow_up message.

[0186] For example, see above Figures 1 to 3 In the network architecture shown, assuming that the first converter is converter 2, the first message is stopped from being sent to device 3 communicating with port 1 of converter 2 in the Master state and device 4 communicating with port 2 of converter 2 in the Master state. In this case, the first message is an Announce message or the above-mentioned Figure 4In the embodiment shown, message 4 is a Sync message or a Follow_up message. For another example, assuming that the first converter is converter 3, the first message is stopped from being sent to device 5 communicating with port 1 in the Master state of converter 3 and device 6 communicating with port 2 in the Master state of converter 3. In this case, the first message is an Announce message or the above-mentioned Figure 4 The message 5 in the embodiment shown is a Sync message or a Follow_up message.

[0187] Optionally, the device may have a network connection with a clock source in the second network (which may be a primary clock source or a backup clock source). By stopping sending the first message (Annonce message, sync message, or Follow_up message) to the device, the device may be forced to synchronize time with the clock source through the network connection, thereby avoiding obtaining incorrect time from the first converter. This avoids synchronization errors based on incorrect time, or the device avoids sending incorrect time to other devices connected to the device in the second network, thereby avoiding synchronization errors based on incorrect time in other devices. For example, the device is Figure 3 For device 5 in the process, converter 3 stops sending the first message to device 5, which can force device 5 to synchronize with clock source 4 and avoid obtaining wrong time from converter 3 for synchronization.

[0188] Optionally, the device does not have a network connection with the clock source in the second network. When the first message (Annonce message, sync message or Follow_up message) is stopped from being sent to the device, the device does not synchronize time and continues to use its own time to avoid synchronizing with the wrong time from the first converter, thereby avoiding synchronization errors. Alternatively, the device stops sending time to other devices connected to the device in the second network to avoid synchronization errors in other devices based on the wrong time. For example, the device is Figure 3 In the device 6, the converter 3 stops sending the first message to the device 6, and the device 6 can use its own time to avoid obtaining the wrong time from the converter 3 for synchronization.

[0189] Optionally, in this step, the port state of the port on the first converter that communicates with the device is set to a first state to prevent the port from sending a first message to the device. The first state is a fault state, a listening state, a disabled state or a specified state.

[0190] The first converter includes at least one port, which includes a port in a slave state and / or a port in a master state. In this step, the port in the slave state and / or the port in the master state included in the first converter is set to a first state.

[0191] It should be noted that: when the port included in the first converter is set to the first state, when the first state is a disabled state or a fault state, the port will not send any 1588 message to the device connected to the port, nor will it receive any 1588 message sent by the device connected to the port.

[0192] For example, see Figure 1 、 Figure 2 、 Figure 3 or Figure 7 Assume that the first converter is converter 1, which includes port 1 in Master state (abbreviated as M1 in the figure) and port 2 in Slave state (abbreviated as S in the figure). If the port states of these two ports are both set to disabled or faulty, these two ports of converter 1 will not send any 1588 messages to device 1 or device 2, nor will they receive any 1588 messages. For another example, assume that the first converter is converter 2, which includes master port 1 (abbreviated as M1 in the figure) and master port 2 (abbreviated as M2 in the figure). If the port states of these two ports are both set to disabled or faulty, these two ports of converter 2 will not send any 1588 messages to device 3 or device 4, nor will they receive any 1588 messages.

[0193] The 1588 messages include the aforementioned Announce message, Sync message, Follow_up message, Pdelay_Req message, Pdelay_Resp message, and Pdelay_Resp_Follow_up message.

[0194] When the first state is the listening state, the port will not send Announce messages, Sync messages, and Follow_Up messages to the device connected to the port, but may continue to send Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages to the device connected to the port. And / or, the port will not receive Announce messages, Sync messages, and Follow_Up messages sent by the device connected to the port, but may continue to receive Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages sent by the device connected to the port.

[0195] For example, see Figure 1 、 Figure 2 、 Figure 3 or Figure 7Assume that the first converter is converter 1. Converter 1 includes port 1 in Master state (abbreviated as M1 in the figure) and port 1 in Slave state (abbreviated as S in the figure). The port states of these two ports are set to Listening state. These two ports of converter 1 will not send Announce messages, Sync messages, and Follow_Up messages to device 1 and device 2, but can continue to send Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages to devices 1 and 2. And / or, these two ports of converter 1 will not receive Announce messages, Sync messages, and Follow_Up messages sent by devices 1 and 2, but can continue to receive Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages sent by devices 1 and 2.

[0196] For another example, assume that the first converter is converter 2. Converter 2 includes port 1 in Master state (abbreviated as M1 in the figure) and port 2 in Master state (abbreviated as M2 in the figure). The port states of these two ports are both set to Listen state. These two ports of converter 2 will not send Announce messages, Sync messages, and Follow_Up messages to devices 3 and 4, but can continue to send Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages to devices 3 and 4. And / or, these two ports of converter 2 will not receive Announce messages, Sync messages, and Follow_Up messages sent by devices 3 and 4, but can continue to receive Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages sent by devices 3 and 4.

[0197] When the first state is the designated state, the port will not send Announce messages, Sync messages, or Follow_Up messages to the device connected to the port. Also, the port will not receive Announce messages, Sync messages, or Follow_Up messages sent by the device connected to the port. The designated state is a newly defined port state. When the port is set to the designated state, the port may not send Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages to the device connected to the port; alternatively, the port may send Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages to the device connected to the port. And / or, the port may also receive Pdelay_Req, Pdelay_Resp and Pdelay_Resp_Follow_Up messages sent by the device connected to the port; or, the port may receive Pdelay_Req, Pdelay_Resp and Pdelay_Resp_Follow_Up messages sent by the device connected to the port.

[0198] For example, see Figure 1 、 Figure 2 、 Figure 3 or Figure 7 Assuming the first converter is converter 1, the port states of two ports included in converter 1 are both set to a specified state. The two ports of converter 1 will not send Announce messages, Sync messages, or Follow_Up messages to device 1 and device 2, but may or may not continue to send Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages to devices 1 and 2. And / or, the two ports of converter 1 will not receive Announce messages, Sync messages, or Follow_Up messages sent by devices 1 and 2, but may or may not continue to receive Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages sent by devices 1 and 2.

[0199] For another example, assume that the first converter is converter 2, which includes two ports. The port states of these two ports are both set to a specified state. These two ports of converter 2 will not send Announce messages, Sync messages, or Follow_Up messages to devices 3 and 4, but may or may not continue to send Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages to devices 3 and 4. And / or, these two ports of converter 2 will not receive Announce messages, Sync messages, or Follow_Up messages from devices 3 and 4, but may or may not continue to receive Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages from devices 3 and 4.

[0200] When the execution subject of this step is the first converter, the first converter stops sending the time synchronized with the clock source in the second network to the device communicating with the first converter. Figure 1 、 Figure 2 、 Figure 3 or Figure 7 , assuming that the first converter is converter 1, converter 1 stops sending the time synchronized with the clock source in the second network to device 2 communicating with converter 1. For another example, assuming that the first converter is converter 2, converter 2 stops sending the time synchronized with the clock source in the second network to devices 3 and 4 communicating with converter 2. Or,

[0201] The execution subject of this step is the device where the first converter is located. In this case, the first converter is a module integrated in the device, and the device controls the first converter to stop sending the time synchronized with the clock source in the second network to the device communicating with the first converter. For example, see Figure 1 、 Figure 2 、 Figure 3 or Figure 7 Assume that the first converter is converter 1, which is located on the UPF. The UPF controls converter 1 to stop sending time synchronized with the clock source in the second network to device 2 communicating with converter 1. For another example, assume that the first converter is converter 2, which is located on the first UE. The first UE controls converter 2 to stop sending time synchronized with the clock source in the second network to devices 3 and 4 communicating with converter 2.

[0202] Optionally, in this step, a fault flag is sent to the configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with the clock source in the first network.

[0203] Optionally, in this step, there are two ways to set the port state of the port on the first converter that communicates with the device to the first state. The two ways are:

[0204] In a first manner, the port state of the port on the first converter that communicates with the device may be directly set to the first state.

[0205] Optionally, in the case where the first converter includes a port in Slave state, a fault identifier is also sent to a configuration device in the first network. The fault identifier is used by the configuration device to set the state of a port on the second converter in the first network to Slave state, where the second converter is a converter other than the first converter in the first network.

[0206] The second method is to set the port state of the port on the first converter that communicates with the device to the first state under the triggering of the configuration device. When implementing:

[0207] A fault identifier may be sent to a configuration device in the first network, and a configuration command sent by the configuration device based on the fault identifier may be received, the configuration command including the first state; and the port state of the port on the first converter that communicates with the device may be set to the first state.

[0208] Optionally, the configuration device receives the fault identifier and, triggered by the fault identifier, sends a configuration command including the first state.

[0209] Optionally, the state of the port is configured to be the first state. When the first converter includes a port in the Slave state, the configuration device, under the triggering of the fault identifier, also sets the state of a port on the second converter in the first network to the Slave state. The second converter is a converter other than the first converter in the first network.

[0210] In the first or second manner, the operation of configuring the device to set the state of a port on the second converter in the first network to the Slave state may be:

[0211] The configuration device may notify each other converter in the first network except the first converter. Each other converter sends a port data set for each port on the other converter to the configuration device. The configuration device receives the port data set for each port on the other converter and, based on the port data set for each port on the other converter, configures a port on one converter to a slave state. The converter is then referred to as the second converter.

[0212] The port data set of the port on the other converter includes a port identifier of the port, or a port identifier and a clock parameter of the port.

[0213] Optionally, the clock parameter is a PTP clock parameter. The port data set of the port is a PTP port data set.

[0214] Optionally, the clock parameters include one or more of the domain number (dominNumber), PTP protocol version number (MinorVersionPTP, version PTP), standards organization major identifier (majorSdoId), standards organization minor identifier (minorSdoId), grandfather clock priority 1 (grandmasterPriority1), grandfather clock identifier (grandmasterIdentity), grandfather clock grade (grandmasterClockQuality), grandfather clock priority 2 (grandmasterPriority2), number of hops (stepsRemoved), source port identifier (sourcePortIdentity), flags, current leap second value (currentUtcOffset), time source (timeSource) and trace path identifier (Path trace TLV).

[0215] Optionally, the operation of configuring the state of a port on a converter by the configuration device to be a Slave state may be: the configuration device selects an optimal data set from the port data sets of the ports on each other converter, and compares the optimal data set with a preset data set; when it is determined that the optimal data set is better than the preset data set, the configuration device determines that the port state of the port corresponding to the optimal data set is a Slave state, that is, the converter where the port is located is the second converter, and the state of the port on the second converter is set to a Slave state.

[0216] Optionally, the configuration device selects an optimal data set through a BMC algorithm, and compares the optimal data set with a preset data set.

[0217] It should be noted that the device communicating with a port on the second converter may be connected to a clock source in the second network, which may be the master clock source or the backup clock source in the second network. Therefore, the port data set of the port on the second converter is the optimal data set, and is therefore set to the slave state port. Then, the device communicating with the slave state port of the second converter is set as described above. Figure 4 The illustrated embodiment enables devices in the second network to synchronize time with a clock source of the second network.

[0218] For example, see Figure 1 、 Figure 2 、 Figure 3 or Figure 7, assuming that the first converter is converter 1 including a port in the Slave state. The configuration device notifies converter 2 and converter 3. Converter 2 sends port data set 21 of port 1 in the Master state and port data set 22 of port 2 in the Master state to the configuration device, and converter 3 sends port data set 31 of port 1 in the Master state and port data set 32 ​​of port 2 in the Master state to the configuration device. The configuration device receives the four port data sets, among which, since device 5 communicating with port 1 in the Master state on converter 3 is connected to clock source 4 in the second network, the configuration device sets port 1 in the Master state on converter 3 to the Slave state. Device 5 performs time synchronization with clock source 4 and synchronizes the time with clock source 4 through the above Figure 4 The illustrated embodiment enables devices 3 , 4 and 6 to be time synchronized with the clock source 4 .

[0219] Optionally, when the time of the first converter in the first network is restored to be synchronized with the clock source in the first network, a restoration flag is sent to the configuration device in the first network, where the restoration flag is used to indicate that the time of the first converter is restored to be synchronized with the clock source in the first network.

[0220] The configuration device receives the restoration flag and configures the port status of each port on each converter in the first network according to the restoration flag.

[0221] The configuration device notifies each converter in the first network. After receiving the notification, each converter in the first network sends a port data set of each port on the converter to the configuration device.

[0222] The configuration device receives a port data set of ports on each converter, and configures a port state of a port on a converter in the first network to a slave state, and configures the port states of other ports on the converter to a master state or other states based on the port data set of ports on each converter. The port states of ports on other converters in the first network are configured to be a master state or other states.

[0223] In an embodiment of the present application, when the time of the first converter in the first network is not synchronized with the clock source in the first network, the device communicating with the first converter stops sending the time synchronized with the clock source in the second network. As a result, the device cannot receive the time synchronized with the clock source in the second network and will not synchronize with the clock source in the second network. As a result, the device will not generate a time synchronization error, thus avoiding time synchronization errors between the device and the clock source in the second network. Alternatively, the device will not send the time synchronized with the clock source in the second network to other devices connected to the device in the second network, thus avoiding time synchronization errors between other devices and the clock source in the second network.

[0224] See also Figure 9 The present invention provides a method for handling time synchronization failures. Figure 1 、 Figure 2 、 Figure 3 or Figure 7 In the network architecture shown, the execution subject of the method may be a control device of the converter, which is an upstream device in the first network connected to the converter. The method includes:

[0225] Step 901: Determine whether the time of a control device of a first converter is synchronized with a clock source in a first network, where the first converter is any converter in the first network.

[0226] The first converter may be any converter in the first network (may be NW-TT or DS-TT). The first converter may include a port in the Slave state or may not include a port in the Slave state.

[0227] The control device is an upstream device in the first network connected to the first converter. For example, see Figure 3 Assuming that the first converter is converter 1, the control device is the UPF. Assuming that the first converter is converter 2, the control device is the first UE. Assuming that the first converter is converter 3, the control device is the second UE.

[0228] In this step, at least one second message is received, each second message is used to control the device to synchronize time with the clock source in the first network, and whether the time of the first converter is synchronized with the clock source in the first network is determined based on the at least one second message.

[0229] Optionally, the at least one second message may be Figure 6 The third message or the fourth message in the embodiment shown

[0230] Optionally, for the detailed implementation content of determining whether the time of the control device is synchronized with the clock source in the first network based on the at least one second message, please refer to the relevant content of determining whether the time of the first converter is synchronized with the clock source in the first network based on the at least one second message in the above step 801, which will not be described in detail here.

[0231] Step 902: When the time of the control device is not synchronized with the clock source in the first network, control the first converter to stop sending the time synchronized with the clock source in the second network to the device communicating with the first converter, the device being located in the second network.

[0232] Optionally, the clock source in the second network in this step is a master clock source in the second network.

[0233] When the device is a terminal, upon receiving time synchronized with a clock source in the second network, the device synchronizes with the clock source in the second network based on the time. When the device is a TSN switch, upon receiving time synchronized with a clock source in the second network, the device transmits the time synchronized with the clock source in the second network to other devices connected to the device in the second network.

[0234] Optionally, in this step, the control device controls the first converter to stop sending a first message to the device, where the type of the first message includes an Announce message, a Sync message, or a Follow_up message.

[0235] Optionally, in this step, the control device controls the first converter to set the port state of the port on the first converter that communicates with the device to a first state to prevent the port from sending a first message to the device, and the first state is a fault state, a listening state, a disabled state or a specified state.

[0236] Optionally, the control device sends a control message to the first converter, the control message being used to instruct the first converter to set the port state of the port communicating with the device to the first state. That is, after receiving the control message, the first converter sets the port state of the port on the first converter communicating with the device to the first state.

[0237] In this step, the control device controls the first converter to stop sending the time synchronized with the clock source in the second network to the device communicating with the first converter. Figure 1 、 Figure 2 、 Figure 3 or Figure 7Assume that the first converter is converter 1, and the upstream device of converter 1 is the UPF. That is, the control device is the UPF, and the UPF controls converter 1 to stop sending time synchronized with the clock source in the second network to device 2 communicating with converter 1. For another example, assume that the first converter is converter 2, and the upstream device of converter 2 is the first UE. That is, the control device is the first UE, and the first UE controls converter 2 to stop sending time synchronized with the clock source in the second network to devices 3 and 4 communicating with converter 2.

[0238] Optionally, in this step, a fault flag is sent to the configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with the clock source in the first network.

[0239] Optionally, in this step, there are two ways to set the port state of the port on the first converter that communicates with the device to the first state. The two ways are:

[0240] In a first manner, the first converter may be directly controlled to set the port state of the port on the first converter that communicates with the device to the first state.

[0241] Optionally, the control message is sent to the first converter, the control message including the first state. The first converter receives the configuration command and sets the port state of the port on the first converter that communicates with the device to the first state according to the control message.

[0242] Optionally, a fault identifier is also sent to a configuration device in the first network.

[0243] Optionally, when the first converter includes a port in Slave state, the fault identifier is used to configure the device to set the state of a port on the second converter in the first network to Slave state, where the second converter is a converter other than the first converter in the first network.

[0244] The second method is to control the first converter to set the port state of the port on the first converter that communicates with the device to the first state under the triggering of the configuration device. When implementing:

[0245] A fault indicator may be sent to a configuration device in the first network, and a configuration command may be received from the configuration device based on the fault indicator, the configuration command including the first state. A control message including the first state may be sent to the first converter. The first converter receives the control message and, based on the control message, sets the port state of a port on the first converter that communicates with the device to the first state.

[0246] Optionally, the configuration device receives the fault identifier and, triggered by the fault identifier, sends a configuration command including the first state.

[0247] Optionally, in the case where the first converter includes a port in the Slave state, the state of the port is configured to the first state, and the configuration device, under the triggering of the fault identifier, also sets the state of a port on the second converter in the first network to the Slave state, where the second converter is a converter other than the first converter in the first network.

[0248] Optionally, when the time of the first converter in the first network is restored to be synchronized with the clock source in the first network, a restoration flag is sent to the configuration device in the first network, where the restoration flag is used to indicate that the time of the first converter is restored to be synchronized with the clock source in the first network.

[0249] The configuration device receives the restoration flag and configures the port status of each port on each converter in the first network according to the restoration flag.

[0250] The configuration device notifies each converter in the first network. After receiving the notification, each converter in the first network sends a port data set of each port on the converter to the configuration device.

[0251] The configuration device receives a port data set of ports on each converter, and configures a port state of a port on a converter in the first network to a slave state, and configures the port states of other ports on the converter to a master state or other states based on the port data set of ports on each converter. The port states of ports on other converters in the first network are configured to be a master state or other states.

[0252] In an embodiment of the present application, when the control device time of the first converter in the first network is not synchronized with the clock source in the first network, the control device controls the first converter to stop sending the time synchronized with the clock source in the second network to the device communicating with the first converter. In this way, the device cannot receive the time synchronized with the clock source in the second network and will not synchronize with the clock source in the second network. As a result, the device will not generate a time synchronization error, thus avoiding time synchronization errors between the device and the clock source in the second network. Alternatively, the device will not send the time synchronized with the clock source in the second network to other devices connected to the device in the second network, thus avoiding time synchronization errors between other devices and the clock source in the second network.

[0253] See also Figure 10 , the embodiment of the present application provides a method for handling time synchronization failure, which can be applied to Figure 1 、 Figure 2 、 Figure 3 or Figure 7In the network architecture shown, the execution subject of the method can be any converter in the first network, the device where the converter is located, and the converter does not include a slave port. For the sake of convenience, the converter is referred to as the first converter. The method includes:

[0254] Step 1001: Determine whether a first converter in a first network receives a first message sent by a second converter in the first network within a timeout period. When the first message sent by the second converter is not received within the timeout period, the second converter includes a Slave port, and step 1002 is executed.

[0255] In this step, when it is detected that the duration during which the first converter fails to receive the first message sent by the second converter exceeds a timeout period, it is determined that the first converter fails to receive the first message sent by the second converter within the timeout period.

[0256] In the first network, a network connection between the second converter and the first converter may fail, resulting in loss of the first message sent by the second converter, so that the first converter fails to receive the first message sent by the second converter.

[0257] For example, see Figure 1 、 Figure 2 、 Figure 3 or Figure 7 Assuming that the first converter is converter 2, the second converter is converter 1, and the first message is message 2 sent by converter 1, when it is detected that the duration during which converter 2 does not receive the first message sent by converter 1 exceeds the timeout period, it is determined that converter 2 does not receive message 2 sent by converter 1 within the timeout period.

[0258] Step 1002: Stop sending time synchronized with a clock source in a second network to a device communicating with the first converter, where the device is located in the second network. The type of the first message includes an Announce message, a Sync message, or a Follow_Up message.

[0259] Optionally, the clock source in the second network in this step is a master clock source in the second network.

[0260] The implementation process of this step can be found in the above Figure 8 The relevant contents in step 802 in the illustrated embodiment will not be described in detail here.

[0261] In an embodiment of the present application, when a first converter in a first network fails to receive a first message sent by a second converter in the first network within a timeout period, the first converter stops sending time synchronized with a clock source in the second network to a device communicating with the first converter. As a result, the device cannot receive time synchronized with the clock source in the second network and will not synchronize with the clock source in the second network. As a result, the device will not generate a time synchronization error, thus avoiding time synchronization errors between the device and the clock source in the second network. Alternatively, the device will not send time synchronized with the clock source in the second network to other devices connected to the device in the second network, thus avoiding time synchronization errors between other devices and the clock source in the second network.

[0262] See also Figure 11 An embodiment of the present application provides an apparatus 1100 for handling a time synchronization failure. The apparatus 1100 can be deployed in a converter of any of the above embodiments, a device where the converter is located, or a device connected to the converter in a first network, including:

[0263] The processing unit 1101 is configured to stop sending time synchronized with a clock source in a second network to a device communicating with the first converter when the time of the first converter in the first network is not synchronized with a clock source in the first network, the device being located in the second network.

[0264] Optionally, the detailed implementation process of the processing unit 1101 stopping sending the time synchronized with the clock source is as follows: Figure 8 The relevant contents in step 802 of the illustrated embodiment will not be described in detail here.

[0265] Optionally, the second network includes a first subnetwork and a second subnetwork, the device is located in the first subnetwork or the second subnetwork, the clock source in the second network is located in the second subnetwork, and the first network connects the first subnetwork and the second subnetwork.

[0266] Optionally, the second network is a delay-sensitive network TSN.

[0267] Optionally, the first network is a 5G network.

[0268] Optionally, the processing unit 1101 is configured to:

[0269] Stop sending the first message to the device, where the type of the first message is an Announce message, a Sync message, or a Follow_up message.

[0270] Optionally, for a detailed implementation process of the processing unit 1101 stopping sending the first message, see Figure 8 The relevant contents in step 802 of the illustrated embodiment will not be described in detail here.

[0271] Optionally, the processing unit 1101 is configured to:

[0272] The port state of the port on the first converter that communicates with the device is set to a first state to prevent the port from sending a first message to the device. The first state is a fault state, a listening state, a disabled state, or a specified state.

[0273] Optionally, the detailed implementation process of the processing unit 1101 setting the port state of the port to the first state is as follows: Figure 8 The relevant contents in step 802 of the illustrated embodiment will not be described in detail here.

[0274] Optionally, the apparatus 1100 further includes a first sending unit 1102 and a first receiving unit 1103:

[0275] A first sending unit 1102 is configured to send a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with the clock source in the first network;

[0276] The first receiving unit 1103 is configured to receive a first status sent by the configuration device based on the fault identifier;

[0277] The processing unit 1101 is configured to set a port state of a port on the first converter that communicates with the device to a first state.

[0278] Optionally, the fault identifier is further used by the configuration device to set the state of a port on the second converter in the first network to a slave state.

[0279] Optionally, the apparatus 1100 further includes: a second receiving unit 1104,

[0280] A second receiving unit 1104 is configured to receive a second message, where the second message is used for the first converter to synchronize time with a clock source in the first network;

[0281] The processing unit 1101 is further configured to determine, according to the second message, whether the time of the first converter is synchronized with the clock source in the first network.

[0282] Optionally, the detailed implementation process of the processing unit 1101 determining whether the time of the first converter is synchronized with the clock source in the first network is described in detail. Figure 8 The relevant contents in step 801 of the illustrated embodiment will not be described in detail here.

[0283] Optionally, the second message includes a clock level.

[0284] The processing unit 1101 is configured to:

[0285] When the clock level is lower than a first threshold, it is determined that the time of the first converter is not synchronized with a clock source in the first network.

[0286] Optionally, the type of the second message includes an Announce message.

[0287] Optionally, the second message is a message including time information, and the processing unit 1101 is configured to:

[0288] When the time deviation between the first converter and the clock source in the first network calculated according to the second message exceeds a second threshold, it is determined that the time of the first converter is not synchronized with the clock source in the first network.

[0289] Optionally, the type of the second message includes a Sync message, a Follow_up message, a delay request Delay_Req message, a delay response Delay_Resp message, a peer delay request Pdelay_Req message, a peer delay response Pdelay_Resp message, or a peer delay response follow Pdelay_Resp_Follow_up message.

[0290] Optionally, the processing unit 1101 is further configured to:

[0291] When the first converter fails to obtain the second message within the timeout period, it is determined that the time of the first converter is not synchronized with the clock source in the first network. The second message is used for the first converter to synchronize time with the clock source in the first network.

[0292] Optionally, the apparatus 1100 further includes:

[0293] The second sending unit 1105 is used to send a recovery identifier to the configuration device in the first network, where the recovery identifier is used to indicate that the time recovery of the first converter is synchronized with the clock source in the first network, and the recovery identifier is used by the configuration device to configure the port status of the ports on each converter in the first network.

[0294] In an embodiment of the present application, since the processing unit stops sending the time synchronized with the clock source in the second network to the device, the device will not receive the wrong time, and thus will not synchronize the time with the clock source in the second network based on the wrong time, thereby avoiding synchronization errors.

[0295] See also Figure 12 , an embodiment of the present application provides a device 1200 for handling time synchronization failures, the device 1200 can be deployed in the converter of any of the above embodiments or the device where the converter is located, but the converter does not include a port in the Slave state. Figure 12 The apparatus 1200 includes:

[0296] Processing unit 1201 is used to stop sending time synchronized with a clock source in the second network to a device communicating with the first converter when the first converter in the first network does not receive a first message sent by a second converter in the first network within a timeout period. The device is located in the second network, and the type of the first message includes a notification Announce message, a synchronization Sync message, or a follow-up Follow_Up message.

[0297] Optionally, the detailed implementation process of the processing unit 1201 stopping sending the time synchronized with the clock source is as follows: Figure 10 The relevant contents in step 1002 of the illustrated embodiment will not be described in detail here.

[0298] Optionally, the processing unit 1201 is configured to:

[0299] Stop sending the second message to the device. The second message type is Announce message, Sync message, or Follow_Up message.

[0300] Optionally, for a detailed implementation process of the processing unit 1201 stopping sending the first message, see Figure 10 The relevant contents in step 1002 of the illustrated embodiment will not be described in detail here.

[0301] Optionally, the processing unit 1201 is configured to:

[0302] The port state of the port on the first converter that communicates with the device is set to a first state to prevent the port from sending a second message to the device. The first state is a fault state, a listening state disabled state, or a specified state.

[0303] Optionally, the apparatus 1200 further includes: a sending unit 1202 and a receiving unit 1203,

[0304] A sending unit 1202 is configured to send a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with the clock source of the first network;

[0305] The receiving unit 1203 is configured to receive a first status sent by the configuration device based on the fault identifier;

[0306] The processing unit 1201 is configured to set a port state of a port on the first converter that communicates with the device to a first state.

[0307] Optionally, the fault identifier is further used to configure the device to set the state of a port on the third converter in the first network to a slave state.

[0308] In this embodiment of the present application, because the processing unit stops sending the time synchronized with the clock source in the second network to the device, the first converter knows how to handle the situation when it fails to receive the first message sent by the second converter in the first network within the timeout period. Furthermore, because the processing unit stops sending the time synchronized with the clock source in the second network to the device, the device does not receive incorrect time. If the device is a terminal, it will not synchronize with the clock source in the second network based on incorrect time, thus avoiding synchronization errors.

[0309] See also Figure 13 The embodiment of the present application provides a device 1300 for processing time synchronization failure, which can be deployed in the above Figure 9 The control device of the embodiment shown includes:

[0310] The processing unit 1301 is configured to control the first converter to stop sending time synchronized with the clock source in the second network to a device communicating with the first converter when the time of the apparatus 1300 is not synchronized with the clock source in the first network, the device being located in the second network.

[0311] Optionally, the detailed implementation process of the processing unit 1301 stopping sending the time synchronized with the clock source can be found in Figure 9 The relevant contents of step 901 of the illustrated embodiment will not be described in detail here.

[0312] Optionally, the processing unit 1301 is configured to:

[0313] The first converter is controlled to stop sending a first message to the device, where the type of the first message is an Announce message, a Sync message, or a Follow_up message.

[0314] Optionally, the detailed implementation process of the processing unit 1301 controlling the first converter to stop sending the time synchronized with the clock source can be found in Figure 9 The relevant contents of step 901 of the illustrated embodiment will not be described in detail here.

[0315] Optionally, the apparatus 1300 further includes a sending unit 1302,

[0316] Sending unit 1302 is used to send a control message to the first converter, which is used to instruct the first converter to set the port state of the port communicating with the device to a first state to prevent the port from sending a first message to the device. The first state is a fault state, a listening state, a disabled state or a specified state.

[0317] Optionally, the detailed implementation process of the sending unit 1302 sending the control message can be found in Figure 9The relevant contents of step 902 of the illustrated embodiment will not be described in detail here.

[0318] Optionally, the apparatus 1300 further includes a first receiving unit 1303;

[0319] The sending unit 1302 is further configured to send a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with the clock source in the first network;

[0320] A first receiving unit 1303 is configured to receive a configuration command sent by a configuration device based on a fault identifier, where the configuration command includes a first state;

[0321] The sending unit 1302 is further configured to send a control message to the first converter according to the configuration command.

[0322] Optionally, the apparatus 1300 further includes a second receiving unit 1304;

[0323] A second receiving unit 1304 is configured to receive a second message, where the second message is used for the apparatus 1300 to perform time synchronization with a clock source in the first network;

[0324] The processing unit 1301 is further configured to determine, based on the second message, whether the time of the device 1300 is synchronized with the clock source in the first network.

[0325] In this embodiment of the present application, the processing unit controls the first converter to stop transmitting time synchronized with a clock source in the second network to a device communicating with the first converter. This prevents the device from receiving erroneous time, thereby preventing the device from obtaining erroneous time. When the device is a terminal, the device does not adjust its local time based on the erroneous time, thus avoiding synchronization errors.

[0326] Figure 14 The embodiment of the present application provides an apparatus 1400 for handling a time synchronization failure. The apparatus 1400 can be deployed on a configuration device of any of the above embodiments. The apparatus 1400 includes:

[0327] A receiving unit 1401 is configured to receive a fault identifier, the fault identifier being used to indicate that a time of a first converter in a first network is not synchronized with a clock source in the first network, or being used to indicate that a time of a device of the first converter is not synchronized with a clock source in the first network;

[0328] A sending unit 1402 is used to send a configuration command based on the fault identifier, where the configuration command includes a first state, and the configuration command is used to set the port state of the port on the first converter that communicates with the device to the first state to avoid the port sending time synchronized with a clock source in a second network to the device, where the device is located in the second network.

[0329] Optionally, the detailed implementation process of the sending unit 1402 sending the configuration command based on the fault identifier can be found in Figure 8 Step 802 of the embodiment shown, see Figure 9 Step 902 of the embodiment shown, or, see Figure 10 The relevant contents of step 1002 of the illustrated embodiment will not be described in detail here.

[0330] Optionally, the apparatus 1400 further includes:

[0331] The first processing unit 1403 is configured to set the state of a port on the second converter in the first network to a slave state according to the fault identifier.

[0332] Optionally, the first processing unit 1403 sets the state of a port on the second converter in the first network to the slave state. For a detailed implementation process, see Figure 8 Step 802 of the embodiment shown, see Figure 9 Step 902 of the embodiment shown, or, see Figure 10 The relevant contents of step 1002 of the illustrated embodiment will not be described in detail here.

[0333] Optionally, the apparatus 1400 further includes: a second processing unit 1404,

[0334] The receiving unit 1401 is further configured to receive a restoration flag, the restoration flag being used to indicate that the time of the first converter has been restored to synchronization with the clock source in the first network, or being used to indicate that the time of the device of the first converter is not synchronized with the clock source in the first network;

[0335] The second processing unit 1404 is configured to configure a port status of a port on each switch in the first network according to the restoration flag.

[0336] In an embodiment of the present application, since the fault flag is used to indicate that the time of the first converter in the first network is not synchronized with the clock source in the first network, or is used to indicate that the time of the control device of the first converter is not synchronized with the clock source in the first network, the sending unit sends a configuration command based on the fault flag. The configuration command includes a first state. The configuration command is used to set the port state of the port on the first converter that communicates with the device to the first state to prevent the port from sending time synchronized with the clock source in the second network to the device. In this way, the device will not receive incorrect time, thereby preventing the device from obtaining incorrect time. When the device is a terminal, the device will not adjust its local time based on the incorrect time, thereby avoiding synchronization errors.

[0337] See also Figure 15 , an embodiment of the present application provides a schematic diagram of an apparatus 1500 for handling a time synchronization failure. The apparatus 1500 may be the first converter in any of the above embodiments. The apparatus 1500 includes at least one processor 1501, an internal connection 1502, a memory 1503, and at least one transceiver 1504.

[0338] The device 1500 is a hardware structure device that can be used to implement Figure 11 The functional modules in the device 1100 are used to implement Figure 12 The functional modules in the device 1200 are as follows. For example, those skilled in the art may think of Figure 11 The processing unit 1101 in the device 1100 shown can be implemented by the at least one processor 1501 calling the code in the memory 1503. Figure 11 The first sending unit 1102, the first receiving unit 1103, and the second receiving unit 1104 in the device 1100 shown in the figure can be implemented by the transceiver 1504. For example, those skilled in the art can imagine Figure 12 The processing unit 1201 in the device 1200 shown can be implemented by the at least one processor 1501 calling the code in the memory 1503. Figure 12 The sending unit 1202 and the receiving unit 1203 in the device 1200 shown can be implemented by the transceiver 1504.

[0339] Optionally, the apparatus 1500 may also be used to implement the function of the first converter or the device where the first converter is located in any of the above embodiments.

[0340] Optionally, the processor 1501 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0341] The internal connection 1502 may include a path for transmitting information between the components. Optionally, the internal connection 1502 is a single board or a bus.

[0342] The transceiver 1504 is used to communicate with other devices or communication networks.

[0343] The above-mentioned memory 1503 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this. The memory can exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.

[0344] Memory 1503 is used to store application code for executing the solution of the present application, and is controlled by processor 1501. Processor 1501 is used to execute the application code stored in memory 1503 and cooperate with at least one transceiver 1504, so that the device 1500 can implement the functions of the method of the present invention.

[0345] In a specific implementation, as an embodiment, the processor 1501 may include one or more CPUs, such as Figure 15 CPU0 and CPU1 in.

[0346] In a specific implementation, as an embodiment, the apparatus 1500 may include multiple processors, such as Figure 15 1 and 1507. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0347] See also Figure 16 , an embodiment of the present application provides a schematic diagram of an apparatus 1600 for handling a time synchronization failure. The apparatus 1600 may be the first converter in any of the above embodiments. The apparatus 1600 includes at least one processor 1601, an internal connection 1602, a memory 1603, and at least one transceiver 1604.

[0348] The device 1600 is a hardware structure device that can be used to implement Figure 13 The functional modules in the device 1300 are as follows. For example, those skilled in the art may think of Figure 13 The processing unit 1301 in the device 1300 shown can be implemented by the at least one processor 1601 calling the code in the memory 1603. Figure 13 The sending unit 1302 , the first receiving unit 1303 , and the second receiving unit 1304 in the device 1300 shown can be implemented by the transceiver 1604 .

[0349] Optionally, the apparatus 1600 may also be used to implement the function of the control device of the first converter in the embodiment shown in 9 above.

[0350] Optionally, the processor 1601 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0351] The internal connection 1602 may include a path for transmitting information between the components. Optionally, the internal connection 1602 is a single board or a bus.

[0352] The transceiver 1604 is used to communicate with other devices or communication networks.

[0353] The memory 1603 may be a read-only memory (ROM) or other static storage device capable of storing static information and instructions, a random access memory (RAM) or other dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but not limited thereto. The memory may be independent and connected to the processor via a bus. The memory may also be integrated with the processor.

[0354] Among them, the memory 1603 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 1601. The processor 1601 is used to execute the application code stored in the memory 1603 and cooperate with at least one transceiver 1604, so that the device 1600 can implement the functions of the method of the present patent.

[0355] In a specific implementation, as an embodiment, the processor 1601 may include one or more CPUs, such as Figure 16 CPU0 and CPU1 in.

[0356] In a specific implementation, as an embodiment, the apparatus 1600 may include multiple processors, such as Figure 16 1 and 1607. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0357] See also Figure 17 , an embodiment of the present application provides a schematic diagram of an apparatus 1700 for handling a time synchronization failure. The apparatus 1700 may be the first converter in any of the above embodiments. The apparatus 1700 includes at least one processor 1701, an internal connection 1702, a memory 1703, and at least one transceiver 1704.

[0358] The device 1700 is a hardware structure device that can be used to implement Figure 14 The functional modules in the device 1400 are as follows. For example, those skilled in the art may think of Figure 14 The first processing unit 1403 and the second processing unit 1404 in the device 1400 shown can be implemented by the at least one processor 1701 calling the code in the memory 1703. Figure 14 The receiving unit 1401 and the sending unit 1402 in the device 1400 shown can be implemented by the transceiver 1704 .

[0359] Optionally, the apparatus 1700 may also be used to implement the functions of the configuration device in the embodiments 8, 9 or 10 above.

[0360] Optionally, the processor 1701 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0361] The internal connection 1702 may include a path for transmitting information between the components. Optionally, the internal connection 1702 is a single board or a bus.

[0362] The transceiver 1704 is used to communicate with other devices or communication networks.

[0363] The memory 1703 may be a read-only memory (ROM) or other static storage device capable of storing static information and instructions, a random access memory (RAM) or other dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.

[0364] Among them, the memory 1703 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 1701. The processor 1701 is used to execute the application code stored in the memory 1703 and cooperate with at least one transceiver 1704, so that the device 1700 can implement the functions of the patent method.

[0365] In a specific implementation, as an embodiment, the processor 1701 may include one or more CPUs, such as Figure 17 CPU0 and CPU1 in.

[0366] In a specific implementation, as an embodiment, the apparatus 1700 may include multiple processors, such as Figure 171 and 1707. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0367] See also Figure 18 The embodiment of the present application provides a system 1800 for processing time synchronization failures, the system 1800 including the following Figure 11 The device 11 and Figure 14 The device 14 shown, or the system 1800 includes Figure 12 The device 12 and the Figure 14 The device 14 shown, or the system 1800 includes Figure 15 The device 15 and the Figure 17 The device 17 is shown.

[0368] See also Figure 18 ,like Figure 11 The device 11, as Figure 12 The device 12 or Figure 15 The device 15 shown is a first converter 1801 or a device 1801 where the first converter is located, such as Figure 14 The device 14 or as Figure 17 The device 17 is a configuration device 1802 .

[0369] See also Figure 19 The embodiment of the present application provides a system 1900 for processing time synchronization failures, the system 1900 including the following Figure 13 The device 13 and Figure 14 The device 14 shown, or the system 1800 includes Figure 16 The device 16 and the Figure 17 The device 17 is shown.

[0370] See also Figure 19 ,like Figure 13 The device 13 or as Figure 16 The device 16 shown is a control device 1901 of the first converter, such as Figure 14 The device 14 or as Figure 17 The device 17 is a configuration device 1902 .

[0371] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0372] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for handling time synchronization failure, characterized in that: The method comprises: When a time of a first converter in a first network is not synchronized with a clock source in the first network, stopping sending a time synchronized with a clock source in a second network to a device communicating with the first converter, the device being located in the second network, wherein the first converter is a device including a port applicable to the Precision Time Protocol (PTP).

2. The method according to claim 1, wherein The second network includes a first subnetwork and a second subnetwork, the device is located in the first subnetwork or the second subnetwork, the clock source in the second network is located in the second subnetwork, and the first network connects the first subnetwork and the second subnetwork.

3. The method according to claim 1 or 2, wherein: The second network is a delay-sensitive network TSN.

4. The method according to claim 1 or 2, wherein: The first network is a 5G network.

5. The method according to claim 1 or 2, wherein: The stopping of sending the time synchronized with the clock source in the second network to the device communicating with the first converter comprises: Stop sending a first message to the device, where the type of the first message is an Announce message, a Sync message, or a Follow_up message.

6. The method according to claim 5, wherein The stopping sending the first message to the device includes: The port state of the port on the first converter that communicates with the device is set to a first state to prevent the port from sending the first message to the device, where the first state is a fault state, a listening state, a disabled state, or a specified state.

7. The method according to claim 6, wherein The step of setting the port state of the port on the first converter that communicates with the device to a first state includes: Sending a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with a clock source in the first network; receiving a configuration command sent by the configuration device based on the fault identifier, where the configuration command includes the first state; The port state of the port on the first converter that communicates with the device is set to the first state.

8. The method according to claim 7, wherein The fault identifier is also used by the configuration device to set the state of a port on the second converter in the first network to a slave state.

9. The method according to claim 1, 2, 6, 7 or 8, wherein: The method further comprises: receiving a second message, where the second message is used for the first converter to synchronize time with a clock source in the first network; Determine, according to the second message, whether the time of the first converter is synchronized with a clock source in the first network.

10. The method according to claim 9, wherein The second message includes a clock level, The determining, according to the second message, whether the time of the first converter is synchronized with a clock source in the first network includes: When the clock level is below a first threshold, it is determined that the time of the first converter is not synchronized with a clock source in the first network.

11. The method according to claim 9, wherein The second message is a message carrying time information, The determining, according to the second message, whether the time of the first converter is synchronized with a clock source in the first network includes: When the time deviation between the first converter and the clock source in the first network calculated according to the second message exceeds a second threshold, it is determined that the time of the first converter is not synchronized with the clock source in the first network.

12. The method of claim 1, 2, 6, 7 or 8, wherein: The method further comprises: When the first converter fails to obtain the second message within the timeout period, it is determined that the time of the first converter is not synchronized with the clock source in the first network. The second message is used for the first converter to synchronize time with the clock source in the first network.

13. The method of claim 1, 2, 6, 7, 8, 10 or 11, wherein: The method further comprises: A recovery identifier is sent to a configuration device in the first network, where the recovery identifier is used to indicate that the time of the first converter is restored to be synchronized with the clock source in the first network, and the recovery identifier is used by the configuration device to configure the port status of the ports on each converter in the first network.

14. A method for handling time synchronization failure, characterized in that: The method comprises: When the time of a control device of a first converter is not synchronized with a clock source in a first network, the control device of the first converter controls the first converter to stop sending a time synchronized with a clock source in a second network to a device communicating with the first converter, the device being located in the second network, and the first converter being a device including a port applicable to the Precision Time Protocol (PTP).

15. The method according to claim 14, wherein The controlling the first converter to stop sending time synchronized with a clock source in the second network to a device communicating with the first converter includes: The first converter is controlled to stop sending a first message to the device, where a type of the first message is an Announce message, a Sync message, or a Follow_up message.

16. The method according to claim 15, wherein The controlling the first converter to stop sending the first message to the device includes: A control message is sent to the first converter, where the control message is used to instruct the first converter to set the port state of the port communicating with the device to a first state to prevent the port from sending the first message to the device, where the first state is a fault state, a listening state, a disabled state, or a specified state.

17. The method according to claim 16, wherein Also includes: Sending a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with a clock source in the first network; receiving a configuration command sent by the configuration device based on the fault identifier, where the configuration command includes the first state; The sending a control message to the first converter includes: The control message is sent to the first converter according to the configuration command.

18. The method according to any one of claims 14 to 17, wherein The method further comprises: receiving a second message, where the second message is used for the control device to synchronize time with a clock source in the first network; Determine, based on the second message, whether the time of the control device is synchronized with a clock source in the first network.

19. A method for handling time synchronization failure, characterized in that: The method comprises: When a first converter in a first network does not receive a first message sent by a second converter in the first network within a timeout period, it stops sending time synchronized with a clock source in the second network to a device communicating with the first converter, where the device is located in the second network. The type of the first message includes an Announce message, a Sync message, or a Follow_Up message, and the first converter is a device including a port applicable to the Precision Time Protocol PTP.

20. The method according to claim 19, wherein The stopping of sending the time synchronized with the clock source in the second network to the device communicating with the first converter comprises: Stop sending a second message to the device, where the type of the second message is an Announce message, a Sync message, or a Follow_Up message.

21. The method according to claim 20, wherein The stopping sending the second message to the device includes: The port state of the port on the first converter that communicates with the device is set to a first state to prevent the port from sending the second message to the device, where the first state is a fault state, a listening state disabled state, or a specified state.

22. The method according to claim 21, wherein The step of setting the port state of the port on the first converter that communicates with the device to a first state includes: Sending a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with a clock source of the first network; receiving a configuration command sent by the configuration device based on the fault identifier, where the configuration command includes the first state; The port state of the port on the first converter that communicates with the device is set to the first state.

23. The method according to claim 22, wherein The fault identifier is further used by the configuration device to set the state of a port on the third converter in the first network to a slave state.

24. A method for handling time synchronization failure, characterized in that: The method comprises: The configuration device receives a fault flag, the fault flag being used to indicate that a time of a first converter in a first network is not synchronized with a clock source in the first network, or being used to indicate that a time of a control device of the first converter is not synchronized with a clock source in the first network, wherein the first converter is a device including a port applicable to the Precision Time Protocol (PTP); The configuration device sends a configuration command based on the fault identifier, the configuration command including a first state, and the configuration command is used to set the port state of the port on the first converter that communicates with the device to the first state to prevent the port from sending time synchronized with a clock source in a second network to the device, where the device is located in the second network.

25. The method of claim 24, wherein: The method further comprises: According to the fault identifier, the state of a port on the second converter in the first network is set to a slave state.

26. The method according to claim 24 or 25, wherein: The method further comprises: receiving a restoration flag, the restoration flag being used to indicate that the time of the first converter has been restored to synchronization with a clock source in the first network, or being used to indicate that the time of a control device of the first converter is not synchronized with the clock source in the first network; The port status of the port on each converter in the first network is configured according to the restoration identifier.

27. A device for handling time synchronization failure, characterized in that: The device comprises: A processing unit is configured to stop sending time synchronized with a clock source in a second network to a device communicating with the first converter when a time of the first converter in the first network is not synchronized with a clock source in the first network, the device being located in the second network, wherein the first converter is a device including a port applicable to the Precision Time Protocol (PTP).

28. The device according to claim 27, wherein The second network includes a first subnetwork and a second subnetwork, the device is located in the first subnetwork or the second subnetwork, the clock source in the second network is located in the second subnetwork, and the first network connects the first subnetwork and the second subnetwork.

29. The device according to claim 27 or 28, characterized in that The second network is a delay-sensitive network TSN.

30. The device according to claim 27 or 28, characterized in that The first network is a 5G network.

31. The device according to claim 27 or 28, characterized in that The processing unit is configured to: Stop sending a first message to the device, where the type of the first message is an Announce message, a Sync message, or a Follow_up message.

32. The device according to claim 31, wherein The processing unit is configured to: The port state of the port on the first converter that communicates with the device is set to a first state to prevent the port from sending the first message to the device, where the first state is a fault state, a listening state, a disabled state, or a specified state.

33. The device according to claim 32, wherein The device further includes a first sending unit and a first receiving unit: The first sending unit is configured to send a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with a clock source in the first network; The first receiving unit is configured to receive the first status sent by the configuration device based on the fault identifier.

34. The device according to claim 33, wherein The fault identifier is also used by the configuration device to set the state of a port on the second converter in the first network to a slave state.

35. The device of claim 27, 28, 32, 33 or 34, wherein: The device further includes a second receiving unit; The second receiving unit is configured to receive a second message, where the second message is used for the first converter to perform time synchronization with a clock source in the first network; The processing unit is further configured to determine, based on the second message, whether the time of the first converter is synchronized with a clock source in the first network.

36. The device according to claim 35, wherein The second message includes a clock level, The processing unit is configured to: When the clock level is below a first threshold, it is determined that the time of the first converter is not synchronized with a clock source in the first network.

37. The device according to claim 35, wherein The second message is a message carrying time information, The processing unit is configured to: When the time deviation between the first converter and the clock source in the first network calculated according to the second message exceeds a second threshold, it is determined that the time of the first converter is not synchronized with the clock source in the first network.

38. The device of claim 27, 28, 32, 33 or 34, wherein: The processing unit is further configured to: When the first converter fails to obtain the second message within the timeout period, it is determined that the time of the first converter is not synchronized with the clock source in the first network. The second message is used for the first converter to synchronize time with the clock source in the first network.

39. The device of claim 27, 28, 32, 33, 34, 36 or 37, wherein: The device further comprises: The second sending unit is used to send a recovery identifier to the configuration device in the first network, where the recovery identifier is used to indicate that the time recovery of the first converter is synchronized with the clock source in the first network, and the recovery identifier is used by the configuration device to configure the port status of the ports on each converter in the first network.

40. A device for handling time synchronization failure, characterized in that: The device comprises: The processing unit is configured to control the first converter to stop sending time synchronized with a clock source in a second network to a device communicating with the first converter when the time of the device is not synchronized with a clock source in the first network, the device being located in the second network, wherein the first converter is a device including a port applicable to the Precision Time Protocol (PTP).

41. The device according to claim 40, wherein The processing unit is configured to: The first converter is controlled to stop sending a first message to the device, where a type of the first message is an Announce message, a Sync message, or a Follow_up message.

42. The device according to claim 41, wherein The device further includes a sending unit, The sending unit is used to send a control message to the first converter, where the control message is used to instruct the first converter to set the port state of the port communicating with the device to a first state to prevent the port from sending the first message to the device, where the first state is a fault state, a listening state, a disabled state or a specified state.

43. The device according to claim 42, wherein Also includes a first receiving unit; The sending unit is further configured to send a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with a clock source in the first network; The first receiving unit is configured to receive a configuration command sent by the configuration device based on the fault identifier, where the configuration command includes the first state; The sending unit is further configured to send the control message to the first converter according to the configuration command.

44. The device according to any one of claims 40 to 43, characterized in that The device further includes a second receiving unit; The second receiving unit is configured to receive a second message, where the second message is used for performing time synchronization between the device and a clock source in the first network; The processing unit is further configured to determine, based on the second message, whether the time of the device is synchronized with a clock source in the first network.

45. A device for handling time synchronization failure, characterized in that: The device comprises: A processing unit, configured to stop sending time synchronized with a clock source in a second network to a device communicating with the first converter when the first converter in the first network does not receive a first message sent by a second converter in the first network within a timeout period, the device being located in the second network, the type of the first message including a notification Announce message, a synchronization Sync message, or a follow-up Follow_Up message, and the first converter being a device including a port applicable to the Precision Time Protocol PTP.

46. ​​The device according to claim 45, wherein The processing unit is configured to: Stop sending a second message to the device, where the type of the second message is an Announce message, a Sync message, or a Follow_Up message.

47. The device according to claim 46, characterized in that The processing unit is configured to: The port state of the port on the first converter that communicates with the device is set to a first state to prevent the port from sending the second message to the device, where the first state is a fault state, a listening state disabled state, or a specified state.

48. The device according to claim 47, wherein The device further comprises: a sending unit and a receiving unit, The sending unit is configured to send a fault flag to a configuration device in the first network, where the fault flag is used to indicate that the time of the first converter is not synchronized with the clock source of the first network; The receiving unit is configured to receive the first state sent by the configuration device based on the fault identifier; The processing unit is configured to set a port state of a port on the first converter that communicates with the device to the first state.

49. The device according to claim 48, wherein The fault identifier is further used by the configuration device to set the state of a port on the third converter in the first network to a slave state.

50. A device for handling time synchronization failure, characterized in that: The device comprises: a receiving unit, configured to receive a fault identifier, wherein the fault identifier is used to indicate that a time of a first converter in a first network is not synchronized with a clock source in the first network, or is used to indicate that a time of a device of the first converter is not synchronized with a clock source in the first network, wherein the first converter is a device including a port applicable to the Precision Time Protocol (PTP); a sending unit, configured to send a configuration command based on the fault identifier, the configuration command including a first state, the configuration command being configured to set a port state of a port on the first converter that communicates with the device to the first state, so as to prevent the port from sending a time synchronized with a clock source in a second network to the device, wherein the device is located in the second network.

51. The device according to claim 50, characterized in that The device further comprises: The first processing unit is configured to set the state of a port on the second converter in the first network to a slave state according to the fault identifier.

52. The device according to claim 50 or 51, characterized in that The device further includes: a second processing unit, The receiving unit is further configured to receive a restoration flag, the restoration flag being used to indicate that the time of the first converter has been restored to synchronization with the clock source in the first network, or being used to indicate that the time of the device of the first converter is not synchronized with the clock source in the first network; The second processing unit is configured to configure a port status of a port on each converter in the first network according to the restoration identifier.

53. A system for handling time synchronization failures, characterized in that: The system comprises the apparatus of any one of claims 27 to 49 and the apparatus of any one of claims 50 to 52.

54. A device for handling time synchronization failure, characterized in that: The device includes a transceiver, a processor, and a memory, wherein the memory is used to store a program, and the processor is used to execute the program in the memory, so that the device implements the method according to any one of claims 1 to 26.

55. A computer program product, characterized in that The computer program product includes a computer program stored in a computer-readable storage medium, and the computer program is loaded by a processor to implement the method according to any one of claims 1 to 26.

56. A computer-readable storage medium, characterized in that Used to store a computer program, which is loaded by a processor to implement the method according to any one of claims 1 to 26.

Citation Information

Patent Citations

  • Clock and time synchronization network synchronization fault processing method and system

    CN105024841A

  • Rapid deployment system and method suitable for time synchronization network

    CN105703867A

Cited By

  • Time synchronization failure processing method, apparatus and system, and storage medium

    WO2022037654A1