Time synchronization method for network nodes, and industrial internet
By setting a high-precision master clock in the Industrial Internet and periodically correcting the timestamps of slave nodes, the problems of insufficient network node clock synchronization accuracy and high cost are solved, and low-cost network clock synchronization is achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- YANGTZE RIVER DELTA HIT ROBOT TECH RES INST
- Filing Date
- 2025-05-30
- Publication Date
- 2026-06-25
AI Technical Summary
In the Industrial Internet, clock synchronization of network nodes suffers from insufficient synchronization accuracy and high cost.
By setting a high-precision master clock in the network and periodically correcting the timestamps of the slave nodes, the clocks of the slave nodes are synchronized using the timestamps of the master clock. This is achieved by detecting the frequency offset rate and transmission delay, thereby maintaining clock synchronization among all nodes in the network.
It achieves basic synchronization among nodes, reduces synchronization costs, and avoids the long-term accumulation of time deviations.
Smart Images

Figure CN2025098337_25062026_PF_FP_ABST
Abstract
Description
Network node time synchronization methods and the Industrial Internet Technical Field
[0001] This invention pertains to the technical field of the Industrial Internet, and more specifically, it relates to a method for time synchronization of network nodes and the Industrial Internet. Background Technology
[0002] As an important carrier of intelligent manufacturing, robots are known as the "crown jewel of manufacturing." They are a powerful driving force for industrial transformation and upgrading, and also a key to enhancing national strength and competitiveness.
[0003] Real-time monitoring and remote operation and maintenance of robots is one of the core components of the industrial internet of robots. It provides functions such as real-time equipment status monitoring, data acquisition, storage, equipment management, and operation and maintenance, meeting customers' needs for equipment management, alarm management, energy consumption management, data statistics, and equipment fault monitoring and analysis. It helps enterprises achieve efficient operation and management of equipment and realize the digitalization and automation of equipment management.
[0004] In fields such as industrial control, all tasks are based on a time reference, and maintaining clock synchronization among nodes in the network is crucial. Summary of the Invention
[0005] This invention provides a time synchronization method for network nodes, aiming to improve the above-mentioned problems.
[0006] This invention is implemented as follows: a time synchronization method for network nodes, the method being as follows:
[0007] (1) Determine the master node and slave nodes in the network;
[0008] (2) Periodically detect the frequency offset rate Rf of the slave clock relative to the master clock and the transmission delay Ndelay between the master node and the slave node, and correct the current timestamp of the slave clock based on the current timestamp of the master clock to achieve synchronization between the slave clock and the master clock.
[0009] Furthermore, the master clock on the master node has higher precision than the slave clock on the slave node.
[0010] Furthermore, the process for obtaining the frequency deviation between the master node and the slave node is as follows:
[0011] The master node sends the first sync message, and the master clock generates a timestamp T1 when the first sync message is sent. The slave node receives the first sync message sent by the master node, and the slave clock generates a timestamp T2 when the first sync message is received.
[0012] The master node sends the first Follow_up message, which carries the timestamp T1 when the first sync message was sent. The slave node receives the first Follow_up message, parses it, and obtains the timestamp T1 when the first sync message was sent.
[0013] The master node sends a second sync message, and the master clock generates a timestamp T3 when the second sync message is sent. The slave node receives the second sync message sent by the master node, and the slave clock generates a timestamp T4 when the second sync message is received.
[0014] The master node sends a second Follow_up message, which carries the timestamp T3 when the second set of sync messages were sent. The slave node receives the second Follow_up message, parses it, and obtains the timestamp T3 when the second sync message was sent.
[0015] The slave node calculates its slave clock frequency offset Rf relative to the master clock based on timestamps T1 to T4.
[0016] Furthermore, the specific formula for calculating the frequency offset rate Rf is as follows:
[0017] Furthermore, the process of obtaining the transmission delay Ndelay between the master node and the slave node is as follows:
[0018] When a slave node sends a Pdelay_Req message to a master node, the slave clock generates a timestamp T5 for sending the Pdelay_Req message. When the master node receives the Pdelay_Req message, the master clock generates a timestamp T6 for receiving the Pdelay_Req message.
[0019] The master node sends a Pdelay_Resp message, and the master clock generates a timestamp T7 when the Pdelay_Resp message is sent. The Pdelay_Resp message carries a timestamp T6 when the Pdelay_Req message is received.
[0020] Receive Pdelay_Resp messages from the node, generate a timestamp T8 when receiving the Pdelay_Resp message from the clock, and parse the Pdelay_Resp message to obtain the timestamp T6 when receiving the Pdelay_Req message.
[0021] The master node sends a third Follow_up message, which carries the timestamp T7 of when the Pdelay_Resp message was sent. The slave node receives the third Follow_up message, parses it, and obtains the timestamp T7 of when the Pdelay_Resp message was sent.
[0022] The transmission delay Ndelay between the node and the master node is calculated based on the current frequency offset Rf from timestamp T5 to timestamp T8.
[0023] Furthermore, the specific formula for calculating the transmission delay Ndelay is as follows:
[0024] Furthermore, the slave clock timestamp correction method based on the master clock timestamp is as follows:
[0025] The master node sends a third sync message, and the master clock generates a timestamp T9 for the sending of the third sync message. The slave node receives the third sync message sent by the master node, and the slave clock generates a timestamp T for the receiving of the third sync message. 10 ;
[0026] The master node sends a fourth Follow_up message, which carries the timestamp T9 from when the third sync message was sent. The slave node receives the fourth Follow_up message, parses it to obtain the timestamp T9 from when the third sync message was sent, and then uses the timestamp T9 and the timestamp T... 10 Calculate the current frequency offset Rf and transmission delay Ndelay relative to the master clock timestamp T. b Synchronized from clock timestamp T a .
[0027] Furthermore, from the timestamp T corresponding to the clock a The specific time formula is as follows: T a =T9+Ndelay+Rf*(T b -T 10 ).
[0028] This invention is implemented as follows: an industrial internet, the industrial internet comprising:
[0029] At least one master node and slave nodes networked with the master node, the master node and slave nodes periodically correct the timestamps of each slave node based on the time synchronization method of the above network nodes.
[0030] This invention sets up a master clock with high clock accuracy in the network and periodically calibrates the time of the slave clocks based on the master clock. This maintains basic clock synchronization among the nodes in the network, and the cost required to maintain basic network clock synchronization is also relatively low. Attached Figure Description
[0031] Figure 1 is a schematic diagram of the time synchronization method for network nodes provided in an embodiment of the present invention.
[0032] Implementation
[0033] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, so as to help those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention.
[0034] Figure 1 is a schematic diagram of a network node time synchronization method provided in an embodiment of the present invention. The method is as follows:
[0035] (1) Determine the master node in the Time Sensitive Network (TSN), and the remaining nodes are slave nodes. The precision of the master clock on the master node is higher than that of the slave clock on the slave node.
[0036] (2) Periodically detect the frequency offset rate Rf of the slave clock relative to the master clock and the transmission delay Ndelay between the master node and the slave node, and then correct the current timestamp of the slave clock based on the current timestamp of the master clock to achieve synchronization between the slave clock and the master clock.
[0037] The slave clock's timestamp is corrected based on the master clock's timestamp to achieve time synchronization between the slave and master clocks.
[0038] In this invention, a master node is set up in a Time-Sensitive Network (TSN) composed of multiple nodes, and the remaining nodes in the TSN are set up as slave nodes. The clock on the master node is called the master clock, and the clock on the slave node is called the slave clock. The slave node generates the timestamp on the data packet based on the slave clock. However, the slave clock is relatively inexpensive but has poor accuracy. During use, the time deviation increases with the increase of usage time. In order to improve the above problems, this invention sets up a master node. The master node uses a clock with extremely high accuracy, and the master clock is also relatively expensive. The slave clock uses the master clock as a reference and periodically corrects its own timestamp to avoid the long-term accumulation of time deviation.
[0039] In this embodiment of the invention, all slave nodes in a Time-Sensitive Network (TSN) need to periodically correct their timestamps based on the master clock of the master node. The specific process of correcting the timestamps of the slave clock is as follows: determine the frequency offset rate Rf of the slave clock relative to the master clock, determine the transmission delay Ndelay between the master node and the slave node based on the frequency offset rate Rf, and correct the timestamps of the slave clocks based on the timestamps of the master clocks to achieve synchronization between the slave clocks and the master clocks.
[0040] (21) Detect the current frequency offset Rf of the slave clock relative to the master clock:
[0041] In practical Time-Sensitive Networks (TSNs), the frequencies of each node are often not completely consistent. Therefore, two sets of sync messages and two sets of follow-up messages are needed to calculate the frequency deviation between each node. The specific process for obtaining the frequency deviation between the master node and the slave node is as follows:
[0042] The master node sends the first sync message, and the master clock generates a timestamp T1 when the first sync message is sent. The slave node receives the first sync message sent by the master node, and the slave clock generates a timestamp T2 when the first sync message is received.
[0043] The master node sends the first Follow_up message, which carries the timestamp T1 when the first sync message was sent. The slave node receives the first Follow_up message, parses it, and obtains the timestamp T1 when the first sync message was sent.
[0044] The master node sends a second sync message, and the master clock generates a timestamp T3 when the second sync message is sent. The slave node receives the second sync message sent by the master node, and the slave clock generates a timestamp T4 when the second sync message is received.
[0045] The master node sends a second Follow_up message, which carries the timestamp T3 when the second sync message was sent. The slave node receives the second Follow_up message, parses it, and obtains the timestamp T3 when the second sync message was sent.
[0046] The frequency offset rate Rf of the slave clock relative to the master clock is calculated by the node based on timestamps T1 to T4, and the specific calculation formula is as follows:
[0047] (22) Detect the transmission delay Ndelay between the master node and the slave node;
[0048] In this embodiment of the invention, the process of obtaining the transmission delay Ndelay between the master node and the slave node is as follows:
[0049] The slave node sends a Pdelay_Req message to the master node, and the slave clock generates a timestamp T5 when the Pdelay_Req message is sent.
[0050] The master node receives the Pdelay_Req message, and the master clock generates a timestamp T6 for the time when the Pdelay_Req message is received.
[0051] The master node sends a Pdelay_Resp message, and the master clock generates a timestamp T7 when the Pdelay_Resp message is sent. The Pdelay_Resp message carries a timestamp T6 when the Pdelay_Req message is received.
[0052] Receive Pdelay_Resp messages from the node, generate a timestamp T8 when receiving the Pdelay_Resp message from the clock, and parse the Pdelay_Resp message to obtain the timestamp T6 when receiving the Pdelay_Req message.
[0053] The master node sends a third Follow_up message (Pdelay_Resp_Follow_up message in Figure 1). The third Follow_up message carries the timestamp T7 when the Pdelay_Resp message was sent. The slave node receives the third Follow_up message, parses it, and obtains the timestamp T7 when the Pdelay_Resp message was sent.
[0054] The transmission delay Ndelay between the slave node and the master node is calculated based on the current frequency offset Rf from timestamp T5 to timestamp T8. The specific formula for calculating the transmission delay Ndelay is as follows:
[0055] (23) After completing the detection of frequency offset rate Rf and transmission delay Ndelay, the slave node corrects its slave clock timestamp based on the current timestamp of the master clock.
[0056] In this embodiment of the invention, the slave clock timestamp correction method based on the master clock timestamp is based on the following:
[0057] The master node sends a third sync message, and the master clock generates a timestamp T9 for the sending of the third sync message. The slave node receives the third sync message sent by the master node, and the slave clock generates a timestamp T for the receiving of the third sync message. 10 ;
[0058] The master node sends a fourth Follow_up message, which carries the timestamp T9 from when the third sync message was sent. The slave node receives the fourth Follow_up message, parses it to obtain the timestamp T9 from when the third sync message was sent, and then uses the timestamp T9 and the timestamp T... 10 Calculate the current frequency offset Rf and transmission delay Ndelay relative to the master clock timestamp T. b Synchronized from clock timestamp T a From the timestamp T corresponding to the clock a The specific time formula is as follows: T a=T9+Ndelay+Rf*(T b -T 10 ).
[0059] This invention also provides an industrial internet of things, which includes:
[0060] At least one master node and slave nodes networked with the master node, the master node and slave nodes periodically correct the timestamps of each slave node through the time synchronization method of the above network nodes.
[0061] This invention sets up a master clock with high clock accuracy in the network and periodically calibrates the time of the slave clocks based on the master clock. This maintains basic clock synchronization among the nodes in the network, and the cost required to maintain basic network clock synchronization is also relatively low.
[0062] The present invention has been described by way of example. Obviously, the specific implementation of the present invention is not limited to the above-described manner. Any non-substantial improvements made using the inventive concept and technical solution of the present invention, or the direct application of the inventive concept and technical solution of the present invention to other occasions without modification, are all within the protection scope of the present invention.
Claims
1. A method for time synchronization of network nodes, characterized in that, The method is as follows: (1) Determine the master and slave nodes in the network; (2) Periodically detect the frequency offset rate Rf of the slave clock relative to the master clock and the transmission delay Ndelay between the master node and the slave node, and correct the current timestamp of the slave clock based on the current timestamp of the master clock to achieve synchronization between the slave clock and the master clock.
2. The time synchronization method for network nodes as described in claim 1, characterized in that, The master clock on the master node has higher precision than the slave clock on the slave node.
3. The time synchronization method for network nodes as described in claim 1, characterized in that, The process for obtaining the frequency deviation between the master node and the slave node is as follows: The master node sends the first sync message, and the master clock generates a timestamp T1 when the first sync message is sent. The slave node receives the first sync message sent by the master node, and the slave clock generates a timestamp T2 when the first sync message is received. The master node sends the first Follow_up message, which carries the timestamp T1 when the first sync message was sent. The slave node receives the first Follow_up message, parses it, and obtains the timestamp T1 when the first sync message was sent. The master node sends a second sync message, and the master clock generates a timestamp T3 when the second sync message is sent. The slave node receives the second sync message sent by the master node, and the slave clock generates a timestamp T4 when the second sync message is received. The master node sends a second Follow_up message, which carries the timestamp T3 when the second sync message was sent. The slave node receives the second Follow_up message, parses it, and obtains the timestamp T3 when the second sync message was sent. The slave node calculates the frequency offset Rf of the slave clock relative to the master clock based on timestamps T1 to T4.
4. The time synchronization method for network nodes as described in claim 3, characterized in that, The formula for calculating the frequency offset rate Rf is as follows:
5. The time synchronization method for network nodes as described in claim 1, characterized in that, The process of obtaining the transmission delay Ndelay between the master node and the slave node is as follows: The slave node sends a Pdelay_Req message to the master node, and the slave clock generates a timestamp T5 when the Pdelay_Req message is sent. The master node receives the Pdelay_Req message, and the master clock generates a timestamp T6 for the time when the Pdelay_Req message is received. The master node sends a Pdelay_Resp message, and the master clock generates a timestamp T7 when the Pdelay_Resp message is sent. The Pdelay_Resp message carries a timestamp T6 when the Pdelay_Req message is received. Receive Pdelay_Resp messages from the node, generate a timestamp T8 when receiving the Pdelay_Resp message from the clock, and parse the Pdelay_Resp message to obtain the timestamp T6 when receiving the Pdelay_Req message. The master node sends a third Follow_up message, which carries the timestamp T7 when the Pdelay_Resp message was sent. The slave node receives the third Follow_up message, parses it, and obtains the timestamp T7 when the Pdelay_Resp message was sent. The transmission delay Ndelay between the node and the master node is calculated based on the current frequency offset Rf from timestamp T5 to timestamp T8.
6. The time synchronization method for network nodes as described in claim 5, characterized in that, The specific formula for calculating the transmission delay Ndelay is as follows:
7. The time synchronization method for network nodes as described in claim 1, characterized in that, The slave clock timestamp correction method based on the master clock timestamp is as follows: The master node sends a third sync message, and the master clock generates a timestamp T9 for the sending of the third sync message. The slave node receives the third sync message sent by the master node, and the slave clock generates a timestamp T for the receiving of the third sync message. 10 ; The master node sends a fourth Follow_up message, which carries the timestamp T9 from when the third sync message was sent. The slave node receives the fourth Follow_up message, parses it to obtain the timestamp T9 from when the third sync message was sent, and then uses the timestamp T9 and the timestamp T... 10 Calculate the current frequency offset Rf and transmission delay Ndelay relative to the master clock timestamp T. b Synchronized from clock timestamp T a .
8. The time synchronization method for network nodes as described in claim 1, characterized in that, From the timestamp T corresponding to the clock a The specific time formula is as follows: T a =T9+Ndelay+Rf*(T b -T 10 ).
9. An industrial internet, characterized in that, The Industrial Internet includes: At least one master node and slave nodes networked with the master node, wherein the master node and slave nodes periodically correct the timestamps of each slave node based on the network node time synchronization method according to any one of claims 1 to 8.