Time synchronization method in SRB network and related device

By calculating the transmission time and generating macro cycles in the SRB network, and sending synchronization time packets regularly, the time synchronization error problem between the master device and the slave device is solved, and a high degree of consistency and stability of the system time is achieved.

CN119342574AActive Publication Date: 2025-01-21BEIJING ZHONGTIAN STAR CONTROL TECH DEV CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411890303.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-01-21
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

There is a time synchronization error between the master and slave devices in the SRB network, especially in complex network environments, resulting in incomplete synchronization of time jitter and system timing.

Method used

By determining the main site in the SRB network and the from the site, calculate the information transmission time between the main site and the from the site, generate a macroscopic cycle, and send a synchronous time package regularly during the macro cycle, so that the site can be based on the synchronization time package and real -time real -time real -time real -time real -time real -time real -time time -time -time -time -time -time -time -time -time -time -time -time real -time real -time real -time real -time time -time -time -time -time -time -time -time -time -time -time -time -friendly -time real -time real time The millisecond time information in the packet is synchronized with local time.

Benefits of technology

Effectively reduce time synchronization errors, improve the time consistency and stability of the system, adapt to the clock frequency and network status of different devices, and ensure that the time of each site during long -term operation is consistent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342574A_ABST
    Figure CN119342574A_ABST
Patent Text Reader

Abstract

The invention discloses a time synchronization method in an SRB network and a related device. The method comprises the following steps: firstly, determining a master station and N slave stations consisting of periodic stations and non-periodic stations, and sending a real-time data packet containing millisecond time information to each slave station by triggering the master station; calculating information transmission time between the master station and each slave station to obtain a plurality of first transmission time; and then adding millisecond time information to the first transmission time corresponding to each periodic station to obtain second transmission time, and adding all the second transmission time and adding the first transmission time corresponding to all the non-periodic stations to obtain a macro period. Every preset time interval. And triggering the master station to send a synchronization time packet including millisecond time information to each slave station in the macro period, so that the slave stations can perform local time synchronization based on the synchronization time packet and the millisecond time information in the real-time data packet. According to the invention, the time synchronization error between the master device and each slave device in the SRB network can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of time synchronization, and in particular to a time synchronization method and related devices in an SRB network. Background Art

[0002] As an efficient and secure communication technology, Software Radio Base Station (SRB) has gradually shown great potential and advantages in the fields of industrial control, motion control, etc. with its excellent security and real-time performance. With the rapid development of industrial automation, intelligent manufacturing and motion control technology, SRB has been widely used in various control systems involving high security and high real-time requirements, especially in key areas such as precision manufacturing, robot control, unmanned driving, and smart grids. In these applications, SRB provides fast and reliable data transmission, and has good anti-interference ability and security protection mechanism, which can ensure the efficient operation of the system and data security.

[0003] In order to meet the growing market demand, various development units have also invested a lot of R&D efforts, increased the intensity of technical research and product innovation, and strived to launch more efficient and intelligent new products. These products are constantly optimized in performance, greatly improving the communication efficiency and control accuracy between devices, thereby promoting the rapid development of automation control systems. However, in this process, some potential problems of the SRB bus in practical applications have also been exposed, especially in the time synchronization accuracy between the master device and each slave device.

[0004] After a lot of practice and testing, it is found that there is a certain degree of time synchronization deviation between the master and slave devices in the SRB system. Especially in complex network environments, this deviation often manifests as time jitter, usually more than 200 nanoseconds. The existence of this jitter means that there is a certain time error in the process of data transmission and control instruction execution, resulting in incomplete synchronization of the internal timing of the system.

[0005] Therefore, how to reduce the time synchronization error between the master device and each slave device in the SRB network is a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0006] Based on the above problems, the present application provides a time synchronization method and related apparatus in an SRB network, which can reduce the time synchronization error between a master device and each slave device in the SRB network.

[0007] The embodiments of the present application disclose the following technical solutions: A time synchronization method in an SRB network, the method comprising: Determine a master site and N slave sites in a software radio base station SRB network, and trigger the master site to send each real-time data packet to the corresponding slave site; the N slave sites include X periodic sites and Y non-periodic sites, N=X+Y, N, X and Y are all positive integers; one real-time data packet adds a real-time data packet payload with millisecond time information; For each of the slave sites, calculating the information transmission time for the master site to transmit its site information to the slave site to obtain a first transmission time; Add the millisecond time information to the first transmission time corresponding to each periodic site to obtain a second transmission time; Add all the second transmission times and then add the first transmission times corresponding to all the non-periodic sites to obtain a macrocycle of the SRB network; At every preset time interval, the master site is triggered to send a synchronization time packet to each slave site within the macro cycle, so that the slave site performs local time synchronization based on the information in the synchronization time packet and the millisecond time information in the real-time data packet; the synchronization time packet includes year, month, day information, hour, minute, second information and the millisecond time information.

[0008] In a possible implementation, the method includes: Determine the sending timestamp and receiving timestamp of the real-time data packet; the sending timestamp is the time when the master site sends the real-time data packet; the receiving timestamp is the time when the slave site receives the real-time data packet.

[0009] In a possible implementation, triggering the master site to send a synchronization time packet to each slave site within the macrocycle at each preset time interval, so that the slave site performs local time synchronization based on information in the synchronization time packet and millisecond time information in the real-time data packet, includes: At every preset time interval, the master site is triggered to send a synchronization time packet to each slave site within the macro cycle, so that the slave site performs local time synchronization within milliseconds based on the sending timestamp, the receiving timestamp and the millisecond time information in the real-time data packet, and performs local time synchronization above milliseconds based on the information in the synchronization time packet.

[0010] In a possible implementation, the preset time interval is 1 second.

[0011] In a possible implementation, the method further includes: If all slave stations cannot receive the synchronization time packet within the macro cycle, the reception of the non-periodic station is preferentially disconnected, so that all slave stations that have not disconnected the reception can receive the synchronization time packet within the macro cycle.

[0012] A time synchronization device in an SRB network, the device comprising: A site determination unit, used to determine a master site and N slave sites in the SRB network; the N slave sites include X periodic sites and Y non-periodic sites, N=X+Y, N, X and Y are all positive integers; A trigger unit, used for triggering the master site to send each real-time data packet to the corresponding slave site; a real-time data packet payload with millisecond time information added to the real-time data packet; a transmission time calculation unit, configured to calculate, for each of the slave sites, an information transmission time for the master site to transmit its site information to the slave site, to obtain a first transmission time; A setting unit, configured to add the millisecond time information to the first transmission time corresponding to each periodic site to obtain a second transmission time; A macrocycle calculation unit, configured to add all the second transmission times and then add the first transmission times corresponding to all the non-periodic sites to obtain a macrocycle of the SRB network; A synchronization time packet sending unit is used to trigger the master site to send a synchronization time packet to each slave site within the macro cycle at a preset time interval, so that the slave site performs local time synchronization based on the information in the synchronization time packet and the millisecond time information in the real-time data packet; the synchronization time packet includes year, month, day information, hour, minute, second information and the millisecond time information.

[0013] In a possible implementation manner, the device further includes: The timestamp unit is used to determine the sending timestamp and receiving timestamp of the real-time data packet; the sending timestamp is the time when the master site sends the real-time data packet; the receiving timestamp is the time when the slave site receives the real-time data packet.

[0014] In a possible implementation manner, the synchronization time packet sending unit is specifically used to: At every preset time interval, the master site is triggered to send a synchronization time packet to each slave site within the macro cycle, so that the slave site performs local time synchronization within milliseconds based on the sending timestamp, the receiving timestamp and the millisecond time information in the real-time data packet, and performs local time synchronization above milliseconds based on the information in the synchronization time packet.

[0015] A time synchronization device in an SRB network includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the time synchronization method in the SRB network as described above is implemented.

[0016] A computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the time synchronization method in the SRB network as described above.

[0017] Compared with the prior art, this application has the following beneficial effects: The present application provides a time synchronization method and related device in an SRB network. Specifically, when executing the time synchronization method in the SRB network provided by the embodiment of the present application, first determine the master site and N slave sites (N=X+Y, where X is the number of periodic sites and Y is the number of non-periodic sites), and trigger the master site to send a real-time data packet to each slave site to achieve. The payload of each real-time data packet contains millisecond time information and instruction data required to perform the task. Subsequently, the information transmission time between the master site and each slave site is calculated to obtain multiple first transmission times. Then, the millisecond time information is added to the first transmission time corresponding to the periodic site to obtain the second transmission time. The macrocycle of the SRB network is obtained by adding all the second transmission times and the first transmission times of the non-periodic sites, and the master site is regularly triggered to send a synchronization time packet including millisecond time information to each slave site within the macrocycle, so that the slave site performs local time synchronization based on the millisecond time information in the synchronization time packet and the real-time data packet. In the present application, each real-time data packet and synchronization time packet contain millisecond time information, and the millisecond time information is used for local time synchronization during the synchronization process. This can effectively reduce the deviation caused by time delay or clock drift. At the same time, by calculating all transmission times and the macrocycle generated after time compensation, the master site can trigger the synchronization package at a preset time interval. This synchronization method can better adapt to different clock frequencies and network conditions between devices, ensuring that the time of each site remains highly consistent during long-term operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art 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 drawings can be obtained based on these drawings without creative work.

[0019] Figure 1A method flow chart of a time synchronization method in an SRB network provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a real-time data packet provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a synchronization time package provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a time synchronization device in an SRB network provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

[0021] SRB provides fast and reliable data transmission, and has good anti-interference ability and security protection mechanism to ensure efficient operation of the system and data security. In order to meet the growing market demand, various development units have invested a lot of R&D efforts to launch more efficient and intelligent new products, improve the communication efficiency and control accuracy between devices, and promote the rapid development of automation control systems. However, in actual applications, it is found that there is a time synchronization deviation between the master and slave devices in the SRB system, especially in complex network environments. This deviation manifests as time jitter, usually more than 200 nanoseconds, resulting in incomplete synchronization of the system's internal timing.

[0022] In order to solve this problem, an embodiment of the present application provides a time synchronization method and related device in an SRB network. First, a master site and N slave sites (wherein the N slave sites include X periodic sites and Y non-periodic sites, and N, X and Y are all positive integers) in a software radio base station SRB network are determined, and the master site is triggered to send a real-time data packet containing millisecond time information to each slave site. Subsequently, the information transmission time between the master site and each slave site is calculated to obtain a first transmission time. Then, the first transmission time corresponding to the periodic site is added with the millisecond time information to obtain a second transmission time, and all the second transmission times and the first transmission times of all non-periodic sites are added to obtain a macrocycle. Finally, at each preset time interval, the master site is triggered to send a synchronization time packet containing millisecond time information to all slave sites within the macrocycle, so that the slave site performs local time synchronization based on the year, month, day information, hour, minute, second information, millisecond time information and millisecond time information in the synchronization time packet and the millisecond time information in the real-time data packet. The present application realizes local time synchronization by using the year, month, day information, hour, minute, second information, millisecond time information and millisecond time information in each synchronization time packet and the millisecond time information in the real-time data packet, which can effectively reduce the deviation caused by time delay and clock drift. By calculating the macrocycle generated by transmission time and time compensation, the master site triggers synchronization packets at preset intervals to better adapt to different device clock frequencies and network conditions, ensuring high consistency of time at each site during long-term operation.

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.

[0024] See also Figure 1 , which is a method flow chart of a time synchronization method in an SRB network provided by an embodiment of the present application, such as Figure 1 As shown, the time synchronization method in the SRB network may include steps S101-S105: S101: Determine a master site and N slave sites in an SRB network, and trigger the master site to send each real-time data packet to the corresponding slave site.

[0025] In this solution, we first need to determine the topology of the SRB network, that is, the master site and N slave sites in the network. Here, N represents the total number of slave sites in the network, and these slave sites are further divided into two categories: X periodic sites and Y non-periodic sites, where N=X+Y, and N, X, and Y are all positive integers. This division is based on whether the slave sites exchange data according to a fixed period.

[0026] In order to achieve efficient data transmission and time synchronization, the master site will be triggered to send real-time data packets to each slave site. Each real-time data packet not only contains the instruction data required by the slave site to perform a specific task, but also adds millisecond-level time information (such as Figure 2 As shown, Figure 2 This design enables the slave station to obtain not only the necessary execution instructions but also the accurate time reference when receiving the real-time data packet, which is crucial to ensure time synchronization in the entire network.

[0027] It should be noted that the payload of the real-time data packet includes the instruction data required for the slave station to perform the task. That is to say, when the master station sends a real-time data packet to the slave station, the payload part of the data packet (i.e., the effective load part after removing the header control information) contains the instruction data required to perform the task. The instruction data is the specific operation instruction required for the slave station to perform the task.

[0028] In a possible implementation, the instruction data may include, but are not limited to: task type, task parameters, operation instructions, execution steps, etc. According to these instruction data, the slave site may perform specific task processing or execution.

[0029] In this way, the master site can effectively manage and coordinate the operations of all slave sites, ensuring that each instruction can be delivered to the corresponding target site in a timely and accurate manner, and that the time bases of all sites can remain highly consistent, thereby improving the overall operating efficiency and stability of the system.

[0030] S102: For each of the slave sites, calculate the information transmission time for the master site to transmit its site information to the slave site to obtain a first transmission time.

[0031] In an SRB network, a key calculation step is required to ensure that each slave site can accurately receive the information sent by the master site and effectively manage the time delay of data transmission. Specifically, for each slave site, the specific time when the master site transmits information to the slave site needs to be calculated. This time is called the "first transmission time".

[0032] In a possible implementation, the specific process of calculating the first transmission time is as follows: first, the communication path between the master site and each slave site is clarified; second, the time taken from the master site starting to send information to the slave site successfully receiving the information is measured using an accurate time measurement tool or mechanism (such as the timestamp in the network time protocol, etc.). This time is the information transmission time from the master site to the corresponding slave site, which is recorded as the "first transmission time".

[0033] In a possible implementation, in an SRB network, "site information" generally refers to a series of data and parameters related to a specific site. Such information may include, but is not limited to, the following aspects: Identification: Each site has a unique identifier that is used to uniquely identify the site in the network.

[0034] Location information: The specific geographical location of the site or its location in the network topology.

[0035] Functional description: The functional role of the site, such as periodic site or aperiodic site, and their specific responsibilities in the network.

[0036] Communication parameters: The communication configuration parameters of the site, such as Internet Protocol (IP) address, port number, communication protocol, etc.

[0037] Status information: The current status of the site, such as whether it is online, workload status, etc.

[0038] Time information: information related to the time synchronization of the site, including clock offset, synchronization status, etc.

[0039] Through this calculation step, the communication delay between the master site and each slave site can be accurately understood. This is crucial for the subsequent implementation of time synchronization, optimization of data transmission strategies, and improvement of the reliability of the entire network. By accurately measuring and recording the first transmission time of each slave site, the time synchronization mechanism can be adjusted more effectively to ensure that the time base between all sites is highly consistent, thereby improving the overall operation efficiency and stability of the system.

[0040] S103: Add the millisecond time information to the first transmission time corresponding to each periodic site to obtain a second transmission time.

[0041] In the SRB network, in order to ensure that the periodic site can accurately receive and process the information transmitted from the master site and achieve efficient time synchronization, it is necessary to add millisecond-level time information to the first transmission time corresponding to each periodic site to obtain the second transmission time.

[0042] Specifically, the first transmission time refers to the time required for the master site to transmit site information to the slave sites (including periodic sites and non-periodic sites). This time reflects the communication delay between the master site and the periodic site. However, in order to manage the time and synchronization mechanism more accurately, millisecond-level time information needs to be considered. This time information usually contains a high-precision timestamp to ensure that the time base of all sites remains highly consistent.

[0043] By adding the first transmission time to the millisecond time information, the second transmission time can be obtained. The second transmission time not only includes the basic transmission delay, but also takes into account the high-precision time synchronization information, thus providing a more accurate time reference. The purpose of this is to ensure that each slave station can not only accurately receive the transmitted data, but also execute the corresponding task at the correct time point.

[0044] It should be noted that "millisecond time information" refers to a time increment, which is in milliseconds. Adding millisecond time information to the first transmission time corresponding to each periodic site is to add the first transmission time corresponding to each periodic site to a specific millisecond time increment, thereby obtaining a new transmission time, namely, the second transmission time.

[0045] For example, assuming that the first transmission time is 500 milliseconds and the millisecond time information is 200 milliseconds, the second transmission time is: First transmission time + millisecond time information = second transmission time, 500ms + 200ms = 700ms.

[0046] Therefore, the "millisecond time information" here is a time increment value used to adjust or correct the original transmission time.

[0047] In summary, the second transmission time is obtained by adding millisecond-level time information to the first transmission time corresponding to each periodic site. This process makes the time synchronization of the entire network more accurate and improves the stability and reliability of the system. This method can better coordinate and manage the task execution of each periodic site, ensuring that all sites in the network can work together under a unified time reference.

[0048] S104: All the second transmission times are added together and then added to the first transmission times corresponding to all the non-periodic sites to obtain a macrocycle of the SRB network.

[0049] In an SRB network, in order to ensure that all sites are time synchronized and operate efficiently, it is necessary to calculate the macrocycle of the entire network. This process involves two main steps: calculating the second transmission time of each periodic site and adding the first transmission time of all non-periodic sites.

[0050] First, for each periodic station, we have obtained the second transmission time by adding the millisecond time information to the first transmission time (i.e., the time required for the master station to transmit the station information to the periodic station). This step ensures that each slave station can not only accurately receive the transmitted data, but also execute the corresponding task at the correct time point.

[0051] Next, these second transmission times need to be added together to get a cumulative value. This cumulative value reflects the total transmission delay and time synchronization requirements in the entire periodic site network. In addition, the impact of non-periodic sites needs to be considered. Although non-periodic sites do not have fixed periodic tasks, they also have first transmission times, which is the time required for the master site to transmit data to these sites.

[0052] The second transmission time of all periodic sites is accumulated, and then added to the first transmission time of all non-periodic sites, and the final result is the macrocycle of the entire SRB network. The macrocycle is a comprehensive indicator that includes the time synchronization requirements and transmission delays of all sites in the network, ensuring that all sites can work together under a unified time reference.

[0053] Specifically, the calculation formula of the macrocycle can be expressed as: Macrocycle = ∑ (second transmission time of periodic site) + ∑ (first transmission time of non-periodic site).

[0054] In this way, the time synchronization status and transmission efficiency of the entire SRB network can be comprehensively evaluated to ensure that all sites in the network can work together under the optimal time reference, thereby improving the stability and reliability of the system.

[0055] S105: triggering the master site to send a synchronization time packet to each slave site within the macrocycle at every preset time interval, so that the slave site performs local time synchronization based on the information in the synchronization time packet and the millisecond time information in the real-time data packet.

[0056] In the SRB network, a periodic synchronization mechanism is used to ensure the time synchronization and efficient operation of all slave sites. The core of this mechanism is to trigger the master site to send a synchronization time packet to each slave site in a macro cycle at a preset time interval. The purpose of this process is to enable the slave site to synchronize its local time based on the information in the synchronization time packet and the millisecond time information in the real-time data packet.

[0057] See also Figure 3 , Figure 3 A schematic diagram of the structure of a synchronization time package provided in an embodiment of the present application. Specifically, the synchronization time package includes the following key components: Year, month, and day information: used to ensure that the slave site knows the current date, allowing for more accurate time management.

[0058] Hour, minute, and second information: Provides the specific hours, minutes, and seconds of the current time to ensure that the time is synchronized to the second level of accuracy.

[0059] Millisecond time information: Provides high-precision timestamps to ensure time synchronization with millisecond-level accuracy.

[0060] Whenever the preset time interval arrives, the master site generates a synchronization time packet containing the above information and sends it to each slave site. After receiving the synchronization time packet, the slave site updates its local time based on the information in it. At the same time, the slave site will further calibrate its local clock based on the millisecond time information in the real-time data packet to ensure that it is highly consistent with the time of the master site.

[0061] This periodic synchronization mechanism ensures that all sites in the entire network can work together under a unified time reference, avoiding potential problems caused by time asynchrony. In this way, the stability and reliability of the system can be improved, ensuring that communication and task execution between all sites can be carried out under precise time control.

[0062] In a possible implementation, the preset time interval is 1 second.

[0063] In a possible implementation, the method includes: Determine the sending timestamp and receiving timestamp of the real-time data packet; the sending timestamp is the time when the master site sends the real-time data packet; the receiving timestamp is the time when the slave site receives the real-time data packet.

[0064] In SRB networks, in order to ensure the accuracy of data transmission and time synchronization, it is necessary to accurately record the sending and receiving timestamps of real-time data packets. This process includes two main steps: determining the sending timestamp and receiving timestamp of the real-time data packet.

[0065] Specifically: Send timestamp: This is the time when the master site sends the real-time data packet. When the master site is ready to send a real-time data packet, it generates an accurate timestamp to record the exact time when the data packet is sent. This timestamp usually contains time information accurate to the millisecond level to ensure high-precision time recording.

[0066] Receive timestamp: This is the time when the real-time data packet is received from the site. When a real-time data packet is received from the site, it also generates an accurate timestamp to record the exact time when the data packet is received. Similarly, this timestamp also contains time information accurate to the millisecond level to ensure high-precision time recording.

[0067] By recording these two timestamps, the delay time required for real-time data packets to be transmitted in the network can be accurately measured. The specific calculation method is as follows: Transmission delay = receiving timestamp − sending timestamp Transmission delay = receiving timestamp − sending timestamp.

[0068] This not only helps evaluate the transmission performance of the network, but also helps detect and diagnose possible time synchronization problems. It ensures that the slave stations can accurately calibrate the time based on the received timestamps, thereby maintaining the time consistency of the entire network.

[0069] In a possible implementation, triggering the master site to send a synchronization time packet to each slave site within the macrocycle at each preset time interval, so that the slave site performs local time synchronization based on information in the synchronization time packet and millisecond time information in the real-time data packet, includes: In the SRB network, a periodic synchronization mechanism is used to ensure time synchronization and efficient operation of all slave sites. The core of this mechanism is to trigger the master site to send synchronization time packets to each slave site within a macro cycle at preset time intervals. This process is designed to enable slave sites to perform high-precision time synchronization based on multiple time information.

[0070] Specifically, the synchronization mechanism is divided into two levels: (1) Local time synchronization within milliseconds: When each slave station receives a real-time data packet, it records the receiving timestamp. At the same time, the master station also records the sending timestamp when sending a real-time data packet. By comparing these two timestamps, the transmission delay of the data packet in the network can be accurately calculated. The slave station will also combine the millisecond time information in the real-time data packet to further calibrate its local clock to ensure that the time is synchronized to millisecond accuracy.

[0071] (2) Local time synchronization above milliseconds: The master site will send synchronization time packets to the slave site regularly (at preset intervals) within the macrocycle. The synchronization time packet contains year, month, day, hour, minute, second, and millisecond time information. After receiving the synchronization time packet, the slave site will perform higher-precision time synchronization based on the detailed time information in it, ensuring that the time is synchronized to the second level or even more accurate.

[0072] It should be noted that local time synchronization above milliseconds means that during the time synchronization process, the time consistency accuracy between various devices or systems is ensured to be above the millisecond level, which usually means that the synchronization time error is controlled within a few milliseconds or even larger.

[0073] Local time synchronization within milliseconds means ensuring that the time consistency accuracy between various devices or systems is within milliseconds, or even at the microsecond or nanosecond level, during the time synchronization process.

[0074] It should also be noted that the year, month and day information: This part of the time information contains three parts: year, month and day, which are used to identify the specific date. For example, October 1, 2023.

[0075] Hour, minute, and second information: This part of the time information includes hours, minutes, and seconds, which are used to identify a specific time point. For example, 14:30:45 (i.e. 2:30:45 p.m.).

[0076] This multi-level time synchronization mechanism ensures that slave sites can not only perform high-precision time calibration within milliseconds, but also maintain a highly consistent time base over longer time periods longer than milliseconds.

[0077] In a possible implementation, the method includes: If all slave stations cannot receive the synchronization time packet within the macro cycle, the reception of the non-periodic station is preferentially disconnected, so that all slave stations that have not disconnected the reception can receive the synchronization time packet within the macro cycle.

[0078] During the time synchronization process, if it is not possible to ensure that all slave sites receive the synchronization time packet during the entire macro cycle, the non-periodic site reception will be disconnected first. This is done to ensure that at the end of the macro cycle, at least those slave sites that have not been disconnected can accurately receive the synchronization time packet to achieve time synchronization of all nodes in the entire system.

[0079] The specific logic is as follows: Determine whether all slave sites can receive the synchronization time packet: During the macro cycle, the system will check whether the synchronization time packet can be successfully sent to all slave sites.

[0080] Take measures to disconnect the reception of non-periodic sites: If it is found that some slave sites cannot receive the synchronization time package, the system will preferentially disconnect the reception of non-periodic sites to reduce the communication burden.

[0081] Ensure that key sites receive the synchronization time packet: Through the above measures, the system can ensure that other important slave sites can successfully receive the synchronization time packet within the macro cycle, thereby maintaining the time synchronization of these key sites.

[0082] This strategy can ensure that the most critical periodic tasks in the system receive timely and accurate time information, maintaining the stable operation and efficient performance of the system. By giving priority to task nodes with higher importance, the system can better adapt to various network conditions and workloads, thereby improving the reliability and accuracy of time synchronization.

[0083] Based on the contents of S101-S105, it can be known that the master site and N slave sites are first determined, and a real-time data packet is sent to each slave site by triggering the master site. The N slave sites are composed of X periodic sites and Y non-periodic sites. Each real-time data packet contains millisecond time information. The information transmission time between the master site and each slave site is calculated to obtain multiple first transmission times. Then, the first transmission time corresponding to each periodic site is added with millisecond time information to obtain the second transmission time, and all the second transmission times are added together and then added with the first transmission time corresponding to all non-periodic sites to obtain the macro cycle. At every preset time interval, the master site is triggered within the macro cycle to send a synchronization time packet including year, month, day information, hour, minute, second information, and millisecond time information to each slave site, so that the slave site can perform local time synchronization based on the synchronization time packet and the millisecond time information in the real-time data packet. In the present application, each real-time data packet and synchronization time packet contain millisecond time information. By using this time information for local time synchronization, the deviation caused by time delay and clock drift is effectively reduced. At the same time, by calculating all transmission times and compensated macrocycles, the master site can trigger synchronization packets at preset time intervals, so that the synchronization method can adapt to the clock frequency and network status of different devices, ensuring a high degree of consistency in the time of each site during long-term operation.

[0084] See also Figure 4 , Figure 4 A schematic diagram of the structure of a time synchronization device in an SRB network provided in an embodiment of the present application. Figure 4 As shown, the time synchronization device in the SRB network includes: A site determination unit 401 is used to determine a master site and N slave sites in the SRB network; the N slave sites include X periodic sites and Y non-periodic sites, N=X+Y, N, X and Y are all positive integers; A trigger unit 402 is used to trigger the master site to send each real-time data packet to the corresponding slave site; a real-time data packet payload with millisecond time information added to the real-time data packet; A transmission time calculation unit 403 is used to calculate, for each of the slave sites, an information transmission time for the master site to transmit its site information to the slave site, to obtain a first transmission time; A setting unit 404 is configured to add the millisecond time information to the first transmission time corresponding to each periodic site to obtain a second transmission time; A macrocycle calculation unit 405 is configured to add all the second transmission times and then add the first transmission times corresponding to all the non-periodic sites to obtain a macrocycle of the SRB network; The synchronization time packet sending unit 406 is used to trigger the master site to send a synchronization time packet to each slave site within the macro cycle at a preset time interval, so that the slave site performs local time synchronization based on the information in the synchronization time packet and the millisecond time information in the real-time data packet; the synchronization time packet includes year, month, day information, hour, minute, second information and the millisecond time information.

[0085] In a possible implementation manner, the device further includes: The timestamp unit is used to determine the sending timestamp and receiving timestamp of the real-time data packet; the sending timestamp is the time when the master site sends the real-time data packet; the receiving timestamp is the time when the slave site receives the real-time data packet.

[0086] In a possible implementation, the synchronization time packet sending unit 406 is specifically configured to: At every preset time interval, the master site is triggered to send a synchronization time packet to each slave site within the macro cycle, so that the slave site performs local time synchronization within milliseconds based on the sending timestamp, the receiving timestamp and the millisecond time information in the real-time data packet, and performs local time synchronization above milliseconds based on the information in the synchronization time packet.

[0087] In a possible implementation, the preset time interval is 1 second.

[0088] In a possible implementation manner, the device further includes: The receiving disconnection unit is used to preferentially disconnect the reception of the non-periodic site if all slave sites cannot receive the synchronous time packet within the macro cycle, so that all slave sites that have not disconnected the reception can receive the synchronous time packet within the macro cycle.

[0089] In addition, an embodiment of the present application also provides a time synchronization device in an SRB network, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the time synchronization method in the SRB network as described above is implemented.

[0090] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the time synchronization method in the SRB network as described above.

[0091] The embodiment of the present application provides a time synchronization device in an SRB network, first using a site determination unit 401 to determine a master site and N slave sites in the SRB network, and using a trigger unit 402 to trigger the master site to send each real-time data packet to the corresponding slave site. The transmission time calculation unit 403 calculates the information transmission time for the master site to transmit its site information to the slave site for each slave site to obtain a first transmission time, and then adds the millisecond time information to the first transmission time corresponding to each periodic site through the setting unit 404 to obtain a second transmission time. Then, the macrocycle calculation unit 405 is used to add all the second transmission times and then add the first transmission times corresponding to all non-periodic sites to obtain the macrocycle of the SRB network, so that the synchronization time packet sending unit can trigger the master site to send a synchronization time packet to each slave site within the macrocycle at every preset time interval, so that the slave site performs local time synchronization based on the information in the synchronization time packet and the millisecond time information in the real-time data packet. Among them, the synchronization time packet includes year, month, day information, hour, minute, second information, and millisecond time information. In the present application, both the real-time data packet and the synchronization time packet carry millisecond time information for local time synchronization, so as to effectively reduce the deviation caused by time delay and clock drift.

[0092] The above is a detailed introduction to a time synchronization method and related devices in an SRB network provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0093] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0094] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

Claims

1. A time synchronization method in an SRB network, characterized in that: The method comprises: Determine a master site and N slave sites in a software radio base station SRB network, and trigger the master site to send each real-time data packet to the corresponding slave site; the N slave sites include X periodic sites and Y non-periodic sites, N=X+Y, N, X and Y are all positive integers; one real-time data packet adds a real-time data packet payload with millisecond time information; For each of the slave sites, calculating the information transmission time for the master site to transmit its site information to the slave site to obtain a first transmission time; Add the millisecond time information to the first transmission time corresponding to each periodic site to obtain a second transmission time; Add all the second transmission times and then add the first transmission times corresponding to all the non-periodic sites to obtain a macrocycle of the SRB network; At every preset time interval, the master site is triggered to send a synchronization time packet to each slave site within the macro cycle, so that the slave site performs local time synchronization based on the information in the synchronization time packet and the millisecond time information in the real-time data packet; the synchronization time packet includes year, month, day information, hour, minute, second information and the millisecond time information.

2. The method according to claim 1, characterized in that The method comprises: Determine the sending timestamp and receiving timestamp of the real-time data packet; the sending timestamp is the time when the master site sends the real-time data packet; the receiving timestamp is the time when the slave site receives the real-time data packet.

3. The method according to claim 2, characterized in that The method of triggering the master site to send a synchronization time packet to each slave site at each preset time interval within the macrocycle, so that the slave site performs local time synchronization based on information in the synchronization time packet and millisecond time information in the real-time data packet, includes: At every preset time interval, the master site is triggered to send a synchronization time packet to each slave site within the macro cycle, so that the slave site performs local time synchronization within milliseconds based on the sending timestamp, the receiving timestamp and the millisecond time information in the real-time data packet, and performs local time synchronization above milliseconds based on the information in the synchronization time packet.

4. The method according to claim 1, characterized in that The preset time interval is 1 second.

5. The method according to claim 1, characterized in that The method further comprises: If all slave stations cannot receive the synchronization time packet within the macro cycle, the reception of the non-periodic station is preferentially disconnected, so that all slave stations that have not disconnected the reception can receive the synchronization time packet within the macro cycle.

6. A time synchronization device in an SRB network, characterized in that: The device comprises: A site determination unit, used to determine a master site and N slave sites in the SRB network; the N slave sites include X periodic sites and Y non-periodic sites, N=X+Y, N, X and Y are all positive integers; A trigger unit, used for triggering the master site to send each real-time data packet to the corresponding slave site; a real-time data packet payload with millisecond time information added to the real-time data packet; a transmission time calculation unit, configured to calculate, for each of the slave sites, an information transmission time for the master site to transmit its site information to the slave site, to obtain a first transmission time; A setting unit, configured to add the millisecond time information to the first transmission time corresponding to each periodic site to obtain a second transmission time; A macrocycle calculation unit, configured to add all the second transmission times and then add the first transmission times corresponding to all the non-periodic sites to obtain a macrocycle of the SRB network; A synchronization time packet sending unit is used to trigger the master site to send a synchronization time packet to each slave site within the macro cycle at a preset time interval, so that the slave site performs local time synchronization based on the information in the synchronization time packet and the millisecond time information in the real-time data packet; the synchronization time packet includes year, month, day information, hour, minute, second information and the millisecond time information.

7. The device according to claim 6, characterized in that The device also includes: The timestamp unit is used to determine the sending timestamp and receiving timestamp of the real-time data packet; the sending timestamp is the time when the master site sends the real-time data packet; the receiving timestamp is the time when the slave site receives the real-time data packet.

8. The device according to claim 7, characterized in that The synchronization time packet sending unit is specifically used for: At every preset time interval, the master site is triggered to send a synchronization time packet to each slave site within the macro cycle, so that the slave site performs local time synchronization within milliseconds based on the sending timestamp, the receiving timestamp and the millisecond time information in the real-time data packet, and performs local time synchronization above milliseconds based on the information in the synchronization time packet.

9. A time synchronization device in an SRB network, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the time synchronization method in the SRB network as described in any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the time synchronization method in an SRB network as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Distributed control aperiodic communication method

    CN112764407A

  • Decentralized fast network time synchronization method

    CN112821979A

  • Method for determining clock synchronization precision, electronic equipment and storage medium

    CN113572560A

  • Time synchronization method applied to mobile internet and related equipment

    CN119094065A

  • Scheduling method for implementing Ethernet determinacy communication

    CN1604554A