Time synchronization method, and device and storage medium
By calculating and transmitting time deviation information on the TSN network side, the device-side TSN converter can periodically correct its time, solving the problem of limited time synchronization accuracy and achieving more efficient time synchronization.
Patent Information
- Application Number
- PCT/CN2024/078736
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-20
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-26
AI Technical Summary
In time-sensitive networks (TSN), due to the low accuracy of the local clock frequency of the upstream node, the time deviation between the downstream node and the master clock accumulates, affecting the time synchronization accuracy. The existing method is to increase the frequency of sending time synchronization messages, but Limited by the frequency limit of the upstream node, the time synchronization accuracy cannot be effectively improved.
After the network-side TSN converter receives the time synchronization information sent by the upstream node, it calculates the time deviation between the clock source and the local clock, and sends correction information to the device-side TSN converter, so that the device-side converter periodically corrects its time to improve time synchronization accuracy.
There is no need to increase the frequency of time synchronization messages sent by the upstream node. By including the time offset in the time synchronization information, the device-side converter can update its time multiple times, significantly improving the time synchronization accuracy.
Smart Images

Figure CN2024078736_26092024_PF_FP
Abstract
Description
Time synchronization method, device and storage medium
[0001] This disclosure claims priority to Chinese patent application No. 202310304598.2, filed on March 20, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of communication technologies, and in particular to a time synchronization method, device, and storage medium. Background Art
[0003] Time-sensitive networking (TSN) is a set of standards developed by the Time-Sensitive Networking Task Group of the IEEE 802.1 Working Group (IEEE 802.1Q). It is primarily used to transmit time-sensitive, real-time data over Ethernet networks. TSN will be a key networking technology in future automotive and Industry 4.0 applications. TSN systems use fifth-generation mobile communication technology (5G) to send timing information to TSN nodes, achieving clock synchronization among TSN nodes in the same time domain. In other words, each TSN node maintains the same clock time.
[0004] Summary of the Invention
[0005] In one aspect, a time synchronization method is provided. The time synchronization method is applied to a network-side TSN converter, and includes: receiving first time synchronization information sent by a first node of a time-sensitive network (TSN); and, in response to the first time synchronization information, sending second time synchronization information to a device-side TSN converter, where the second time synchronization information includes a time offset between a TSN clock source and a clock source of a communication network in which the network-side TSN converter is located.
[0006] In another aspect, a time synchronization method is provided. The time synchronization method is applied to a device-side TSN converter, and the time synchronization method includes: receiving second time synchronization information sent by a network-side TSN converter, the second time synchronization information including a time deviation between a clock source of a time-sensitive network and a clock source of a communication network where the network-side TSN converter is located; synchronizing the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network based on the second time synchronization information; periodically correcting the TSN time of the device-side TSN converter based on the time deviation, and sending the corrected TSN time of the device-side TSN converter to a second node in the time-sensitive network.
[0007] In another aspect, a time synchronization device is provided. The time synchronization device includes: a receiving unit configured to receive first time synchronization information sent by a first node of a time-sensitive network (TSN); and a sending unit configured to send second time synchronization information to a device-side TSN converter in response to the first time synchronization information. The second time synchronization information includes a time offset between a TSN clock source and a clock source of a communication network in which the network-side TSN converter is located.
[0008] In another aspect, a time synchronization device is provided. The time synchronization device includes: a receiving unit configured to receive second time synchronization information sent by a network-side TSN converter, the second time synchronization information including a time offset between a clock source of a time-sensitive network and a clock source of a communication network in which the network-side TSN converter is located; a processing unit configured to synchronize the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network based on the second time synchronization information; and a sending unit configured to periodically correct the TSN time of the device-side TSN converter based on the time offset and send the corrected TSN time of the device-side TSN converter to a second node in the time-sensitive network.
[0009] In another aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory stores instructions executable by the processor; and when the processor is configured to execute the instructions, the electronic device implements the method provided in any of the above aspects.
[0010] In yet another aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the method provided in any one of the above aspects.
[0011] In yet another aspect, a computer program product comprising computer instructions is provided. When the computer instructions are executed on a computer, the computer is caused to execute the method provided in any one of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are used to provide a further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation to the technical solution of the present disclosure.
[0013] FIG1 is a schematic diagram of the architecture of a communication system according to some embodiments.
[0014] FIG2 is a schematic diagram of the architecture of a 5G system according to some embodiments.
[0015] FIG3 is a flowchart of a time synchronization method according to some embodiments.
[0016] FIG4 is a schematic diagram of an overall flow chart of a time synchronization method according to some embodiments.
[0017] FIG5 is a schematic diagram showing the composition of a time synchronization device according to some embodiments.
[0018] FIG6 is a schematic diagram showing the composition of another time synchronization device according to some embodiments.
[0019] FIG7 is a schematic structural diagram of an electronic device according to some embodiments. DETAILED DESCRIPTION
[0020] To enable those skilled in the art to better understand the technical solutions of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0021] The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature designated "first," "second," etc., may explicitly or implicitly include one or more of such features. Throughout this disclosure, unless otherwise specified, "plurality" means two or more.
[0022] In the embodiments of the present disclosure, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present disclosure should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0023] The communication system deploys a functional module on the user equipment (UE): device side TSN translator (DS-TT), and a functional module on the user plane function (UPF): network side TSN translator (NW-TT) to adapt to the external TSN system. The TSN system uses the precision time protocol (PTP) to achieve time synchronization. According to 3GPP (3 rdAccording to the Third Generation Partnership Project (3GPP) protocol, precise time synchronization of communication systems is achieved in the following way: first, the upstream node of the external TSN system periodically sends time synchronization messages to provide the master clock reference. After each PTP slave node receives the time synchronization message, it corrects it according to the fields in the time synchronization message, as well as the average link delay (MeanLinkDelay) and residence time (residence time), and then it can obtain the current time of the grandmaster (GM), thereby completing time synchronization.
[0024] Currently, upstream nodes are generally end-station devices with TSN capabilities, such as programmable logic controllers (PLCs). The local clock frequency accuracy of upstream nodes is usually lower than that of other nodes. When the local clock of the upstream node is used as the master clock, after the downstream node synchronizes with the master clock, a time deviation is formed between the local clock of the downstream node and the master clock due to the difference in frequency accuracy. This time deviation will continue to accumulate over time, thereby affecting the time synchronization accuracy. Currently, the time deviation can be reduced by increasing the frequency of sending time synchronization messages. However, since the frequency of sending time synchronization messages by upstream nodes is limited, the time synchronization accuracy cannot be effectively improved.
[0025] Based on this, an embodiment of the present disclosure provides a time synchronization method, wherein after receiving first time synchronization information sent by a first TSN node (i.e., an upstream node), the network-side TSN converter determines the time offset between the time of the TSN master clock and the local time of the local clock of the network-side TSN converter based on the first time synchronization information, and then sends second time synchronization information to the device-side TSN converter. The second time synchronization information includes the time offset, so that the device-side TSN converter corrects the TSN time of the device-side TSN converter based on the time offset, and sends the corrected TSN time of the device-side TSN converter to the second TSN node (i.e., a downstream node) to complete time synchronization. In this way, there is no need to increase the frequency of sending time synchronization messages from the upstream node. Time synchronization can be completed by setting the second time synchronization information to include the time offset, so that within the sending interval of two time synchronization messages, the device-side TSN converter can send the corrected TSN time of the device-side TSN converter to the second node multiple times, that is, update the TSN time of the device-side TSN converter multiple times to improve time synchronization accuracy.
[0026] The embodiments of the present disclosure will be described below with reference to the accompanying drawings.
[0027] The technical solutions provided by the embodiments of the present disclosure can be applied to various communication systems that support TSN, such as New Radio (NR) communication systems, future evolution systems, long term evolution (LTE) or multiple communication convergence systems using 5G communication technology, and the embodiments of the present disclosure are not limited to this.
[0028] Figure 1 is a schematic diagram of the structure of a communication system provided by an embodiment of the present disclosure. As shown in Figure 1, the communication system includes a radio access network (RAN) device 101, a terminal device 102, and a core network device 103. The terminal device 102 can be connected to a TSN node, such as a TSN end node or a TSN bridge. The core network device 103 can be connected to a TSN node, such as a TSN clock source or a TSN bridge.
[0029] The wireless access network device 101 can be an ordinary base station (such as Node B or eNB), a new radio controller (NR controller), a gNode B (gNB) or en-gNB in a 5G system, a centralized unit, a new wireless base station, a radio frequency remote module, a micro base station, a relay, a distributed unit, a transmission reception point (TRP) or a transmission point (TP) or any other wireless access device, etc., and the embodiments of the present disclosure do not limit this. The base station can be divided into a macro base station for providing a macro cell, a micro base station for providing a pico cell, and a femto base station for providing a femto cell. With the continuous evolution of wireless communication technology, future base stations may also adopt other names.
[0030] In some embodiments, the terminal device 102 may be a device with wireless transceiver capabilities, such as a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. The disclosed embodiments do not limit the type of terminal device 102. A terminal device is also referred to as user equipment (UE).
[0031] In some embodiments, the core network device 103 may be a user plane function UPF.
[0032] Taking the 5G system (5GS) as an example, as shown in Figure 2, 5GS deploys a functional module: DS-TT in the UE and a functional module: NW-TT in the UPF to adapt to the external TSN system.
[0033] In some embodiments, when 5GS acts as a TSN bridge, it can be called a 5GS Virtual TSN Bridge.
[0034] As shown in Figure 2, the UPF, RAN, and UE belong to the 5G clock domain, while the upstream TSN nodes, NW-TT, DS-TT, and downstream TSN nodes belong to the TSN clock domain. In the TSN clock domain, the clock frequencies of the upstream and downstream TSN nodes differ from those of the NW-TT and DS-TT, while all nodes in the 5G clock domain use a clock frequency with a uniform accuracy level.
[0035] It should be understood that Figure 1 is an exemplary structural diagram, and the number of devices included in the communication system shown in Figure 1 is not limited. For example, the number of radio access network devices and the number of terminal devices are not limited. Furthermore, in addition to the devices shown in Figure 1, the communication system shown in Figure 1 may also include other devices, which is not limited.
[0036] Next, as shown in FIG3 , an embodiment of the present disclosure provides a time synchronization method, which can be applied to the communication system shown in FIG1 . The method includes the following S101 - S104 .
[0037] S101: A network-side TSN converter receives first time synchronization information sent by a first TSN node.
[0038] The network-side TSN converter is the NW-TT in FIG. 2 , and the first node of TSN is the upstream TSN node in FIG. 2 . The first node may be a PLC.
[0039] In some embodiments, for time synchronization, the first node periodically sends first time synchronization information to the network-side TSN converter. Correspondingly, the network-side TSN converter receives the first time synchronization information sent by the first node.
[0040] In some embodiments, the network-side TSN converter receives the first time synchronization information sent by the first node, which may include the following situations.
[0041] Scenario 1: The first node sends first time synchronization information to the network-side TSN converter via a message.
[0042] In some embodiments, when the first node has high hardware performance, the first node can send a first time synchronization (Sync) message to the network-side TSN converter, where the first Sync message includes first time synchronization information. Accordingly, the network-side TSN converter receives the first Sync message sent by the first node. Since the first Sync message includes the first time synchronization information, the first time synchronization information sent by the first node is received.
[0043] Scenario 2: The first node sends the first time synchronization information to the network-side TSN converter via two messages.
[0044] In some embodiments, before the first node sends the first time synchronization information to the network-side TSN converter, the first node may first send a first Sync message to the network-side TSN converter, and then send a first follow-up message to the network-side TSN converter, where the first follow-up message includes the first time synchronization information. Accordingly, before the network-side TSN converter receives the first time synchronization information sent by the first node, it receives the first Sync message sent by the first node, and then receives the first follow-up message sent by the first node. Since the first follow-up message includes the first time synchronization information, the first time synchronization information sent by the first node is received.
[0045] In some embodiments, the first time synchronization information includes a reference timestamp and a first correction parameter. The reference timestamp and the first correction parameter are used to indicate the TSN time at which the first node sends the first Sync message. For example, the sum of the reference timestamp and the first correction parameter can be used as the TSN time at which the first node sends the first Sync message. Typically, the value of the first correction parameter is 0.
[0046] In some embodiments, the reference timestamp in the first time synchronization information is used to indicate a TSN reference time, where the TSN reference time is the TSN time when the first node sends the first Sync message.
[0047] In some embodiments, the first time synchronization information also includes a frequency ratio and a packet interval parameter. The frequency ratio is the ratio between the frequencies of the TSN clock source and the clock source of the communication network. The packet interval parameter is used to determine the time interval between sending two consecutive first Sync messages.
[0048] In some embodiments, the reference timestamp is located in the PreciseOriginalTimeStamp field of the first time synchronization information, the first correction parameter is located in the CorrectionField field of the first time synchronization information, the frequency ratio is located in the rateRatio field of the first time synchronization information, and the packet transmission interval parameter is located in the SyncInterval field of the first time synchronization information. It is understood that the first node sends the first time synchronization information to the network-side TSN converter via one message, i.e., the first node sends the first time synchronization information to the network-side TSN converter according to a one-step method. The first node sends the first time synchronization information to the network-side TSN converter via two messages, i.e., the first node sends the first time synchronization information to the network-side TSN converter according to a two-step method. Since the first time synchronization information includes the reference timestamp, and sending the reference timestamp requires certain hardware performance, if the first node has high hardware performance, the first node can complete the transmission of the first time synchronization information by sending a first Sync message. If the first node does not have high hardware performance, the first node can complete the transmission of the first time synchronization information by sending a first Sync message and then a first follow-up message.
[0049] S102: In response to the first time synchronization information, the network-side TSN converter sends second time synchronization information to the device-side TSN converter. Correspondingly, the device-side TSN converter receives the second time synchronization information sent by the network-side TSN converter.
[0050] In some embodiments, after receiving the first time synchronization information, the network-side TSN converter modifies the first time synchronization information in response to the first time synchronization information to obtain second time synchronization information, and then sends the second time synchronization information to the device-side TSN converter.
[0051] In some embodiments, the second time synchronization information includes a time offset between the TSN clock source and a clock source of a communication network of the network-side TSN converter.
[0052] In some embodiments, the communication network where the network-side TSN converter is located is a 5G communication network, and the clock source of the communication network where the network-side TSN converter is located is also the clock source of the 5G communication network.
[0053] In some embodiments, the second time synchronization information also includes at least one of the following: a reference timestamp, an entry timestamp, a packet interval parameter, a second correction parameter and a frequency ratio. The reference timestamp and the second correction parameter are used to indicate the TSN time when the network side TSN converter sends the second Sync message. The entry timestamp is used to indicate the local time when the network side TSN converter sends the second Sync message. The packet interval parameter is used to determine the time interval between sending two second Sync messages. The second correction parameter is used to indicate the difference between the TSN time when the network side TSN converter sends the second Sync message and the reference time.
[0054] In some embodiments, the reference timestamp is located in the PreciseOriginalTimeStamp field of the second time synchronization information, the second correction parameter is located in the CorrectionField field of the second time synchronization information, the frequency ratio is located in the rateRatio field of the second time synchronization information, and the packet interval parameter is located in the SyncInterval field of the second time synchronization information.
[0055] In some embodiments, the time offset between the TSN clock source and the clock source of the communication network where the network-side TSN converter is located is obtained according to the following S1-S2.
[0056] S1. Determine a first TSN time according to a reference timestamp in first time synchronization information, a first correction parameter, and a link delay between a first node and a network-side TSN converter.
[0057] The reference timestamp and the first correction parameter are used to indicate the TSN time when the first node sends the first Sync message.
[0058] In some embodiments, the reference timestamp, the first correction parameter, and the link delay between the network-side TSN converter may be added to obtain a first TSN time. The first TSN time is the TSN time when the network-side TSN converter receives the first Sync message.
[0059] S2. Determine a time offset according to the first TSN time and the first local time.
[0060] The first local time is the local time when the network-side TSN converter receives the first Sync message.
[0061] It should be noted that the local time when the network-side TSN converter receives the first Sync message includes the local TSN time and the local 5GS time. The first local time is the local TSN time when the network-side TSN converter receives the first Sync message.
[0062] In some embodiments, the time offset is a difference between the first TSN time and the first local time.
[0063] In some embodiments, the modification of the first time synchronization information by the network-side TSN converter includes one or more of the following:
[0064] 1. Update the cumulative rateRatio field in the general precise time protocol (gPTP) payload of the first time synchronization information.
[0065] 2. Update the CorrectionField field in the gPTP payload of the first time synchronization information.
[0066] 3. Add the TSi timestamp to the suffix field of the first time synchronization information. The TSi timestamp is also the above-mentioned entry timestamp.
[0067] In some embodiments, the TSi timestamp uses 5GS time.
[0068] 4. Add the time offset TimeOffset field to the Suffix field of the first time synchronization information.
[0069] 5. Update the message length field of the first time synchronization information.
[0070] It is understandable that, since two fields, TSi timestamp and TimeOffset, are newly added to the first time synchronization information, the message length field of the first time synchronization information needs to be modified synchronously.
[0071] That is, after receiving the first time synchronization information, the network-side TSN converter updates the first time synchronization information to obtain the second time synchronization information.
[0072] In some embodiments, the network-side TSN converter sends the second time synchronization information to the device-side TSN converter, which may include the following situations.
[0073] Scenario 1: The network-side TSN converter sends the second time synchronization information to the device-side TSN converter via a message.
[0074] Exemplarily, the network-side TSN converter sends a second Sync message to the device-side TSN converter, where the second Sync message includes the second time synchronization information. Accordingly, the device-side TSN converter receives the second Sync message sent by the network-side TSN converter. Since the second Sync message includes the second time synchronization information, the device-side TSN converter also receives the second time synchronization information sent by the network-side TSN converter.
[0075] Scenario 2: The network-side TSN converter sends the second time synchronization information to the device-side TSN converter via two messages.
[0076] In some embodiments, before the network-side TSN converter sends the second time synchronization information to the device-side TSN converter, the network-side TSN converter may first send a second Sync message to the device-side TSN converter, and then send a second follow up message to the device-side TSN converter, where the second follow up message includes the second time synchronization information. Accordingly, before the device-side TSN converter receives the second time synchronization information sent by the network-side TSN converter, it receives the second Sync message sent by the network-side TSN converter, and then receives the second follow up message sent by the network-side TSN converter. Since the second follow up message includes the second time synchronization information, the device-side TSN converter also receives the second time synchronization information sent by the network-side TSN converter.
[0077] S103: The device-side TSN converter synchronizes the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network according to the second time synchronization information.
[0078] The device-side TSN converter is the DS-TT shown in Figure 2 above.
[0079] In some embodiments, the device-side TSN converter synchronizes the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network according to the second time synchronization information, which may include the following A1-A2.
[0080] A1. Based on the second time synchronization information, obtain a reference timestamp, an entry timestamp, a second correction parameter, and a frequency ratio.
[0081] In some embodiments, after receiving the second time synchronization information, the device-side TSN converter parses the second time synchronization information to obtain a reference timestamp, an entry timestamp, a second correction parameter, and a frequency ratio.
[0082] A2. Determine a second TSN time according to the reference timestamp, the entry timestamp, the second correction parameter, the frequency ratio, and the second local time.
[0083] The second local time is the local time when the device-side TSN converter receives the second Sync message. The second TSN time is the TSN time when the device-side TSN converter receives the second Sync message. The reference timestamp and the second correction parameter are used to indicate the TSN time when the network-side TSN converter sends the second Sync message. The entry timestamp is used to indicate the local time when the network-side TSN converter sends the second Sync message. The second correction parameter is used to indicate the difference between the TSN time when the network-side TSN converter sends the second Sync message and the reference time. The frequency ratio is the ratio between the frequency of the TSN clock source and the frequency of the clock source of the communication network.
[0084] It should be noted that the local time when the device-side converter receives the second Sync message includes the local 5GS time and the local TSN time. The second local time is the local 5GS time when the device-side converter receives the second Sync message. The local time when the network-side TSN converter sends the second Sync message includes the local 5GS time and the local TSN time. The ingress timestamp is used to indicate the local 5GS time when the network-side TSN converter sends the second Sync message.
[0085] As an example, the second TSN time is determined according to the reference timestamp, the entry timestamp, the second correction parameter, the frequency ratio and the second local time, which can be shown as follows: CurrentTSNtime=PreciseOriginalTimeStamp+CorrectionField+(CurrentTime(5G)-TSi)*rateRatio
[0086] Among them, CurrentTSNtime is the second TSN time, PreciseOriginalTimeStamp is the reference timestamp, CorrectionField is the second correction parameter, CurrentTime(5G) is the second local time, TSi is the entry timestamp, and rateRatio is the frequency ratio.
[0087] After obtaining the second TSN time, the TSN time of the device-side TSN converter is synchronized to the second TSN time, that is, the TSN time of the device-side TSN converter is synchronized to the time of the clock source of the time-sensitive network.
[0088] S104: The device-side TSN converter periodically corrects the TSN time of the device-side TSN converter based on the time deviation, and sends the corrected TSN time of the device-side TSN converter to the second node in the time-sensitive network.
[0089] In some embodiments, the device-side TSN converter periodically corrects the TSN time of the device-side TSN converter based on the time deviation, which may include the following B1-B3.
[0090] B1. Determine a correction time interval based on the duration of the time synchronization period and the number of corrections between the time-sensitive network and the communication network.
[0091] As can be seen from the above description, the second time synchronization information further includes a packet sending interval parameter, which is used to determine the duration of the time synchronization period between the time sensitive network and the communication network.
[0092] In some embodiments, the device-side TSN converter stores a correction number pre-configured by a network administrator. The correction number is used to indicate the granularity of dividing the time deviation. For example, the correction number is 6.
[0093] In some embodiments, after the device-side TSN converter receives the second time synchronization information, the device-side TSN converter can determine the duration of the time synchronization period between the time-sensitive network and the communication network based on the packet interval parameter in the second time synchronization information, and then determine the correction time interval based on the duration of the time synchronization period between the time-sensitive network and the communication network and the preset number of corrections.
[0094] As an example, the correction time interval is determined according to the duration of the time synchronization period and the number of corrections between the time sensitive network and the communication network, which can be shown as follows: deltaT = (2SyncInterval) / (2 N )
[0095] Among them, deltaT is the correction time interval, 2SyncInterval is the duration of the time synchronization period between the time-sensitive network and the communication network, SyncInterval is the packet interval parameter, and N is the number of corrections.
[0096] B2. Determine the correction value based on the time deviation and the number of corrections.
[0097] The correction value is used to correct the TSN time of the TSN converter on the device side.
[0098] As an example, the correction value is determined according to the time offset in the second time synchronization information and the preset number of corrections, which can be shown as the following formula: Z = TimeOffset / (2 N )
[0099] Where Z is the correction value and TimeOffset is the time offset.
[0100] B3. After synchronizing the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network, the TSN time of the device-side is corrected by the correction value at each correction time interval to obtain the corrected TSN time of the device-side TSN converter.
[0101] In some embodiments, the device-side TSN converter may insert the correction value into the TSN time of the device-side TSN converter at each correction time interval to perform interpolation compensation, thereby obtaining the corrected TSN time of the device-side TSN converter.
[0102] In some embodiments, a timer is preset in the device-side TSN converter, so that after each correction time interval of the timer is reached, the device-side TSN converter corrects the TSN time of the device-side TSN converter with the correction value to obtain the corrected TSN time of the device-side TSN converter.
[0103] In some embodiments, when the device-side TSN converter obtains the corrected TSN time of the device-side TSN converter, it sends the corrected TSN time of the device-side TSN converter to a second node in the time-sensitive network. Accordingly, the second node receives the corrected TSN time of the device-side TSN converter sent from the device-side TSN converter. The second node is also the downstream TSN node shown in FIG2 .
[0104] In some embodiments, after receiving the corrected TSN time of the device-side TSN converter, the second node reads the corrected TSN time of the device-side TSN converter to complete time synchronization with the first node.
[0105] In some embodiments, when the device-side TSN converter obtains the corrected TSN time of the device-side TSN converter, it may send third time synchronization information to the second node, where the third time synchronization information includes the corrected TSN time of the device-side TSN converter. The implementation of the device-side TSN converter sending the third time synchronization information to the second node can refer to the two scenarios in step S101 above regarding the first node sending the first time synchronization information to the network-side TSN converter, and will not be further described here.
[0106] It should be noted that the above embodiment is merely an example of applying a time synchronization method provided by an embodiment of the present disclosure to the network architecture of a 5GS bridge to complete time synchronization. The time synchronization method provided by an embodiment of the present disclosure can also be applied to other deterministic network (such as DetNet) architectures to complete time synchronization in the corresponding deterministic network architecture. The embodiment of the present disclosure does not limit this.
[0107] Based on the embodiment shown in FIG3 , after the network-side TSN converter receives the first time synchronization information sent by the first node, it determines the time offset between the TSN clock source and the clock source of the communication network where the network-side TSN converter is located based on the first time synchronization information, and then sends a second time synchronization information to the device-side TSN converter. The second time synchronization information includes the time offset, so that the device-side TSN converter periodically corrects the TSN time of the device-side TSN converter based on the time offset, and then periodically sends the corrected TSN time of the device-side TSN converter to the second node to complete time synchronization. In this way, there is no need to increase the frequency of sending time synchronization messages by the first node. By adding the time offset to the time synchronization information, the device-side TSN converter can send the corrected TSN time of the device-side TSN converter to the second node multiple times within the interval between sending two time synchronization messages, thereby improving time synchronization accuracy.
[0108] The following describes a time synchronization method provided by an embodiment of the present disclosure in conjunction with the 5G system architecture diagram shown in Figure 2. Referring to Figure 4, a schematic diagram of the overall process of a time synchronization method provided by an embodiment of the present disclosure is shown. As shown in Figure 4, the method as a whole includes the following steps S301-S308.
[0109] S301. Pre-configure the number of corrections N on the DS-TT.
[0110] Regarding the description of the number of corrections, reference may be made to the description of the number of corrections in the above embodiment, which will not be repeated here.
[0111] S302: The upstream TSN node sends first time synchronization information to the NW-TT.
[0112] In some embodiments, the upstream TSN node periodically sends first time synchronization information to the NW-TT for time synchronization. This first time synchronization information can be sent in a one-step manner, i.e., sending a first Sync message that includes the first time synchronization information, or in a two-step manner, i.e., first sending the first Sync message and then sending a follow-up message that includes the first time synchronization information. This is not limited in the present embodiment. The first time synchronization information includes a Cumulative Rate Ratio and a Correction Field.
[0113] S303: The NW-TT parses the first time synchronization information to obtain the current time of the master clock, and calculates the time offset (TimeOffset) between the current time of the master clock and the current time of the NW-TT local clock.
[0114] The current time of the NW-TT local clock is the current TSN time of the NW-TT local clock.
[0115] S304. The NW-TT updates the first time synchronization information and obtains the second time synchronization information.
[0116] Updates include:
[0117] 1. Update the Cumulative rateRatio field in the first time synchronization information payload;
[0118] 2. Update the correction field in the first synchronization information payload;
[0119] 3. Add the entry Tsi timestamp (using a 5GS clock) to the Suffix field;
[0120] 4. Add the time offset TimeOffset in the Suffix field;
[0121] 5. Update the message length field of the first time synchronization information.
[0122] S305. The NW-TT sends second time synchronization information to the DS-TT.
[0123] The second time synchronization information can be sent based on a one-step method, that is, sending a second Sync message, which includes the second time synchronization information, or based on a two-step method, that is, first sending the second Sync message and then sending a follow-up message, which includes the second time synchronization information. This embodiment of the present disclosure does not limit this. The second time synchronization information includes the time offset, TSi timestamp, cumulative rateRatio, and correction field.
[0124] S306: DS-TT performs segmented difference correction.
[0125] In some embodiments, S306 may include the following steps:
[0126] S3061. Obtain from the second time synchronization information: a reference timestamp, an entry timestamp, a second correction parameter, a frequency ratio, and a packet sending interval parameter.
[0127] S3062: Calculate the current TSN time of DS-TT.
[0128] S3063. Set a timer in DS-TT to determine the calibration time interval.
[0129] S3064: In each correction time interval when the timer arrives, interpolate and compensate the current TSN time of the DS-TT based on the time deviation to obtain the corrected TSN time of the DS-TT.
[0130] S307 : The DS-TT sends the corrected TSN time of the DS-TT to the downstream TSN node.
[0131] S308 : The downstream TSN node reads the corrected TSN time of the DS-TT to complete time synchronization.
[0132] The above mainly introduces the solution provided by the present disclosure from the perspective of the interaction between each node. It can be understood that each node, such as the network-side TSN converter and the device-side TSN converter, contains hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software-driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0133] FIG5 is a schematic diagram showing the composition of a time synchronization device provided by an embodiment of the present disclosure. As shown in FIG5 , the time synchronization device 20 includes a receiving unit 201 , a processing unit 202 , and a sending unit 203 .
[0134] The time synchronization device 20 may be the network-side TSN converter or a chip in the network-side TSN converter. When the time synchronization device 20 is used to implement the functions of the network-side TSN converter in the above embodiment, each unit is used to implement the following functions.
[0135] The receiving unit 201 is configured to receive first time synchronization information sent by a first node of a time sensitive network TSN.
[0136] The sending unit 203 is configured to send second time synchronization information to the device-side TSN converter in response to the first time synchronization information, where the second time synchronization information includes a time deviation between the TSN clock source and a clock source of a communication network where the network-side TSN converter is located.
[0137] In some embodiments, the receiving unit 201 is configured to receive a first time synchronization (Sync) message sent by a first node, where the first Sync message includes first time synchronization information.
[0138] In some embodiments, before receiving the first time synchronization information sent by the first node of the time sensitive network TSN, the receiving unit 201 is further configured to receive a first Sync message sent by the first node.
[0139] The receiving unit 201 is configured to receive a first follow up message sent by a first node, where the first follow up message includes first time synchronization information.
[0140] In some embodiments, the first time synchronization information includes a reference timestamp and a first correction parameter, and the reference timestamp and the first correction parameter are used to indicate the TSN time when the first node sends the first Sync message; the processing unit 202 is used to determine the first TSN time based on the reference timestamp, the first correction parameter and the link delay between the first node and the network side TSN converter in the first time synchronization information, and the first TSN time is the TSN time when the network side TSN converter receives the first Sync message; determine the time deviation based on the first TSN time and the first local time, and the first local time is the local time when the network side TSN converter receives the first Sync message.
[0141] In some embodiments, the sending unit 203 is configured to send a second Sync message to the device-side TSN converter, where the second Sync message includes second time synchronization information.
[0142] In some embodiments, before sending the second time synchronization information to the device-side TSN converter, the sending unit 203 is further configured to send a second Sync message to the device-side TSN converter.
[0143] The sending unit 203 is configured to send a second follow up message to the device-side TSN converter, where the second follow up message includes second time synchronization information.
[0144] In some embodiments, the second time synchronization information also includes at least one of the following: a reference timestamp, an entry timestamp, a packet interval parameter, a correction parameter, and a frequency ratio. The reference timestamp and the second correction parameter are used to indicate the local time when the network side TSN converter sends the second Sync message. The packet interval parameter is used to determine the time interval between two consecutive first Sync messages. The second correction parameter is used to indicate the difference between the TSN time when the network side TSN converter sends the second Sync message and the reference time. The frequency ratio is the ratio between the frequency of the TSN clock source and the frequency of the clock source of the communication network.
[0145] FIG6 is a schematic diagram showing the composition of another time synchronization device provided by an embodiment of the present disclosure. As shown in FIG6 , the time synchronization device 30 includes a receiving unit 301 , a processing unit 302 , and a sending unit 303 .
[0146] The time synchronization device 30 may be the device-side TSN converter or a chip in the device-side TSN converter. When the time synchronization device 30 is used to implement the function of the device-side TSN converter in the above embodiment, each unit is used to implement the following functions.
[0147] The receiving unit 301 is configured to receive second time synchronization information sent by the network-side TSN converter, where the second time synchronization information includes a time offset between a clock source of the time-sensitive network and a clock source of the communication network where the network-side TSN converter is located.
[0148] The processing unit 302 is configured to synchronize the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network according to the second time synchronization information.
[0149] The sending unit 303 is configured to periodically correct the TSN time of the device-side TSN converter based on the time deviation, and send the corrected TSN time of the device-side TSN converter to the second node in the time sensitive network.
[0150] In some embodiments, the processing unit 302 is used to: determine a correction time interval based on the length of the time synchronization period and the number of corrections between the time-sensitive network and the communication network; determine a correction value based on the time deviation and the number of corrections; after synchronizing the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network, correct the TSN time of the device-side TSN converter with the correction value every correction time interval to obtain the corrected TSN time of the device-side TSN converter.
[0151] In some embodiments, the receiving unit 301 is configured to receive a second Sync message sent by a network-side TSN converter, where the second Sync message includes second time synchronization information.
[0152] In some embodiments, before receiving the second time synchronization information sent by the network-side TSN converter, the receiving unit 301 is further configured to receive a second Sync message sent by the network-side TSN converter.
[0153] The receiving unit 301 is configured to receive a second follow up message sent by the network-side TSN converter, where the second follow up message includes second time synchronization information.
[0154] In some embodiments, the second time synchronization information also includes at least one of the following: a reference timestamp, an entry timestamp, a packet interval parameter, a second correction parameter, and a frequency ratio. The reference timestamp and the second correction parameter are used to indicate the local time at which the network-side TSN converter sends the second Sync message. The packet interval parameter is used to determine the duration of the time synchronization cycle between the time-sensitive network and the communication network. The second correction parameter is used to indicate the difference between the TSN time at which the network-side TSN converter sends the second Sync message and the reference time. The frequency ratio is the ratio between the frequency of the TSN clock source and the frequency of the clock source of the communication network.
[0155] In some embodiments, the processing unit 302 is used to: obtain a reference timestamp, an entry timestamp, a second correction parameter, and a frequency ratio based on the second time synchronization information; determine a second TSN time based on the reference timestamp, the entry timestamp, the second correction parameter, the frequency ratio, and the second local time, where the second local time is the local time when the device-side TSN converter receives the second Sync message, and the second TSN time is the TSN time when the device-side TSN converter receives the second Sync message; and synchronize the TSN time of the device-side TSN converter to the second TSN time.
[0156] It should be noted that the units in Figures 5 and 6 may also be referred to as modules. For example, the sending unit may be referred to as a sending module. In addition, in the embodiments shown in Figures 5 and 6, the names of the units may not be those shown in the figures. For example, the sending unit may be referred to as a communication unit, and the receiving unit may be referred to as a communication unit.
[0157] If the various units in Figures 5 and 6 are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present disclosure. The storage medium for storing computer software products includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc. Various media that can store program codes.
[0158] When the time synchronization device 20 or the time synchronization device 30 implements the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present disclosure provides a structural diagram of an electronic device. As shown in Figure 7, the electronic device 40 includes: a memory 401, a processor 402, a communication interface 403, and a bus 404.
[0159] The memory 401 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a 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 thereto.
[0160] Processor 402 may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein. Processor 402 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein. Processor 402 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
[0161] The communication interface 403 is used to connect to other devices via a communication network, such as Ethernet, wireless access network, or wireless local area network (WLAN).
[0162] In some embodiments, memory 401 may exist independently of processor 402 and may be connected to processor 402 via bus 404 for storing instructions or program codes. When processor 402 calls and executes the instructions or program codes stored in memory 401, the time synchronization method provided in the embodiments of the present disclosure can be implemented.
[0163] In some embodiments, the memory 401 may also be integrated with the processor 402 .
[0164] Bus 404 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 404 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG7 shows only one thick solid line, but this does not mean that there is only one bus or only one type of bus.
[0165] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the time synchronization device can be divided into different functional modules to complete all or part of the functions described above.
[0166] The embodiments of the present disclosure also provide a computer-readable storage medium. All or part of the processes in the above-mentioned method embodiments can be completed by computer instructions to the relevant hardware, and the program can be stored in the above-mentioned computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The computer-readable storage medium can be the internal storage unit of the time synchronization device provided in any of the above-mentioned embodiments, such as the memory of a computer device. The above-mentioned computer-readable storage medium can also be an external storage device of the above-mentioned time synchronization device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above-mentioned time synchronization device. Furthermore, the above-mentioned computer-readable storage medium can also include both the internal storage unit of the above-mentioned time synchronization device and an external storage device. The above-mentioned computer-readable storage medium is used to store the above-mentioned computer program and other programs and data required by the above-mentioned time synchronization device. The above-mentioned computer-readable storage medium can also be used to temporarily store data that has been output or is to be output. The above-mentioned computer-readable storage medium includes a non-transitory computer-readable storage medium.
[0167] An embodiment of the present disclosure further provides a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute any one of the time synchronization methods provided in the above embodiments.
[0168] Although the present disclosure is described herein in conjunction with various embodiments, in the process of implementing the present disclosure for which protection is sought, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit may implement several of the functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0169] Although the present disclosure has been described with reference to specific features and embodiments thereof, it will be apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present disclosure. Accordingly, this specification and the drawings are merely illustrative of the present disclosure as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present disclosure. Obviously, those skilled in the art may make various modifications and variations to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, the present disclosure is intended to encompass such modifications and variations if they fall within the scope of the claims of the present disclosure and their equivalents.
[0170] The above are only specific embodiments of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or replacements within the technical scope disclosed in the present disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A time synchronization method, wherein: The method is applied to a network-side TSN converter and comprises: Receiving first time synchronization information sent by a first node of a time sensitive network TSN; In response to the first time synchronization information, second time synchronization information is sent to the device-side TSN converter, where the second time synchronization information includes a time deviation between the TSN clock source and a clock source of a communication network where the network-side TSN converter is located.
2. The method according to claim 1, wherein: The receiving the first time synchronization information sent by the first node of the TSN includes: A first time synchronization Sync message sent by the first node is received, where the first Sync message includes the first time synchronization information.
3. The method according to claim 1, wherein: Before receiving the first time synchronization information sent by the first node of the TSN, the method further includes: Receiving a first Sync message sent by the first node; The receiving the first time synchronization information sent by the first node of the TSN includes: A first follow up message sent by the first node is received, where the first follow up message includes the first time synchronization information.
4. The method according to claim 2 or 3, wherein: The first time synchronization information includes a reference timestamp and a first correction parameter, where the reference timestamp and the first correction parameter are used to indicate a TSN time at which the first node sends the first Sync message; The method further comprises: Determine a first TSN time according to the reference timestamp in the first time synchronization information, the first correction parameter, and the link delay between the first node and the network-side TSN converter, where the first TSN time is the TSN time when the network-side TSN converter receives the first Sync message; The time deviation is determined according to the first TSN time and a first local time, where the first local time is the local time when the network-side TSN converter receives the first Sync message.
5. The method according to claim 1, wherein: The sending the second time synchronization information to the device-side TSN converter includes: Send a second Sync message to the device-side TSN converter, where the second Sync message includes the second time synchronization information.
6. The method according to claim 1, wherein: Before sending the second time synchronization information to the device-side TSN converter, the method further includes: Sending a second Sync message to the device-side TSN converter; The sending the second time synchronization information to the device-side TSN converter includes: A second follow up message is sent to the device-side TSN converter, where the second follow up message includes the second time synchronization information.
7. The method according to claim 5 or 6, wherein: The second time synchronization information also includes at least one of the following: a reference timestamp, an entry timestamp, a packet interval parameter, a second correction parameter and a frequency ratio, and the reference timestamp and the second correction parameter are used to indicate the TSN time when the network-side TSN converter sends the second Sync message.
8. A time synchronization method, wherein: The method is applied to a device-side TSN converter and includes: Receiving second time synchronization information sent by a network-side TSN converter, wherein the second time synchronization information includes a time deviation between a clock source of a time-sensitive network TSN and a clock source of a communication network where the network-side TSN converter is located; According to the second time synchronization information, synchronizing the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network; The TSN time of the device-side TSN converter is periodically corrected based on the time deviation, and the corrected TSN time of the device-side TSN converter is sent to the second node in the time-sensitive network.
9. The method according to claim 8, wherein: The periodically correcting the TSN time of the device-side TSN converter based on the time deviation includes: Determining a correction time interval according to the duration of the time synchronization period between the time sensitive network and the communication network and the number of corrections; Determining a correction value according to the time deviation and the number of corrections; After the TSN time of the device-side TSN converter is synchronized to the time of the clock source of the time-sensitive network, the TSN time of the device-side TSN converter is corrected with the correction value every correction time interval to obtain the corrected TSN time of the device-side TSN converter.
10. The method according to claim 8, wherein: The receiving the second time synchronization information sent by the network-side TSN converter includes: A second Sync message sent by the network-side TSN converter is received, where the second Sync message includes the second time synchronization information.
11. The method according to claim 8, wherein: Before receiving the second time synchronization information sent by the network-side TSN converter, the method includes: Receiving a second Sync message sent by the network-side TSN converter; The receiving the second time synchronization information sent by the network-side TSN converter includes: The receiving a second follow up message sent by the network-side TSN converter, wherein the second follow up message includes the second time synchronization information.
12. The method according to claim 10 or 11, wherein: The second time synchronization information also includes at least one of the following: a reference timestamp, an entry timestamp, a packet interval parameter, a second correction parameter and a frequency ratio, and the reference timestamp and the second correction parameter are used to indicate the TSN time when the network-side TSN converter sends the second Sync message.
13. The method according to claim 12, wherein: The step of synchronizing the TSN time of the device-side TSN converter to the time of the clock source of the time-sensitive network according to the second time synchronization information includes: Based on the second time synchronization information, acquiring the reference timestamp, the entry timestamp, the second correction parameter and the frequency ratio; Determine a second TSN time according to the reference timestamp, the entry timestamp, the second correction parameter, the frequency ratio, and a second local time, where the second local time is the local time when the device-side TSN converter receives the second Sync message, and the second TSN time is the TSN time when the device-side TSN converter receives the second Sync message; The TSN time of the device-side TSN converter is synchronized to the second TSN time.
14. An electronic device comprising: Processor and memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the electronic device implements the time synchronization method according to any one of claims 1 to 13.
15. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the time synchronization method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Industrial wireless and TSN fusion-oriented cross-network time synchronization method
CN114050884A
System and method based on time-sensitive network transmission in 5G mobile communication
CN114827056A
Method for implementing time synchronization and related device
US20220174625A1
TSN service processing method, apparatus and system
WO2020220747A1
Network translator and device translator
WO2022176026A1
