Time synchronization method and device, network equipment, storage medium and program product
By receiving and filtering synchronization information, calculating time deviation, and adjusting frame header position, the problem that the gossip algorithm cannot be applied to the coexistence of macro base stations and micro base stations is solved, thus achieving accuracy and stability in time synchronization.
Patent Information
- Application Number
- CN202510144993.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-12-12
AI Technical Summary
The existing gossip algorithm is not applicable to scenarios where macro base stations and micro base stations coexist, and changes in nodes can disrupt the synchronization of the network system, causing clock information oscillations or disturbances.
By receiving the synchronization information broadcast by the second node device, the third node device that meets the preset synchronization conditions is selected as the first neighbor device. The time deviation is calculated and time synchronization adjustment is performed. The frame synchronization method is adopted, taking into account the propagation delay and the weight of different nodes, and the improved gossip algorithm is used.
It achieves time synchronization in scenarios where macro base stations and micro base stations coexist, improving synchronization accuracy and stability, and reducing time oscillations and system interference caused by network topology changes.
Smart Images

Figure CN121126504A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mobile communication, in particular to a time synchronization method and device, network equipment, storage medium and program product. BACKGROUND
[0002] The gossip algorithm is a consensus-based time synchronization algorithm, and the clock of the base station node in the network no longer needs to be synchronized with a specific node, thereby avoiding the disadvantage that the synchronization error increases with the increase of the network topology diameter.
[0003] However, the existing gossip algorithm has eventual consistency, and when the node changes, such as the addition of clock information of a new node or the occurrence of a faulty clock, the synchronization state of the entire network system is broken, and the clock information of each node oscillates or is disturbed. Moreover, the gossip algorithm is only applicable to a distributed system in which nodes are completely equal and there is no central node, and cannot be applied to a scenario in which macro base stations and micro base stations coexist. SUMMARY
[0004] At least one embodiment of the present application provides a time synchronization method, device, network equipment, storage medium and program product, which are used to solve the problem that the existing gossip algorithm is only applicable to a distributed system and cannot be applied to a scenario in which macro base stations and micro base stations coexist.
[0005] To solve the above technical problems, the present application is implemented as follows:
[0006] In a first aspect, the embodiments of the present application provide a time synchronization method applied to a first node device, comprising:
[0007] receiving synchronization information broadcast by at least one second node device; the synchronization information comprising a first frame header position and a synchronization state parameter of the second node device;
[0008] determining a third node device in the at least one second node device as a first neighbor device, wherein the synchronization state parameter of the third node device satisfies a preset synchronization condition;
[0009] calculating a time deviation between the first node device and each third node device according to a current second frame header position of the first node device and the first frame header position of each third node device;
[0010] performing time synchronization adjustment on the first node device according to the time deviation.
[0011] Further, the synchronization state parameter comprises state indication information for indicating a current state as a synchronization state or an out-of-step state, and / or synchronization count information for indicating a synchronization cumulative number.
[0012] The preset synchronization condition comprises one or more of the following:
[0013] The current state is a synchronization state;
[0014] The synchronization count is greater than the synchronization count of the first node device.
[0015] Further, according to the second frame header position of the first node device and the first frame header position of each third node device, the time offset between the first node device and each third node device is calculated, comprising:
[0016] According to the first frame header position and the second frame header position, the first time delay of the first node device sending a message to each third node device and the second time delay of each third node device sending a message to the first node device are determined;
[0017] The propagation time delay between the first node device and each third node device is determined;
[0018] According to the first time delay, the second time delay and the propagation time delay, the time offset between the first node device and each third node device is calculated.
[0019] Further, according to the time offset, the first node device is time-synchronized and adjusted, comprising:
[0020] The weight of each third node device is determined;
[0021] According to the weight of each third node device and the time offset, the frame header offset of the first node device relative to the third node device is determined;
[0022] The second frame header position is adjusted according to the frame header offset.
[0023] Further, the weight of each third node device is determined, comprising at least one of the following:
[0024] According to the type of the third node device, the weight of each third node device is determined;
[0025] According to the synchronization count of each third node device, the weight of each third node device is determined;
[0026] According to the number of second neighbor devices of the third node device, the weight of each third node device is determined;
[0027] The third node device types include: a macro base station, a micro base station that has been time-synchronized with the macro base station, and a micro base station that has been time-synchronized with a neighbor micro base station and whose neighbor micro base station is greater than a preset value.
[0028] Further, the weight of each third node device is determined according to the synchronization count of each third node device, including:
[0029] A first proportion of the synchronization count of each third node device to the sum of the synchronization counts of all third node devices is calculated.
[0030] The weight of each third node device is determined according to the first proportion.
[0031] The weight of each third node device is determined according to the number of second neighbor devices of the third node device, including:
[0032] A second proportion of the number of second neighbor devices of each third node device to the sum of the numbers of all second neighbor devices is calculated.
[0033] The weight of each third node device is determined according to the second proportion.
[0034] Further, the frame header offset of the first node device relative to the third node device is determined according to the weight of each third node device and the time offset, including:
[0035] A weighted average of the time offset between the first node device and each third node device is calculated as the frame header offset according to the weight of each third node device.
[0036] Further, the method further includes:
[0037] The frame header position of the wireless frame of the first node device is adjusted M times until the frame header position after the Mth adjustment is the same as the frame header position after the (M-1)th adjustment.
[0038] Wherein, M is an integer greater than or equal to 1.
[0039] Further, the synchronization information is carried in a first system message block.
[0040] Further, the method further includes:
[0041] The current synchronization information is broadcasted.
[0042] Wherein, the synchronization information includes: a second frame header position of the first node device and a synchronization state parameter.
[0043] In a second aspect, the embodiments of the present application provide a time synchronization method, applied to a second node device, comprising:
[0044] broadcasting current synchronization information;
[0045] The synchronization information comprises a first frame header position and a synchronization state parameter of the second node device.
[0046] Further, the method further comprises:
[0047] periodically detecting timing information, wherein the timing information comprises a frame header position of a radio frame of the second node device;
[0048] in a case where a deviation of the timing information of the second node device occurring in at least two detection processes is less than a preset threshold, determining that a synchronization state of the second node device is synchronization;
[0049] determining a synchronization count of the second node device according to the synchronization state of the second node device.
[0050] Further, determining the synchronization count of the second node device according to the synchronization state of the second node device comprises:
[0051] in a case where the synchronization state of the second node device switches to synchronization, the synchronization count is a period number of periods in which the synchronization state is synchronization;
[0052] in a case where the synchronization state of the second node device switches to out-of-sync, the synchronization count is 0.
[0053] In a third aspect, the embodiments of the present application provide a time synchronization device, applied to a first node device, comprising:
[0054] a receiving module, configured to receive synchronization information broadcast by at least one second node device, wherein the synchronization information comprises a first frame header position and a synchronization state parameter of the second node device;
[0055] a determining module, configured to determine that a third node device, in which the synchronization state parameter satisfies a preset synchronization condition, is a first neighbor device;
[0056] a calculating module, configured to calculate a time deviation between the first node device and each third node device according to a current second frame header position of the first node device and the first frame header position of each third node device;
[0057] an adjusting module, configured to perform time synchronization on the first node device according to the time deviation.
[0058] In a fourth aspect, an embodiment of the present application provides a time synchronization apparatus applied to a second node device, comprising:
[0059] a broadcasting module configured to broadcast current synchronization information;
[0060] The synchronization information comprises a first frame header position and a synchronization state parameter of the second node device.
[0061] In a fifth aspect, an embodiment of the present application provides a network device, comprising a transceiver and a processor, wherein:
[0062] The transceiver is configured to receive synchronization information broadcast by at least one second node device, and the synchronization information comprises a first frame header position and a synchronization state parameter of the second node device.
[0063] The processor is configured to determine a third node device in the at least one second node device as a first neighbor device, if the synchronization state parameter of the third node device satisfies a preset synchronization condition.
[0064] According to a current second frame header position of the first node device and the first frame header position of each third node device, a time offset between the first node device and each third node device is calculated.
[0065] The first node device is time-synchronized according to the time offset.
[0066] In a sixth aspect, an embodiment of the present application provides a network device, comprising a transceiver, wherein:
[0067] The transceiver is configured to broadcast current synchronization information.
[0068] The synchronization information comprises a first frame header position and a synchronization state parameter of the second node device.
[0069] In a seventh aspect, an embodiment of the present application provides a network device, comprising a processor, a memory, and a program stored in the memory and executable in the processor, and the program, when executed in the processor, implements the steps of the time synchronization method.
[0070] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a program, and the program, when executed in a processor, implements the steps of the time synchronization method.
[0071] In a ninth aspect, a computer program product is provided, comprising computer instructions, and the computer instructions, when executed in a processor, implement the steps of the time synchronization method.
[0072] Compared with the prior art, the time synchronization method, device, network equipment, storage medium and program product provided by the embodiment of the application can filter out the second node equipment meeting the preset synchronization condition as the neighbor equipment of the first node equipment by receiving the synchronization information broadcast by at least one second node equipment, and adjust the time synchronization of the first node equipment by calculating the time deviation between the first node equipment and each third node equipment. The time synchronization method of the embodiment of the application solves the problem that the gossip algorithm in the prior art cannot be applied to the coexistence of micro base stations and macro base stations, the reduction of synchronization speed caused by the change of distributed system nodes, and various scenes with system interference. BRIEF DESCRIPTION OF DRAWINGS
[0073] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not intended to limit the scope of the application. Moreover, like reference numerals designate like parts throughout the several views in the drawings. In the drawings:
[0074] Figure 1 The step schematic diagram of the time synchronization method applied to the first node equipment of the embodiment of the application;
[0075] Figure 2 The step schematic diagram of the time synchronization method applied to the second node equipment of the embodiment of the application;
[0076] Figure 3 The step logic diagram of the time synchronization method of the embodiment of the application;
[0077] Figure 4 One of the convergence performance simulation diagrams of the time synchronization method of the embodiment of the application compared with the prior art;
[0078] Figure 5 The second of the convergence performance simulation diagrams of the time synchronization method of the embodiment of the application compared with the prior art;
[0079] Figure 6 The third of the convergence performance simulation diagrams of the time synchronization method of the embodiment of the application compared with the prior art;
[0080] Figure 7 The structure schematic diagram of the time synchronization device of the embodiment of the application;
[0081] Figure 8 The structure schematic diagram of the time synchronization device of another embodiment of the application;
[0082] Figure 9 The structure schematic diagram of the network equipment of the embodiment of the application;
[0083] Figure 10 Structure diagram of network device according to another embodiment of the present application;
[0084] Figure 11 Structure diagram of network device according to another embodiment of the present application. DETAILED DESCRIPTION
[0085] Exemplary embodiments of the present application will be described herein below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it is to be understood that the present application can be embodied in various forms without being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
[0086] The terms "first", "second", and the like, as used in the description and the claims of this application, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so construed can interchange depending upon the context in which it is used. Embodiments of the application described herein are not limited to the specific embodiments described herein, but include any and all equivalents falling within the scope of the present application. Furthermore, the use of the terms "including", "containing", "having" and variations thereof herein are meant to encompass the presence of stated elements or features but do not preclude the presence or addition of one or more other elements or features. The term "and / or" includes any and all combinations of one or more of the associated listed items.
[0087] The technology described herein is not limited to NR systems and Long Time Evolution (LTE) / LTE-Advanced (LTE-A) systems, and can also be used for various wireless communication systems such as Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency Division Multiple Access (SC-FDMA), and other systems. The terms "system" and "network" are often used interchangeably. A CDMA system can implement a radio technology such as CDMA2000, Universal Terrestrial Radio Access (UTRA), etc. UTRA includes Wideband-CDMA (WCDMA) and other variants of CDMA. A TDMA system can implement a radio technology such as Global System for Mobile Communications (GSM). An OFDMA system can implement a radio technology such as Ultra Mobile Broadband (UMB), Evolution-UTRA (E-UTRA), IEEE 802.21 (Wi-Fi), IEEE 802.16 (WiMAX), IEEE 802.20, Flash-OFDM, etc. UTRA and E-UTRA are part of Universal Mobile Telecommunication System (UMTS). LTE and LTE-Advanced (e.g., LTE-A) are new releases of UMTS that use E-UTRA. UTRA, E-UTRA, UMTS, LTE, LTE-A, and GSM are described in documents from an organization called the "3rd Generation Partnership Project" (3GPP). CDMA2000 and UMB are described in documents from an organization called the "3rd Generation Partnership Project 2" (3GPP2).The techniques described herein can be used for the systems and radio technologies mentioned above as well as other systems and radio technologies. The description below, however, describes a NR system for purposes of example, and NR terminology is used in much of the description below, although the techniques are applicable beyond NR systems.
[0088] The following description provides examples, and is not limiting of the scope, applicability, or configuration set forth in the claims. Changes can be made in the function and arrangement of elements discussed without departing from the scope and spirit of aspects of the disclosure. Various examples can omit, substitute, or add various procedures or components as appropriate. For instance, the methods described can be performed in an order different from that described, and various steps can be added, omitted, or combined. Also, features described with respect to certain examples can be combined in other examples.
[0089] As described in the background, in the prior art, when the gossip algorithm node changes, the synchronization state in the entire network system is broken, and the clock information of each node is oscillated or disturbed. And it is only applicable to the distributed system where nodes are completely peer-to-peer and there is no central node, and cannot be applied to the scenario where macro base stations and micro base stations exist at the same time.
[0090] As shown in Figure 1 The time synchronization method provided by the embodiment of the present application, when applied to a first node device, comprises the following steps:
[0091] Step 101, receiving synchronization information broadcast by at least one second node device; the synchronization information comprises a first frame header position and a synchronization state parameter of the second node device;
[0092] Step 102, determining a third node device in the at least one second node device as a first neighbor device, where the synchronization state parameter of the third node device satisfies a preset synchronization condition;
[0093] Step 103, calculating a time deviation between the first node device and each of the third node devices according to a current second frame header position of the first node device and the first frame header position of each of the third node devices;
[0094] Step 104, performing time synchronization adjustment on the first node device according to the time deviation.
[0095] Optionally, the first node is a micro base station or a small base station, and the second node is a micro base station, a small base station, or a macro base station.
[0096] Optionally, the synchronization information is broadcast in real time by the second node device based on its local time.
[0097] The time synchronization method of the embodiment of the present application is different from the existing gossip algorithm in which the signal quality listened to is used as the basis for selecting the neighbor device, and the neighbor device is determined according to the synchronization state parameter of the received node device, so that when the node changes, the synchronization state of the entire network system is prevented from being broken due to the addition of a new node or the error of the clock information of the node device, and the information of each node is prevented from being disturbed.
[0098] The time synchronization method provided by the embodiment of the present application can filter out the second node device satisfying the preset synchronization condition as the neighbor device of the first node device by receiving the synchronization information broadcast by at least one second node device, and adjust the time synchronization of the first node device by calculating the time deviation between the first node device and each third node device.
[0099] The time synchronization method provided by the embodiment of the present application gives the synchronization state parameter to the macro base station, the micro base station and the small base station, overcomes the limitation that the gossip algorithm can only be used in a decentralized distributed system, and is applicable to a scenario in which only a micro base station exists and a scenario in which a macro base station and a micro base station exist at the same time. The problem that the synchronization error of a multi-hop synchronization network topology formed by one macro base station and multiple small base stations (only part of the small base stations can listen to the macro base station) increases with the increase of the hop number is solved.
[0100] Optionally, the synchronization state parameter includes state indication information used for indicating that the current state is a synchronization state or an out-of-step state, and / or synchronization count information used for indicating the synchronization cumulative number.
[0101] The preset synchronization condition includes one or more of the following:
[0102] The current state is a synchronization state.
[0103] The synchronization count is greater than the synchronization count of the first node device.
[0104] In the embodiment of the present application, when the first node or the second node is a micro base station, the first node or the second node performs periodic timing information detection and adjustment, and the corresponding synchronization state setting mechanism is that the synchronization state is set to synchronization only when the timing information is unchanged compared with the last time or unchanged for several times in succession, otherwise the synchronization state is set to out-of-step.
[0105] It should be noted that the unchanged timing information can be understood as that the change amount of the timing information of the micro base station at the current time compared with the last time is less than a preset threshold value; the preset threshold value can be set to a value not greater than the time synchronization accuracy, for example, 1 microsecond.
[0106] In the embodiments of the present application, the timing information is the frame header position of a radio frame, and the timing information being unchanged can be understood as the offset of the frame header position being 0, i.e., offset=0.
[0107] Specifically, the offset of the frame header position is zero, i.e., the frame header position of the current node device has an offset of zero relative to the frame header of its neighbor device; the weighted average of the offset of the frame header position of the current node device relative to the offset of the frame header of its neighbor device is zero; i.e., the frame header position of the radio frame of the node device at m+1 time has an offset of zero relative to the frame header position at n time.
[0108] In the embodiments of the present application, in the case that the first node device or the second node device is a macro base station, when it completes the authorization of a global navigation satellite system (GNSS), its synchronization count is infinite, for example, 2 32 If it is out of synchronization due to a fault, the synchronization count is reset to zero.
[0109] In the case that the first node device or the second node device is a micro base station or a small base station, when the timing information is unchanged compared with the last time or unchanged for a preset number of times in succession, the synchronization count starts to accumulate from 0, the synchronization state is unchanged for each period, the synchronization count is incremented by 1, and once the timing information changes compared with the last time due to a fault or the like, the synchronization count is reset to 0.
[0110] It should be noted that the synchronization state being unchanged can be understood as the current timing information of the node device changing by less than a preset threshold compared with the last time, and the preset threshold can be set to a value not greater than the time synchronization accuracy, for example, 1 microsecond.
[0111] The time synchronization method of the embodiments of the present application can use the synchronization state parameter as the basis for selecting the neighbor device of the first node device, so that the first node device can only synchronize with the neighbor device whose synchronization state is synchronization or whose synchronization count is greater than itself. The method can cope with changes in network topology and avoid time shock and system interference caused by the addition of a node or a node fault.
[0112] Optionally, according to the current second frame header position of the first node device and the first frame header position of each third node device, a time offset between the first node device and each third node device is calculated, including:
[0113] According to the first frame header position and the second frame header position, a first time delay of the first node device sending a message to each third node device and a second time delay of each third node device sending a message to the first node device are determined.
[0114] determining a propagation delay between the first node device and each of the third node devices;
[0115] calculating a time offset between the first node device and each of the third node devices according to the first time delay, the second time delay and the propagation delay.
[0116] In the embodiments of the present application, for any two adjacent node devices (for example, the first node device and any third node device), under a symmetric channel, it is assumed that the propagation delay between the two nodes is Delay, and the two node devices broadcast and receive the synchronization information respectively based on their local time.
[0117] The time delay of the message from the first node device i to the third node device j can be calculated as Δt ij , and the time delay of the message from the third node device to the first node device i is Δt ji .
[0118] Wherein, it is assumed that the frame header position of the third node device is ahead of the frame header position of the first node device, then:
[0119] Δt ij = Delay + Offset
[0120] Δt ji = Delay - Offset
[0121] Offset ij = -Offset ji = Offset
[0122] Therefore, the time offset between the third node device and the first node device can be calculated as:
[0123]
[0124] The time synchronization method of the embodiments of the present application considers the propagation delay, adopts the gossip time synchronization algorithm of the frame synchronization mode, and improves the accuracy of the time synchronization between base stations.
[0125] Optionally, according to the time offset, the first node device is adjusted for time synchronization, comprising:
[0126] determining the weight of each of the third node devices;
[0127] determining the frame header offset of the first node device relative to the third node device according to the weight of each of the third node devices and the time offset;
[0128] Adjust the second frame header position according to the frame header offset.
[0129] It should be noted that the weight coefficients of different node devices are different, and the weight coefficients of each node device are determined according to the importance of the node device in time synchronization, for example, increasing the weight of the node with high time stability or influence.
[0130] In the embodiments of the present application, the weight of the macro base station, the micro base station which has been time synchronized with the macro base station, or the micro base station which has been time synchronized and is listened to by more micro base stations (or has more neighbor devices) is larger; the weight of the micro base station which has not been time synchronized or the micro base station which has fewer neighbor devices is smaller.
[0131] Specifically, for the first node device, the weighted average of the frame header offsets of all neighbor nodes is used as the adjustment amount of the first node device to adjust the frame header position of the first node device, so as to realize time synchronization of the first node device.
[0132] The time synchronization method of the embodiments of the present application calculates the adjustment amount of the frame header position adjustment of the first node device by using different weight coefficients for different neighbor devices, so that higher weights are used for nodes with high time stability or great influence, and the stability and convergence speed of time synchronization are ensured.
[0133] Optionally, determining the weight of each third node device comprises at least one of:
[0134] determining the weight of each third node device according to the type of the third node device;
[0135] determining the weight of each third node device according to the synchronization count of the third node device;
[0136] determining the weight of each third node device according to the number of second neighbor devices of the third node device;
[0137] The type of the third node device includes: a macro base station, a micro base station which has been time synchronized with the macro base station, and a micro base station which has been time synchronized and has more than a preset number of neighbor micro base stations.
[0138] Optionally, determining the weight of each third node device according to the synchronization count of the third node device comprises:
[0139] calculating a first proportion of the synchronization count of each third node device to the sum of the synchronization counts of all third node devices;
[0140] determining the weight of each third node device according to the first proportion;
[0141] determining the weight of each third node device according to the number of second neighbor devices of the third node device, comprising:
[0142] calculating a second proportion of the number of second neighbor devices of each third node device and the sum of the number of all second neighbor devices;
[0143] determining the weight of each third node device according to the second proportion.
[0144] In the embodiments of the present application, the weight of each third node device is determined according to the synchronization count of each third node device, which is realized by the following formula:
[0145]
[0146] wherein, k ij is the synchronization count of the third node device, and N is the number of the third devices;
[0147] If the sum of the synchronization counts of the second neighbor devices of all third node devices is greater than 0, the weighted average value is used, otherwise the absolute value of the weighted average value is used.
[0148] In the embodiments of the present application, the weight of each third node device is determined according to the number of second neighbor devices of the third node device, which is realized by the following formula:
[0149]
[0150] wherein, a is the second neighbor device of the third node device b; P ab is the number of second neighbor devices of the third node device b; and P is the number of the second neighbor devices.
[0151] Optionally, the frame header offset of the first node device relative to the third node device is determined according to the weight of each third node device and the time deviation, comprising:
[0152] The weighted average value of the time deviation between the first node device and each third node device is calculated according to the weight of each third node device, as the frame header offset.
[0153] In the embodiments of the present application, the adjustment of the second frame header position according to the frame header offset can be realized by the following formula:
[0154]
[0155] Where is the frame header position of the first node at time n or period n; is the frame header position of the first node after adjustment at time n+1 or period n; f ij (n) represents the weight of the third node device j; Offset ij (n) is the frame header offset of the first node device i relative to the third node device j; N is the number of the third node devices.
[0156] Optionally, the method further includes:
[0157] The frame header position of the wireless frame of the first node device is adjusted M times until the frame header position after the Mth adjustment is the same as the frame header position after the (M-1)th adjustment.
[0158] Where M is an integer greater than or equal to 1.
[0159] In this embodiment of the invention, by determining the t of the first node device i (n+1) and t i (n) Whether they are equal; if yes, then the first node device is considered to have completed time synchronization; if no, time synchronization needs to be performed again.
[0160] Optionally, the synchronization information is carried in the first system message block.
[0161] In this embodiment of the invention, a status information element is added to the first System Information Block (SIB) SIB1 to carry the synchronization information.
[0162] Optionally, the method further includes:
[0163] Broadcast the current synchronization information;
[0164] The synchronization information includes: the second frame header position of the first node device and synchronization status parameters.
[0165] It should be noted that while receiving the synchronization information sent by the second node device, the first node device also periodically or in real time broadcasts the synchronization information based on its local time.
[0166] like Figure 2 As shown in the embodiments of this application, a time synchronization method is also provided, applied to a second node device, including:
[0167] Step 201: Broadcast the current synchronization information;
[0168] The synchronization information includes the first frame header position and synchronization status parameters of the second node device.
[0169] Optionally, the method further comprises:
[0170] periodically detecting timing information; the timing information comprises a frame header position of a radio frame of the second node device;
[0171] in a case where a deviation of the timing information of the second node device occurring in at least two detection processes is less than a preset threshold, determining a synchronization state of the second node device as synchronization;
[0172] determining a synchronization count of the second node device according to the synchronization state of the second node device.
[0173] Optionally, determining the synchronization count of the second node device according to the synchronization state of the second node device comprises:
[0174] in a case where the synchronization state of the second node device switches to synchronization, the synchronization count is a number of periods in which the synchronization state is synchronization in continuous detection periods;
[0175] in a case where the synchronization state of the second node device switches to out-of-sync, the synchronization count is 0.
[0176] As shown in Figure 3 the time synchronization method of the embodiment of the present application comprises:
[0177] receiving synchronization information of a second node device;
[0178] parsing a frame header position and a synchronization state parameter of the second node device according to the synchronization information;
[0179] selecting the second node device in which a current synchronization state is a synchronization state, and / or a synchronization count is greater than a synchronization count of the first node device as the third node device, thereby constituting a neighbor node device set;
[0180] calculating a frame header offset of the first node device and each of the third node devices in consideration of a propagation delay;
[0181] determining a weight of each of the third node devices;
[0182] calculating an adjustment amount of the frame header position of the first node device according to the frame header offset and the weight of each of the third node devices, and performing time synchronization;
[0183] judging whether t i (n+1) of the first node device after the frame header position adjustment is equal to t i (n) before the adjustment; if equal, the time synchronization of the first node device is completed, and if not equal, the adjustment of the frame header position is performed again.
[0184] In an embodiment of the present application, in a 3x3 network topology composed of 9 micro base stations, each base station can only communicate with the adjacent base stations above, below, left and right, using the improved gossip algorithm proposed in the present application, time synchronization is completed after 121 iterations, while using the traditional gossip algorithm, 247 iterations are needed. Here, each iteration refers to only one base station randomly performing time correction and synchronization state parameter detection;
[0185] Figure 4 For this scenario, the convergence performance simulation diagram of the improved gossip algorithm (Modified Gossip Algorithm) proposed in the present application, and the convergence speed comparison with the traditional gossip algorithm (Gossip). Assuming that the maximum time difference between nodes in the network does not exceed 2s, as the number of algorithm runs increases, the time difference between nodes decreases, and when the maximum time difference between nodes approaches 0 (here, it is set to less than 1 microsecond, ), time synchronization is completed.
[0186] In an embodiment of the present application, a 3x3 network topology composed of 1 macro base station and 8 micro base stations, each base station can only communicate with the adjacent base stations above, below, left and right, using the improved gossip algorithm proposed in the present application, the synchronization count of the macro base station is set to 2 32 , time synchronization is completed after 32 iterations, while using the traditional gossip algorithm, although the time value of the macro base station itself is not affected by the micro base station, it is obviously not suitable for the setting of the undirected network, and 1649 iterations are needed to complete synchronization;
[0187] Figure 5 For this scenario, the convergence performance simulation diagram of the improved gossip algorithm (Modified Gossip Algorithm) proposed in the present application, and the convergence speed comparison with the traditional gossip algorithm (Gossip). Assuming that the maximum time difference between nodes in the network does not exceed 2s, as the number of algorithm runs increases, the time difference between nodes decreases, and when the maximum time difference between nodes approaches 0 (here, it is set to less than 1 microsecond, ), time synchronization is completed.
[0188] In an embodiment of the present application, the stability of time synchronization is also an important consideration factor in the case of possible node failure or addition of nodes in the network topology, which has practical significance in avoiding time oscillation and system disturbance. For example Figure 6, for a 3x3 network topology consisting of 9 micro base stations, assuming that the micro base station in the middle position jumps to 1s at the 30th iteration, to test the stability of the time synchronization algorithm. Using the improved gossip algorithm proposed in this proposal, time synchronization is completed after 66 iterations, while using the traditional gossip algorithm, 294 iterations are required.
[0189] As shown in Figure 7 , the embodiment of the application further provides a time synchronization device 700 applied to a first node device, comprising:
[0190] A receiving module 701 is configured to receive synchronization information broadcast by at least one second node device; the synchronization information comprises a first frame header position and a synchronization state parameter of the second node device;
[0191] A determining module 702 is configured to determine a third node device in the at least one second node device as a first neighbor device, if the synchronization state parameter of the third node device meets a preset synchronization condition;
[0192] A calculating module 703 is configured to calculate a time offset between the first node device and each third node device according to a current second frame header position of the first node device and the first frame header position of each third node device;
[0193] An adjusting module 704 is configured to perform time synchronization on the first node device according to the time offset.
[0194] The time synchronization device provided by the embodiment of the application can screen out a second node device meeting a preset synchronization condition as a neighbor device of a first node device by receiving synchronization information broadcast by at least one second node device, and adjust the time synchronization of the first node device according to a time offset between the first node device and each third node device.
[0195] As shown in Figure 8 , the embodiment of the application further provides a time synchronization device 800 applied to a second node device, comprising:
[0196] A broadcasting module 801 is configured to broadcast current synchronization information;
[0197] The synchronization information comprises a first frame header position and a synchronization state parameter of the second node device.
[0198] As shown in Figure 9 , the embodiment of the application further provides a network device 900, comprising a transceiver 902 and a processor 910, wherein,
[0199] The transceiver 920 is configured to receive synchronization information broadcast by at least one second node device, wherein the synchronization information comprises a first frame header position and a synchronization state parameter of the second node device.
[0200] The processor 910 is configured to determine a third node device, from the at least one second node device, as a first neighbor device, if the synchronization state parameter of the third node device satisfies a preset synchronization condition.
[0201] The processor 910 is configured to calculate a time offset between the first node device and each of the third node devices according to a current second frame header position of the first node device and the first frame header position of each of the third node devices.
[0202] The processor 910 is configured to perform time synchronization for the first node device according to the time offset.
[0203] As shown in Figure 10 The present application also provides a network device 1000, which comprises a transceiver 1010, wherein,
[0204] The transceiver 1010 is configured to broadcast current synchronization information.
[0205] The synchronization information comprises a first frame header position and a synchronization state parameter of a second node device.
[0206] As shown in Figure 11 The present application also provides a network device 1100, which comprises a processor 1101, a memory 1102, and a computer program stored in the memory 1102 and executable on the processor 1101, wherein the computer program, when executed by the processor 1101, implements each process of the above-mentioned time synchronization method embodiment and achieves the same technical effects. To avoid repetition, details are not described herein.
[0207] The present application also provides a computer readable storage medium, which stores a computer program, wherein the computer program, when executed by a processor, implements each process of the above-mentioned time synchronization method embodiment and achieves the same technical effects. To avoid repetition, details are not described herein. The computer readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0208] The present application also provides a computer program product, which comprises computer instructions executable by a processor to implement each process of the above-mentioned time synchronization method embodiment and achieve the same technical effects. To avoid repetition, details are not described herein.
[0209] It should be noted that, in the present document, the terms "comprises / comprising" or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0210] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, also can be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a plurality of instructions to make a terminal (may be a mobile phone, computer, server, air conditioner, or network equipment, etc.) execute the method described in various embodiments of the present application.
[0211] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative, not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the protection scope of the claims.
Claims
1. A time synchronization method, applied to a first node device, characterized in that, include: Receive synchronization information broadcast by at least one second node device; The synchronization information includes the first frame header position and synchronization status parameters of the second node device; A third node device whose synchronization status parameter satisfies a preset synchronization condition among the at least one second node device is identified as a first neighbor device. Based on the current second frame header position of the first node device and the first frame header position of each of the third node devices, calculate the time deviation between the first node device and each of the third node devices; Based on the time deviation, the first node device is adjusted for time synchronization.
2. The time synchronization method according to claim 1, characterized in that, The synchronization status parameters include status indication information for indicating whether the current state is a synchronized state or a out-of-synchronization state, and / or synchronization count information for indicating the cumulative number of synchronizations; The preset synchronization conditions include one or more of the following: The current state is synchronized. The synchronization count is greater than the synchronization count of the first node device.
3. The time synchronization method according to claim 1, characterized in that, Based on the current second frame header position of the first node device and the first frame header position of each of the third node devices, the time deviation between the first node device and each of the third node devices is calculated, including: Based on the first frame header position and the second frame header position, determine the first delay for the first node device to send a message to each of the third node devices and the second delay for each of the third node devices to send a message to the first node device; Determine the propagation delay between the first node device and each of the third node devices; The time deviation between the first node device and each of the third node devices is calculated based on the first delay, the second delay, and the propagation delay.
4. The time synchronization method according to claim 1, characterized in that, Based on the time deviation, time synchronization adjustments are made to the first node device, including: Determine the weight of each of the third node devices; The frame header offset of the first node device relative to the third node device is determined based on the weight of each of the third node devices and the time deviation. The position of the second frame header is adjusted according to the frame header offset.
5. The time synchronization method according to claim 4, characterized in that, Determining the weight of each of the third node devices includes at least one of the following: The weight of each of the third node devices is determined based on the type of the third node device; The weight of each third node device is determined based on the synchronization count of each third node device. The weight of each third node device is determined based on the number of its second neighbor devices. The types of the third node devices include: macro base stations, micro base stations that have been synchronized with macro base stations in time, and micro base stations whose neighboring micro base stations are greater than a preset value that have been synchronized in time.
6. The time synchronization method according to claim 5, characterized in that, The weight of each third node device is determined based on the synchronization count of each third node device, including: Calculate a first ratio of the synchronization count of each of the third node devices to the sum of the synchronization counts of all the third node devices; The weight of each of the third node devices is determined based on the first ratio; The weight of each third node device is determined based on the number of its second neighbor devices, including: Calculate a second ratio of the number of second neighbor devices for each of the third node devices to the sum of the number of all second neighbor devices; The weight of each of the third node devices is determined based on the second ratio.
7. The time synchronization method according to claim 4, characterized in that, Based on the weight of each of the third node devices and the time deviation, the frame header offset of the first node device relative to the third node device is determined, including: The weighted average of the time deviations between the first node device and each of the third node devices is calculated based on the weight of each of the third node devices, and is used as the frame header offset.
8. The time synchronization method according to claim 1, characterized in that, The method further includes: The frame header position of the wireless frame of the first node device is adjusted M times until the frame header position after the Mth adjustment is the same as the frame header position after the (M-1)th adjustment. Where M is an integer greater than or equal to 1.
9. The time synchronization method according to claim 1, characterized in that, The synchronization information is carried in the first system message block.
10. The time synchronization method according to claim 1, characterized in that, The method further includes: Broadcast the current synchronization information; The synchronization information includes: the second frame header position of the first node device and synchronization status parameters.
11. A time synchronization method applied to a second node device, characterized in that, include: Broadcast the current synchronization information; The synchronization information includes the first frame header position and synchronization status parameters of the second node device.
12. The time synchronization method according to claim 11, characterized in that, The method further includes: The timing information is periodically checked; the timing information includes the frame header position of the wireless frame of the second node device. If the deviation of the timing information of the second node device is less than a preset threshold in at least two detection processes, the synchronization status of the second node device is determined to be synchronized. The synchronization count of the second node device is determined based on its synchronization status.
13. The time synchronization method according to claim 12, characterized in that, Based on the synchronization status of the second node device, the synchronization count of the second node device is determined, including: When the synchronization state of the second node device switches to synchronization, the synchronization count is the number of cycles in which the synchronization state is synchronized for a continuous detection period. When the synchronization state of the second node device switches to out-of-synchronization, the synchronization count is 0.
14. A time synchronization device, applied to a first node device, characterized in that, include: The receiving module is used to receive synchronization information broadcast by at least one second node device; The synchronization information includes the first frame header position and synchronization status parameters of the second node device; The determination module is used to determine the third node device among the at least one second node device whose synchronization status parameters satisfy the preset synchronization conditions as the first neighbor device; The calculation module is used to calculate the time deviation between the first node device and each third node device based on the current second frame header position of the first node device and the first frame header position of each third node device; The adjustment module is used to synchronize the time of the first node device according to the time deviation.
15. A time synchronization device, applied to a second node device, characterized in that, include: The broadcast module is used to broadcast the current synchronization information. The synchronization information includes the first frame header position and synchronization status parameters of the second node device.
16. A network device, characterized in that, Includes transceivers and processors, among which, The transceiver is used to receive synchronization information broadcast by at least one second node device; the synchronization information includes the first frame header position and synchronization status parameters of the second node device; The processor is configured to determine a third node device whose synchronization status parameters satisfy a preset synchronization condition among the at least one second node device as a first neighbor device. Calculate the time deviation between the first node device and each third node device based on the current second frame header position of the first node device and the first frame header position of each third node device; Based on the time deviation, the first node device is synchronized in time.
17. A network device, characterized in that, Including transceivers, among which, The transceiver is used to broadcast the current synchronization information; The synchronization information includes the first frame header position and synchronization status parameters of the second node device.
18. A network device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, the program, when executed by the processor, implementing the steps of the method as described in any one of claims 1 to 13.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 13.
20. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 13.