Time synchronization method, device and equipment, readable storage medium and program product

By using wireless devices in industrial networks to measure the dwell time of time synchronization frames, the problem of inaccurate time synchronization between devices in the converged network is solved, efficient and accurate time synchronization is achieved, and production efficiency and product quality are improved.

CN119449219APending Publication Date: 2025-02-14SHENZHEN INOVANCE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411672798.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In a converged network, real-time control requires high accuracy, but inaccurate time synchronization may lead to delays in control instructions or incorrect execution, affecting production efficiency and product quality.

Method used

By introducing a first wireless device and a second wireless device in an industrial network, the dwell time measurement is performed using the time synchronization frame between them, and the time synchronization frame is transmitted to the wired device based on the dwell time, the precise time between devices is achieved to achieve the synchronous.

Benefits of technology

This method can quickly and efficiently realize time synchronization between devices in the converged network, reduce time synchronization between wireless devices and wired devices, and improve time synchronization efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449219A_ABST
    Figure CN119449219A_ABST
Patent Text Reader

Abstract

The invention relates to a time synchronization method, device and equipment, a readable storage medium and a program product. The method comprises the following steps: a first wireless device in an industrial network receives a first time synchronization frame sent by a second wireless device in the industrial network, wherein the time of the first wireless device and the time of the second wireless device are synchronized; determining residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device; and according to the first time synchronization frame and the residence time, a second time synchronization frame is sent to the first wired device in the industrial network, and the second time synchronization frame is used for time synchronization of the first wired device. By adopting the method, accurate time synchronization among the devices in the converged network can be efficiently and quickly realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial network technology, and in particular to a time synchronization method, device, equipment, readable storage medium and program product. Background Art

[0002] As the industrial production environment becomes more complex, the traditional industrial network method of data transmission between industrial equipment and controllers based on wired networks can no longer meet actual needs. Therefore, it has become a trend to integrate wired and wireless networks to build a converged network architecture.

[0003] At present, the integration of wired network and wireless network is generally achieved through external wireless communication equipment to form a converged network. Wireless communication equipment can be divided into management station (MS) and terminal station (TS) in terms of function. The controller and management station are connected by wired cables, the industrial equipment and terminal station are connected by wired cables, and the management station and terminal station are connected by air interface.

[0004] In converged networks, real-time control requires increasingly higher precision. Inaccurate time synchronization may cause control command delays or erroneous execution, affecting production efficiency and product quality. Therefore, how to efficiently and quickly achieve accurate time synchronization between devices in a converged network has become an important issue. Summary of the invention

[0005] Based on this, it is necessary to provide a time synchronization method, apparatus, device, readable storage medium and program product that can efficiently and quickly achieve accurate time synchronization between devices in a converged network in response to the above technical problems.

[0006] In a first aspect, the present application provides a time synchronization method for a first wireless device in an industrial network, the method comprising:

[0007] Receiving a first time synchronization frame sent by a second wireless device in the industrial network, and time synchronization between the first wireless device and the second wireless device;

[0008] Determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0009] According to the first time synchronization frame and the residence time, a second time synchronization frame is sent to a first wired device in the industrial network, where the second time synchronization frame is used for time synchronization of the first wired device.

[0010] In one embodiment, sending a second time synchronization frame to a first wired device in the industrial network according to the first time synchronization frame and the dwell time includes:

[0011] Update the timestamp included in the first time synchronization frame according to the residence time to obtain the second time synchronization frame;

[0012] The second time synchronization frame is sent to the first wired device.

[0013] In one embodiment, determining the dwell time of the first time synchronization frame corresponding to the first wireless device and the second wireless device includes:

[0014] Acquire a reception time at which the second wireless device receives a third time synchronization frame, wherein the first time synchronization frame is acquired by the second wireless device according to the third time synchronization frame, or the first time synchronization frame is the third time synchronization frame;

[0015] A sending time at which the first wireless device sends the second time synchronization frame is determined, and a time difference between the sending time and the receiving time is determined as the dwell time.

[0016] In one embodiment, obtaining the reception time of the third time synchronization frame received by the second wireless device includes:

[0017] The receiving time is obtained by parsing the first time synchronization frame, where the first time synchronization frame is obtained by the second wireless device adding the receiving time to the third time synchronization frame; or,

[0018] The receiving time sent by the second wireless device is received, and the first time synchronization frame is the third time synchronization frame.

[0019] In one of the embodiments, before receiving the first time synchronization frame sent by the second wireless device in the industrial network, the method further includes:

[0020] Time synchronization is performed with the second wireless device.

[0021] In a second aspect, the present application provides a time synchronization method for a second wireless device in an industrial network, the method comprising:

[0022] Receiving a third time synchronization frame sent by a second wired device in the industrial network;

[0023] Sending a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame;

[0024] Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

[0025] In one embodiment, sending a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame includes:

[0026] adding the receiving time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and sending the first time synchronization frame to the first wireless device; or,

[0027] The receiving time is sent to the first wireless device, and the third time synchronization frame is sent to the first wireless device as the first time synchronization frame.

[0028] In one embodiment, the method further comprises:

[0029] Time synchronization is performed with the second wired device according to the third time synchronization frame.

[0030] In one embodiment, the method further comprises:

[0031] Time synchronization is performed with the first wireless device.

[0032] In a third aspect, the present application provides a time synchronization method for a first wired device in an industrial network, the method comprising:

[0033] Receiving a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0034] Time synchronization is performed with a master clock device in the industrial network according to the second time synchronization frame.

[0035] In a fourth aspect, the present application provides a time synchronization device for a first wireless device in an industrial network, the device comprising:

[0036] A receiving module, configured to receive a first time synchronization frame sent by a second wireless device in the industrial network, and time synchronization between the first wireless device and the second wireless device;

[0037] A determination module, configured to determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0038] The sending module is used to send a second time synchronization frame to a first wired device in the industrial network according to the first time synchronization frame and the residence time, wherein the second time synchronization frame is used for time synchronization of the first wired device.

[0039] In a fifth aspect, the present application provides a time synchronization device for a second wireless device in an industrial network, the device comprising:

[0040] A receiving module, configured to receive a third time synchronization frame sent by a second wired device in the industrial network;

[0041] A sending module, configured to send a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame;

[0042] Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

[0043] In a sixth aspect, the present application provides a time synchronization device for a first wired device in an industrial network, the device comprising:

[0044] A receiving module, configured to receive a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0045] A synchronization module is used to perform time synchronization with a master clock device in the industrial network according to the second time synchronization frame.

[0046] In a seventh aspect, the present application provides a wireless device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect or the second aspect are implemented.

[0047] In an eighth aspect, the present application provides a wired device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the third aspect are implemented.

[0048] In a ninth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect, the second aspect or the third aspect above are implemented.

[0049] In a tenth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect, the second aspect or the third aspect above.

[0050] The above-mentioned time synchronization method, apparatus, device, readable storage medium and program product receive a first time synchronization frame sent by a second wireless device through a first wireless device in an industrial network, and the time of the first wireless device and the second wireless device is synchronized. Then, the first wireless device determines the residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device, and then sends a second time synchronization frame to the first wired device according to the first time synchronization frame and the residence time, so that the first wired device performs time synchronization. In this way, the first wireless device and the second wireless device are used as virtual bridge devices (the first wireless device can be, for example, an MS, and the second wireless device can be, for example, a TS, or the first wireless device can be, for example, a TS, and the second wireless device can be, for example, a TS For example, MS, etc.), the time synchronization has been completed in advance inside the virtual bridging device (that is, the first wireless device and the second wireless device have completed the time synchronization in advance), the virtual bridging device can measure the residence time of the time synchronization frame in the wireless transmission link, and transmit the second time synchronization frame downward based on the residence time, quickly complete the time synchronization of the wired device and the wireless device, decouple the synchronization process of the wired device and the synchronization process of the wireless device, thereby reducing the time consumption of time synchronization between the wireless device and the wired device, improving the time synchronization efficiency of the converged network, and measuring the residence time of the time synchronization frame in the wireless transmission link by the virtual bridging device, the residence time can be taken into account in the synchronization process of the wired device, thereby improving the synchronization accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0052] FIG1 is a schematic diagram of a network topology of a wired network in an industrial network;

[0053] FIG2 is a schematic diagram of a network topology of a wired and wireless integrated network in an industrial network;

[0054] FIG3 is a schematic diagram of a flow chart of a time synchronization method in one embodiment;

[0055] FIG4 is a schematic diagram of a flow chart of step 303 in another embodiment;

[0056] FIG5 is a schematic diagram of an exemplary frame structure of a first time synchronization frame in another embodiment;

[0057] FIG6 is a schematic diagram of a flow chart of step 302 in another embodiment;

[0058] FIG7 is a schematic diagram of exemplary timestamp positions of receiving time and sending time in another embodiment;

[0059] FIG8 is a schematic flow chart of a time synchronization method in another embodiment;

[0060] FIG9 is a schematic flow chart of a time synchronization method in another embodiment;

[0061] FIG10 is a schematic flow chart of a time synchronization method in another embodiment;

[0062] FIG11 is a schematic diagram of a network topology of an industrial network in another embodiment;

[0063] FIG12 is a block diagram of a time synchronization device according to an embodiment;

[0064] FIG13 is a block diagram of a time synchronization device in another embodiment;

[0065] FIG14 is a block diagram of a time synchronization device in another embodiment;

[0066] FIG. 15 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0068] Wireless communication equipment can be functionally divided into management stations (MS) and terminal stations (TS). MS is mainly responsible for providing wireless access services and managing wireless resources, while TS sends and receives data according to the scheduling instructions of MS. The controller and management station are connected by wired cables, the industrial equipment and terminal stations are connected by wired cables, and the management station and terminal stations are connected by air interfaces.

[0069] For example, referring to FIG. 1 and FIG. 2, FIG. 1 is a schematic diagram of the network topology of a wired network in an industrial network, and the traditional wired network in FIG. 1 forms a linear network topology. FIG. 2 is a schematic diagram of the network topology of a converged network in which wired and wireless networks are integrated in an industrial network, and multiple TSs and MSs in the converged network shown in FIG. 2 form a star network topology. In the converged network, MSs and TSs transparently transmit industrial Ethernet data (referred to as transparent transmission) without modifying the industrial Ethernet data.

[0070] In a converged network, real-time control requires increasingly higher precision, and inaccurate time synchronization may cause control instruction delays or erroneous execution, affecting production efficiency and product quality. In view of this, the embodiments of the present application provide a time synchronization method, apparatus, device, readable storage medium, and program product, which can efficiently and quickly achieve accurate time synchronization between devices in a converged network.

[0071] The data transmission method provided in the embodiment of the present application can be applied to the implementation environment shown in Figure 2. Among them, the controller and the MS are connected by a wired cable, and the controller and the MS can communicate by wire, the industrial equipment (industrial equipment 1 to industrial equipment n as shown in Figure 2, n is a positive integer greater than 1) and the corresponding TS (TS1 to TSn as shown in Figure 2) are connected by a wired cable, and the industrial equipment and the TS can communicate by wire, and the MS and the TS communicate wirelessly through the air interface.

[0072] Below, in conjunction with the drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0073] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0074] In an exemplary embodiment, as shown in FIG. 3 , a time synchronization method is provided, which is described by taking the method applied to a first wireless device in an industrial network as an example. The first wireless device may be the MS in FIG. 2 or the TS in FIG. 2 .

[0075] The time synchronization method includes the following steps 301 to 303:

[0076] Step 301: A first wireless device receives a first time synchronization frame sent by a second wireless device in an industrial network, and the time of the first wireless device is synchronized with the second wireless device.

[0077] In the embodiment of the present application, after the first wireless device and the second wireless device establish a communication connection, the first wireless device and the second wireless device can achieve time synchronization based on the wireless low layer. Taking the first wireless device as a TS and the second wireless device as an example, after the TS and the MS establish a communication connection, the TS and the MS can achieve time synchronization based on the wireless low layer, so that the TS is synchronized with the MS.

[0078] Industrial networks include multiple wired devices, such as controllers and various industrial devices. In the process of time synchronization, the controller can be used as the master clock node and the industrial devices as slave clock nodes. Of course, a certain industrial device can be selected as the master clock node through the master clock selection strategy, and the controller and other industrial devices can be used as slave clock nodes. The master clock node can send a time synchronization frame that carries the timestamp of the master clock node. After the time synchronization frame reaches each slave clock node, each slave clock node can perform time synchronization based on the received time synchronization frame.

[0079] In an embodiment of the present application, after the master clock node sends the time synchronization frame, the time synchronization frame arrives at the second wireless device (it can be understood that, when the master clock node is directly connected to the second wireless device, the master clock node directly sends the time synchronization frame to the second wireless device, and when the master clock node and the second wireless device are not directly connected, the time synchronization frame directly sent by the master clock node is updated and forwarded by the wired device between the master clock node and the second wireless device before arriving at the second wireless device), the second wireless device performs time synchronization with the upper-level wired device based on the received time synchronization frame, and after the second wireless device performs frame format conversion and other operations on the received time synchronization frame, it sends the first time synchronization frame to the first wireless device through the air interface.

[0080] Exemplarily, the first time synchronization frame carries the reception time of the second wireless device receiving the time synchronization frame. Exemplarily, the first wireless device sends the reception time and the first time synchronization frame separately to the second wireless device.

[0081] In the embodiment of the present application, it can be understood that, when the master clock node is a controller, after the controller sends a time synchronization frame, the second wireless device sends a first time synchronization frame to the first wireless device, then the second wireless device is an MS, and the first wireless device is a TS. When the master clock node is an industrial device (directly connected or indirectly connected) connected to a TS, after the industrial device sends a time synchronization frame, the second wireless device sends a first time synchronization frame to the first wireless device, then the second wireless device is a TS, and the first wireless device is an MS.

[0082] Step 302: The first wireless device determines a dwell time of a first time synchronization frame corresponding to the first wireless device and the second wireless device.

[0083] The first wireless device receives the first time synchronization frame, and the first wireless device can determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device. The residence time is the time interval between the time when the time synchronization frame (the time synchronization frame received by the second wireless device, the time synchronization frame sent by the first wireless device, and the first time synchronization frame received by the first wireless device, may have differences in time information, and therefore are collectively referred to as time synchronization frames here) enters the wired PHY (Physical Layer) interface of the second wireless device and the time when the time synchronization frame is sent from the wired PHY interface of the first wireless device, that is, the residence time of the time synchronization frame in the wireless transmission link (or forwarding delay).

[0084] Step 303: The first wireless device sends a second time synchronization frame to a first wired device in the industrial network according to the first time synchronization frame and the dwell time.

[0085] The second time synchronization frame is used for the first wired device to perform time synchronization.

[0086] After the first wireless device calculates the residence time, it sends a second time synchronization frame to the first wired device in the industrial network based on the first time synchronization frame and the residence time. The first wired device can be an industrial device or a controller directly connected to the first wireless device. It can be understood that when the first wireless device is a TS, the first wired device can be an industrial device. When the first wireless device is an MS, the first wired device can be a controller or an industrial device.

[0087] In a possible implementation of step 303, the first wireless device may use the first time synchronization frame as the second time synchronization frame, and send the second time synchronization frame and the above-mentioned residence time to the first wired device; in another possible implementation of step 303, the first wireless device may use the residence time to update the first time synchronization frame to obtain the second time synchronization frame.

[0088] That is, the first wireless device sends a second time synchronization frame according to the addressing rule to synchronize the wired device connected to the first wireless device, thereby completing the time synchronization between the wired network and the wireless network. In an embodiment of the present application, after the first wired device receives the second time synchronization frame sent by the first wireless device in the industrial network, the first wired device performs time synchronization with the master clock device in the industrial network according to the second time synchronization frame.

[0089] Exemplarily, the first wired device may send a link delay measurement frame to a neighboring node (such as the first wireless device) point-to-point, measure and obtain a link delay measurement value, and store it inside the first wired device.

[0090] Exemplarily, the first wired device can send a link delay measurement frame delay-req to the neighbor node at time T1, the neighbor node receives the link delay measurement frame delay-req at time T2, the neighbor node sends a link delay measurement response delay-rsp to the first wired device at time T3, and the first wired device receives the link delay measurement response delay-rsp at time T4, and the link delay measurement response delay-rsp carries the above-mentioned T2 and T3. In this way, the first wired device can calculate the link delay measurement value between the first wired device and the first wireless device based on T1-T4.

[0091] The first wired device performs time synchronization based on the timestamp included in the second time synchronization frame and the link delay measurement value obtained by the above measurement, and the first wired device updates the valid timestamp in the second time synchronization frame, and synchronizes the updated second time synchronization frame with subsequent wired devices in turn to perform time synchronization.

[0092] In an embodiment of the present application, the first wireless device and the second wireless device are used as virtual bridging devices (the first wireless device may be, for example, an MS, and the second wireless device may be, for example, a TS, or the first wireless device may be, for example, a TS, and the second wireless device may be, for example, an MS, etc.), and time synchronization has been completed in advance inside the virtual bridging device (that is, the first wireless device and the second wireless device have completed time synchronization in advance). The virtual bridging device can measure the residence time of the time synchronization frame in the wireless transmission link, and transmit the second time synchronization frame downward based on the residence time, so as to quickly complete the time synchronization of the wired device and the wireless device, decouple the synchronization process of the wired device and the synchronization process of the wireless device, thereby reducing the time consumption of time synchronization between the wireless device and the wired device, and improving the time synchronization efficiency of the converged network. Moreover, by measuring the residence time of the time synchronization frame in the wireless transmission link through the virtual bridging device, the residence time can be taken into account in the synchronization process of the wired device, thereby improving the synchronization accuracy.

[0093] In one embodiment, based on the embodiment shown in FIG3, referring to FIG4, this embodiment exemplarily introduces a process in which a first wireless device sends a second time synchronization frame to a first wired device in an industrial network according to a first time synchronization frame and a dwell time. As shown in FIG4, step 303 includes steps 401 and 402 shown in FIG4:

[0094] Step 401: A first wireless device updates a timestamp included in a first time synchronization frame according to a dwell time to obtain a second time synchronization frame.

[0095] In this embodiment, the first wireless device may add the dwell time to the timestamp included in the first time synchronization frame to obtain an updated timestamp, and then replace the original timestamp with the updated timestamp in the first time synchronization frame to obtain a second time synchronization frame.

[0096] For example, the first time synchronization frame includes a timestamp of 12:00, and the dwell time is 3 minutes. The first wireless device determines that the update timestamp is 12:03. The first wireless device modifies the timestamp to 12:03 in the first time synchronization frame, and obtains a second time synchronization frame.

[0097] For example, see Figure 5, which is a schematic diagram of a frame structure of a first time synchronization frame. The first time synchronization frame may include a message header, a synchronization data segment, and a check segment, wherein the synchronization data segment includes a timestamp. The first wireless device decapsulates the first time synchronization frame, removes wireless encapsulation such as a wireless frame header,

[0098] After the first wireless device adds the dwell time to the timestamp included in the first time synchronization frame to obtain an updated timestamp, it replaces the original timestamp with the updated timestamp in the synchronization data segment to obtain a second time synchronization frame.

[0099] Step 402: The first wireless device sends a second time synchronization frame to the first wired device.

[0100] The first wireless device sends a second time synchronization frame to the first wired device through the cable, that is, the first wireless device updates the residence time into the time synchronization frame. As the time synchronization frame message is sent down, the slave clock nodes connected to the first wireless device are synchronized in turn, thereby realizing the clock synchronization of the integrated wired network and the wireless network.

[0101] In one embodiment, based on the embodiment shown in FIG. 3 or FIG. 4 above, referring to FIG. 6, the following is an exemplary introduction to the process of the first wireless device determining the dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device. As shown in FIG. 6, step 302 may include steps 601 and 602 shown in FIG. 6, including:

[0102] Step 601: The first wireless device obtains the reception time of the third time synchronization frame received by the second wireless device.

[0103] The first time synchronization frame is acquired by the second wireless device according to the third time synchronization frame, or the first time synchronization frame is the third time synchronization frame.

[0104] During the time synchronization process, the second wireless device receives a third time synchronization frame sent by a second wired device in the industrial network. The second wired device may be a master clock node, or a slave clock node between the master clock node and the second wireless device.

[0105] The second wireless device performs time synchronization with the second wired device according to the third time synchronization frame, and the second wireless device sends a first time synchronization frame to the first wireless device in the industrial network according to the third time synchronization frame. Optionally, the second wireless device can add the reception time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and send the first time synchronization frame to the first wireless device. Optionally, the second wireless device sends the reception time to the first wireless device, and sends the third time synchronization frame as the first time synchronization frame to the first wireless device.

[0106] In this way, when the second wireless device can add the receiving time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, the first wireless device can parse the receiving time from the first time synchronization frame to obtain the receiving time when the second wireless device receives the third time synchronization frame; when the second wireless device sends the receiving time to the first wireless device and sends the third time synchronization frame as the first time synchronization frame to the first wireless device, the first wireless device can directly receive the receiving time sent by the second wireless device. It can be understood that, in this case, the first time synchronization frame is the third time synchronization frame.

[0107] Step 602: The first wireless device determines a sending time of a second time synchronization frame sent by the first wireless device, and determines a time difference between the sending time and the receiving time as a dwell time.

[0108] Exemplarily, see Figure 7, which is a schematic diagram of an exemplary position for timestamping the receiving time and the sending time. As shown in Figure 7, the second wireless device receives the third time synchronization frame, the second wireless device records the receiving timestamp information at the wired physical layer PHY interface, obtains the first time synchronization frame, and sends the first time synchronization frame to the first wireless device.

[0109] The first wireless device records the sending timestamp information at the wired physical layer PHY interface. At this time, the time difference between the sending time and the receiving time can be obtained, the residence time is obtained, and the calculation of the residence time is completed. The residence time is the residence time of the time synchronization frame in the wireless transmission link (or it is called forwarding delay). The first wireless device updates the residence time to the first time synchronization frame, synchronizes the slave clock node to which the first wireless device is connected according to the addressing rule, and completes the fast and reliable time synchronization of the wired and wireless networks.

[0110] In one embodiment, based on the embodiment shown in FIG. 3 , referring to FIG. 8 , before the first wireless device in this embodiment receives the first time synchronization frame sent by the second wireless device in the industrial network, the time synchronization method further includes step 801 shown in FIG. 8 :

[0111] Step 801: A first wireless device performs time synchronization with a second wireless device.

[0112] In the related technologies, for the converged network that integrates wired and wireless in the industrial network, the positioning signal of GPS (Global Positioning System) or Beidou satellite system is usually used as the clock reference source. By receiving the positioning signal, high-precision time information can be provided to the wireless device, thereby realizing the synchronization of global time. In addition, there are also multiple distributed clock servers deployed in the converged network. These servers communicate and calibrate through NTP (Network Time Protocol) or PTP (Precision Time Protocol) to ensure the time consistency between nodes in the network, or synchronize with the time in the Internet through NTP or PTP. However, in these related technologies, it is necessary to simultaneously meet the synchronization between wireless devices, the synchronization between wired devices, and the synchronization between wireless devices and wired devices. The synchronization process of wired network and wireless network cannot be decoupled, the synchronization process is slow, and the time synchronization of wireless devices is easily interfered by the external environment, which may lead to problems such as low synchronization efficiency and poor stability of the entire converged network.

[0113] In an embodiment of the present application, the first wireless device and the second wireless device can achieve time synchronization based on the wireless low layer, and then, in the process of synchronization of the wired device, the first wireless device and the second wireless device act as virtual bridging devices again, and the virtual bridging device can measure the residence time of the time synchronization frame in the wireless transmission link, and transmit the second time synchronization frame downward based on the residence time, and synchronize the transmission direction of the time synchronization frame from the clock node in turn, quickly complete the time synchronization of the wired device and the wireless device, decouple the synchronization process of the wired device and the synchronization process of the wireless device, thereby reducing the time consumption of time synchronization between the wireless device and the wired device, and improving the time synchronization efficiency of the converged network. Moreover, by measuring the residence time of the time synchronization frame in the wireless transmission link through the virtual bridging device, the residence time can be taken into account in the synchronization process of the wired device, thereby improving the synchronization accuracy.

[0114] In addition, the first wireless device and the second wireless device achieve time synchronization based on the wireless low layer, avoiding the problem of the entire network system being out of sync due to synchronization interference from the wireless devices, improving the efficiency of time synchronization while ensuring the stability of the converged network clock synchronization.

[0115] In one embodiment, as shown in FIG. 9 , a time synchronization method is provided, and the method is applied to a second wireless device in an industrial network as an example for explanation. The first wireless device may be the TS in FIG. 2 or the MS in FIG. 2 .

[0116] The time synchronization method includes the following steps 901 to 902:

[0117] Step 901: A second wireless device receives a third time synchronization frame sent by a second wired device in an industrial network.

[0118] Step 902: The second wireless device sends a first time synchronization frame to a first wireless device in the industrial network according to a third time synchronization frame.

[0119] Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send the second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time. The second time synchronization frame is used for time synchronization of the first wired device.

[0120] In one embodiment, sending a first time synchronization frame to a first wireless device in an industrial network according to a third time synchronization frame includes:

[0121] The second wireless device adds the reception time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and sends the first time synchronization frame to the first wireless device; or,

[0122] The second wireless device sends the reception time to the first wireless device, and sends the third time synchronization frame as the first time synchronization frame to the first wireless device.

[0123] In one embodiment, the method further comprises:

[0124] The second wireless device performs time synchronization with the second wired device according to the third time synchronization frame.

[0125] In one embodiment, the method further comprises:

[0126] The second wireless device is time synchronized with the first wireless device.

[0127] Regarding the implementation and beneficial effects of the time synchronization method for the second wireless device, reference may be made to the relevant description in the above embodiment of the time synchronization method for the first wireless device, which will not be repeated here.

[0128] In one embodiment, as shown in FIG. 10 , a time synchronization method is provided, and the method is described by taking the application of the method to a first wired device in an industrial network as an example. The first wired device may be the controller in FIG. 2 or the industrial device in FIG. 2 .

[0129] The time synchronization method includes the following steps 1001 to 1002:

[0130] Step 1001: A first wired device receives a second time synchronization frame sent by a first wireless device in an industrial network.

[0131] Wherein, the second time synchronization frame is sent by the first wireless device according to the first time synchronization frame sent by the second wireless device in the industrial network, and the dwell time of the first time synchronization frame corresponding to the first wireless device and the second wireless device;

[0132] Step 1002: The first wired device performs time synchronization with a master clock device in the industrial network according to a second time synchronization frame.

[0133] Regarding the implementation and beneficial effects of the time synchronization method for the first wired device, reference may be made to the relevant description in the above embodiment of the time synchronization method for the first wireless device, which will not be repeated here.

[0134] In one embodiment, a time synchronization method is provided, and the time synchronization method is used for the network topology shown in FIG11 as an example for explanation. The network topology includes device units constituting an industrial network, including a controller (master clock node), slave devices synchronized with the master clock node (industrial devices 1-3 shown in FIG11), MS, and TS. As described above, when the master clock node is the controller, the MS is the second wireless device, and the TS is the first wireless device.

[0135] The time synchronization method comprises the following steps:

[0136] 1) MS establishes a communication connection with TS, and MS and TS perform time synchronization.

[0137] 2) Each node device (controller and each industrial device) in the wired network sends link delay measurement frames point-to-point to obtain and save the link delay measurement value.

[0138] 3) The controller sends a time synchronization frame to industrial device 1. Industrial device 1 performs time synchronization based on the time synchronization frame and updates the timestamp in the time synchronization frame to obtain a third time synchronization frame. Industrial device 1 sends the third time synchronization frame to the MS.

[0139] 4) The MS receives the third time synchronization frame sent by the industrial device 1 .

[0140] 5) The MS performs time synchronization with the industrial device 1 according to the third time synchronization frame, and the MS adds the reception time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and sends the first time synchronization frame to the TS.

[0141] 6) TS receives the first time synchronization frame sent by MS.

[0142] 7) TS parses the first time synchronization frame to obtain the receiving time, determines the sending time of the second time synchronization frame sent by TS, and determines the time difference between the sending time and the receiving time as the dwell time.

[0143] 8) TS updates the timestamp included in the first time synchronization frame according to the residence time to obtain the above-mentioned second time synchronization frame.

[0144] 9) TS sends a second time synchronization frame to industrial device 3.

[0145] 10) The industrial device 3 performs time synchronization with the controller according to the second time synchronization frame.

[0146] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0147] Based on the same inventive concept, the embodiment of the present application also provides a time synchronization device for implementing the time synchronization method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more time synchronization device embodiments provided below can refer to the limitations on the time synchronization method above, and will not be repeated here.

[0148] In an exemplary embodiment, as shown in FIG12 , a time synchronization device is provided for a first wireless device in an industrial network, the device comprising:

[0149] The receiving module 1201 is used to receive a first time synchronization frame sent by a second wireless device in the industrial network, and the time synchronization between the first wireless device and the second wireless device;

[0150] A determination module 1202 is configured to determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0151] The sending module 1203 is used to send a second time synchronization frame to a first wired device in the industrial network according to the first time synchronization frame and the residence time, wherein the second time synchronization frame is used for time synchronization of the first wired device.

[0152] In one of the embodiments, the sending module 1203 is specifically configured to update the timestamp included in the first time synchronization frame according to the residence time to obtain the second time synchronization frame; and send the second time synchronization frame to the first wired device.

[0153] In one embodiment, the determining module 1202 includes:

[0154] an acquiring unit, configured to acquire a receiving time at which the second wireless device receives a third time synchronization frame, wherein the first time synchronization frame is acquired by the second wireless device according to the third time synchronization frame, or the first time synchronization frame is the third time synchronization frame;

[0155] The determining unit is used to determine the sending time of the second time synchronization frame sent by the first wireless device, and determine the time difference between the sending time and the receiving time as the dwell time.

[0156] In one embodiment, the acquisition unit is specifically used to parse the receiving time from the first time synchronization frame, where the first time synchronization frame is obtained by the second wireless device adding the receiving time to the third time synchronization frame; or, to receive the receiving time sent by the second wireless device, where the first time synchronization frame is the third time synchronization frame.

[0157] In one embodiment, the device further comprises:

[0158] The synchronization module is used to perform time synchronization with the second wireless device in the industrial network before the receiving module 1201 receives the first time synchronization frame sent by the second wireless device.

[0159] It should be noted here that the above-mentioned time synchronization device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned time synchronization method embodiment for the first wireless device, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be specifically repeated here. Each module in the above-mentioned time synchronization device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the first wireless device in the form of hardware, or can be stored in the memory in the first wireless device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0160] In an exemplary embodiment, as shown in FIG13 , a time synchronization device is provided for a second wireless device in an industrial network, the device comprising:

[0161] The receiving module 1301 is used to receive a third time synchronization frame sent by a second wired device in the industrial network;

[0162] A sending module 1302 is configured to send a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame;

[0163] Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

[0164] In one embodiment, the sending module 1302 is specifically used to add the receiving time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and send the first time synchronization frame to the first wireless device; or, send the receiving time to the first wireless device, and send the third time synchronization frame as the first time synchronization frame to the first wireless device.

[0165] In one embodiment, the device further comprises:

[0166] The first synchronization module is used to perform time synchronization with the second wired device according to the third time synchronization frame.

[0167] In one embodiment, the device further comprises:

[0168] The second synchronization module is used to perform time synchronization with the first wireless device.

[0169] It should be noted that the above-mentioned time synchronization device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned time synchronization method embodiment for the second wireless device, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be described in detail here. Each module in the above-mentioned time synchronization device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the second wireless device in the form of hardware, or can be stored in the memory in the second wireless device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0170] In an exemplary embodiment, as shown in FIG14 , a time synchronization device is provided for a first wired device in an industrial network, the device comprising:

[0171] The receiving module 1401 is configured to receive a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0172] The synchronization module 1402 is used to perform time synchronization with a master clock device in the industrial network according to the second time synchronization frame.

[0173] It should be noted here that the above-mentioned time synchronization device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned time synchronization method embodiment for the first wired device, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be described in detail here. Each module in the above-mentioned time synchronization device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the first wired device in the form of hardware, or can be stored in the memory in the first wired device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0174] In an exemplary embodiment, a computer device is provided, which may be a wireless device or a wired device, and its internal structure diagram may be shown in FIG15. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store time synchronization data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a time synchronization method is implemented.

[0175] Those skilled in the art will understand that the structure shown in FIG. 15 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0176] In an exemplary embodiment, a computer device is provided, which may be a first wireless device in an industrial network, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0177] Receiving a first time synchronization frame sent by a second wireless device in the industrial network, and time synchronization between the first wireless device and the second wireless device;

[0178] Determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0179] According to the first time synchronization frame and the residence time, a second time synchronization frame is sent to a first wired device in the industrial network, where the second time synchronization frame is used for time synchronization of the first wired device.

[0180] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:

[0181] Update the timestamp included in the first time synchronization frame according to the residence time to obtain the second time synchronization frame;

[0182] The second time synchronization frame is sent to the first wired device.

[0183] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:

[0184] Acquire a reception time at which the second wireless device receives a third time synchronization frame, wherein the first time synchronization frame is acquired by the second wireless device according to the third time synchronization frame, or the first time synchronization frame is the third time synchronization frame;

[0185] A sending time at which the first wireless device sends the second time synchronization frame is determined, and a time difference between the sending time and the receiving time is determined as the dwell time.

[0186] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:

[0187] The receiving time is obtained by parsing the first time synchronization frame, where the first time synchronization frame is obtained by the second wireless device adding the receiving time to the third time synchronization frame; or,

[0188] The receiving time sent by the second wireless device is received, and the first time synchronization frame is the third time synchronization frame.

[0189] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0190] Time synchronization is performed with the second wireless device.

[0191] In an exemplary embodiment, a computer device is provided, which may be a second wireless device in an industrial network, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0192] Receiving a third time synchronization frame sent by a second wired device in the industrial network;

[0193] Sending a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame;

[0194] Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

[0195] In one embodiment, when the processor executes the computer program, the following steps are specifically implemented:

[0196] adding the receiving time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and sending the first time synchronization frame to the first wireless device; or,

[0197] The receiving time is sent to the first wireless device, and the third time synchronization frame is sent to the first wireless device as the first time synchronization frame.

[0198] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0199] Time synchronization is performed with the second wired device according to the third time synchronization frame.

[0200] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0201] Time synchronization is performed with the first wireless device.

[0202] In an exemplary embodiment, a computer device is provided, which may be a first wired device in an industrial network, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0203] Receiving a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0204] Time synchronization is performed with a master clock device in the industrial network according to the second time synchronization frame.

[0205] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0206] Receiving a first time synchronization frame sent by a second wireless device in the industrial network, the time of the first wireless device is synchronized with the second wireless device;

[0207] Determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0208] According to the first time synchronization frame and the residence time, a second time synchronization frame is sent to a first wired device in the industrial network, where the second time synchronization frame is used for time synchronization of the first wired device.

[0209] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0210] Update the timestamp included in the first time synchronization frame according to the residence time to obtain the second time synchronization frame;

[0211] The second time synchronization frame is sent to the first wired device.

[0212] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0213] Acquire a reception time at which the second wireless device receives a third time synchronization frame, wherein the first time synchronization frame is acquired by the second wireless device according to the third time synchronization frame, or the first time synchronization frame is the third time synchronization frame;

[0214] A sending time at which the first wireless device sends the second time synchronization frame is determined, and a time difference between the sending time and the receiving time is determined as the dwell time.

[0215] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0216] The receiving time is obtained by parsing the first time synchronization frame, where the first time synchronization frame is obtained by the second wireless device adding the receiving time to the third time synchronization frame; or,

[0217] The receiving time sent by the second wireless device is received, and the first time synchronization frame is the third time synchronization frame.

[0218] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0219] Time synchronization is performed with the second wireless device.

[0220] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0221] Receiving a third time synchronization frame sent by a second wired device in the industrial network;

[0222] Sending a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame;

[0223] Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

[0224] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0225] adding the receiving time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and sending the first time synchronization frame to the first wireless device; or,

[0226] The receiving time is sent to the first wireless device, and the third time synchronization frame is sent to the first wireless device as the first time synchronization frame.

[0227] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0228] Time synchronization is performed with the second wired device according to the third time synchronization frame.

[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0230] Time synchronization is performed with the first wireless device.

[0231] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0232] Receiving a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0233] Time synchronization is performed with a master clock device in the industrial network according to the second time synchronization frame.

[0234] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0235] Receiving a first time synchronization frame sent by a second wireless device in the industrial network, the time of the first wireless device is synchronized with the second wireless device;

[0236] Determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0237] According to the first time synchronization frame and the residence time, a second time synchronization frame is sent to a first wired device in the industrial network, where the second time synchronization frame is used for time synchronization of the first wired device.

[0238] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0239] Update the timestamp included in the first time synchronization frame according to the residence time to obtain the second time synchronization frame;

[0240] The second time synchronization frame is sent to the first wired device.

[0241] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0242] Acquire a reception time at which the second wireless device receives a third time synchronization frame, wherein the first time synchronization frame is acquired by the second wireless device according to the third time synchronization frame, or the first time synchronization frame is the third time synchronization frame;

[0243] A sending time at which the first wireless device sends the second time synchronization frame is determined, and a time difference between the sending time and the receiving time is determined as the dwell time.

[0244] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0245] The receiving time is obtained by parsing the first time synchronization frame, where the first time synchronization frame is obtained by the second wireless device adding the receiving time to the third time synchronization frame; or,

[0246] The receiving time sent by the second wireless device is received, and the first time synchronization frame is the third time synchronization frame.

[0247] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0248] Time synchronization is performed with the second wireless device.

[0249] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0250] Receiving a third time synchronization frame sent by a second wired device in the industrial network;

[0251] Sending a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame;

[0252] Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

[0253] In one embodiment, when the computer program is executed by a processor, the following steps are specifically implemented:

[0254] adding the receiving time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and sending the first time synchronization frame to the first wireless device; or,

[0255] The receiving time is sent to the first wireless device, and the third time synchronization frame is sent to the first wireless device as the first time synchronization frame.

[0256] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0257] Time synchronization is performed with the second wired device according to the third time synchronization frame.

[0258] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0259] Time synchronization is performed with the first wireless device.

[0260] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0261] Receiving a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device;

[0262] Time synchronization is performed with a master clock device in the industrial network according to the second time synchronization frame.

[0263] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0264] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0265] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A time synchronization method, characterized in that: For a first wireless device in an industrial network, the method comprises: Receiving a first time synchronization frame sent by a second wireless device in the industrial network, and time synchronization between the first wireless device and the second wireless device; Determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device; According to the first time synchronization frame and the residence time, a second time synchronization frame is sent to a first wired device in the industrial network, where the second time synchronization frame is used for time synchronization of the first wired device.

2. The method according to claim 1, characterized in that The sending a second time synchronization frame to a first wired device in the industrial network according to the first time synchronization frame and the dwell time includes: Update the timestamp included in the first time synchronization frame according to the residence time to obtain the second time synchronization frame; The second time synchronization frame is sent to the first wired device.

3. The method according to claim 1 or 2, characterized in that: The determining the dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device includes: Acquire a reception time at which the second wireless device receives a third time synchronization frame, wherein the first time synchronization frame is acquired by the second wireless device according to the third time synchronization frame, or the first time synchronization frame is the third time synchronization frame; A sending time at which the first wireless device sends the second time synchronization frame is determined, and a time difference between the sending time and the receiving time is determined as the dwell time.

4. The method according to claim 3, characterized in that The obtaining the reception time of the third time synchronization frame received by the second wireless device includes: The receiving time is obtained by parsing the first time synchronization frame, where the first time synchronization frame is obtained by the second wireless device adding the receiving time to the third time synchronization frame; or, The receiving time sent by the second wireless device is received, and the first time synchronization frame is the third time synchronization frame.

5. The method according to claim 1, characterized in that Before receiving the first time synchronization frame sent by the second wireless device in the industrial network, the method further includes: Time synchronization is performed with the second wireless device.

6. A time synchronization method, characterized in that: For a second wireless device in an industrial network, the method comprises: Receiving a third time synchronization frame sent by a second wired device in the industrial network; Sending a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame; Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

7. The method according to claim 6, characterized in that The step of sending a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame includes: adding the receiving time of the third time synchronization frame to the third time synchronization frame to obtain the first time synchronization frame, and sending the first time synchronization frame to the first wireless device; or, The receiving time is sent to the first wireless device, and the third time synchronization frame is sent to the first wireless device as the first time synchronization frame.

8. The method according to claim 6, characterized in that The method further comprises: Time synchronization is performed with the second wired device according to the third time synchronization frame.

9. The method according to claim 6, characterized in that The method further comprises: Time synchronization is performed with the first wireless device.

10. A time synchronization method, characterized in that: For a first wired device in an industrial network, the method comprises: Receiving a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device; Time synchronization is performed with a master clock device in the industrial network according to the second time synchronization frame.

11. A time synchronization device, characterized in that: For a first wireless device in an industrial network, the apparatus comprises: A receiving module, configured to receive a first time synchronization frame sent by a second wireless device in the industrial network, and time synchronization between the first wireless device and the second wireless device; A determination module, configured to determine a dwell time corresponding to the first time synchronization frame and the first wireless device and the second wireless device; The sending module is used to send a second time synchronization frame to a first wired device in the industrial network according to the first time synchronization frame and the residence time, wherein the second time synchronization frame is used for time synchronization of the first wired device.

12. A time synchronization device, characterized in that: For use in a second wireless device in an industrial network, the apparatus comprises: A receiving module, configured to receive a third time synchronization frame sent by a second wired device in the industrial network; A sending module, configured to send a first time synchronization frame to a first wireless device in the industrial network according to the third time synchronization frame; Among them, the first time synchronization frame is used by the first wireless device to determine the residence time of the first time synchronization frame corresponding to the first wireless device and the second wireless device, and send a second time synchronization frame to the first wired device in the industrial network according to the first time synchronization frame and the residence time, and the second time synchronization frame is used for time synchronization of the first wired device.

13. A time synchronization device, characterized in that: A first wired device for use in an industrial network, the device comprising: A receiving module, configured to receive a second time synchronization frame sent by a first wireless device in the industrial network, wherein the second time synchronization frame is sent by the first wireless device according to a first time synchronization frame sent by a second wireless device in the industrial network, and a residence time corresponding to the first time synchronization frame and the first wireless device and the second wireless device; A synchronization module is used to perform time synchronization with a master clock device in the industrial network according to the second time synchronization frame.

14. A wireless device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

15. A wired device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to claim 10 are implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

Citation Information

Cited By

  • Data transmission method, device, management station, terminal station, controller and system

    CN121334050A