Timing compensation method, wireless timing terminal, electronic equipment and storage medium
By adjusting the timing of the wireless timing terminal during the testing phase, the problem of large time discrepancies between different service terminals was solved, achieving accurate time compensation, ensuring the consistency of time of each terminal in the service system, and improving timing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2021-05-20
- Publication Date
- 2026-07-17
AI Technical Summary
The time synchronization obtained by different business terminals varies significantly, making it difficult for different business terminals in the business system to cooperate based on the time synchronization.
During the testing phase, the deviation between the reference time and the test timing time is obtained through the wireless timing terminal. When the deviation is greater than the adjustment threshold, the test timing time is adjusted to be less than the adjustment threshold, and the adjustment parameters are recorded. During the usage phase, the usage timing time is adjusted according to the adjustment parameters to reduce the timing deviation.
This ensures that the time synchronization received by each business terminal is close to the reference time, reducing the deviation between time synchronization times and guaranteeing that business terminals in the business system can cooperate based on the time synchronization, thereby improving time synchronization efficiency.
Smart Images

Figure CN115379491B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and in particular to a timing compensation method, a wireless timing terminal, an electronic device, and a storage medium. Background Technology
[0002] With the rapid development of networks and the in-depth promotion of 5G industry applications, the application of 5G technology in the power system is gradually being carried out. Today, China Southern Power Grid and State Grid are carrying out technological innovation and deploying the application of 5G timing technology to provide timing for business systems through 5G technology.
[0003] However, in practical applications, the relevant time synchronization methods require 5G base stations and wireless timing terminals to provide high-precision synchronization signals to service terminals, i.e., to provide time synchronization to the service terminals. Factors such as the distance between the wireless timing terminal and the base station, the air interface transmission rate, and specific operator requirements can all affect the accuracy of the time synchronization obtained by the service terminals.
[0004] Therefore, the relevant time synchronization methods have the following problems: the time synchronization obtained by different business terminals varies greatly, making it difficult for different business terminals in the business system to cooperate based on the time synchronization. Summary of the Invention
[0005] The main objective of this application is to propose a time synchronization compensation method, a wireless time synchronization terminal, an electronic device, and a storage medium, which can reduce the deviation between the time synchronization times obtained by different service terminals and ensure that service terminals in the service system can cooperate based on the time synchronization.
[0006] To achieve the above objectives, embodiments of this application provide a timing compensation method applied to a wireless timing terminal. The wireless timing terminal receives timing information from a base station and transmits the time to a service terminal. The method includes: during a testing phase, acquiring a test timing time and a reference time; wherein the test timing time is received from the base station; calculating the deviation between the test timing time and the reference time; if the deviation is greater than or equal to an adjustment threshold, adjusting the test timing time until the deviation is less than the adjustment threshold, and recording the adjustment parameters; during a usage phase, acquiring a usage timing time from the base station; adjusting the usage timing time according to the adjustment parameters, and transmitting the adjusted usage timing time to the service terminal.
[0007] To achieve the above objectives, this application also provides a wireless timing terminal. The wireless timing terminal receives timing information from a base station and transmits it to a service terminal. The wireless timing terminal includes: an acquisition module and an adjustment module. During the testing phase, the acquisition module acquires a test timing time and a reference time; wherein the test timing time is received from the base station. The adjustment module calculates the deviation between the test timing time and the reference time; if the deviation is greater than or equal to an adjustment threshold, the test timing time is adjusted until the deviation is less than the adjustment threshold, and the adjustment parameters are recorded. During the usage phase, the acquisition module acquires the usage timing time from the base station; the adjustment module adjusts the usage timing time according to the adjustment parameters and transmits the adjusted usage timing time to the service terminal.
[0008] To achieve the above objectives, embodiments of this application also provide an electronic device, including: at least one processor; a memory communicatively connected to the at least one processor; the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described timing compensation method.
[0009] To achieve the above objectives, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned time compensation method.
[0010] This application proposes a method to compensate for the deviation between the test time and the test timing received from the base station during the testing phase. The deviation between the two is calculated, and when it is greater than or equal to an adjustment threshold, the test timing is adjusted to reduce the deviation to less than the threshold. This adjustment parameter is recorded, and during the usage phase, the usage timing is adjusted using this recorded parameter. Since the adjustment parameter compensates for the deviation between the test timing and the base time, the deviation between the usage timing sent to the service terminal after adjustment by the wireless timing terminal and the base time is small. Therefore, the usage timing received by each service terminal from each wireless timing terminal is close to the base time, resulting in a smaller deviation between the usage timing of each service terminal and ensuring that service terminals in the service system can cooperate based on the timing. Attached Figure Description
[0011] Figure 1 This is a flowchart of a time synchronization compensation method according to an embodiment of the present invention;
[0012] Figure 2 This is a timing network topology diagram provided according to an embodiment of the present invention;
[0013] Figure 3 This is a schematic diagram of a wireless timing terminal according to an embodiment of the present invention;
[0014] Figure 4 This is a flowchart of a time synchronization compensation method according to another embodiment of the present invention;
[0015] Figure 5 This is a flowchart of test timing adjustment according to an embodiment of the present invention;
[0016] Figure 6 This is a flowchart of adjusting the time synchronization based on the length of the time synchronization line according to an embodiment of the present invention;
[0017] Figure 7 This is a flowchart of adjusting the timing based on user input transmission deviation provided according to an embodiment of the present invention;
[0018] Figure 8 This is a schematic diagram of the structure of a wireless timing terminal according to an embodiment of the present invention;
[0019] Figure 9 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.
[0021] Embodiments of the present invention relate to a time synchronization compensation method, such as... Figure 1 As shown, it includes:
[0022] Step 101: During the testing phase, obtain the test timing time and the reference time; wherein, the test timing time is received from the base station;
[0023] Step 102: Calculate the deviation between the test timing and the reference time;
[0024] Step 103: If the deviation is greater than or equal to the adjustment threshold, adjust the test timing until the deviation is less than the adjustment threshold, and record the adjustment parameters.
[0025] Step 104: During the usage phase, obtain the usage time synchronization from the base station;
[0026] Step 105: Adjust the time synchronization period according to the adjustment parameters, and synchronize the time synchronization period with the business terminal using the adjusted time synchronization period.
[0027] The timing compensation method of this embodiment is applied to wireless timing terminals, such as Customer Premise Equipment (CPE). In 5G timing technology, in addition to providing traditional data transmission services, the wireless timing terminal also receives timing information from the 5G base station and provides timing information to connected service terminals. This timing compensation method is particularly applicable to industrial-grade 5G power CPEs used in power systems, such as… Figure 2 As shown, in the power system, a three-remote master station is equipped. The three-remote master station is connected to the 5G core network (5G Core, abbreviated as "5GC"), and is connected to the CPE through the 5G network. The CPE is connected to the data transfer unit (DTU), i.e. the service terminal, to realize the telemetry, tele-signaling information reporting and remote control capabilities, i.e., distribution network automation three-remote and distribution network differential protection.
[0028] like Figure 3 As shown, the wireless timing terminal contains a timing module chip and a timing microcontroller unit (MCU). The timing module chip is primarily responsible for transmitting and receiving wireless data, parsing the SIB9 messages in the periodically broadcast messages from the 5G base station, extracting the Coordinated Universal Time (UTC) information from the SIB9 messages, and converting it into a second pulse signal with a frequency of 1 second / cycle, which is then sent to the timing MCU. The timing MCU further processes the second pulse signal received from the timing module chip, converting it into an IRIG-B time code signal, and outputting the timing time to service terminals such as the DTU via interfaces such as RS-485. For the normal operation of the power system, it is necessary to ensure that the timing deviation between various devices in the power system is less than 1 μs. While existing 5G timing technology can achieve this standard in the laboratory, in actual network transmission, factors such as the distance between the wireless timing terminal and the base station, the air interface transmission rate, and special requirements of operators can affect the timing accuracy, causing the timing deviation in the power system to exceed the deviation threshold. In other words, existing 5G timing cannot meet the required timing accuracy requirements, and the timing time obtained by different service terminals varies greatly, making it difficult for different service terminals in the service system to cooperate based on the timing time.
[0029] The timing compensation method in this embodiment obtains a reference time and a test timing time received from the base station during the testing phase, calculates the deviation between the two, and adjusts the test timing time to make the deviation less than the adjustment threshold when the deviation is greater than or equal to the adjustment threshold. That is, timing compensation is performed on the test timing time to reduce the deviation between the test timing time and the reference time, and the adjustment parameters are recorded. During the usage phase, the usage timing time is adjusted with the recorded adjustment parameters. Since the adjustment parameters are used to compensate for the deviation between the test timing time and the reference time, the deviation between the usage timing time sent to the service terminal after adjustment by the wireless timing terminal and the reference time is small. Therefore, the usage timing time received by each service terminal from each wireless timing terminal is close to the reference time, and the deviation between the usage timing times of each service terminal is small, thereby ensuring that the service terminals in the service system can cooperate based on the timing time. Furthermore, since the timing compensation method of this application determines the adjustment parameters during the testing phase before the wireless timing terminal is actually put into use, in actual use, it is only necessary to adjust the usage timing time obtained from the base station according to the adjustment parameters to make the usage timing time received by the service terminal less skewed, without having to determine the adjustment parameters again. This controls the time consumption of the timing compensation method in actual use and improves timing efficiency.
[0030] The following is a detailed description of the implementation details of the network connection exception handling method in this embodiment. The following content is only for the convenience of understanding and is not necessary for implementing this solution.
[0031] In this embodiment, steps 101 to 103 are the steps performed by the wireless timing terminal during the installation and testing phase to implement the timing compensation method, and steps 104 to 105 are the steps performed by the wireless timing terminal during the actual use phase to implement the timing compensation method.
[0032] In step 101, the wireless timing terminal receives broadcast messages periodically sent by the 5G base station, parses the timing information from the SIB9 message, and thus obtains the test timing time. The wireless timing terminal is connected to an external reference time device and obtains the reference time from the reference time device.
[0033] In one example, the wireless timing terminal can also acquire the first test timing time and the first reference time multiple times, calculate the average value of the first test timing time to obtain the test timing time, and calculate the average value of the first reference time to obtain the reference time.
[0034] In this embodiment, by acquiring the first test timing time and the first reference time multiple times, using the average value of the first test timing time as the test timing time, and using the average value of the first reference time as the reference time, the influence of unexpected factors during the timing process on the adjustment parameters can be avoided, thereby improving the accuracy of timing compensation.
[0035] In step 102, the wireless timing terminal calculates the absolute value of the difference between the test timing time and the reference time to obtain the deviation between the test timing time and the reference time.
[0036] In step 103, the wireless timing terminal determines whether the deviation is less than the adjustment threshold. If the deviation is greater than or equal to the adjustment threshold, the wireless timing terminal adjusts the received test timing time until the deviation is less than the adjustment threshold, and records the adjustment parameters. The adjustment threshold is a preset deviation threshold, such as a 1μs deviation threshold allowed in a power system.
[0037] In one example, if the deviation is less than the adjustment threshold, such as Figure 4 As shown, this indicates that the difference between the test timing time received by the wireless timing terminal and the reference time is small enough, meaning the timing accuracy between the base station and the wireless timing terminal is high enough. Therefore, the wireless timing terminal does not need to perform timing compensation and does not adjust the test timing time, nor does it record the adjustment parameters; alternatively, it records the adjustment parameters as 0. During the usage phase, the wireless timing terminal sends the acquired usage timing time to the service terminal.
[0038] Specifically, such as Figure 5As shown, the wireless timing terminal adjusts the test timing time using the following adjustment method: The wireless timing terminal first determines whether the deviation β is less than the initial adjustment step size B0. If the deviation β is less than the initial adjustment step size B0, the wireless timing terminal adjusts the test timing time with a fine adjustment step size B1 until the deviation β is less than the adjustment threshold. The initial adjustment step size B0 is greater than the fine adjustment step size B1. If the deviation β is greater than or equal to the initial adjustment step size B0, the wireless timing terminal adjusts the test timing time with the initial adjustment step size B0 and then with the fine adjustment step size B1 until the deviation is less than the adjustment threshold. The initial adjustment step size B0 is the time adjustment step size of the timing module chip in the wireless timing terminal, and the fine adjustment step size B1 is the time adjustment step size of the timing microcontroller unit (MCU) in the wireless timing terminal. The timing module chip extracts the test timing time or the used timing time from the broadcast message sent by the base station, converts the test timing time or the used timing time into a pulse signal and sends it to the timing MCU. The timing MCU converts the pulse signal into a timing signal and sends it to the service terminal. When the timing module chip converts the test timing time or the used timing time into a pulse signal, it adjusts the test timing time or the used timing time using the initial adjustment step size B0. When the timing MCU converts the pulse signal into a timing signal, it adjusts the test timing time or the used timing time using the fine adjustment step size B1. The initial adjustment step size B0 and the fine adjustment step size B1 can be obtained by testing by the wireless timing terminal or input by the user through the user interface provided by the wireless timing terminal. Generally, the initial adjustment step size B0 is in milliseconds, for example, 10ms or 1ms, while the fine adjustment step size B1 is in nanoseconds, for example, 1000ns, 10ns or 1ns.
[0039] In one example, the test timing time obtained by the wireless timing terminal is t, and the reference time measured by the reference time device is T0. The deviation β = |t - T0|, for example, is 3,001,250 ns. Since 3,001,250 ns is greater than the adjustment threshold of 1 μs and greater than the initial adjustment step size of 1 ms, the timing module chip adjusts the test timing time with an initial adjustment step size of 1 ms. The deviation β1 of the adjusted test timing time is 3,001,250 - 1,000,000 * 3 = 1,250 ns. Then, the timing MCU adjusts the test timing time with a fine adjustment step size of 1000 ns. The deviation β2 of the adjusted test timing time is 1,250 - 1,000 = 250 ns, which is less than the adjustment threshold of 1 μs.
[0040] In this embodiment, the timing MCU and timing module chip in the wireless timing terminal are used to adjust the test timing time, eliminating the need to add a timing adjustment component to the wireless timing terminal. This achieves compensation for the timing deviation between the base station and the wireless timing terminal while saving the manufacturing cost of the wireless timing terminal.
[0041] In another example, the wireless timing terminal can first obtain the initial adjustment step size of the timing module chip and the fine adjustment step size of the timing MCU, and calculate and record the adjustment parameters that use the initial adjustment step size and the fine adjustment step size to adjust the deviation to the minimum value.
[0042] In step 104, the wireless timing terminal obtains the timing time from the 5G base station. The wireless timing terminal obtains the timing information from the SIB9 message by receiving the broadcast messages periodically sent by the 5G base station.
[0043] In step 105, the wireless timing terminal adjusts the timing time according to the adjustment parameters and transmits the adjusted timing time to the service terminal.
[0044] In one example, during the testing phase, after calculating the deviation between the test timing time and the reference time, the wireless timing terminal also sends the test timing time to the service terminal to obtain the transmission deviation between the service terminal and the wireless timing terminal. During the usage phase, before sending timing to the service terminal, the wireless timing terminal also adjusts the usage timing time based on the transmission deviation.
[0045] In this embodiment, during the testing phase, after determining whether the deviation is less than the adjustment threshold, the test timing time is sent to the service terminal. That is, the test timing time with a deviation less than the adjustment threshold that has not been adjusted, or the adjusted test timing time, is sent to the service terminal. The transmission deviation between the service terminal and the wireless timing terminal is obtained. Based on the transmission deviation, the usage timing time is adjusted to reduce the transmission deviation, further reducing the deviation between the usage timing time received by the service terminal and the reference time, thereby further reducing the deviation between the usage timing times received by each service terminal.
[0046] In one example, the wireless timing terminal can obtain the transmission deviation by acquiring the difference between the test timing time received by the service terminal and the reference time received by the service terminal. The service terminal, by connecting to an external reference time device, calculates the difference between the received test timing time and the reference time; this difference is the transmission deviation. After calculating the transmission deviation, the service terminal sends the transmission deviation to the wireless timing terminal for the wireless timing terminal to obtain the transmission deviation.
[0047] In this embodiment, a precise transmission deviation value is obtained based on the difference between the test timing time received by the service terminal and the reference time received by the service terminal. Thus, the wireless timing terminal can compensate for the transmission deviation based on the transmission deviation value, reducing the deviation between the usage timing time received by the service terminal and the reference time, thereby further reducing the deviation between the usage timing times received by each service terminal.
[0048] In another example, the wireless timing terminal can calculate the transmission deviation based on the length of the timing line between the service terminal and the wireless timing terminal. The length of the timing line between the service terminal and the wireless timing terminal is obtained by sending test messages between them.
[0049] The time synchronization line length can also be obtained directly through user input. The wireless time synchronization terminal provides a user interface for users to input the time synchronization line length value. Since the time synchronization line is an essential component for the installation and connection between the wireless time synchronization terminal and the service terminal, installers usually know the time synchronization line length value in advance. By simply inputting the time synchronization line length value, the wireless time synchronization terminal can calculate the transmission deviation, allowing for quick acquisition of the transmission deviation and saving communication resources. When the positional relationship between the wireless time synchronization terminal and the service terminal changes, and the time synchronization line length value changes, the user can modify the time synchronization line length value in the user interface, thereby changing the transmission deviation.
[0050] Specifically, each meter of the time synchronization line introduces a deviation of +Δ0. Therefore, the usage time T2 sent by the wireless time synchronization terminal to the service terminal is T1 - Δ0. m , where Δ m =Δ0*m, where m is the time synchronization line length in meters. The wireless time synchronization terminal provides a user interface where the user inputs the time synchronization line length m. For example, the user can perform the following operation: enter the advanced settings interface—enter the time synchronization compensation interface—enter the time synchronization line length, and the wireless time synchronization terminal will display the result. Figure 6 As shown, the system provides users with an advanced settings interface and a time synchronization compensation interface. The system obtains the user-input time synchronization line length from the time synchronization compensation interface and determines whether the obtained time synchronization line length is the same as the current / default length. If the obtained time synchronization line length is the same as the current / default length, the adjustment ends. If the obtained time synchronization line length is different from the current / default length, the time synchronization time is adjusted and takes effect after the wireless time synchronization terminal is restarted.
[0051] In this embodiment, since the signal will be lost during transmission, the transmission deviation is positively correlated with the length of the timing line between the service terminal and the wireless timing terminal. Therefore, the wireless timing terminal can calculate the transmission deviation based on the length of the timing line between the service terminal and the wireless timing terminal, compensate for the transmission deviation, reduce the deviation between the usage timing time received by the service terminal and the reference time, and further reduce the deviation between the usage timing time received by each service terminal.
[0052] In one example, the wireless timing terminal adjusts the time synchronization used in the following way: The wireless timing terminal first determines whether the deviation is less than the initial adjustment step size. If the deviation is less than the initial adjustment step size, the wireless timing terminal adjusts the time synchronization used in the micro-adjustment step size until the transmission deviation reaches its minimum value. Here, the initial adjustment step size is greater than the micro-adjustment step size. If the deviation is greater than or equal to the initial adjustment step size, the wireless timing terminal adjusts the time synchronization used in the initial adjustment step size and then adjusts the time synchronization used in the micro-adjustment step size until the transmission deviation reaches its minimum value. Here, the initial adjustment step size is the time adjustment step size of the timing module chip in the wireless timing terminal, and the micro-adjustment step size is the time adjustment step size of the timing microcontroller unit (MCU) in the wireless timing terminal. The timing module chip is used to extract the test time synchronization or the time synchronization used in the broadcast message sent by the base station, convert the test time synchronization or the time synchronization used in the time synchronization into a pulse signal and send it to the timing MCU. The timing MCU is used to convert the pulse signal into a timing signal and send it to the service terminal. When the timing module chip converts the test timing time or the time used for timing into a pulse signal, it adjusts the test timing time or the time used for timing with an initial adjustment step size. When the timing MCU converts the pulse signal into a timing signal, it adjusts the test timing time or the time used for timing with a fine adjustment step size.
[0053] In this embodiment, the MCU and timing module chip in the wireless timing terminal are used to adjust the timing time, eliminating the need to add a timing adjustment component to the wireless timing terminal. This not only compensates for the timing deviation between the wireless timing terminal and the service terminal, but also saves on the manufacturing cost of the wireless timing terminal.
[0054] In another example, the wireless timing terminal can adjust the timing information as follows: The wireless timing terminal can provide a user interface for the user to input the transmission deviation measured by the service terminal. In the user interface, the user can perform the following operations: enter the advanced settings interface—enter the timing compensation interface—input the transmission deviation, and the wireless timing terminal will then adjust the timing information accordingly. Figure 7 As shown, the system provides users with an advanced settings interface and a time synchronization compensation interface. The system obtains the transmission deviation input by the user from the time synchronization compensation interface and determines whether the obtained transmission deviation is greater than the transmission deviation adjustment threshold. If the obtained transmission deviation is less than the transmission deviation adjustment threshold, the adjustment ends. If the obtained transmission deviation is greater than or equal to the adjustment threshold, the time synchronization time is adjusted and takes effect after the wireless time synchronization terminal is restarted.
[0055] This invention also relates to a wireless timing terminal, which receives timing information from a base station and transmits the time to a service terminal, such as... Figure 8 As shown, the wireless timing terminal includes: an acquisition module 801 and an adjustment module 802;
[0056] The acquisition module 801 is used during the testing phase to acquire the test timing time and the reference time; wherein, the test timing time is received from the base station;
[0057] The adjustment module 802 is used during the testing phase to calculate the deviation between the test timing time and the reference time; if the deviation is greater than or equal to the adjustment threshold, the test timing time is adjusted until the deviation is less than the adjustment threshold, and the adjustment parameters are recorded.
[0058] The acquisition module 801, during the usage phase, is used to acquire the usage time synchronization from the base station;
[0059] The adjustment module 802, during the usage phase, is used to adjust the usage time synchronization according to the adjustment parameters, and to synchronize the time synchronization with the business terminal using the adjusted usage time synchronization.
[0060] In one example, during the testing phase, after calculating the deviation between the test timing time and the reference time, the adjustment module 802 is further configured to send the test timing time to the service terminal; the acquisition module 801 is further configured to acquire the transmission deviation between the service terminal and the wireless timing terminal; during the usage phase, before timing the service terminal, the adjustment module 802 is further configured to adjust the usage timing time according to the transmission deviation.
[0061] In one example, the acquisition module 801 is also used to acquire the first test timing time and the first reference time multiple times; calculate the average value of the first test timing time to obtain the test timing time; and calculate the average value of the first reference time to obtain the reference time.
[0062] In one example, during the testing phase, the acquisition module 801 is also used to calculate the transmission deviation based on the length of the timing line between the service terminal and the wireless timing terminal.
[0063] In one example, during the testing phase, the acquisition module 801 is also used to obtain the transmission deviation based on the difference between the test timing time received by the service terminal and the reference time received by the service terminal.
[0064] In one example, during the testing phase, the adjustment module 802 is further used to determine whether the deviation is less than the initial adjustment step size; if the deviation is less than the initial adjustment step size, the timing time is adjusted by a fine adjustment step size until the transmission deviation reaches its minimum value; wherein, the initial adjustment step size is greater than the fine adjustment step size; if the deviation is greater than or equal to the initial adjustment step size, the timing time is adjusted by the initial adjustment step size, and then adjusted by the fine adjustment step size until the transmission deviation reaches its minimum value; wherein, the initial adjustment step size is the time adjustment step size of the timing module chip in the wireless timing terminal, and the fine adjustment step size is the time adjustment step size of the timing microcontroller unit (MCU) in the wireless timing terminal. The timing module chip is used to adjust the test timing time or the used timing time by the initial adjustment step size when converting the test timing time or the used timing time into a pulse signal and sending it to the timing MCU. The timing MCU adjusts the test timing time or the used timing time by the fine adjustment step size when converting the pulse signal into a timing signal and sending it to the service terminal.
[0065] In one example, during the testing phase, the adjustment module 802 is further used to determine whether the deviation is less than the initial adjustment step size; if the deviation is less than the initial adjustment step size, the test timing time is adjusted by a fine adjustment step size until the deviation is less than the adjustment threshold; wherein, the initial adjustment step size is greater than the fine adjustment step size; if the deviation is greater than or equal to the initial adjustment step size, the test timing time is adjusted by the initial adjustment step size and then by the fine adjustment step size until the deviation is less than the adjustment threshold; wherein, the initial adjustment step size is the time adjustment step size of the timing module chip in the wireless timing terminal, and the fine adjustment step size is the time adjustment step size of the timing microcontroller unit (MCU) in the wireless timing terminal. The timing module chip is used to adjust the test timing time or the used timing time by the initial adjustment step size when converting the test timing time or the used timing time into a pulse signal and sending it to the timing MCU. The timing MCU adjusts the test timing time or the used timing time by the fine adjustment step size when converting the pulse signal into a timing signal and sending it to the service terminal.
[0066] This invention also relates to an electronic device, such as... Figure 9 As shown, it includes: at least one processor 901; a memory 902 communicatively connected to the at least one processor; wherein the memory 902 stores instructions executable by the at least one processor 901, and the instructions are executed by the at least one processor 901 to perform the aforementioned timing compensation method.
[0067] The memory 902 and processor 901 are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors 901 and memory 902. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Information processed by processor 901 is transmitted over a wireless medium via an antenna, which further receives information and transmits it to processor 901.
[0068] Processor 901 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 902 can be used to store information used by the processor during operation.
[0069] Embodiments of the present invention also relate to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method embodiments.
[0070] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0071] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing the present invention, and in practical applications, various changes in form and detail may be made without departing from the spirit and scope of the present invention.
Claims
1. A time synchronization compensation method, characterized in that, An application to a wireless timing terminal, wherein the wireless timing terminal receives timing from a base station and transmits timing to a service terminal, the method includes: During the testing phase, the test timing time and the reference time are obtained; wherein, the test timing time is received from the base station; Calculate the deviation between the test timing time and the reference time; If the deviation is greater than or equal to the adjustment threshold, the test timing time is adjusted until the deviation is less than the adjustment threshold, and the adjustment parameters are recorded. During the usage phase, the usage time synchronization time is obtained from the base station; Based on the adjustment parameters, the time synchronization time is adjusted, and the adjusted time synchronization time is used to synchronize the time with the service terminal. Adjusting the test timing time until the deviation is less than the adjustment threshold includes: If the deviation is less than the initial adjustment step size, the test timing time is adjusted by a fine adjustment step size until the deviation is less than the adjustment threshold; wherein the initial adjustment step size is greater than the fine adjustment step size. If the deviation is greater than or equal to the initial adjustment step size, then the test timing time is adjusted with the initial adjustment step size, and then the test timing time is adjusted with the fine adjustment step size until the deviation is less than the adjustment threshold. Wherein, the initial adjustment step size is the time adjustment step size of the time synchronization module chip in the wireless time synchronization terminal, and the fine adjustment step size is the time adjustment step size of the time synchronization microcontroller unit (MCU) in the wireless time synchronization terminal. The time synchronization module chip is used to adjust the test time synchronization time or the used time synchronization time with the initial adjustment step size before converting the test time synchronization time or the used time synchronization time into a pulse signal and sending it to the time synchronization MCU. The time synchronization MCU is used to adjust the test time synchronization time or the used time synchronization time with the fine adjustment step size before converting the pulse signal into a time synchronization signal and sending it to the service terminal.
2. The time synchronization compensation method according to claim 1, characterized in that, The acquisition of the test timing includes: The first test timing and the first baseline time were obtained multiple times. Calculate the average value of the first test timing time to obtain the test timing time; The average value of the first reference time is calculated to obtain the reference time.
3. The time synchronization compensation method according to claim 1 or 2, characterized in that, During the testing phase, and after calculating the deviation between the test timing time and the reference time, the method further includes: Obtain the transmission deviation between the service terminal and the wireless timing terminal; During the usage phase, prior to the time synchronization with the service terminal, the following steps are also included: The timing time is adjusted based on the transmission deviation.
4. The time synchronization compensation method according to claim 3, characterized in that, The step of obtaining the transmission deviation between the service terminal and the wireless timing terminal includes: The transmission deviation is calculated based on the length of the timing line between the service terminal and the wireless timing terminal.
5. The time synchronization compensation method according to claim 3, characterized in that, During the testing phase, and after calculating the deviation between the test timing time and the reference time, the method further includes: Send the test timing to the service terminal; The step of obtaining the transmission deviation between the service terminal and the wireless timing terminal includes: The transmission deviation is obtained based on the difference between the test timing received by the service terminal and the reference time received by the service terminal.
6. The time compensation method according to claim 3, characterized in that, The step of adjusting the timing based on the transmission deviation includes: Determine whether the deviation is less than the initial adjustment step size; If the deviation is less than the initial adjustment step size, the timing time is adjusted by a fine adjustment step size until the transmission deviation reaches its minimum value; wherein the initial adjustment step size is greater than the fine adjustment step size. If the deviation is greater than or equal to the initial adjustment step size, then the time synchronization time is adjusted by the initial adjustment step size, and then the time synchronization time is adjusted by the fine adjustment step size until the transmission deviation reaches its minimum value.
7. A wireless timing terminal, characterized in that, The wireless timing terminal receives time synchronization from the base station and transmits time synchronization to the service terminal. The wireless timing terminal includes: an acquisition module and an adjustment module. The acquisition module is used to acquire the test timing time and the reference time during the testing phase; wherein the test timing time is received from the base station. The adjustment module is used to calculate the deviation between the test timing time and the reference time during the testing phase; if the deviation is greater than or equal to an adjustment threshold, the test timing time is adjusted until the deviation is less than the adjustment threshold, and the adjustment parameters are recorded. The acquisition module is also used to acquire the usage time synchronization from the base station during the usage phase; The adjustment module is also used to adjust the usage time synchronization time according to the adjustment parameters during the usage phase, and to synchronize the time of the service terminal with the adjusted usage time synchronization time. The adjustment module is further configured to, if the deviation is less than the initial adjustment step size, adjust the test timing time with a fine adjustment step size until the deviation is less than the adjustment threshold; wherein the initial adjustment step size is greater than the fine adjustment step size; if the deviation is greater than or equal to the initial adjustment step size, adjust the test timing time with the initial adjustment step size and then adjust the test timing time with the fine adjustment step size until the deviation is less than the adjustment threshold; wherein the initial adjustment step size is the time adjustment step size of the timing module chip in the wireless timing terminal, the fine adjustment step size is the time adjustment step size of the timing microcontroller unit (MCU) in the wireless timing terminal, the timing module chip is configured to adjust the test timing time or the used timing time with the initial adjustment step size before converting the test timing time or the used timing time into a pulse signal and sending it to the timing MCU, and the timing MCU is configured to adjust the test timing time or the used timing time with the fine adjustment step size before converting the pulse signal into a timing signal and sending it to the service terminal.
8. An electronic device, characterized in that, include: At least one processor; A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the timing compensation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the timing compensation method as described in any one of claims 1 to 6.