Time synchronization method and device and storage medium
By using the network-side converter to calculate and transmit the time deviation in the time-sensitive network, and periodically correcting the time of the device-side converter, the time synchronization accuracy problem caused by the low local clock frequency of the upstream node is solved, and higher time synchronization accuracy is achieved. .
Patent Information
- Application Number
- CN202310304598.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2024-09-20
AI Technical Summary
In a time-sensitive network (TSN), due to the low accuracy of the local clock frequency of the upstream node, the time synchronization accuracy is limited. Existing methods cannot effectively improve the time synchronization accuracy by increasing the frequency of sending time synchronization messages.
After the network side 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 passes the deviation to the device side converter to periodically correct the TSN time of the device side converter. , add the time offset field in the time synchronization information to update the TSN time of the device-side converter multiple times within the sending interval of the two time synchronization information.
There is no need to increase the frequency of time synchronization messages sent by upstream nodes. By adding time offsets to the time synchronization information, the device-side converter can send the corrected TSN time multiple times, significantly improving time synchronization accuracy.
Smart Images

Figure CN118677558A
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a time synchronization method, device and storage medium. Background Art
[0002] Time sensitive network (TSN) is a set of standards (IEEE 802.1Q) developed by the Time Sensitive Network Task Group of the IEEE802.1 Working Group, which is mainly used to transmit time-sensitive real-time data on Ethernet networks. TSN will be one of the main network technologies in future automobiles and Industry 4.0. The TSN system sends timing information to TSN nodes through the fifth-generation mobile communication technology (5G) system to achieve clock synchronization of TSN nodes in the same time domain. In layman's terms, the clock time of each TSN node is consistent. However, the local clock frequency accuracy of the upstream node of the TSN system is usually lower than the local clock frequency accuracy of other nodes in the TSN system, which affects the time synchronization accuracy.
[0003] Currently, the time synchronization accuracy can be improved by increasing the frequency of sending time synchronization messages. However, since the frequency of sending time synchronization messages by the upstream nodes of the TSN system is limited, the time synchronization accuracy cannot be effectively improved. Summary of the invention
[0004] The present application provides a time synchronization method, device and storage medium for improving time synchronization accuracy.
[0005] In order to achieve the above purpose, this application adopts the following technical solutions:
[0006] In a first aspect, a time synchronization method is provided, the method being applied to a network side converter, the method comprising:
[0007] Receiving first time synchronization information sent by a first node of a time sensitive network TSN;
[0008] In response to the first time synchronization information, second time synchronization information is sent to the device-side converter, where the second time synchronization information includes a time deviation between a TSN clock source and a clock source of a communication network where the network-side converter is located.
[0009] In a second aspect, a time synchronization method is provided, the method being applied to a device-side converter, the method comprising:
[0010] Receiving second time synchronization information sent by the network side converter, the second time synchronization information including a time deviation between a clock source of the time sensitive network and a clock source of the communication network where the network side converter is located;
[0011] According to the second time synchronization information, the TSN time of the device-side converter is synchronized to the time of the clock source of the time-sensitive network;
[0012] The TSN time of the device-side converter is periodically corrected based on the time deviation, and the corrected TSN time of the device-side converter is sent to the second node in the time-sensitive network.
[0013] In a third aspect, a time synchronization device is provided, the device comprising:
[0014] A receiving unit, configured to receive first time synchronization information sent by a first node of a time sensitive network TSN;
[0015] The sending unit is used to send second time synchronization information to the device side converter in response to the first time synchronization information, where the second time synchronization information includes a time deviation between a TSN clock source and a clock source of a communication network where the network side converter is located.
[0016] In a fourth aspect, a time synchronization device is provided, the device comprising:
[0017] A receiving unit, configured to receive second time synchronization information sent by a network side converter, wherein the second time synchronization information includes a time deviation between a clock source of a time sensitive network and a clock source of a communication network where the network side converter is located;
[0018] A processing unit, configured to synchronize the TSN time of the device-side converter to the time of the clock source of the time-sensitive network according to the second time synchronization information;
[0019] The sending unit is used to periodically correct the TSN time of the device side converter based on the time deviation, and send the corrected TSN time of the device side converter to the second node in the time sensitive network.
[0020] In a fifth aspect, an electronic device is provided, comprising: a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method provided in any one of the first or second aspects above.
[0021] In a sixth 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 either the first aspect or the second aspect.
[0022] In a seventh aspect, a computer program product comprising computer instructions is provided. When the computer instructions are executed on a computer, the computer executes the method provided in any one of the first aspect or the second aspect.
[0023] In the embodiment of the present application, after the network side converter receives the first time synchronization information sent by the first node, it determines the time deviation between the TSN clock source and the clock source of the communication network where the network side converter is located according to the first time synchronization information, and then sends the second time synchronization information to the device side converter, and the second time synchronization information includes the time deviation, so that the device side converter periodically corrects the TSN time of the device side converter based on the time deviation, and then periodically sends the corrected TSN time of the device side converter to the second node to complete time synchronization. In this way, there is no need to increase the sending frequency of the time synchronization message sent by the first node. By adding the time deviation in the time synchronization information, the device side converter can send the corrected TSN time of the device side converter to the second node multiple times within the sending interval of the two time synchronization information, that is, the TSN time of the device side converter is updated multiple times, thereby improving the time synchronization accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0025] Figure 1 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of the architecture of a 5G system provided in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of a time synchronization method provided in an embodiment of the present application;
[0028] Figure 4 A schematic diagram of the overall process of a time synchronization method provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of the composition of a time synchronization device provided in an embodiment of the present application;
[0030] Figure 6 A schematic diagram of the composition of another time synchronization device provided in an embodiment of the present application;
[0031] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0034] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0035] The communication system deploys functional modules in user equipment (UE): device side TSN translator (DS-TT) and in 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 the 3GPP protocol, the precise time synchronization of the communication system is achieved in the following way: First, the upstream node of the external TSN system periodically sends a time synchronization message to provide the master clock reference. After each PTP slave node receives the time synchronization message, it can obtain the current time of the grandmaster (GM) according to the fields in the time synchronization message, as well as the link delay (MeanLinkDelay) and the residence time (residence time), thereby completing time synchronization.
[0036] At present, the upstream node is generally an end station device with TSN function, such as a programmable logic controller (PLC) device. The local clock frequency accuracy of the upstream node is usually lower than that of other nodes. When the local clock of the upstream node is used as GM, 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 different frequency accuracy, and the time deviation will continue to accumulate over time, thereby affecting the time synchronization accuracy. At present, the time deviation can be reduced by increasing the sending frequency of the time synchronization message, but since the frequency of sending the time synchronization message by the upstream node is limited, the time synchronization accuracy cannot be effectively improved.
[0037] Based on this, an embodiment of the present application provides a time synchronization method, after receiving the first time synchronization information sent by the first node (i.e., the upstream node) of the TSN, the network side converter determines the time deviation between the time of the master clock of the TSN and the local time of the local clock of the network side converter according to the first time synchronization information, and then sends the second time synchronization information to the device side converter, the second time synchronization information includes the time deviation, so that the device side converter corrects the TSN time of the device side converter based on the time deviation, and sends the corrected TSN time of the device side converter to the second node (i.e., the downstream node) of the TSN to complete time synchronization. In this way, there is no need to increase the sending frequency of the time synchronization message sent by the upstream node, and time synchronization can be completed by setting the second time synchronization information to include the time deviation, so that within the sending interval of the two time synchronization information, the device side converter can send the corrected TSN time of the device side converter to the second node multiple times, that is, update the TSN time of the device side converter multiple times to improve the time synchronization accuracy.
[0038] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0039] The technical solution provided in the embodiments of the present application can be applied to various communication systems supporting TSN, for example, a new radio (NR) communication system using 5G communication technology, a future evolution system, a long term evolution (LTE) or a variety of communication fusion systems, etc., but the embodiments of the present application are not limited to this.
[0040] Figure 1 This is a schematic diagram of the structure of a communication system provided in an embodiment of the present application. Figure 1As shown, the communication system includes a radio access network (RAN) device 101, a terminal device 102 and a core network device 103, wherein the terminal device 102 can be connected to a TSN node, such as a TSN end node, a TSN bridge, etc. The core network device 103 can be connected to a TSN node, such as a TSN clock source, a TSN bridge, etc.
[0041] Among them, the wireless access network device 101 can be an ordinary base station (such as Node B or eNB), a new radio controller (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 application are not limited to this. Among them, the base station can be divided into a macro base station for providing a macrocell, a micro base station for providing a microcell (Pico cell), and a femto base station for providing a femtocell. With the continuous evolution of wireless communication technology, future base stations may also adopt other names.
[0042] In some embodiments, the terminal device 102 may be a device with wireless transceiver functions, such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present application does not limit the specific type of the terminal device 102. The terminal device is also called user equipment (UE),
[0043] In some embodiments, the core network device 103 may be a user plane function UPF.
[0044] Take the 5G system (5G system, 5GS) as an example. Figure 2As shown, 5GS adapts to the external TSN system by deploying the functional module: DS-TT in UE and the functional module: NW-TT in UPF.
[0045] In some embodiments, when 5GS is used as a TSN bridge (TSN Bridge), it can be called a 5GS Virtual TSN Bridge (5GS Virtual TSN Bridge).
[0046] Depend on Figure 2 It can be seen that UPF, RAN and UE belong to the 5G clock domain, and the upstream TSN node, NW-TT, DS-TT and downstream TSN node belong to the TSN clock domain. In the TSN clock domain, the clock frequencies of the upstream TSN node and downstream TSN node are different from those of NW-TT and DS-TT, while each node in the 5G clock domain uses a clock frequency with a unified accuracy level.
[0047] It should be understood that Figure 1 is an exemplary structural diagram, Figure 1 The number of devices included in the communication system shown is not limited, for example, the number of wireless access network devices is not limited and the number of terminal devices is not limited. Figure 1 In addition to the equipment shown, Figure 1 The communication system shown may also include other devices, which is not limited to this.
[0048] Next, if Figure 3 As shown, the embodiment of the present application provides a time synchronization method, which can be applied to Figure 1 The communication system shown in the figure comprises the following steps:
[0049] S101. A network-side converter receives first time synchronization information sent by a first node of a TSN.
[0050] Among them, the network side converter is also the above Figure 2 The NW-TT in TSN is the first node mentioned above. Figure 2 Among the upstream TSN nodes, the first node can be a PLC.
[0051] In some embodiments, in order to perform time synchronization, the first node periodically sends first time synchronization information to the network side converter. Accordingly, the network side converter receives the first time synchronization information sent by the first node.
[0052] As a possible example, the network-side converter receives the first time synchronization information sent by the first node, which may include the following situations.
[0053] Scenario 1: The first node sends first time synchronization information to the network side converter via a message.
[0054] In some embodiments, when the first node has higher hardware performance, the first node may send a first time synchronization (Sync) message to the network side converter, and the first Sync message includes first time synchronization information. Accordingly, the network side converter receives the first Sync message sent by the first node, and since the first Sync message includes the first time synchronization information, the first time synchronization information sent by the first node is received.
[0055] Scenario 2: The first node sends the first time synchronization information to the network side converter through two messages.
[0056] In some embodiments, before the first node sends the first time synchronization information to the network side converter, the first node may first send a first Sync message to the network side converter, and then send a first follow-up message to the network side converter, and the first follow up message includes the first time synchronization information. Accordingly, before the network side converter receives the first time synchronization message 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.
[0057] 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 when the first node sends the first Sync message. Exemplarily, the sum of the reference timestamp and the first correction parameter can be used as the TSN time when the first node sends the first Sync message. Usually, the value of the first correction parameter is 0.
[0058] 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.
[0059] 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.
[0060] 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 can be understood that the first node sends the first time synchronization information to the network side converter through a message, that is, the first node sends the first time synchronization information to the network side converter according to the one-step method, and the first node sends the first time synchronization information to the network side converter through two messages, that is, the first node sends the first time synchronization information to the network side converter according to the two-step method. Since the first time synchronization information includes the reference timestamp, sending the reference timestamp requires certain hardware performance to support. Therefore, if the first node has higher hardware performance, the first node can send a first Sync message to complete the sending of the first time synchronization information. If the first node does not have higher hardware performance, the first node can send a first Sync message and then send a first follow up message to complete the sending of the first time synchronization information.
[0061] S102: In response to the first time synchronization information, the network side converter sends second time synchronization information to the device side converter. Accordingly, the device side converter receives the second time synchronization information sent by the network side converter.
[0062] In some embodiments, after receiving the first time synchronization information, the network side 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 converter.
[0063] In some embodiments, the second time synchronization information includes a time offset between the TSN clock source and a clock source of the communication network of the network-side converter.
[0064] As a possible example, the communication network where the network-side converter is located is a 5G communication network, and the clock source of the communication network where the network-side converter is located is also the clock source of the 5G communication network.
[0065] 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 converter sends the second Sync message, the entry timestamp is used to indicate the local time when the network side converter sends the second Sync message, the packet interval parameter is used to determine the time interval between sending two second Sync messages, and the second correction parameter is used to indicate the difference between the TSN time when the network side converter sends the second Sync message and the reference time.
[0066] 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.
[0067] In some embodiments, the time offset between the TSN clock source and the clock source of the communication network where the network-side converter is located is obtained according to the following steps:
[0068] 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 converter.
[0069] The reference timestamp and the first correction parameter are used to indicate the TSN time when the first node sends the first Sync message.
[0070] As a possible example, the reference timestamp, the first correction parameter and the link delay between the network side converter may be added to obtain a first TSN time, wherein the first TSN time is the TSN time when the network side converter receives the first Sync message.
[0071] S2. Determine a time offset according to the first TSN time and the first local time.
[0072] The first local time is the local time when the network-side converter receives the first Sync message.
[0073] It should be noted that the local time when the network side converter receives the first Sync message includes the local TSN time and the local 5GS time, and the first local time is the local TSN time when the network side converter receives the first Sync message.
[0074] As a possible example, the time deviation is the difference between the first TSN time and the first local time.
[0075] As a possible example, the modification of the first time synchronization information by the network side converter includes one or more of the following:
[0076] 1. Update the cumulative rateRatio field in the general precise time protocol (gPTP) payload of the first time synchronization information.
[0077] 2. Update the CorrectionField field in the gPTP payload of the first time synchronization information.
[0078] 3. Add a TSi timestamp to the suffix field of the first time synchronization information. The TSi timestamp is also the above-mentioned entry timestamp.
[0079] In some embodiments, the TSi timestamp uses 5GS time.
[0080] 4. Add the time offset TimeOffset field to the Suffix field of the first time synchronization information.
[0081] 5. Update the message length field of the first time synchronization information.
[0082] It is understandable that, since two fields, TSi timestamp and TimeOffset, are newly added in the first time synchronization information, the message length field of the first time synchronization information needs to be modified synchronously.
[0083] That is to say, after receiving the first time synchronization information, the network side converter updates the first time synchronization information to obtain the second time synchronization information.
[0084] As a possible example, the network side converter sends the second time synchronization information to the device side converter, which may include the following situations.
[0085] Scenario 1: The network side converter sends the second time synchronization information to the device side converter via a message.
[0086] Exemplarily, the network side converter sends a second Sync message to the device side converter, and the second Sync message includes the second time synchronization information. Accordingly, the device side converter receives the second Sync message sent by the network side converter, and because the second Sync message includes the second time synchronization information, the device side converter also receives the second time synchronization information sent by the network side converter.
[0087] Scenario 2: The network side converter sends the second time synchronization information to the device side converter via two messages.
[0088] In some embodiments, before the network side converter sends the second time synchronization information to the device side converter, the network side converter may first send a second Sync message to the device side converter, and then send a second follow up message to the device side converter, and the second follow up message includes the second time synchronization information. Accordingly, before the device side converter receives the second time synchronization message sent by the network side converter, it receives the second Sync message sent by the network side converter, and then receives the second follow up message sent by the network side converter. Since the second follow up message includes the second time synchronization information, the second time synchronization information sent by the network side converter is received.
[0089] S103: The device-side converter synchronizes the TSN time of the device-side converter to the time of the clock source of the time-sensitive network according to the second time synchronization information.
[0090] Among them, the device side converter is also the above Figure 2 DS-TT shown.
[0091] As a possible example, the device-side converter synchronizes the TSN time of the device-side 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 steps:
[0092] A1. Based on the second time synchronization information, obtain a reference timestamp, an entry timestamp, a second correction parameter and a frequency ratio.
[0093] In some embodiments, after receiving the second time synchronization information, the device-side converter parses the second time synchronization information to obtain a reference timestamp, an entry timestamp, a second correction parameter, and a frequency ratio.
[0094] 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.
[0095] Among them, the second local time is the local time when the device side converter receives the second Sync message, the second TSN time is the TSN time when the device side 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 converter sends the second Sync message, the entry timestamp is used to indicate the local time when the network side converter sends the second Sync message, the second correction parameter is used to indicate the difference between the TSN time when the network side converter sends the second Sync message and the reference time, and 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.
[0096] 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, and 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 converter sends the second Sync message includes the local 5GS time and the local TSN time, and the entry timestamp is used to indicate the local 5GS time when the network-side converter sends the second Sync message.
[0097] 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
[0098] 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.
[0099] After obtaining the second TSN time, the TSN time of the device-side converter is synchronized to the second TSN time, that is, the TSN time of the device-side converter is synchronized to the time of the clock source of the time-sensitive network.
[0100] S104. The device-side converter periodically corrects the TSN time of the device-side converter based on the time deviation, and sends the corrected TSN time of the device-side converter to the second node in the time-sensitive network.
[0101] As a possible example, the device-side converter periodically corrects the TSN time of the device-side converter based on the time deviation, which may include the following steps:
[0102] B1. Determine a correction time interval according to the duration of the time synchronization cycle between the time sensitive network and the communication network and the number of corrections.
[0103] It can be seen from the above description that the second time synchronization information also includes a packet sending interval parameter, and the packet sending interval parameter is used to determine the duration of the time synchronization period between the time sensitive network and the communication network.
[0104] In some embodiments, the device-side converter stores the number of corrections pre-configured by the network administrator, where the number of corrections is used to indicate the granularity of dividing the time deviation, for example, the number of corrections is 6.
[0105] As a possible example, after the device-side converter receives the second time synchronization information, the device-side converter can determine the duration of the time synchronization cycle 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 cycle between the time-sensitive network and the communication network and the preset number of corrections.
[0106] As an example, the correction time interval is determined according to the duration of the time synchronization cycle between the time sensitive network and the communication network and the number of corrections, which can be shown in the following formula:
[0107] deltaT=(2 SyncInterval ) / (2 N )
[0108] Among them, deltaT is the correction time interval, 2 SyncInterval is the duration of the time synchronization period between the time-sensitive network and the communication network, SyncInterval is the packet sending interval parameter, and N is the number of corrections.
[0109] B2. Determine the correction value based on the time deviation and the number of corrections.
[0110] The correction value is used to correct the TSN time of the device-side converter.
[0111] As an example, the correction value is determined according to the time deviation in the second time synchronization information and the preset number of corrections, which can be shown as the following formula:
[0112] Z=TimeOffset / (2 N )
[0113] Among them, Z is the correction value and TimeOffset is the time deviation.
[0114] B3. After synchronizing the TSN time of the converter on the device side to the clock source time of the time-sensitive network, the TSN time on the device side is corrected with the correction value at each correction time interval to obtain the corrected TSN time of the converter on the device side.
[0115] As a possible example, the device-side converter may insert the correction value into the TSN time of the device-side converter at each correction time interval to perform interpolation compensation, thereby obtaining the corrected TSN time of the device-side converter.
[0116] As a possible example, a timer is preset in the device side converter, so that after each correction time interval is reached by the timer, the device side converter corrects the TSN time of the device side converter with the correction value to obtain the corrected TSN time of the device side converter.
[0117] In some embodiments, when the device-side converter obtains the corrected TSN time of the device-side converter, it sends the corrected TSN time of the device-side converter to the second node in the time-sensitive network. Accordingly, the second node receives the corrected TSN time of the device-side converter sent from the device-side converter. The second node is also the above-mentioned Figure 2 The downstream TSN nodes shown in .
[0118] In some embodiments, after receiving the corrected TSN time of the device-side converter, the second node reads the corrected TSN time of the device-side converter to complete time synchronization with the first node.
[0119] As a possible example, when the device-side converter obtains the corrected TSN time of the device-side converter, the third time synchronization information may be sent to the second node, where the third time synchronization information includes the corrected TSN time of the device-side converter. The implementation of the device-side converter sending the third time synchronization information to the second node may refer to the two situations in which the first node sends the first time synchronization information to the network-side converter in the above step S101, which will not be described in detail here.
[0120] It should be noted that the above-mentioned embodiment is merely exemplary in that a time synchronization method provided in an embodiment of the present application is applied to the network architecture of a 5GS bridge to complete time synchronization. A time synchronization method provided in an embodiment of the present application can also be applied to other deterministic network (such as DetNet) architectures to complete time synchronization in the corresponding deterministic network architecture, and the embodiment of the present application does not limit this.
[0121] based on Figure 3In the embodiment shown, after the network-side converter receives the first time synchronization information sent by the first node, it determines the time deviation between the TSN clock source and the clock source of the communication network where the network-side converter is located according to the first time synchronization information, and then sends the second time synchronization information to the device-side converter. The second time synchronization information includes the time deviation, so that the device-side converter periodically corrects the TSN time of the device-side converter based on the time deviation, and then periodically sends the corrected TSN time of the device-side converter to the second node to complete time synchronization. In this way, there is no need to increase the sending frequency of the time synchronization message sent by the first node. By adding the time deviation in the time synchronization information, the device-side converter can send the corrected TSN time of the device-side converter to the second node multiple times within the sending interval of two time synchronization information, so as to improve the time synchronization accuracy.
[0122] Combine the following Figure 2 The schematic diagram of the 5G system architecture shown in FIG. 1 introduces a time synchronization method provided in an embodiment of the present application. Figure 4 , is a schematic diagram of the overall process of a time synchronization method provided in an embodiment of the present application. Figure 4 As shown, the method as a whole comprises the following steps:
[0123] S301. Pre-configure the number of corrections N on DS-TT.
[0124] 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.
[0125] S302: The upstream TSN node sends first time synchronization information to the NW-TT.
[0126] In some embodiments, the upstream TSN node periodically sends the first time synchronization information to the NW-TT for time synchronization. The first time synchronization information can be sent based on a one-step method, that is, sending Sync, which includes the first time synchronization information, or based on a two-step method, that is, first sending a Sync message, and then sending a follow up message, the follow up message includes the first time synchronization information, and the embodiment of the present application does not limit this. The first time synchronization information includes Cumulative rateRatio and correction filed.
[0127] 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.
[0128] The current time of the NW-TT local clock is the current TSN time of the NW-TT local clock.
[0129] S304. NW-TT updates the first time synchronization information and obtains second time synchronization information.
[0130] The updating includes 1. updating the Cumulative rateRatio field in the first time synchronization information payload.
[0131] 2. Update the correction field in the first synchronization information payload.
[0132] 3. Add the entry Tsi timestamp (using 5GS clock) in the Suffix field.
[0133] 4. Add the time offset TimeOffset in the Suffix field.
[0134] 5. Update the message length field of the first time synchronization information.
[0135] S305. NW-TT sends second time synchronization information to DS-TT.
[0136] The second time synchronization information may be sent based on a one-step method, that is, sending Sync, which includes the second time synchronization information, or may be sent based on a two-step method, that is, first sending a Sync message, and then sending a follow up message, the follow up message includes the second time synchronization information, and the embodiment of the present application does not limit this. The second time synchronization information includes a time deviation, a TSi timestamp, a cumulative rateRatio, and a correction filed.
[0137] S306, DS-TT performs segmented difference correction.
[0138] As a possible example, S306 may include the following steps:
[0139] S3061. Obtain from the second time synchronization information: a reference timestamp, an entry timestamp, a second correction parameter frequency ratio, and a packet sending interval parameter.
[0140] S3062. Calculate the current TSN time of DS-TT.
[0141] S3063. Set a timer in DS-TT to determine the calibration time interval.
[0142] 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.
[0143] S307. The DS-TT sends the corrected TSN time of the DS-TT to the downstream TSN node.
[0144] S308. The downstream TSN node reads the corrected TSN time of the DS-TT to complete time synchronization.
[0145] The above mainly introduces the solution provided by the present application from the perspective of interaction between various nodes. It can be understood that in order to realize the above functions, each node, such as the network side converter and the device side converter, includes a hardware structure and / or software module corresponding to each function.
[0146] It should be easily appreciated by those skilled in the art that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 the present invention.
[0147] Figure 5 FIG. 1 is a schematic diagram showing the composition of a time synchronization device provided in an embodiment of the present application. Figure 5 As shown, the time synchronization device 20 includes a receiving unit 201 , a processing unit 202 and a sending unit 203 .
[0148] The time synchronization device 20 may be the above network side converter or a chip in the network side converter. When the time synchronization device 20 is used to implement the functions of the network side converter in the above embodiment, each unit is specifically used to implement the following functions.
[0149] The receiving unit 201 is configured to receive first time synchronization information sent by a first node of a time sensitive network TSN.
[0150] The sending unit 203 is used to send second time synchronization information to the device side 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 the communication network where the network side converter is located.
[0151] In some embodiments, the receiving unit 201 is specifically configured to receive a first time synchronization Sync message sent by a first node, where the first Sync message includes first time synchronization information.
[0152] 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.
[0153] The receiving unit 201 is specifically configured to receive a first follow up message sent by a first node, where the first follow up message includes first time synchronization information.
[0154] 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 according to the reference timestamp, the first correction parameter and the link delay between the first node and the network side converter in the first time synchronization information, and the first TSN time is the TSN time when the network side converter receives the first Sync message; determine the time deviation according to the first TSN time and the first local time, and the first local time is the local time when the network side converter receives the first Sync message.
[0155] In some embodiments, the sending unit 203 is specifically configured to send a second Sync message to the device-side converter, where the second Sync message includes second time synchronization information.
[0156] In some embodiments, before sending the second time synchronization information to the device side converter, the sending unit 203 is further configured to send a second Sync message to the device side converter.
[0157] The sending unit 203 is specifically configured to send a second follow up message to the device side converter, where the second follow up message includes second time synchronization information.
[0158] 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 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 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.
[0159] Figure 6 FIG. 2 is a schematic diagram showing the composition of another time synchronization device provided in an embodiment of the present application. Figure 6As shown, the time synchronization device 30 includes a receiving unit 301 , a processing unit 302 and a sending unit 303 .
[0160] The time synchronization device 30 may be the device-side converter or a chip in the device-side converter. When the time synchronization device 30 is used to implement the function of the device-side converter in the above embodiment, each unit is specifically used to implement the following functions.
[0161] The receiving unit 301 is configured to receive second time synchronization information sent by a network side converter, where the second time synchronization information includes a time deviation between a clock source of a time sensitive network and a clock source of a communication network where the network side converter is located.
[0162] The processing unit 302 is configured to synchronize the TSN time of the device-side converter to the time of the clock source of the time-sensitive network according to the second time synchronization information.
[0163] The sending unit 303 is used to periodically correct the TSN time of the device side converter based on the time deviation, and send the corrected TSN time of the device side converter to the second node in the time sensitive network.
[0164] In some embodiments, the processing unit 302 is specifically 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 converter to the time of the clock source of the time-sensitive network, correct the TSN time of the device-side converter with the correction value every correction time interval to obtain the corrected TSN time of the device-side converter.
[0165] In some embodiments, the receiving unit 301 is specifically configured to receive a second Sync message sent by a network side converter, where the second Sync message includes second time synchronization information.
[0166] In some embodiments, before receiving the second time synchronization information sent by the network side converter, the receiving unit 301 is further configured to receive a second Sync message sent by the network side converter.
[0167] The receiving unit 301 is specifically configured to receive a second follow up message sent by a network side converter, where the second follow up message includes second time synchronization information.
[0168] 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 when the network side 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 when the network side 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.
[0169] In some embodiments, the processing unit 302 is specifically 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 according to the reference timestamp, the entry timestamp, the second correction parameter, the frequency ratio and the second local time, the second local time being the local time when the device side converter receives the second Sync message, and the second TSN time being the TSN time when the device side converter receives the second Sync message; synchronize the TSN time of the device side converter to the second TSN time.
[0170] It should be noted that Figure 5 and Figure 6 The units in the system may also be referred to as modules, for example, the sending unit may be referred to as a sending module. Figure 5 and Figure 6 In the illustrated embodiment, the names of the various units may not be the names shown in the figure. For example, the sending unit may be called a communication unit, and the receiving unit may be called a communication unit.
[0171] Figure 5 and Figure 6 If each unit in the embodiment is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application 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 to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present application. The storage medium for storing computer software products includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0172] When the time synchronization device 20 or the time synchronization device 30 implements the functions of the integrated modules in the form of hardware, the present application embodiment provides a structural diagram of an electronic device. Figure 7 As shown, the electronic device 40 includes: a processor 402 , a communication interface 403 , and a bus 404 . Optionally, the electronic device 40 may further include a memory 401 .
[0173] The processor 402 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The 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 devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present application. The 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, and the like.
[0174] The communication interface 403 is used to connect with other devices via a communication network, such as Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0175] The memory 401 may 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 disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0176] As a possible implementation, the memory 401 can exist independently of the processor 402, and the memory 401 can be connected to the processor 402 via a bus 404 to store instructions or program codes. When the processor 402 calls and executes the instructions or program codes stored in the memory 401, the time synchronization method provided in the embodiment of the present application can be implemented.
[0177] In another possible implementation, the memory 401 may also be integrated with the processor 402 .
[0178] The bus 404 may be an extended industry standard architecture (EISA) bus, etc. The bus 404 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0179] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity 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.
[0180] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by computer instructions to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be the memory of any of the above embodiments. The above computer-readable storage medium can also be an external storage device of the above 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 time synchronization device. Further, the above computer-readable storage medium can also include both the internal storage unit of the above time synchronization device and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above time synchronization device. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0181] An embodiment of the present application 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.
[0182] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several 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.
[0183] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0184] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A time synchronization method, characterized in that: The method is applied to a network side converter, and the method 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 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 converter is located.
2. The method according to claim 1, characterized in that The receiving first time synchronization information sent by a first node of a time sensitive network 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, characterized in that Before receiving the first time synchronization information sent by the first node of the time sensitive network TSN, the method further includes: Receiving a first Sync message sent by the first node; The receiving first time synchronization information sent by a first node of a time sensitive network 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, characterized in that: 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 converter, where the first TSN time is the TSN time when the network side 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 converter receives the first Sync message.
5. The method according to claim 1, characterized in that The sending the second time synchronization information to the device side converter includes: A second Sync message is sent to the device-side converter, where the second Sync message includes the second time synchronization information.
6. The method according to claim 1, characterized in that Before sending the second time synchronization information to the device side converter, the method further includes: Sending a second Sync message to the device-side converter; The sending the second time synchronization information to the device side converter includes: A second follow up message is sent to the device side converter, where the second follow up message includes the second time synchronization information.
7. The method according to claim 5 or 6, characterized in that: 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 converter sends the second Sync message.
8. A time synchronization method, characterized in that: The method is applied to a device-side converter, and the method comprises: Receiving second time synchronization information sent by the network side 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 converter is located; According to the second time synchronization information, synchronizing the TSN time of the device-side converter to the time of the clock source of the time-sensitive network; The TSN time of the device-side converter is periodically corrected based on the time deviation, and the corrected TSN time of the device-side converter is sent to the second node in the time-sensitive network.
9. The method according to claim 8, characterized in that The periodically correcting the TSN time of the device-side 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 converter is synchronized to the time of the clock source of the time sensitive network, the TSN time of the device side converter is corrected with the correction value every correction time interval to obtain the corrected TSN time of the device side converter.
10. The method according to claim 8, characterized in that The receiving second time synchronization information sent by the network side converter includes: A second Sync message sent by the network side converter is received, where the second Sync message includes the second time synchronization information.
11. The method according to claim 8, characterized in that Before receiving the second time synchronization information sent by the network side converter, the method includes: Receiving a second Sync message sent by the network side converter; The receiving second time synchronization information sent by the network side converter includes: The receiving a second follow up message sent by the network side converter, wherein the second follow up message includes the second time synchronization information.
12. The method according to claim 10 or 11, characterized in that: 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 converter sends the second Sync message.
13. The method according to claim 12, characterized in that The step of changing the TSN time of the device-side 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 converter receives the second Sync message, and the second TSN time is the TSN time when the device-side converter receives the second Sync message; The TSN time of the device-side converter is synchronized to the second TSN time.
14. An electronic device, characterized in that: include: 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, characterized in that: 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
Cited By
Data processing method and device based on terminal side TSN converter, equipment and medium
CN119316371A
