Clock synchronization method, network and device in high-speed industrial bus relay network

By analyzing the time and processing time of relay messages in a high-speed industrial bus relay network, and calculating the time difference between the relay network and the main network, the clock synchronization problem is solved, and the accuracy of clock synchronization and the long-distance of data transmission are improved.

CN115567142BActive Publication Date: 2024-11-22BEIJING NEURON NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211215668.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2024-11-22
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

The clock synchronization problem in high-speed industrial bus networks leads to limited long-distance data transmission and insufficient accuracy of clock synchronization.

Method used

By utilizing the communication between the main network and the relay network in a high-speed industrial bus relay network, the time difference between the relay network and the main network is calculated to realize the clock by obtaining and analyzing the sending and receiving time of the relay message and the processing time of the processing time of the relay network and the main network. synchronous. The specific method includes obtaining the relay message sent by the target main transmission node by the second master control node, extracting the main network transmission time and the relay network extraction time, determining the time difference between the relay network and the main network, and performing clock synchronization according to the difference.

Benefits of technology

It improves the accuracy and long-distance transmission capabilities of clock synchronization in high-speed industrial bus networks, ensuring the synchronization consistency of clocks within the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567142B_ABST
    Figure CN115567142B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a clock synchronization method, network and device in a high-speed industrial bus relay network. The method includes: obtaining a first relay message, extracting the main network sending time corresponding to the first relay message sending, and determining the relay network extraction time corresponding to the main network sending time; when the first relay message is interpreted, determining the relay network interpretation time; obtaining a second relay message, and extracting the first relay message sending processing time determined by the target main transmission node; determining the first relay message interpretation processing time according to the first relay message receiving time and the relay network extraction time obtained by detection; determining the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time and the first relay message interpretation processing time, and performing clock synchronization. The method can realize clock synchronization in a high-speed industrial bus relay network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial control and communication technology, and in particular to a clock synchronization method, network and equipment in a high-speed industrial bus relay network. Background Art

[0002] The high-speed industrial bus (AUTBUS) is a two-wire non-bridged medium with multi-node, high-bandwidth, and time-sensitive industrial fieldbus. However, the transmission distance of the high-speed industrial bus for data transmission is still limited. In addition, the high-speed industrial bus is a network with synchronized clock frequency within the network. The clock synchronization problem of the high-speed industrial bus has always been a research hotspot.

[0003] The object of the present invention is to provide a method for improving the long-distance data transmission of a high-speed industrial bus network and ensuring clock synchronization within the network. Summary of the invention

[0004] The present invention provides a clock synchronization method, network and equipment in a high-speed industrial bus relay network, so as to realize clock synchronization in the high-speed industrial bus relay network.

[0005] According to one aspect of the present invention, a clock synchronization method in a high-speed industrial bus relay network is provided, which is applied to the high-speed industrial bus relay network, wherein the high-speed industrial bus relay network includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node; the method is executed by the second master control node in the high-speed industrial bus relay network, and includes:

[0006] Obtaining a first relay message sent by the target primary transmission node, extracting a primary network sending time corresponding to the sending of the first relay message from the first relay message, and determining a relay network extraction time corresponding to the extraction of the primary network sending time;

[0007] When the first relay message is interpreted, determining the relay network interpretation time;

[0008] Acquire a second relay message sent by the target main transmission node, and extract, from the second relay message, a first relay message sending processing duration determined by the target main transmission node;

[0009] Determine the first relay message interpretation processing time according to the first relay message reception time obtained by detection and the relay network extraction time;

[0010] According to the sending time of the main network, the interpretation time of the relay network, the sending processing time of the first relay message, and the interpretation processing time of the first relay message, the relay network time difference between the relay network and the main network is determined, and clock synchronization is performed according to the relay network time difference.

[0011] According to another aspect of the present invention, a clock synchronization method in a high-speed industrial bus relay network is provided, which is applied to the high-speed industrial bus relay network, wherein the high-speed industrial bus relay network includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node; the method is executed by the target main transmission node in the high-speed industrial bus relay network, and includes:

[0012] When sending the first relay message to the second master control node, determine the primary network sending time and the first relay message preparation time corresponding to the primary network sending time;

[0013] Encapsulate the primary network sending time into the first relay message, and send the first relay message to the second master control node;

[0014] Determine the first relay message sending processing duration according to the detected first relay message sending time and the first relay message preparation time;

[0015] The first relay message sending processing duration is encapsulated into a second relay message, and the second relay message is sent to a second master control node so that the second master control node performs clock synchronization.

[0016] According to another aspect of the present invention, a clock synchronization device in a high-speed industrial bus relay network is provided, which is applied to the high-speed industrial bus relay network, wherein the high-speed industrial bus relay network includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node; the clock synchronization device is executed by the second master control node in the high-speed industrial bus relay network, and the device includes:

[0017] A relay network extraction time determination module, used to obtain a first relay message sent by the target main transmission node, extract the main network sending time corresponding to the sending of the first relay message from the first relay message, and determine the relay network extraction time corresponding to the main network sending time;

[0018] A relay network interpretation time determination module, used to determine the relay network interpretation time when the interpretation of the first relay message is completed;

[0019] A first relay message sending processing time length determination module, used to obtain a second relay message sent by the target main transmission node, and extract the first relay message sending processing time length determined by the target main transmission node from the second relay message;

[0020] A first relay message interpretation processing time determination module, used to determine the first relay message interpretation processing time according to the first relay message reception time obtained by detection and the relay network extraction time;

[0021] A clock synchronization module is used to determine the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, and perform clock synchronization according to the relay network time difference.

[0022] According to another aspect of the present invention, a clock synchronization device in a high-speed industrial bus relay network is provided, which is applied to the high-speed industrial bus relay network, wherein the high-speed industrial bus relay network includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node; the device is executed by the target main transmission node in the high-speed industrial bus relay network, and includes:

[0023] A first relay message preparation time determination module, used to determine the primary network sending time and the first relay message preparation time corresponding to the primary network sending time when sending the first relay message to the second master control node;

[0024] A first relay message sending module, configured to encapsulate the primary network sending time into the first relay message, and send the first relay message to the second master control node;

[0025] A first relay message sending processing duration determining module, configured to determine the first relay message sending processing duration according to the detected first relay message sending time and the first relay message preparation time;

[0026] The second relay message sending module is used to encapsulate the first relay message sending processing time into a second relay message, and send the second relay message to a second master control node to synchronize the clock of the second master control node.

[0027] According to another aspect of the present invention, a high-speed industrial bus relay network is provided, the high-speed industrial bus relay network comprising a main network and a relay network; the main network comprises a first master control node and at least one main transmission node; the relay network comprises a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, the target main transmission node is any main transmission node, wherein:

[0028] The target main transmission node is used to determine the main network sending time and the first relay message preparation time corresponding to the main network sending time when sending the first relay message to the second master control node; encapsulate the main network sending time into the first relay message, and send the first relay message to the second master control node;

[0029] The second master control node is used to obtain the first relay message sent by the target main transmission node, extract the primary network sending time corresponding to the sending of the first relay message from the first relay message, and determine the relay network extraction time corresponding to the primary network sending time; when the interpretation of the first relay message is completed, determine the relay network interpretation time;

[0030] The target main transmission node is used to determine the first relay message sending processing time according to the detected first relay message sending time and the first relay message preparation time; encapsulate the first relay message sending processing time into a second relay message, and send the second relay message to the second master control node;

[0031] The second main control node is used to obtain the second relay message sent by the target main transmission node, and extract the first relay message sending processing duration determined by the target main transmission node from the second relay message; determine the first relay message interpretation processing duration according to the detected first relay message receiving time and the relay network extraction time; determine the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing duration, and the first relay message interpretation processing duration, and perform clock synchronization according to the relay network time difference.

[0032] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0033] at least one processor; and

[0034] a memory communicatively connected to the at least one processor; wherein,

[0035] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the clock synchronization method in the high-speed industrial bus relay network described in any embodiment of the present invention.

[0036] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the clock synchronization method in a high-speed industrial bus relay network described in any embodiment of the present invention when executed.

[0037] The technical solution of the embodiment of the present invention provides a high-speed industrial bus relay network, which can enable the remote relay network to communicate through the main transmission node in the main network and the second main control node in the relay network, thereby improving the long-distance transmission of high-speed industrial bus network data; and, in the high-speed industrial bus relay network, the clock synchronization of the main network and the relay network in the high-speed industrial bus relay network can be achieved through the clock synchronization of the target main transmission node and the second main control node; specifically, when the target main transmission node and the second main control node perform clock synchronization, the execution time of the relay message is considered, that is, the first relay message interpretation processing time and the first relay message sending processing time, which can avoid the impact of message execution on the accuracy of clock synchronization. In summary, the technical solution of the embodiment of the present invention solves the clock synchronization problem in the high-speed industrial bus relay network, and realizes that the message execution time is considered when performing clock synchronization, thereby improving the accuracy of clock synchronization.

[0038] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1a is a flowchart of a clock synchronization method provided according to Embodiment 1 of the present invention;

[0041] Figure 1b This is a schematic diagram of the structure of a high-speed industrial bus relay network provided according to Embodiment 1 of the present invention;

[0042] Figure 2ais a flowchart of a clock synchronization method provided according to Embodiment 2 of the present invention;

[0043] Figure 2b This is a schematic diagram of a master network clock synchronization structure provided according to Embodiment 2 of the present invention;

[0044] Figure 2c is a schematic diagram of an OFDM symbol provided according to Embodiment 2 of the present invention;

[0045] Figure 3 This is a schematic diagram of the structure of a high-speed industrial bus relay network clock synchronization provided according to Embodiment 3 of the present invention;

[0046] Figure 4 is a structural diagram of a clock synchronization device provided by Embodiment 4 of the present invention;

[0047] Figure 5 is a structural diagram of a clock synchronization device provided by Embodiment 5 of the present invention;

[0048] Figure 6 It is a structural schematic diagram of an electronic device for implementing the clock synchronization method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0051] Embodiment 1

[0052] Figure 1aThis is a flowchart of a clock synchronization method provided according to the first embodiment of the present invention. This embodiment is applicable to the situation where a high-speed industrial bus relay network performs clock synchronization between a main network and a relay network. The method can be executed by a clock synchronization device in a high-speed industrial bus relay network. The clock synchronization device in the high-speed industrial bus relay network can be implemented in the form of hardware and / or software. The clock synchronization device in the high-speed industrial bus relay network can be configured in an electronic device. Specifically, Figure 1b 1 is a schematic diagram of a high-speed industrial bus relay network provided according to the first embodiment of the present invention. The clock synchronization method can be applied to Figure 1b The high-speed industrial bus relay network 1100 shown in the figure includes a main network 1200 and a relay network 1300; the main network 1200 includes a first master control node 1210 and at least one main transmission node 1220; the relay network 1300 includes a second master control node 1310 and at least one relay transmission node 1320; the second master control node 1310 is connected to a target main transmission node 1230, and the target main transmission node 1230 is any main transmission node; the method is executed by the second master control node 1310 in the high-speed industrial bus relay network 1100. Figure 1a As shown, the method includes:

[0053] Step 110: obtain a first relay message sent by a target main transmission node, extract a primary network sending time corresponding to the sending of the first relay message from the first relay message, and determine a relay network extraction time corresponding to the extracted primary network sending time.

[0054] Among them, the first relay message can be understood as a message sent by the main network to the relay network through the target main transmission node when the relay network is pre-synchronized with the main network. The first relay message can be a message sent periodically, and its period is configurable, so as to ensure that the clock in the high-speed industrial bus relay network remains synchronized continuously. Specifically, the clock frequency difference between the main network and the relay network can be considered when configuring the period. For example, the larger the clock frequency difference, the shorter the sending period of the configured first relay message can be.

[0055] In the first relay network, the primary network sending time (T 主网TN_read ). 主网TN_read The system time of the main network transmission node (TN) read when the target main transmission node starts to send the first relay message. Relay network extraction time (T 中继RX_mac ) is the second master control node to interpret the first relay message and extract T 主网TN_read The time of reading. 中继RX_mac It can be the system time of the second master control node of the relay network, or it can be the time represented by an agreed counter.

[0056] Specifically, the connection mode between the second master control node and the target main transmission node in the high-speed industrial bus relay network can be directly connected through high-speed input and output pins (I / O PIN pins), which can improve the data transmission speed. The relay message transmitted between the second master control node and the target main transmission node can be a MAC message.

[0057] Step 120: When the first relay message is interpreted, determine the relay network interpretation time.

[0058] Among them, the relay network interpretation time (T 中继CN_read ) is the system time of the second master control node in the relay network read when the second master control node finishes interpreting the first relay message.

[0059] Step 130: Obtain a second relay message sent by the target main transmission node, and extract the first relay message sending processing duration determined by the target main transmission node from the second relay message.

[0060] The second relay message can be understood as a message sent by the primary network to the relay network through the target primary transmission node for assisting clock synchronization. The sending period of the second relay message can be consistent with the first message. The second relay message can carry the first relay message sending processing time (T processTN ), so that the time required for message processing can be taken into account during clock synchronization, making clock synchronization more accurate.

[0061] T processTN It can be understood as the first relay message preparation time, that is, the message sending processing time. Specifically, T processTN It can be determined in a number of ways. For example, T processTN It can be a preset value. In order to improve the determined T processTN To improve the accuracy, a hardware circuit implementation method can be used to package and send the first relay message, and the sending processing time can be more accurately estimated through the hardware execution time.

[0062] In addition, the target master transmission node can also determine T in the following way: processTN : When sending the first relay message to the second master control node, determine the main network sending time and the first relay message preparation time corresponding to the main network sending time; encapsulate the main network sending time into the first relay message, and send the first relay message to the second master control node; determine the first relay message sending processing time based on the detected first relay message sending time and the first relay message preparation time.

[0063] Among them, the main network sends the time (T 主网TN_read) is the system time of the target main transmission node in the main network read when the target main transmission node starts to send the first relay message. The first relay message preparation time (T 主网TX_mac ) is the time when the target main transmission node starts to prepare to send the first relay message, triggering the reading of the system time T 主网TN_read moment. 主网TX_mac It can be expressed in system time or in other agreed time counters. The first relay message sending time (T 主网TX_out ) is the time when the first relay message sent by the target main transmission node leaves. 主网TX_out It can be expressed by system time or other agreed time counters. processTN It can be T 主网TX_out With T 主网TX_mac The difference.

[0064] Step 140: Determine the first relay message interpretation processing time according to the first relay message reception time obtained by detection and the relay network extraction time.

[0065] Among them, the first relay message receiving time (T 中继RX_in ) is the time when the second master control node of the relay network detects that the received message is the first relay message. 中继RX_in It can be represented by system time or other agreed time counter. First relay message interpretation processing time (T processCN ) can be T 中继RX_mac With T 中继RX_in The difference.

[0066] Specifically, the reception and analysis of the first relay message can be performed by hardware circuit implementation, and the hardware execution time can be used to determine T processCN .

[0067] In addition, in an optional implementation of an embodiment of the present invention, the first relay message interpretation and processing time is determined based on the detected first relay message reception time and the relay network extraction time, including: when it is detected through the physical layer that the first relay message is received, the first relay message reception time in the relay network is determined; and the difference between the relay network extraction time and the first relay message reception time is used as the first relay message interpretation and processing time.

[0068] Among them, T 中继RX_in Specifically, it is the moment when the physical layer of the second master control node of the relay network detects that the received message is the first relay message.

[0069] Step 150: determine the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, and perform clock synchronization according to the relay network time difference.

[0070] In an optional implementation of an embodiment of the present invention, the relay network time difference between the relay network and the main network is determined according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, including: taking the sum of the main network sending time and the first relay message sending processing time as the main network target sending time; taking the difference between the relay network interpretation time and the first relay message interpretation processing time as the relay network target receiving time; taking the difference between the relay network target receiving time and the main network target sending time as the relay network time difference between the relay network and the main network.

[0071] Specifically, the relay network time difference can be determined by the following formula: ΔT = T 中继CN -T 主网TN =(T 中继CN_read -T processCN )-(T 主网TN_read +T processTN ). Among them, ΔT is the relay network time difference, T 中继CN is the target receiving time of the relay network, T 主网TN Send time for primary network target.

[0072] Performing clock synchronization according to the relay network time difference may be that the second master control node corrects the system time according to ΔT.

[0073] The technical solution of this embodiment is to obtain the first relay message sent by the target main transmission node, extract the main network sending time corresponding to the first relay message in the first relay message, and determine the relay network extraction time corresponding to the extracted main network sending time; when the first relay message is interpreted, determine the relay network interpretation time; obtain the second relay message sent by the target main transmission node, and extract the first relay message sending processing time determined by the target main transmission node in the second relay message; determine the first relay message interpretation processing time according to the detected first relay message receiving time and the relay network extraction time; determine the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, and perform clock synchronization according to the relay network time difference, thereby solving the clock synchronization problem in the high-speed industrial bus relay network, and realizing that the message execution time is considered when performing clock synchronization in the high-speed industrial bus relay network, thereby improving the accuracy of clock synchronization.

[0074] Embodiment 2

[0075] Figure 2a 1 is a flow chart of a clock synchronization method provided according to Embodiment 2 of the present invention. The technical solution in this embodiment can be combined with each optional solution in one or more of the above embodiments. Specifically, the clock synchronization method can be applied to Figure 1b The high-speed industrial bus relay network shown in the figure can be executed by a target main transmission node in the high-speed industrial bus relay network. Figure 2a As shown, the method includes:

[0076] Step 210: When sending the first relay message to the second master control node, determine the primary network sending time and the first relay message preparation time corresponding to the primary network sending time.

[0077] Step 220: Encapsulate the primary network sending time into a first relay message, and send the first relay message to the second master control node.

[0078] Step 230: Determine the first relay message sending processing duration according to the first relay message sending time and the first relay message preparation time obtained by detection.

[0079] Among them, the first relay message can be packaged and sent by hardware circuit implementation, and T can be estimated more accurately by hardware execution time. processTN .

[0080] In an optional implementation of an embodiment of the present invention, the first relay message sending processing duration is determined based on the detected first relay message sending time and the first relay message preparation time, including: when it is detected through the physical layer that the first relay message is sent, the first relay message sending time in the main network is determined; and the difference between the first relay message sending time and the first relay message preparation time is used as the first relay message sending processing duration.

[0081] Specifically, T 主网TX_out The time when the first relay message sent by the target primary transmission node leaves the physical layer.

[0082] Step 240: Encapsulate the first relay message sending processing time into a second relay message, and send the second relay message to the second master control node to synchronize the clock of the second master control node.

[0083] On the basis of the above implementation, optionally, before sending the first relay message to the second master control node, determining the main network sending time and the first relay message preparation time corresponding to the main network sending time, it also includes: obtaining the time mapping relationship sent by the first master control node, wherein the time mapping relationship is composed of the correspondence between the identification information of the first target sending symbol and the first target symbol sending time; when the second target sending symbol sent by the first master control node is obtained, determining the second target symbol sending time of the second target sending symbol according to the sequence relationship between the second target sending symbol and the first target sending symbol, and the time mapping relationship; performing clock synchronization according to the second target symbol sending time and the target main transmission node time corresponding to the second target symbol sending time when the second target symbol sending time is determined.

[0084] The first master control node may support the Precision Time Protocol (PTP). Figure 2b 1 is a schematic diagram of a master network clock synchronization structure provided according to Embodiment 2 of the present invention. Figure 2b As shown, the first master control node can obtain accurate time from the external network. For example, the first master control node can obtain accurate timing from the Global Navigation Satellite System (GNSS) system or the PTP master (Master PTP). When the first master control node obtains the accurate timing, it can be broadcast to each main transmission node. Each main transmission node can synchronize the clock in the main network through the following clock synchronization method. The following takes the target main transmission node as an example to illustrate the clock synchronization in the main network. The target main transmission node can be any main transmission node.

[0085] Exemplarily, the first master control node may send a time mapping relationship to the target master transmission node. The time mapping relationship is a correspondence between identification information of the first target transmission symbol and the first target symbol transmission time. The target transmission symbol may be an orthogonal frequency division multiplexing (OFDM) symbol. Figure 2c FIG. 1 is a schematic diagram of an OFDM symbol provided according to Embodiment 2 of the present invention. Figure 2c As shown, the sequence relationship of OFDM symbols is fixed. In the time mapping relationship, the identification information of the first target transmission symbol can be understood as the sequence number of the current transmission symbol; the first target symbol transmission time can be understood as the transmission time corresponding to the current transmission symbol. For example, the time mapping relationship can be understood as the first master control node broadcasting the A symbol to the main transmission node at time X. When the target main transmission node receives the second target transmission symbol, it can perform clock synchronization according to the corresponding information of the symbol.

[0086] Specifically, the target main transmission node knows the sequence relationship of OFDM symbols. For example, when the target main transmission node receives the B symbol, it can determine the number of symbols between the B symbol and the A symbol according to the sequence relationship of the OFDM symbol. In the OFDM symbol, the time of each symbol is fixed. Therefore, the target main transmission node can infer the sending time of the B symbol, such as the Y time, based on the time mapping relationship between the A symbol and the X time, and the sequence relationship between the B symbol and the A symbol.

[0087] Furthermore, the target main transmission node can compensate and correct the target main transmission node time according to time Y, thereby realizing clock synchronization in the main network, and achieving clock synchronization in the main network using OFDM communication access technology. At the same time, in the main network, only the first master control node needs to support the PTP protocol to achieve clock synchronization, which can avoid the need for all nodes to support the PTP protocol, thereby reducing signaling interactions and helping to improve data throughput.

[0088] In an optional implementation of an embodiment of the present invention, clock synchronization is performed according to the second target symbol sending time and the target main transmission node time corresponding to the second target symbol sending time, including: sending an access symbol to the first main control node, and obtaining the path delay fed back by the first main control node based on the access symbol; clock synchronization is performed according to the path delay, the second target symbol sending time and the target main transmission node time.

[0089] Among them, Figure 2c As shown, there is a random access symbol in the OFDM symbol. The first master control node knows the starting point of the OFDM symbol, that is, it knows the random access symbol. Specifically, the first master control node knows the sending time of the access symbol sent by the target main transmission node. However, there is a path delay between the sending time of the access symbol known to the first master control node and the actual sending time. The first master control node can determine the path delay based on the actual receiving time of the access symbol and the known sending time. Specifically, the path delay is half of the difference between the actual receiving time and the known sending time. That is, the difference between the actual receiving time and the known sending time is twice the path delay.

[0090] Furthermore, the target main transmission node can perform clock synchronization according to the path delay, the second target symbol sending time and the target main transmission node time. accurate Compensate and correct the target main transmission node time to achieve clock synchronization within the main network. accurate =T deduce +T path_delay ; T deduceThe second target symbol sending time is inferred according to the second target symbol sequence number and the time mapping relationship generated by the identification information of the first target symbol sent and the first target symbol sending time broadcast by the first master control node; T path_delay T is the path delay broadcast by the first master control node; accurate It is the precise second target symbol sending time after final compensation.

[0091] Specifically, each main transmission node can locally save the path delay when transmitting data to the first main control node, so that the path delay can be directly obtained during subsequent clock synchronization without interacting with the first main control node, which can improve the speed of clock synchronization.

[0092] Based on the above implementation, optionally, in a high-speed industrial bus relay network, after the second master control node updates the system time, the second master control node can simultaneously broadcast the updated system time to each relay transmission node so that each relay transmission node can synchronize the clock within the relay network.

[0093] The clock synchronization between the second master control node and the relay transmission node is similar to the clock synchronization between the first master control node and the main transmission node.

[0094] Specifically, the second master control node can use the clock synchronization time as the precise timing to send a target time mapping relationship to each relay transmission node, where the target time mapping relationship is composed of the corresponding relationship between the identification information of the third target transmission symbol and the third target symbol transmission time. When each relay transmission node obtains the fourth target transmission symbol sent by the second master control node, it determines the fourth target symbol transmission time of the fourth target transmission symbol based on the sequence relationship between the fourth target transmission symbol and the third target transmission symbol, as well as the target time mapping relationship; and performs clock synchronization based on the fourth target symbol transmission time and the target relay transmission node time corresponding to the fourth target symbol transmission time when determining the fourth target symbol transmission time.

[0095] Clock synchronization is performed according to the fourth target symbol sending time and the target relay transmission node time corresponding to the fourth target symbol sending time, including: sending an access symbol to the second master control node, and obtaining the relay path delay fed back by the second master control node based on the access symbol; clock synchronization is performed according to the relay path delay, the fourth target symbol sending time and the target relay transmission node time.

[0096] Specifically, each relay transmission node can locally save the relay path delay when transmitting data to the second master control node, so that the relay path delay can be directly obtained during subsequent clock synchronization without interacting with the second master control node, thereby improving the speed of clock synchronization.

[0097] The technical solution of the embodiment of the present invention is to determine the main network sending time and the first relay message preparation time corresponding to the main network sending time when sending the first relay message to the second main control node; encapsulate the main network sending time into the first relay message, and send the first relay message to the second main control node; determine the first relay message sending processing time according to the detected first relay message sending time and the first relay message preparation time; encapsulate the first relay message sending processing time into the second relay message, and send the second relay message to the second main control node, so that the second main control node performs clock synchronization, thereby solving the clock synchronization problem in the high-speed industrial bus relay network, and realizing that the message execution time is considered when performing clock synchronization in the high-speed industrial bus relay network, thereby improving the accuracy of clock synchronization.

[0098] In addition, while performing clock synchronization within the high-speed industrial bus relay network, it also provides clock synchronization within the main network and the relay network within the high-speed industrial bus relay network, so that the entire network can achieve clock synchronization. When performing clock synchronization within the main network and the relay network, the transmission path is taken into account, making the clock synchronization more accurate.

[0099] Embodiment 3

[0100] Figure 3 1 is a schematic diagram of a high-speed industrial bus relay network clock synchronization structure provided according to the third embodiment of the present invention. Figure 3 As shown, the clock synchronization can be applied to high-speed industrial bus relay networks to achieve clock synchronization between the target main transmission node in the main network and the second master control node in the relay network; it can also achieve clock synchronization in the main network and clock synchronization in the relay network. Figure 3 As shown, the high-speed industrial bus relay network may include a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node. Wherein:

[0101] The target main transmission node is used to determine the main network sending time and the first relay message preparation time corresponding to the main network sending time when sending the first relay message to the second main control node; encapsulate the main network sending time into the first relay message, and send the first relay message to the second main control node;

[0102] The second master control node is used to obtain the first relay message sent by the target master transmission node, extract the main network sending time corresponding to the sending of the first relay message in the first relay message, and determine the relay network extraction time corresponding to the extracted main network sending time; when the first relay message is interpreted, determine the relay network interpretation time;

[0103] The target main transmission node is used to determine the first relay message sending processing time according to the detected first relay message sending time and the first relay message preparation time; encapsulate the first relay message sending processing time into the second relay message, and send the second relay message to the second master control node;

[0104] The second main control node is used to obtain the second relay message sent by the target main transmission node, and extract the first relay message sending processing time determined by the target main transmission node in the second relay message; determine the first relay message interpretation processing time according to the first relay message receiving time obtained by detection and the relay network extraction time; determine the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, and perform clock synchronization according to the relay network time difference.

[0105] In an optional implementation of an embodiment of the present invention, the second master control node is specifically used to determine the time when the first relay message is received in the relay network when it is detected through the physical layer that the first relay message is received; and use the difference between the extraction time of the relay network and the reception time of the first relay message as the duration of the first relay message interpretation and processing.

[0106] In an optional implementation of the embodiment of the present invention, the second master control node is specifically used to use the sum of the main network sending time and the first relay message sending processing time as the main network target sending time; use the difference between the relay network interpretation time and the first relay message interpretation processing time as the relay network target receiving time; use the difference between the relay network target receiving time and the main network target sending time as the relay network time difference between the relay network and the main network.

[0107] In an optional implementation of an embodiment of the present invention, the target main transmission node is specifically used to determine the time when the first relay message is sent in the main network when it is detected through the physical layer that the first relay message is sent; and use the difference between the time when the first relay message is sent and the time when the first relay message is prepared as the processing duration for sending the first relay message.

[0108] In an optional implementation of an embodiment of the present invention, the target main transmission node is also used to obtain a time mapping relationship sent by the first main control node before determining the main network sending time and the first relay message preparation time corresponding to the main network sending time when sending the first relay message to the second main control node, wherein the time mapping relationship is composed of the correspondence between the identification information of the first target sending symbol and the first target symbol sending time; when the second target sending symbol sent by the first main control node is obtained, the second target symbol sending time of the second target sending symbol is determined according to the sequence relationship between the second target sending symbol and the first target sending symbol, and the time mapping relationship; clock synchronization is performed according to the second target symbol sending time and the target main transmission node time corresponding to the second target symbol sending time when the second target symbol sending time is determined.

[0109] In an optional implementation of an embodiment of the present invention, the target main transmission node is specifically used to send an access symbol to the first main control node, and obtain the path delay fed back by the first main control node based on the access symbol; clock synchronization is performed according to the path delay, the second target symbol sending time and the target main transmission node time.

[0110] Based on the above implementation, optionally, in a high-speed industrial bus relay network, after the second master control node updates the system time, the second master control node can simultaneously broadcast the updated system time to each relay transmission node so that each relay transmission node can synchronize the clock within the relay network.

[0111] The clock synchronization between the second master control node and the relay transmission node is similar to the clock synchronization between the first master control node and the main transmission node.

[0112] Specifically, the second master control node can use the clock synchronization time as the precise timing to send a target time mapping relationship to each relay transmission node, where the target time mapping relationship is composed of the corresponding relationship between the identification information of the third target transmission symbol and the third target symbol transmission time. When each relay transmission node obtains the fourth target transmission symbol sent by the second master control node, it determines the fourth target symbol transmission time of the fourth target transmission symbol based on the sequence relationship between the fourth target transmission symbol and the third target transmission symbol, as well as the target time mapping relationship; and performs clock synchronization based on the fourth target symbol transmission time and the target relay transmission node time corresponding to the fourth target symbol transmission time when determining the fourth target symbol transmission time.

[0113] Each relay transmission node is specifically used to: send an access symbol to the second master control node, and obtain the relay path delay fed back by the second master control node based on the access symbol; perform clock synchronization based on the relay path delay, the fourth target symbol sending time and the target relay transmission node time.

[0114] The technical solution of the embodiment of the present invention is to construct a high-speed industrial bus relay network including a main network and a relay network, wherein the main network includes a first main control node and at least one main transmission node; the relay network includes a second main control node and at least one relay transmission node; the second main control node is connected to a target main transmission node, and the target main transmission node is any main transmission node, and when sending a first relay message to the second main control node through the target main transmission node, the main network sending time and the first relay message preparation time corresponding to the main network sending time are determined; the main network sending time is encapsulated into the first relay message, and the first relay message is sent to the second main control node; the first relay message sent by the target main transmission node is obtained through the second main control node, the main network sending time corresponding to the first relay message is extracted from the first relay message, and the relay network extraction time corresponding to the extracted main network sending time is determined; when the first relay message is interpreted, the relay network interpretation time is determined moment; through the target main transmission node, according to the first relay message sending time obtained by detection and the first relay message preparation time, determine the first relay message sending processing time; encapsulate the first relay message sending processing time into the second relay message, and send the second relay message to the second main control node; through the second main control node, obtain the second relay message sent by the target main transmission node, and extract the first relay message sending processing time determined by the target main transmission node in the second relay message; according to the first relay message receiving time obtained by detection and the relay network extraction time, determine the first relay message interpretation processing time; according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, determine the relay network time difference between the relay network and the main network, and perform clock synchronization according to the relay network time difference, which solves the clock synchronization in the high-speed industrial bus relay network and achieves the effect of improving the accuracy of clock synchronization.

[0115] Embodiment 4

[0116] Figure 4 This is a schematic diagram of the structure of a clock synchronization device provided in the fourth embodiment of the present invention. The device is applied to a high-speed industrial bus relay network, which includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target master transmission node, which is any master transmission node; and is executed by the second master control node in the high-speed industrial bus relay network. Figure 4As shown, the clock synchronization device in the high-speed industrial bus relay network includes: a relay network extraction time determination module 410, a relay network interpretation time determination module 420, a first relay message sending processing time determination module 430, a first relay message interpretation processing time determination module 440, and a clock synchronization module 450. Among them:

[0117] The relay network extraction time determination module 410 is used to obtain the first relay message sent by the target main transmission node, extract the main network sending time corresponding to the sending of the first relay message from the first relay message, and determine the relay network extraction time corresponding to the extracted main network sending time;

[0118] The relay network interpretation time determination module 420 is used to determine the relay network interpretation time when the interpretation of the first relay message is completed;

[0119] The first relay message sending processing duration determining module 430 is used to obtain the second relay message sent by the target primary transmission node, and extract the first relay message sending processing duration determined by the target primary transmission node from the second relay message;

[0120] The first relay message interpretation processing time length determination module 440 is used to determine the first relay message interpretation processing time length according to the first relay message reception time obtained by detection and the relay network extraction time;

[0121] The clock synchronization module 450 is used to determine the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, and perform clock synchronization according to the relay network time difference.

[0122] Optionally, the first relay message interpretation processing time determination module 440 includes:

[0123] A first relay message reception time determination unit, configured to determine a first relay message reception time in the relay network when it is detected through the physical layer that the first relay message is received;

[0124] The first relay message interpretation processing time length determining unit is used to use the difference between the relay network extraction time and the first relay message reception time as the first relay message interpretation processing time length.

[0125] Optionally, the clock synchronization module 450 includes:

[0126] A main network target sending time determination unit, used to take the sum of the main network sending time and the first relay message sending processing time as the main network target sending time;

[0127] A relay network target reception time determination unit, configured to use the difference between the relay network interpretation time and the first relay message interpretation processing time as the relay network target reception time;

[0128] The relay network time difference determination unit is used to use the difference between the relay network target reception time and the main network target transmission time as the relay network time difference between the relay network and the main network.

[0129] The clock synchronization device in the high-speed industrial bus relay network provided by the embodiment of the present invention can execute the clock synchronization method in the high-speed industrial bus relay network provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0130] Embodiment 5

[0131] Figure 5 This is a structural diagram of a clock synchronization device provided in the fifth embodiment of the present invention. The clock synchronization device in the high-speed industrial bus relay network is applied to the high-speed industrial bus relay network, which includes a main network and a relay network; the main network includes a first master control node and at least one master transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target master transmission node, which is any master transmission node; and is executed by the target master transmission node in the high-speed industrial bus relay network. Figure 5 As shown, the clock synchronization device in the high-speed industrial bus relay network includes: a first relay message preparation time determination module 510, a first relay message sending module 520, a first relay message sending processing time determination module 530, and a second relay message sending module 540. Among them:

[0132] A first relay message preparation time determination module 510, configured to determine the primary network sending time and the first relay message preparation time corresponding to the primary network sending time when sending the first relay message to the second master control node;

[0133] A first relay message sending module 520, configured to encapsulate the primary network sending time into a first relay message, and send the first relay message to the second master control node;

[0134] A first relay message sending processing duration determining module 530, configured to determine the first relay message sending processing duration according to the first relay message sending time and the first relay message preparation time obtained by detection;

[0135] The second relay message sending module 540 is used to encapsulate the first relay message sending processing time into a second relay message, and send the second relay message to the second master control node to synchronize the clock of the second master control node.

[0136] Optionally, the first relay message sending processing duration determining module 530 includes:

[0137] A first relay message sending time determination unit, configured to determine a first relay message sending time in the primary network when detecting through the physical layer that the first relay message is sent;

[0138] The first relay message sending processing duration determining unit is used to use the difference between the first relay message sending time and the first relay message preparation time as the first relay message sending processing duration.

[0139] Optionally, the device further includes:

[0140] A time mapping relationship acquisition module is used to obtain the time mapping relationship sent by the first master control node before determining the primary network sending time and the first relay message preparation time corresponding to the primary network sending time when sending the first relay message to the second master control node, wherein the time mapping relationship is composed of the corresponding relationship between the identification information of the first target sending symbol and the first target symbol sending time;

[0141] A second target symbol sending time determination module, configured to determine a second target symbol sending time of the second target sending symbol according to a sequence relationship between the second target sending symbol and the first target sending symbol, and a time mapping relationship, when a second target sending symbol sent by the first master control node is acquired;

[0142] The clock synchronization module is used to perform clock synchronization according to the second target symbol sending time and the target main transmission node time corresponding to the second target symbol sending time.

[0143] Optional, clock synchronization module, including:

[0144] A path delay acquisition unit, configured to send an access symbol to the first master control node, and acquire a path delay fed back by the first master control node according to the access symbol;

[0145] The clock synchronization unit is used to perform clock synchronization according to the path delay, the second target symbol sending time and the target main transmission node time.

[0146] The clock synchronization device in the high-speed industrial bus relay network provided by the embodiment of the present invention can execute the clock synchronization method in the high-speed industrial bus relay network provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0147] Embodiment 6

[0148] Figure 6A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0149] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0150] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0151] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a clock synchronization method in a high-speed industrial bus relay network.

[0152] In some embodiments, the clock synchronization method in the high-speed industrial bus relay network can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the clock synchronization method in the high-speed industrial bus relay network described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the clock synchronization method in any other appropriate manner (for example, by means of firmware).

[0153] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0154] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0155] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0156] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0157] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0158] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0159] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0160] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A clock synchronization method in a high-speed industrial bus relay network, characterized in that: Applied to a high-speed industrial bus relay network, the high-speed industrial bus relay network includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node; The method is performed by a second master control node in a high-speed industrial bus relay network, and includes: Obtaining a first relay message sent by the target primary transmission node, extracting a primary network sending time corresponding to the sending of the first relay message from the first relay message, and determining a relay network extraction time corresponding to the extraction of the primary network sending time; When the first relay message is interpreted, determining the relay network interpretation time; Acquire a second relay message sent by the target main transmission node, and extract, from the second relay message, a first relay message sending processing duration determined by the target main transmission node; Determine the first relay message interpretation processing time according to the first relay message reception time obtained by detection and the relay network extraction time; Determine a relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, and perform clock synchronization according to the relay network time difference; Among them, the first relay message is a message for clock synchronization sent by the main network to the relay network through the target main transmission node, and the second relay message is a message for auxiliary clock synchronization sent by the main network to the relay network through the target main transmission node.

2. The method according to claim 1, characterized in that Determining the first relay message interpretation processing time according to the first relay message reception time obtained by detection and the relay network extraction time, including: When it is detected through the physical layer that the first relay message is received, determining a first relay message reception time in the relay network; The difference between the time when the relay network is extracted and the time when the first relay message is received is used as the duration of the first relay message interpretation processing.

3. The method according to claim 1, characterized in that: Determining the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, including: The sum of the primary network sending time and the first relay message sending processing time is used as the primary network target sending time; The difference between the relay network interpretation time and the first relay message interpretation processing time is used as the relay network target reception time; The difference between the target receiving time of the relay network and the target sending time of the main network is used as the relay network time difference between the relay network and the main network.

4. A clock synchronization method in a high-speed industrial bus relay network, characterized in that: Applied to a high-speed industrial bus relay network, the high-speed industrial bus relay network includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node; The method is performed by a target main transmission node in a high-speed industrial bus relay network, and includes: When sending the first relay message to the second master control node, determine the primary network sending time and the first relay message preparation time corresponding to the primary network sending time; Encapsulate the primary network sending time into the first relay message, and send the first relay message to the second master control node; Determine the first relay message sending processing duration according to the detected first relay message sending time and the first relay message preparation time; Encapsulating the first relay message sending processing duration into a second relay message, and sending the second relay message to a second master control node, so that the second master control node performs clock synchronization; Among them, the first relay message is a message for clock synchronization sent by the main network to the relay network through the target main transmission node, and the second relay message is a message for auxiliary clock synchronization sent by the main network to the relay network through the target main transmission node.

5. The method according to claim 4, characterized in that Determining a first relay message sending processing duration according to the detected first relay message sending time and the first relay message preparation time includes: When it is detected through the physical layer that the first relay message is sent, determining the time when the first relay message is sent in the primary network; The difference between the first relay message sending time and the first relay message preparation time is used as the first relay message sending processing duration.

6. The method according to any one of claims 4 to 5, characterized in that: When sending the first relay message to the second master control node, before determining the primary network sending time and determining the first relay message preparation time corresponding to the primary network sending time, it also includes: Acquire a time mapping relationship sent by the first master control node, wherein the time mapping relationship is formed by a correspondence between identification information of a first target sent symbol and a first target symbol sent time; When a second target sending symbol sent by the first master control node is acquired, determining a second target symbol sending time of the second target sending symbol according to a sequence relationship between the second target sending symbol and the first target sending symbol and the time mapping relationship; Clock synchronization is performed according to the second target symbol sending time and the target main transmission node time corresponding to the second target symbol sending time.

7. The method according to claim 6, characterized in that Performing clock synchronization according to the second target symbol sending time and the target main transmission node time corresponding to the second target symbol sending time, including: Sending an access symbol to the first master control node, and obtaining a path delay fed back by the first master control node according to the access symbol; Clock synchronization is performed according to the path delay, the second target symbol sending time and the target main transmission node time.

8. A high-speed industrial bus relay network, characterized in that: The high-speed industrial bus relay network includes a main network and a relay network; the main network includes a first master control node and at least one main transmission node; the relay network includes a second master control node and at least one relay transmission node; the second master control node is connected to a target main transmission node, and the target main transmission node is any main transmission node, wherein: The target main transmission node is used to determine the main network sending time and the first relay message preparation time corresponding to the main network sending time when sending the first relay message to the second master control node; encapsulate the main network sending time into the first relay message, and send the first relay message to the second master control node; The second master control node is used to obtain the first relay message sent by the target main transmission node, extract the primary network sending time corresponding to the sending of the first relay message from the first relay message, and determine the relay network extraction time corresponding to the primary network sending time; when the interpretation of the first relay message is completed, determine the relay network interpretation time; The target main transmission node is used to determine the first relay message sending processing time according to the detected first relay message sending time and the first relay message preparation time; encapsulate the first relay message sending processing time into a second relay message, and send the second relay message to the second master control node; The second master control node is used to obtain the second relay message sent by the target main transmission node, and extract the first relay message sending processing time determined by the target main transmission node from the second relay message; determine the first relay message interpretation processing time according to the detected first relay message reception time and the relay network extraction time; determine the relay network time difference between the relay network and the main network according to the main network sending time, the relay network interpretation time, the first relay message sending processing time, and the first relay message interpretation processing time, and perform clock synchronization according to the relay network time difference; Among them, the first relay message is a message for clock synchronization sent by the main network to the relay network through the target main transmission node, and the second relay message is a message for auxiliary clock synchronization sent by the main network to the relay network through the target main transmission node.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the clock synchronization method in the high-speed industrial bus relay network described in any one of claims 1-3 or 4-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the clock synchronization method in a high-speed industrial bus relay network according to any one of claims 1-3 or 4-7 when executed.