Base station clock switching method and apparatus, base station, and medium

By performing phase detection processing on the pulse signals of GNSS and 1588v2 clock sources, and determining the phase difference, the clock source is switched under the set conditions, which solves the problem of unstable clock source switching in the prior art and ensures the stability of the base station clock system.

CN116599616BActive Publication Date: 2026-01-23DATANG MOBILE COMM EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210116802.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-07
Publication Date
2026-01-23
Estimated Expiration
2042-02-07

AI Technical Summary

Technical Problem

When switching between the GNSS clock source and the 1588v2 clock source, the existing technology fails to effectively consider the phase difference between the two pulse signals, resulting in instability of the base station clock system, which may cause cell outage and network paralysis.

Method used

By performing phase detection processing on the pulse signals of the first and second clock sources to determine the phase difference, clock source switching is only performed when set conditions are met, thus ensuring base station stability.

Benefits of technology

This improves the stability of clock source switching, prevents base stations from entering an abnormal clock state, and ensures the stability of the base station clock system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116599616B_ABST
    Figure CN116599616B_ABST
Patent Text Reader

Abstract

The application provides a base station clock switching method and device, a base station and a medium, and relates to the technical field of communication. The specific implementation scheme is: in response to a clock switching instruction, a first pulse signal corresponding to a first clock source currently locked by the base station is obtained; a second pulse signal corresponding to a second clock source to be switched to, which is indicated by the clock switching instruction, is obtained; phase discrimination processing is performed on the first pulse signal and the second pulse signal to determine a first phase difference between the first pulse signal and the second pulse signal; and in the case that the first phase difference meets a first set condition corresponding to the second clock source, the base station is controlled to switch to the second clock source. Thus, only in the case that the first phase difference meets the first set condition corresponding to the second clock source, the base station is controlled to switch to the second clock source according to the clock switching instruction, which can improve the stability of clock source switching, avoid the base station from entering an abnormal clock state, and ensure the stability of the base station clock system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a base station clock switching method, apparatus, base station, and medium. Background Technology

[0002] Currently, the selection of clock sources for 5G base stations mainly includes two schemes: obtaining time through direct connection to GNSS (Global Navigation Satellite System) and synchronizing timing information by tracking the ground 1588v2 (v2 version of the 1588 time synchronization protocol) link.

[0003] With the widespread deployment of the 1588v2 function, ensuring a stable switch between the GNSS clock source and the 1588v2 clock source is crucial to the stability of the base station clock system's timing. Summary of the Invention

[0004] This application provides a base station clock switching method, apparatus, base station, and medium.

[0005] According to one aspect of this application, a base station clock control method is provided, the method comprising:

[0006] In response to a clock switching command, the first pulse signal corresponding to the first clock source currently locked by the base station is obtained;

[0007] Obtain the second pulse signal corresponding to the second clock source to which the clock switching instruction is to be switched;

[0008] Phase detection processing is performed on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal;

[0009] When the first phase difference satisfies the first set condition corresponding to the second clock source, the base station is controlled to switch to the second clock source.

[0010] Optionally, the first clock source is a GNSS clock source, and the second clock source is a 1588v2 clock source. The step of controlling the base station to switch to the second clock source when the first phase difference satisfies a first preset condition corresponding to the second clock source includes:

[0011] If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the second clock source is determined;

[0012] When the second phase difference satisfies the second preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source.

[0013] Optionally, the first setting condition includes: the first phase difference is less than a first setting threshold;

[0014] The second setting condition includes: the second phase difference is less than the second setting threshold.

[0015] Optionally, obtaining the first pulse signal corresponding to the first clock source currently locked by the base station includes:

[0016] Receive the antenna signal transmitted by the GNSS;

[0017] The antenna signal is analyzed to obtain the first pulse signal;

[0018] Accordingly, obtaining the second pulse signal corresponding to the second clock source to be switched to as indicated by the clock switching command includes:

[0019] The second phase difference is calculated to obtain the frequency offset and phase offset to be adjusted;

[0020] Based on the frequency offset and the phase offset, the frequency and phase of the network card corresponding to the slave clock of the second clock source are corrected;

[0021] Obtain the second pulse signal output by the corrected network card, wherein the frequency of the second pulse signal matches the frequency of the corrected network card, and the phase of the second pulse signal matches the phase of the corrected network card.

[0022] Optionally, determining the second phase difference between the master clock and the slave clock within the second clock source includes:

[0023] Obtain the Precision Time Protocol (PTP) message provided by the master clock corresponding to the second clock source;

[0024] The second phase difference is determined based on the PTP message.

[0025] Optionally, the PTP message includes a first timestamp of the master clock sending the synchronization message Sync, and a second timestamp of the master clock receiving the delay request message Delay_Req;

[0026] Determining the second phase difference based on the PTP message includes:

[0027] Query the third timestamp of the slave clock receiving the synchronization message Sync corresponding to the second clock source, and query the fourth timestamp of the slave clock sending the delay request message Delay_Req;

[0028] The first time deviation is determined based on the first timestamp and the third timestamp;

[0029] The second time deviation is determined based on the second timestamp and the fourth timestamp;

[0030] The second phase difference is determined based on the first time deviation and the second time deviation.

[0031] Optionally, the first clock source is a 1588v2 clock source, and the second clock source is a GNSS clock source;

[0032] When the first phase difference satisfies the first preset condition corresponding to the second clock source, controlling the base station to switch to the second clock source includes:

[0033] If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the first clock source is determined;

[0034] When the second phase difference satisfies the third preset condition corresponding to the first clock source, the base station is controlled to switch to the second clock source.

[0035] Optionally, the first setting condition includes: the first phase difference is greater than a first setting threshold;

[0036] The third setting condition includes: the second phase difference is greater than a second setting threshold. Optionally, the method further includes:

[0037] Receive clock switching command;

[0038] or,

[0039] In response to a failure of the first clock source, the clock switching command is generated.

[0040] Optionally, the method further includes:

[0041] If the first phase difference does not meet the first set condition corresponding to the second clock source, the base station is controlled to continue locking the first clock source;

[0042] or,

[0043] If the first phase difference does not meet the first set condition corresponding to the second clock source, the base station is controlled to switch to a backup clock source of the same type as the first clock source.

[0044] Optionally, there are multiple second clock sources, and the step of controlling the base station to switch to the second clock source when the first phase difference satisfies the first preset condition corresponding to the second clock source includes:

[0045] When the first phase difference satisfies the first set condition corresponding to the second clock source, the target clock source is determined from each of the second clock sources according to the priority corresponding to each of the second clock sources.

[0046] Control the base station to switch to the target clock source.

[0047] According to another aspect of this application, a base station is provided, the base station including a memory, a transceiver, and a processor;

[0048] A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer programs from the memory and performing the following operations:

[0049] In response to a clock switching command, the first pulse signal corresponding to the first clock source currently locked by the base station is obtained;

[0050] Obtain the second pulse signal corresponding to the second clock source to which the clock switching instruction is to be switched;

[0051] Phase detection processing is performed on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal;

[0052] When the first phase difference satisfies the first set condition corresponding to the second clock source, the base station is controlled to switch to the second clock source.

[0053] Optionally, the first clock source is a GNSS clock source, and the second clock source is a 1588v2 clock source; the processor is specifically used to perform the following operations:

[0054] If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the second clock source is determined;

[0055] When the second phase difference satisfies the second preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source.

[0056] Optionally, the first setting condition includes: the first phase difference is less than a first setting threshold;

[0057] The second setting condition includes: the second phase difference is less than a second setting threshold. Optionally, the processor is specifically configured to perform the following operations:

[0058] Receive the antenna signal transmitted by the GNSS;

[0059] The antenna signal is analyzed to obtain the first pulse signal;

[0060] The processor is also used to perform the following operations:

[0061] The second phase difference is calculated to obtain the frequency offset and phase offset to be adjusted;

[0062] Based on the frequency offset and the phase offset, the frequency and phase of the network card corresponding to the slave clock of the second clock source are corrected;

[0063] Obtain the second pulse signal output by the corrected network card, wherein the frequency of the second pulse signal matches the frequency of the corrected network card, and the phase of the second pulse signal matches the phase of the corrected network card.

[0064] Optionally, the processor is specifically configured to perform the following operations:

[0065] Obtain the Precision Time Protocol (PTP) message provided by the master clock corresponding to the second clock source;

[0066] The second phase difference is determined based on the PTP message.

[0067] Optionally, the PTP message includes a first timestamp of the master clock sending the synchronization message Sync, and a second timestamp of the master clock receiving the delay request message Delay_Req;

[0068] The processor is specifically used to perform the following operations:

[0069] Query the third timestamp of the slave clock receiving the synchronization message Sync corresponding to the second clock source, and query the fourth timestamp of the slave clock sending the delay request message Delay_Req;

[0070] The first time deviation is determined based on the first timestamp and the third timestamp;

[0071] The second time deviation is determined based on the second timestamp and the fourth timestamp;

[0072] The second phase difference is determined based on the first time deviation and the second time deviation.

[0073] Optionally, the first clock source is a 1588v2 clock source, and the second clock source is a GNSS clock source;

[0074] The processor is specifically used to perform the following operations:

[0075] If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the first clock source is determined;

[0076] When the second phase difference satisfies the third preset condition corresponding to the first clock source, the base station is controlled to switch to the second clock source.

[0077] Optionally, the first setting condition includes: the first phase difference is greater than a first setting threshold;

[0078] The third setting condition includes: the second phase difference is greater than the second setting threshold.

[0079] Optionally, the processor is also configured to perform the following operations:

[0080] Receive clock switching command;

[0081] or,

[0082] In response to a failure of the first clock source, the clock switching command is generated.

[0083] Optionally, the processor is also configured to perform the following operations:

[0084] If the first phase difference does not meet the first set condition corresponding to the second clock source, the base station is controlled to continue locking the first clock source;

[0085] or,

[0086] If the first phase difference does not meet the first set condition corresponding to the second clock source, the base station is controlled to switch to a backup clock source of the same type as the first clock source.

[0087] Optionally, there are multiple second clock sources, and the processor is specifically used to perform the following operations:

[0088] If the first phase difference meets the set condition, the target clock source is determined from each of the second clock sources according to the priority corresponding to each of the second clock sources;

[0089] Control the base station to switch to the target clock source.

[0090] According to one aspect of this application, a base station clock switching device is provided, the device comprising:

[0091] The first acquisition module is used to acquire the first pulse signal corresponding to the first clock source currently locked by the base station in response to the clock switching command;

[0092] The second acquisition module is used to acquire the second pulse signal corresponding to the second clock source to be switched to as indicated by the clock switching command;

[0093] The processing module is used to perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal;

[0094] The first control module is used to control the base station to switch to the second clock source when the first phase difference meets the first set condition corresponding to the second clock source.

[0095] According to another aspect of this application, a processor-readable storage medium is provided, which stores a computer program for causing the processor to perform the aforementioned base station clock switching method.

[0096] According to another aspect of this application, a computer program product is provided, which, when executed by an instruction processor in the computer program product, performs the aforementioned base station clock switching method.

[0097] This application has the following technical effects: by performing phase detection on the first pulse signal corresponding to the first clock source and the second pulse signal corresponding to the second clock source, the first phase difference between the first pulse signal and the second pulse signal is determined. Only when the first phase difference meets the first set condition corresponding to the second clock source, the base station is controlled to switch to the second clock source according to the clock switching command, which can improve the stability of clock source switching and prevent the base station from entering a clock abnormal state.

[0098] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0099] The accompanying drawings are provided for a better understanding of this solution and do not constitute a limitation of this application. Wherein:

[0100] Figure 1 This is a schematic diagram of the GNSS time synchronization principle;

[0101] Figure 2 This is a schematic diagram of the 1588v2 time synchronization principle. Figure 1 ;

[0102] Figure 3 This is a schematic diagram of the 1588v2 time synchronization principle. Figure 2 ;

[0103] Figure 4 This is a flowchart illustrating a base station clock switching method provided in an embodiment of this application;

[0104] Figure 5 This is a flowchart illustrating a base station clock switching method provided in an embodiment of this application;

[0105] Figure 6 This is a flowchart illustrating a base station clock switching method provided in an embodiment of this application;

[0106] Figure 7 This is a flowchart illustrating a base station clock switching method provided in an embodiment of this application;

[0107] Figure 8 This is a flowchart illustrating a base station clock switching method provided in an embodiment of this application;

[0108] Figure 9 This is a schematic diagram of the phase difference detection circuit provided in this application;

[0109] Figure 10 This is a schematic diagram of a base station structure provided according to an embodiment of this application;

[0110] Figure 11 This is a schematic diagram of the structure of a base station clock switching device provided in an embodiment of this application. Detailed Implementation

[0111] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0112] In this application's embodiments, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0113] The time accuracy requirement for basic 5G services is ±1.5μs relative to UTC (Universal Time Coordinated). For operators' synchronization networks, it is necessary not only to meet the accuracy requirements of time synchronization, but also to meet the requirements of network security and stability.

[0114] However, network interference from GPS (Global Positioning System) can severely impact network communication capabilities and pose security risks, potentially causing localized network outages. With the completion of the BeiDou-3 global network, critical areas such as positioning, timing, and navigation can operate without relying on GPS.

[0115] Furthermore, the deployment density of 5G base stations is relatively high, especially with the number of indoor base stations increasing exponentially. This can lead to numerous deployment scenarios where satellite signals cannot be obtained. Terrestrial synchronization technology based on the IEEE (Institute of Electrical and Electronics Engineers) 1588v2 standard can effectively solve this problem.

[0116] Currently, the selection of clock sources for 5G base stations mainly includes two schemes: obtaining time through direct connection to GNSS and synchronizing timing information by tracking the ground 1588v2 link.

[0117] I. GPS and BeiDou satellite time synchronization (i.e., direct GNSS time acquisition)

[0118] The GPS satellite navigation system provides users with positioning, navigation, and timing services. The internal clocks of GPS satellites use a combination of cesium and rubidium atomic clocks.

[0119] The BeiDou Navigation Satellite System, such as the BeiDou-3 network satellites, uses higher-performance rubidium atomic clocks and hydrogen atomic clocks. The rubidium atomic clocks have a daily stability on the order of E-14, while the hydrogen atomic clocks have a daily stability on the order of E-15. The BeiDou Navigation Satellite System innovatively integrates navigation and communication functions, providing a variety of services including positioning, navigation, and timing; satellite-based augmentation; ground-based augmentation; precise point positioning; short message communication; and international search and rescue.

[0120] When using satellite navigation systems to synchronize the time of 5G base stations, it is necessary to ensure that the satellite receiver of the 5G base station simultaneously receives signals from at least four satellites within its field of view at any given time. These satellite signals are composed of a carrier wave, pseudo-random code (also known as a ranging code), and navigation message (also known as a data code). The satellite navigation message provides the "week number" of the current time, which is counted from the start time of BeiDou or GPS. Furthermore, the carrier wave carries a chip of pseudo-random code modulated onto the carrier wave using digital modulation technology. This chip reveals the second within the current week. After positioning, the satellite receiver can calculate the clock difference between its own time and the satellite time, and then correct for errors within a second based on this clock difference.

[0121] The internal hardware circuitry and software of the satellite receiver encode and process the received information, and can extract and output two types of time signals from the information: one is a synchronization pulse signal 1PPS (Pulse Per Second) with an interval of 1 second, whose pulse leading edge has a synchronization error with UTC of no more than 1ns; the other is the UTC absolute time ToD (Time of Day), which includes year, month, day, hour, minute and second, and corresponds to the 1PPS pulse, thus achieving time synchronization.

[0122] As an example, when a base station uses GNSS as its clock source, the GNSS timing principle can be as follows: Figure 1 As shown, the antenna signal input provided by GNSS is sent to the receiver. The receiver converts the received antenna signal into ToD messages and pulse signals (i.e. PPS signals) that can be recognized by the X86 processor, and provides the ToD messages and PPS signals to the X86 processor. The base station finally uses the PPS signal provided by GNSS as a reference to calibrate and compensate its own crystal oscillator and operate in a stable state.

[0123] in, Figure 1 In this context, X86 refers to the processor used by the base station, UART stands for Universal Asynchronous Receiver / Transmitter, SCP stands for Service Communication Proxy, and EPLD stands for Erasable Programmable Logic Device.

[0124] II. 1588v2 ground time synchronization (i.e., synchronizing timing information by tracking the ground 1588v2 link)

[0125] 1588v1 is a synchronization standard developed by the IEEE Institute of Electrical and Electronics Engineers for industrial automation measurement and control systems, suitable for industrial local area network applications; version 1588v2 is a standard specifically developed for communication network applications based on version 1588v1.

[0126] The basic idea of ​​the 1588v2 protocol is to use hardware and software to record the sending and receiving times of synchronization clock information, and to timestamp each message. Using these timestamps, the receiver can calculate its own clock error and latency within the network, and make corrections accordingly to achieve synchronization with the network clock source.

[0127] As an example, when the base station uses 1588v2 as its clock source, the 1588v2 time synchronization principle can be shown in Figure 2. The 1588v2 master clock and slave clock achieve time synchronization by transmitting messages such as Sync, Follow_Up, Delay_Req, and Delay_Resp.

[0128] The clock error between the master clock and slave clock of the 1588v2 clock source is offset, the transmission delay from the master clock to the slave clock is t-ms, and the transmission delay from the slave clock to the master clock is t-sm.

[0129] In a local high-precision time synchronization network based on 1588v2, 1588v2 functionality is configured across all network devices (including time servers, intermediate time link transmission equipment, and 5G base stations). This allows one port of the network's intermediate boundary clock (BC (Boundary Clock) mode) node to act as a slave clock, synchronizing with the upstream clock, while the other ports act as master clocks for the next-level network elements. Upon receiving a 1588v2 message, the device processes it, generates a new message, and then transmits it downstream. This method transmits the time reference signal from the time server to the 5G base station equipment point-by-point.

[0130] As another example, when the base station uses 1588v2 as its clock source, the 1588v2 time synchronization principle can be as follows: Figure 3 As shown, the 1588 server (i.e. Figure 3 The 1588 server can provide PTP (Precise Time Protocol) messages to the x86 processor. The x86 processor then uses the timestamp information in the PTP message to... Figure 2 As shown, the clock error offset and delay are calculated, and the network card 710 is calibrated according to the clock error offset and delay so that the pulse signal (i.e. PPS signal) output by the network card 710 is synchronized with the 1588v2 server. The calibrated PPS signal output by the network card 710 can be provided to the CPLD (Complex Programmable Logic Device) for calibration and compensation of the base station system crystal oscillator.

[0131] in, Figure 3 The 1588 stack in the text refers to the 1588 protocol stack.

[0132] In recent years, organizations such as ITU-T (ITU-T for ITU Telecommunication Standardization Sector), 3GPP (3rd Generation Partnership Project), IEEE, and CCSA (China Communications Standards Association) have been researching next-generation network synchronization technologies that can meet the application requirements of 5G networks and have formulated a series of standards. 1588v2 technology is considered to be one of the most effective ways to assist GNSS satellite systems in achieving high-precision time synchronization link transmission on the ground.

[0133] In related technologies, 5G base station time synchronization deployment schemes are gradually adopting the configuration of GNSS satellite reception (dual-mode joint reception of Beidou and GPS satellite signals) as the primary synchronization reference benchmark, while using a ground link based on 1588v2 technology to obtain the synchronization reference benchmark from the local time server equipment as a backup means.

[0134] However, in reality, packet transmission networks require all nodes to support the PTP protocol, making network topology quite complex. Network congestion, latency, jitter, and packet loss all affect clock accuracy. Furthermore, existing clock switching implementations consider the switching conditions met when a target clock source exists and is available, and then modify the base station's clock source to switch to the target clock source. However, since network and transmission environment configurations significantly impact the 1588v2 clock source, the above methods ignore the influence of network link latency and other factors on the 1588v2 clock source. By the time PTP packets arrive at the base station and are processed, clock accuracy has already been affected.

[0135] More importantly, 1588v2 synchronization requires equal uplink and downlink latency; otherwise, manual calibration is necessary, which is extremely difficult in project implementation. In practical applications, a significant phase difference between the 1588v2 clock source and the GNSS clock source is highly probable. This significant phase difference can cause the base station's phase-locked loop (PLL) to fail to lock, resulting in a loss of base station clock system lock and causing cell outages, network paralysis, and other malfunctions.

[0136] In related technologies, after operators deploy 1588v2, they periodically switch between GNSS and 1588v2 clock sources, either from a GNSS clock source to a 1588v2 clock source or vice versa. If the phase difference between the pulse signals corresponding to the GNSS clock source and the 1588v2 clock source is uncertain, the base station is controlled to switch to the target clock source. If the phase difference between the pulse signals corresponding to the two clock sources is large, it will cause a large phase difference between the base station and the target clock source, potentially leading to a failure of the base station's phase-locked loop (PLL) to lock, resulting in a clock system failure and causing cell outages, network paralysis, and other malfunctions.

[0137] To address the aforementioned issues, this application provides a base station clock switching method, apparatus, base station, and medium. By performing phase detection on a first pulse signal corresponding to a first clock source and a second pulse signal corresponding to a second clock source to determine a first phase difference between the first and second pulse signals, the base station is controlled to switch to the second clock source only when the first phase difference meets a first preset condition corresponding to the second clock source. This improves the stability of clock source switching, prevents the base station from entering an abnormal clock state, and ensures the stability of the base station clock system.

[0138] The base station clock switching method, apparatus, base station, and medium of this embodiment are described below with reference to the accompanying drawings.

[0139] The base station involved in this application embodiment may include multiple cells providing services to terminals. Depending on the specific application, the base station may also be called an access point, or a device in the access network that communicates with the wireless terminal device through one or more sectors on the air interface, or other names. The network device can be used to exchange received air frames with Internet Protocol (IP) packets, acting as a router between the wireless terminal device and the rest of the access network, where the rest of the access network may include an Internet Protocol (IP) communication network. The network device can also coordinate the attribute management of the air interface. For example, the network equipment involved in the embodiments of this application can be a base transceiver station (BTS) in Global System for Mobile communications (GSM) or Code Division Multiple Access (CDMA), a NodeB in Wide-band Code Division Multiple Access (WCDMA), an evolved Node B (eNB or e-NodeB) in a long term evolution (LTE) system, a 5G base station (gNB) in a next generation system, a Home evolved Node B (HeNB), a relay node, a femto, a pico, etc., and is not limited in the embodiments of this application. In some network structures, the base station may include a Centralized Unit (CU) node and a Distributed Unit (DU) node, and the Centralized Unit and Distributed Unit may be geographically separated.

[0140] In this context, a terminal can be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connectivity, or other processing devices connected to a wireless modem. The name of the terminal may differ across systems; for example, in a 5G system, a terminal can be called User Equipment (UE). A wireless terminal can communicate with one or more core networks (CNs) via a Radio Access Network (RAN). Wireless terminals can be mobile terminal devices, such as mobile phones (or "cellular" phones) and computers with mobile terminal devices, for example, portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile devices. They exchange voice and / or data with the RAN. Examples include Personal Communication Service (PCS) phones, cordless phones, Session Initiated Protocol (SIP) phones, Wireless Local Loop (WLL) stations, and Personal Digital Assistants (PDAs). The wireless terminal can also be referred to as a system, subscriber unit, subscriber station, mobile station, mobile station, remote station, access point, remote terminal, access terminal, user terminal, user agent, or user device, but is not limited to these terms in the embodiments of this application.

[0141] It should be noted that the technical solutions provided in this application are applicable to a variety of systems, especially 5G systems. For example, applicable systems may include Global System for Mobile communication (GSM), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA) General Packet Radio Service (GPRS), Long Term Evolution (LTE), LTE Frequency Division Duplex (FDD), LTE Time Division Duplex (TDD), Long Term Evolution Advanced (LTE-A), Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX), and 5G New Radio (NR), etc. All of these systems include terminal equipment and base stations. The system may also include a core network component, such as the Evolved Packet System (EPS) or the 5G system (5GS).

[0142] Figure 4 This is a schematic flowchart of a base station clock switching method provided in an embodiment of this application.

[0143] This base station clock switching method can be applied to base stations.

[0144] like Figure 4 As shown, the base station clock switching method may include the following steps:

[0145] Step 401: In response to the clock switching command, obtain the first pulse signal corresponding to the first clock source currently locked by the base station.

[0146] In this embodiment of the application, the clock switching instruction is used to control the base station to switch from the first clock source to the second clock source.

[0147] In this application embodiment, there is no limitation on the method of generating the clock switching command; it can be manually triggered or automatically generated by the base station. In one possible implementation of this application embodiment, when the clock switching command is generated manually, the base station can receive the manually triggered clock switching command.

[0148] In another possible implementation of the embodiments of this application, when the clock switching command is automatically generated by the base station, for example, when the first clock source fails, the clock switching command can be automatically generated. In this case, the base station can generate the clock switching command in response to the failure of the first clock source.

[0149] In this embodiment of the application, the base station can respond to a clock switching command and obtain the first pulse signal corresponding to the first clock source currently locked by the base station.

[0150] It should be noted that the above is only an example of generating a clock switching command using one method. In actual applications, two methods can be combined to generate the clock switching command, and this application does not impose any restrictions on this. For example, when the first clock source fails, after the clock switching command is generated, it can be manually confirmed. After manual confirmation, the base station can respond to the clock switching command and obtain the first pulse signal corresponding to the first clock source currently locked by the base station.

[0151] Step 402: Obtain the second pulse signal corresponding to the second clock source to be switched to as indicated by the clock switching command.

[0152] In this embodiment, the second clock source is the clock source to which the clock switching command is to be initiated. The second clock source may be different from the first clock source.

[0153] In this embodiment of the application, the second clock source to which the base station is to be switched can be determined according to the clock switching instruction, and the second pulse signal corresponding to the second clock source can be obtained.

[0154] Step 403: Perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal.

[0155] In the embodiments of this application, phase detection processing can be performed on the first pulse signal and the second pulse signal. For example, a phase detector in related technologies can be used to perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal.

[0156] Step 404: If the first phase difference satisfies the first set condition corresponding to the second clock source, control the base station to switch to the second clock source.

[0157] In this embodiment, the first setting condition corresponding to the second clock source can be a pre-set condition. It should be understood that the first setting condition corresponding to the second clock source can be different when the second clock source is different. For example, when the second clock source is a 1588v2 clock source, the corresponding first setting condition can be that the first phase difference is less than a first setting threshold. As another example, when the second clock source is a GNSS clock source, the corresponding first setting condition can be that the first phase difference is greater than a first setting threshold. Here, the first setting threshold is a pre-set threshold.

[0158] It should be noted that the above example only uses a 1588v2 clock source or a GNSS clock source as the second clock source, but this application is not limited to this. In actual applications, the second clock source can also be other clock sources, and there are no restrictions on this.

[0159] In this embodiment of the application, when the first phase difference meets the first set condition corresponding to the second clock source, the base station can be controlled to switch from the first clock source to the second clock source.

[0160] Using the example above, when the second clock source is a 1588v2 clock source, if the first phase difference is less than the first set threshold, the base station is controlled to switch to the 1588v2 clock source. When the second clock source is a GNSS clock source, if the first phase difference is greater than the first set threshold, the base station is controlled to switch to the GNSS clock source.

[0161] In one possible implementation of this application embodiment, if the first phase difference does not meet the first set condition corresponding to the second clock source, the base station can be controlled to continue locking the first clock source.

[0162] In other words, if the first phase difference does not meet the first set condition corresponding to the second clock source, the base station does not meet the condition for switching from the first clock source to the second clock source. That is, the base station does not meet the clock switching condition. Therefore, the base station can be controlled to continue locking the first clock source, that is, the base station continues to provide time to the first clock source.

[0163] In another possible implementation of this application, if the first phase difference does not meet the first set condition corresponding to the second clock source, the base station can also be controlled to switch to a backup clock source of the same type as the first clock source.

[0164] The backup clock source is of the same type as the primary clock source. For example, when the primary clock source is a GNSS clock source, the backup clock source can also be a GNSS clock source. For instance, if the primary clock source is a GPS (Global Positioning System) clock source, the backup clock source can be a BDS (BeiDou Navigation Satellite System) clock source. In this case, the GPS and BDS clock sources are of the same type, and both belong to the GNSS clock source category.

[0165] Furthermore, if the first phase difference does not meet the first set condition corresponding to the second clock source, the second clock source and / or the first clock source may be abnormal (or faulty). Therefore, in one possible implementation of this application embodiment, if the first phase difference does not meet the first set condition corresponding to the second clock source, an alarm message can also be sent, wherein the alarm message is used to provide an abnormal prompt for the second clock source and / or the first clock source.

[0166] For example, if the clock switching command is generated when the first clock source fails, the alarm message is used to indicate the failure of the first clock source.

[0167] Optionally, the alarm information may also include the specific value of the first phase difference, and / or the alarm information may also include the specific value of the second phase difference, so that relevant personnel can determine the cause of the fault of the first clock source and / or the second clock source based on the specific values ​​of the first phase difference and / or the second phase difference in the alarm information, so as to troubleshoot the first clock source and / or the second clock source according to the cause of the fault.

[0168] In another possible implementation of this application, a second clock source and / or first clock source operating duration performance counter and a second clock source and / or first clock source failure count performance counter may be presented. The second clock source and / or first clock source operating duration performance counter is used to time the operating duration of the second clock source and / or first clock source, and the second clock source and / or first clock source failure count performance counter is used to count the number of failures of the second clock source and / or first clock source.

[0169] It should be noted that when there are multiple secondary clock sources, determining which secondary clock source the base station switches to is a problem that needs to be solved. For example, when the base station includes multiple secondary clock sources of the same type, such as when the secondary clock source is a GNSS clock source, the GNSS clock source can include a GPS clock source, a BDS clock source, a GLONASS (GLOBALNAVIGATION SATELLITE SYSTEM) clock source, and a GSNS (Galileo satellite navigation system) clock source.

[0170] To address the aforementioned issues, and in order to clearly explain which second clock source the base station switches to when the first phase difference meets the first set condition corresponding to the second clock source, in one possible implementation of this application, the priority of each second clock source can be determined, and the target clock source can be determined from each second clock source according to the priority of each second clock source, thereby controlling the base station to switch to the target clock source.

[0171] In this embodiment, each second clock source has a corresponding priority, and the base station can arrange the second clock sources sequentially according to their priority. For example, the second clock sources can be sorted from highest to lowest priority, and the second clock source ranked first can be selected as the target clock source. That is, the base station can determine the second clock source with the highest priority from among the second clock sources based on their respective priorities, and use it as the target clock source. After determining the target clock source, the base station can be controlled to switch to the target clock source.

[0172] The base station clock switching method of this application embodiment, in response to a clock switching command, acquires a first pulse signal corresponding to a first clock source currently locked to the base station; acquires a second pulse signal corresponding to a second clock source to which the base station is to switch, as indicated by the clock switching command; performs phase detection processing on the first pulse signal and the second pulse signal to determine a first phase difference between the first pulse signal and the second pulse signal; and controls the base station to switch to the second clock source when the first phase difference meets a first preset condition corresponding to the second clock source. Therefore, by performing phase detection on the first pulse signal corresponding to the first clock source and the second pulse signal corresponding to the second clock source to determine the first phase difference between the first pulse signal and the second pulse signal, and only when the first phase difference meets the first preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source according to the clock switching command, which improves the stability of clock source switching, prevents the base station from entering a clock abnormal state, and ensures the stability of the base station clock system.

[0173] In one possible implementation of this application, when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, in order to clearly explain what conditions the GNSS clock source must meet to control the base station to switch to the 1588v2 clock source, this application also provides a base station clock switching method.

[0174] Figure 5 This is a schematic flowchart of a base station clock switching method provided in an embodiment of this application.

[0175] like Figure 5 As shown, the base station clock switching method may include the following steps:

[0176] Step 501: In response to the clock switching command, obtain the first pulse signal corresponding to the GNSS clock source currently locked by the base station.

[0177] In this embodiment of the application, the clock switching command is used to indicate a switch from the GNSS clock source to the 1588v2 clock source.

[0178] In this embodiment of the application, the base station can respond to the clock switching command and obtain the first pulse signal corresponding to the GNSS clock source currently locked by the base station.

[0179] Step 502: Obtain the second pulse signal corresponding to the 1588v2 clock source to be switched to as indicated by the clock switching command.

[0180] In this embodiment of the application, the 1588v2 clock source is the clock source to which the clock switching command is to be switched.

[0181] In this embodiment of the application, the 1588v2 clock source to which the base station is to be switched can be determined according to the clock switching instruction, and the second pulse signal corresponding to the 1588v2 clock source can be obtained.

[0182] Step 503: Perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal.

[0183] The execution process of step 503 can be found in any embodiment of this application, and will not be described in detail here.

[0184] Step 504: If the first phase difference satisfies the first setting condition corresponding to the 1588v2 clock source, determine the second phase difference between the master clock and slave clock inside the 1588v2 clock source.

[0185] In this embodiment of the application, the first setting condition corresponding to the 1588v2 clock source can be a pre-set condition.

[0186] In one possible implementation of this application embodiment, the first setting condition may include: a first phase difference being less than a first setting threshold. If the first phase difference is less than the first setting threshold, it can be determined that the first phase difference satisfies the first setting condition corresponding to the 1588v2 clock source.

[0187] In this embodiment of the application, if the first phase difference satisfies the first set condition corresponding to the 1588v2 clock source, the second phase difference between the master clock and the slave clock inside the 1588v2 clock source can be further determined.

[0188] As an example, the timing principle of the 1588v2 clock source is as follows: Figure 3 As shown in the example, the master clock can be Figure 3 The 1588server (i.e., the 1588 server) in the clock source can be an x86 processor. If the first phase difference satisfies the first set condition corresponding to the 1588v2 clock source, the second phase difference between the 1588server and the x86 processor within the 1588v2 clock source can be further determined.

[0189] Step 505: If the second phase difference meets the second set condition corresponding to the 1588v2 clock source, control the base station to switch to the 1588v2 clock source.

[0190] In this embodiment of the application, the second setting condition corresponding to the 1588v2 clock source can be preset.

[0191] In one possible implementation of this application embodiment, the second setting condition may include: the second phase difference is less than the second setting threshold; wherein the second setting threshold is a preset threshold.

[0192] It should be noted that this application does not restrict the relationship between the first and second set thresholds. For example, the first set threshold can be the same as the second set threshold, or the first set threshold can be different from the second set threshold. For example, the first set threshold can be greater than the second set threshold, or the second set threshold can be greater than the first set threshold. This application does not impose any restrictions on this. For example, the first set threshold can be 1000 ns, and the second set threshold can be 300 ns.

[0193] In this embodiment of the application, when the first phase difference meets the first setting condition corresponding to the 1588v2 clock source and the second phase difference meets the second setting condition corresponding to the 1588v2 clock source, the base station can be controlled to switch from the GNSS clock source to the 1588v2 clock source.

[0194] It should be noted that when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, if the first phase difference meets the first set condition corresponding to the 1588v2 clock source, but the second phase difference does not meet the second set condition corresponding to the 1588v2 clock source, then the base station does not meet the condition for switching from the first clock source to the second clock source. That is, the base station does not meet the clock switching condition. Therefore, the base station can be controlled to continue locking the first clock source (i.e., the GNSS clock source), or the base station can be controlled to switch to a backup clock source of the same type as the first clock source (i.e., the GNSS clock source).

[0195] In other words, when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, if the first phase difference does not meet the first set condition corresponding to the 1588v2 clock source, and / or the second phase difference does not meet the second set condition corresponding to the 1588v2 clock source, the base station can be controlled to continue locking the GNSS clock source, or the base station can be controlled to switch to a backup clock source of the same type as the GNSS clock source.

[0196] For example, when the first clock source is a GPS clock source and the second clock source is a 1588v2 clock source, if the first phase difference does not meet the first set condition corresponding to the 1588v2 clock source, and / or the second phase difference does not meet the second set condition corresponding to the 1588v2 clock source, the base station can be controlled to continue locking the GPS clock source, or the base station can be controlled to switch to the BDS clock source.

[0197] It should be noted that the above-mentioned settings for the first and second conditions are merely exemplary. In actual applications, the settings for the first and / or second conditions may include other situations, which are not limited in this application.

[0198] The base station clock switching method of this application embodiment, when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, determines the second phase difference between the master clock and slave clock inside the 1588v2 clock source by, under the condition that the first phase difference meets the first preset condition corresponding to the 1588v2 clock source; and controls the base station to switch to the 1588v2 clock source when the second phase difference meets the second preset condition corresponding to the 1588v2 clock source. Therefore, it is possible to accurately determine whether the base station meets the clock switching conditions based on the phase difference outside the clock source (i.e., the first phase difference) and the phase difference inside the clock source (i.e., the second phase difference), thereby improving the stability of clock source switching and preventing the base station from entering an abnormal clock state.

[0199] In one possible implementation of this application, when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, in order to clearly explain how the pulse signals corresponding to each clock source are obtained in this application, this application also provides a base station clock switching method.

[0200] Figure 6 This is a schematic flowchart of a base station clock switching method provided in an embodiment of this application.

[0201] like Figure 6 As shown, the base station clock switching method may include the following steps:

[0202] Step 601: In response to the clock switching command, receive the antenna signal transmitted by the GNSS.

[0203] In this embodiment of the application, the clock switching command is used to indicate a switch from the GNSS clock source to the 1588v2 clock source.

[0204] In this embodiment of the application, the base station can respond to a clock switching command by receiving the antenna signal transmitted by GNSS through the receiver corresponding to the GNSS clock source.

[0205] Step 602: Analyze the antenna signal to obtain the first pulse signal corresponding to the GNSS clock source.

[0206] In this embodiment of the application, the receiver corresponding to the GNSS clock source can analyze the antenna signal and extract the first pulse signal corresponding to the GNSS clock source currently locked by the base station from the antenna signal. For example, the first pulse signal can be the first PPS signal.

[0207] As an example, the timing principle of a GNSS clock source is as follows: Figure 1 As an example, after receiving the antenna signal, the receiver corresponding to the GNSS clock source can encode and process the received antenna signal to extract two time signals: one is a synchronization pulse signal 1PPS with an interval of 1 second (i.e., the first pulse signal in this application), and the other is the UTC absolute time ToD.

[0208] Step 603: Determine the second phase difference between the master clock and slave clock within the 1588v2 clock source to which the clock switching command is to be switched.

[0209] In this embodiment, the 1588v2 clock source has a master clock and a slave clock. The second phase difference between the master clock and the slave clock inside the 1588v2 clock source to which the clock switching command is to be switched can be determined based on the master clock and the slave clock.

[0210] Step 604: Solve the second phase difference to obtain the frequency offset and phase offset to be adjusted.

[0211] In this embodiment of the application, the second phase difference can be calculated based on the set rules to obtain the frequency offset and phase offset to be adjusted.

[0212] Step 605: Correct the frequency and phase of the network card corresponding to the slave clock of the 1588v2 clock source based on the frequency offset and phase offset.

[0213] In this embodiment of the application, the frequency and phase of the network card corresponding to the slave clock of the 1588v2 clock source can be corrected according to the frequency offset and phase offset.

[0214] Step 606: Obtain the second pulse signal output by the calibrated network card, wherein the frequency of the second pulse signal matches the frequency of the calibrated network card, and the phase of the second pulse signal matches the phase of the calibrated network card.

[0215] In this embodiment of the application, after the network card is calibrated, the calibrated network card can output a second pulse signal, wherein the frequency of the second pulse signal matches the frequency of the calibrated network card, and the phase of the second pulse signal matches the phase of the calibrated network card.

[0216] Step 607: Perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal.

[0217] Step 608: If the first phase difference meets the first set condition corresponding to the 1588v2 clock source, control the base station to switch to the 1588v2 clock source.

[0218] The execution process of steps 607 to 608 can be found in the execution process of any embodiment of this application, and will not be described in detail here.

[0219] The base station clock switching method of this application embodiment, when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, receives the antenna signal transmitted by the GNSS; analyzes the antenna signal to obtain a first pulse signal; accordingly, calculates the second phase difference to obtain the frequency offset and phase offset to be adjusted; corrects the frequency and phase of the network card of the slave clock corresponding to the second clock source based on the frequency offset and phase offset; and obtains the second pulse signal output by the corrected network card, wherein the frequency of the second pulse signal matches the frequency of the corrected network card, and the phase of the second pulse signal matches the phase of the corrected network card. Thus, it is possible to effectively obtain the first pulse signal corresponding to the first clock source (i.e., the GNSS clock source) based on the antenna signal transmitted by the GNSS, and to correct the network card of the slave clock based on the second phase difference between the master clock and the slave clock within the second clock source, thereby effectively obtaining the second pulse signal from the corrected network card side.

[0220] Based on any of the above embodiments, when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, in order to clearly explain how the second phase difference between the master clock and slave clock inside the 1588v2 clock source is determined in this application, this application also provides a base station clock switching method.

[0221] Figure 7 This is a schematic flowchart of a base station clock switching method provided in an embodiment of this application.

[0222] like Figure 7 As shown, the base station clock switching method may include the following steps:

[0223] Step 701: In response to the clock switching command, obtain the first pulse signal corresponding to the GNSS clock source currently locked by the base station.

[0224] Step 702: Obtain the second pulse signal corresponding to the 1588v2 clock source to be switched to as indicated by the clock switching command.

[0225] Step 703: Perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal.

[0226] The execution process of steps 701 to 703 can be found in the execution process of any embodiment of this application, and will not be described in detail here.

[0227] Step 704: If the first phase difference meets the first set condition corresponding to the 1588v2 clock source, obtain the PTP message provided by the master clock corresponding to the 1588v2 clock source.

[0228] In this embodiment, the 1588v2 clock source has a corresponding master clock, and the master clock corresponding to the 1588v2 clock source can provide PTP messages. For example, the time synchronization principle of the 1588v2 clock source is as follows: Figure 3 As shown in the example, the master clock of the 1588v2 clock source can be the 1588server, and the slave clock can be the x86 processor. The 1588server can provide PTP messages to the x86 processor.

[0229] In this embodiment of the application, if the first phase difference meets the first set condition corresponding to the 1588v2 clock source, the PTP message provided by the master clock corresponding to the second clock source (i.e., the 1588v2 clock source) can be further obtained.

[0230] Step 705: Determine the second phase difference between the master clock and slave clock inside the 1588v2 clock source based on the PTP message.

[0231] In this embodiment of the application, the 1588v2 clock source also has a slave clock, for example, based on the time synchronization principle of the 1588v2 clock source as follows: Figure 3 As shown in the example, the slave clock of the 1588v2 clock source can be an x86 processor.

[0232] In this embodiment of the application, the second phase difference between the master clock and slave clock inside the 1588v2 clock source can be determined based on the PTP message.

[0233] It should be explained that, generally speaking, a PTP message may include the first timestamp of the master clock sending a synchronization message Sync, and the second timestamp of the master clock receiving a delay request message Delay_Req.

[0234] In cases where the PTP message includes a first timestamp of the master clock sending a synchronization message (Sync) and a second timestamp of the master clock receiving a delay request message (Delay_Req), to clearly explain how the second phase difference between the master clock and the slave clock is determined based on the PTP message in this application, in one possible implementation of this application, the third timestamp of the slave clock receiving the synchronization message (Sync) corresponding to the 1588v2 clock source can be queried, and the fourth timestamp of the slave clock sending the delay request message (Delay_Req) ​​can be queried. Thus, the first time deviation can be determined based on the first and third timestamps, and the second time deviation can be determined based on the second and fourth timestamps. Furthermore, the second phase difference can be determined based on the first and second time deviations.

[0235] As an example, the timing principle of the 1588v2 clock source is as follows: Figure 2As illustrated in the example, the master clock and slave clock of the 1588v2 clock source can transmit synchronization messages (Sync) and delay request messages (Delay_Req). The master clock can send a synchronization message (Sync) to the slave clock, and the time when the master clock sends the synchronization message (Sync) is marked as the first timestamp t1 in this application. The slave clock can receive the synchronization message (Sync) sent by the master clock, and the time when the slave clock receives the synchronization message (Sync) is marked as the third timestamp t2 in this application. The slave clock can also send a delay request message (Delay_Req) ​​to the master clock, and the time when the slave clock sends the delay request message (Delay_Req) ​​is marked as the fourth timestamp t3 in this application. The master clock can receive the delay request message (Delay_Req) ​​sent by the slave clock, and the time when the master clock receives the delay request message (Delay_Req) ​​is marked as the second timestamp t4 in this application.

[0236] Assuming the second phase difference between the master clock and slave clock of the 1588v2 clock source is offset, the transmission delay from the master clock to the slave clock is t-ms, and the transmission delay from the slave clock to the master clock is t-sm, according to... Figure 2 The following equation can be obtained:

[0237] t2 = t1 + t - ms + offset; (1)

[0238] t4 = t3 + t - sm - offset; (2)

[0239] That is, the first time deviation (t-ms+offset) can be determined based on the first timestamp t1 and the third timestamp t2; and the second time deviation (t-ms-offset) can be determined based on the second timestamp t4 and the fourth timestamp t3.

[0240] Assuming the bidirectional transmission delay is the same, i.e., t-ms = t-sm, the second phase difference offset between the master clock and the slave clock can be calculated:

[0241]

[0242] Step 706: If the second phase difference meets the second set condition corresponding to the 1588v2 clock source, control the base station to switch to the 1588v2 clock source.

[0243] The execution process of step 706 can be found in any embodiment of this application, and will not be described in detail here.

[0244] The base station clock switching method of this application embodiment, when the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source, obtains the PTP message provided by the master clock corresponding to the 1588v2 clock source; and determines the second phase difference based on the PTP message. Therefore, the second phase difference between the master clock and slave clock within the 1588v2 clock source can be accurately determined based on the PTP message provided by the master clock of the 1588v2 clock source, thereby enabling precise control of the base station to switch clock sources based on the accurate second phase difference.

[0245] It should be noted that the above in this application Figures 5 to 7 In the base station clock switching method provided in the embodiments, in any embodiment, the first clock source is a GNSS clock source and the second clock source is a 1588v2 clock source.

[0246] Correspondingly, when the first clock source is a 1588v2 clock source and the second clock source is a GNSS clock source, and the first phase difference meets the first set condition corresponding to GNSS, in order to clearly explain what conditions the 1588v2 clock source must meet to control the base station to switch to the GNSS clock source, this application also provides a base station clock switching method.

[0247] Figure 8 This is a schematic flowchart of a base station clock switching method provided in an embodiment of this application.

[0248] like Figure 8 As shown, the base station clock switching method may include the following steps:

[0249] Step 801: In response to the clock switching command, obtain the first pulse signal corresponding to the 1588v2 clock source currently locked by the base station.

[0250] In this embodiment of the application, the clock switching command is used to indicate a switch from a 1588v2 clock source to a GNSS clock source.

[0251] In this embodiment of the application, the base station can respond to the clock switching command and obtain the first pulse signal corresponding to the 1588v2 clock source currently locked by the base station.

[0252] In one possible implementation of this application, a second phase difference between the master clock and slave clock inside the 1588v2 clock source can be determined. The second phase difference is calculated to obtain the frequency offset and phase offset to be adjusted. Based on the frequency offset and phase offset, the frequency and phase of the network card corresponding to the slave clock of the 1588v2 clock source are corrected to obtain the first pulse signal output by the corrected network card. The frequency of the first pulse signal matches the frequency of the corrected network card, and the phase of the first pulse signal matches the phase of the corrected network card.

[0253] Step 802: Obtain the second pulse signal corresponding to the GNSS clock source to be switched to as indicated by the clock switching command.

[0254] In this embodiment of the application, the GNSS clock source is the clock source to be switched to as indicated by the switching command.

[0255] In this embodiment of the application, the GNSS clock source to which the base station is to be switched can be determined according to the clock switching command, and the second pulse signal corresponding to the GNSS clock source can be obtained.

[0256] In one possible implementation of this application, the antenna signal transmitted by GNSS can be received and analyzed to obtain the second pulse signal corresponding to the GNSS clock source.

[0257] Step 803: Perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal.

[0258] Step 804: If the first phase difference satisfies the first setting condition corresponding to the GNSS clock source, determine the second phase difference between the master clock and slave clock inside the 1588v2 clock source.

[0259] In this embodiment of the application, the first setting condition corresponding to the GNSS clock source can be a pre-set condition.

[0260] In one possible implementation of this application embodiment, the first setting condition may include: a first phase difference greater than a first setting threshold. If the first phase difference is greater than the first setting threshold, it can be determined that the first phase difference satisfies the first setting condition corresponding to the GNSS clock source.

[0261] The execution process of steps 803 to 804 can be found in the execution process of any embodiment of this application, and will not be described in detail here.

[0262] Step 805: If the second phase difference meets the third setting condition corresponding to the 1588v2 clock source, control the base station to switch to the GNSS clock source.

[0263] In this embodiment of the application, the third setting condition corresponding to the 1588v2 clock source can be a pre-set condition.

[0264] In one possible implementation of this application embodiment, the third setting condition may include: the second phase difference is greater than the second setting threshold; wherein, the second setting threshold is a preset threshold.

[0265] In this embodiment of the application, when the first phase difference meets the first setting condition corresponding to the GNSS clock source and the second phase difference meets the third setting condition corresponding to the 1588v2 clock source, the base station can be controlled to switch from the 1588v2 clock source to the GNSS clock source.

[0266] It should be explained that the embodiments of this application only illustrate the control of the base station to switch to the GNSS clock source when the first phase difference meets the first setting condition corresponding to the GNSS clock source and the second phase difference meets the third setting condition corresponding to the 1588v2 clock source. However, this application is not limited to this. In actual application, when the first phase difference meets the first setting condition corresponding to the GNSS clock source and / or the second phase difference meets the third setting condition corresponding to the 1588v2 clock source, the base station can be controlled to switch from the 1588v2 clock source to the GNSS clock source.

[0267] It should be noted that the above-described settings for the first and third conditions are merely exemplary. In actual applications, the settings for the first and / or third conditions may include other scenarios, which this application does not limit. For example, when the first or second clock source is a clock source other than a GNSS clock source or a 1588v2 clock source, the first and third conditions can be other conditions.

[0268] The base station clock switching method of this application embodiment, when the first clock source is a 1588v2 clock source and the second clock source is a GNSS clock source, determines the second phase difference between the master clock and slave clock inside the 1588v2 clock source by determining the first phase difference when the first phase difference meets the first preset condition corresponding to the GNSS clock source; and controls the base station to switch to the GNSS clock source when the second phase difference meets the third preset condition corresponding to the 1588v2 clock source. Therefore, it is possible to accurately determine whether the base station meets the clock switching conditions based on the phase difference outside the clock source (i.e., the first phase difference) and the phase difference inside the clock source (i.e., the second phase difference), thereby improving the stability of clock source switching and preventing the base station from entering an abnormal clock state.

[0269] As an example, the timing principle of a GNSS clock source is as follows: Figure 1 As shown, the timing principle of the 1588v2 clock source is as follows: Figure 3 As shown in the example, it can be done through, as Figure 9 The phase difference detection circuit shown detects the first phase difference between the 1588v2 clock source and the GNSS clock source.

[0270] In this application, the base station can simultaneously provide time signals to both a GNSS clock source and a 1588v2 clock source, through... Figure 9The EPLD (Erasable Programmable Logic Device) in the system selects the PPS signal from the GNSS clock source and the PPS signal from the 1588v2 clock source, and then... Figure 9 The phase detector in the system performs phase detection on the PPS signal of the GNSS clock source and the PPS signal of the 1588v2 clock source, and outputs the first phase difference between the two PPS signals.

[0271] The GPS receiver receives and processes antenna signals, extracts the PPS signal, and inputs it to the EPLD module. The slave clock of the 1588v2 base station clock source receives PTP messages from the master clock and determines the phase difference between the master and slave clocks based on the PTP messages. It then corrects the slave clock's network interface card (NIC) based on this phase difference, outputting the PPS signal to the EPLD module. The EPLD module selects the PPS signal corresponding to the GNSS clock source (e.g., through a closed loop). Figure 9 Switch 80 in the middle is used to select the PPS signal corresponding to the GNSS clock source and to select the PPS signal corresponding to the 1588v2 clock source (e.g., by closing the switch). Figure 9 Switch 20 in the middle is used to select the PPS signal corresponding to the 1588v2 clock source, and the phase detector is used to detect the phase of the two PPS signals. Finally, the phase difference between the PPS signal corresponding to the GNSS clock source and the PPS signal corresponding to the 1588v2 clock source is obtained by reading the EPLD phase difference register.

[0272] In summary, after obtaining the phase difference between the PPS signal of the GNSS clock source and the PPS signal of the 1588v2 clock source, and if the phase difference meets the first set condition corresponding to the second clock source to be switched to as indicated by the clock switching command, controlling the base station to switch to the second clock source indicated by the clock switching command can avoid the instability caused by base station time asynchrony or clock lockout, and improve the stability of the base station clock system.

[0273] To implement the above embodiments, this application also provides a base station.

[0274] Figure 10 This is a schematic diagram of the structure of a base station provided according to an embodiment of this application.

[0275] like Figure 10 As shown, the base station may include a transceiver 1000, a processor 1010, and a memory 1020, wherein:

[0276] Transceiver 1000 is used to receive and send data under the control of processor 1010.

[0277] Among them, Figure 10 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 1010) and memory (memory 1020). The bus architecture can also link 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. The bus interface provides an interface. The transceiver 1000 can be multiple elements, including transmitters and receivers, providing units for communicating with various other devices over transmission media, including wireless channels, wired channels, optical fibers, etc. The processor 1010 is responsible for managing the bus architecture and general processing, and the memory 1020 can store data used by the processor 1010 during operation.

[0278] The processor 1010 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor can also adopt a multi-core architecture.

[0279] The processor 1010 calls a computer program stored in the memory and performs the following operations: in response to a clock switching instruction, it acquires a first pulse signal corresponding to the first clock source currently locked by the base station; acquires a second pulse signal corresponding to the second clock source to which the base station is to switch, as indicated by the clock switching instruction; performs phase detection processing on the first pulse signal and the second pulse signal to determine a first phase difference between the first pulse signal and the second pulse signal; and controls the base station to switch to the second clock source when the first phase difference meets a first set condition corresponding to the second clock source.

[0280] Optionally, as another embodiment, the first clock source is a Global Navigation Satellite System (GNSS) clock source, and the second clock source is a 1588v2 clock source; the processor 1010 is specifically used to perform the following operations: when the first phase difference meets the first set condition corresponding to the second clock source, determine the second phase difference between the master clock and the slave clock inside the second clock source; when the second phase difference meets the second set condition corresponding to the second clock source, control the base station to switch to the second clock source.

[0281] Optionally, as another embodiment, the first setting condition includes: the first phase difference is less than the first setting threshold; the second setting condition includes: the second phase difference is less than the second setting threshold.

[0282] Optionally, as another embodiment, the processor 1010 is specifically configured to perform the following operations: receive antenna signals transmitted by GNSS; parse the antenna signals to obtain a first pulse signal; the processor 1010 is also configured to perform the following operations: calculate a second phase difference to obtain a frequency offset and a phase offset to be adjusted; correct the frequency and phase of the network card corresponding to the second clock source based on the frequency offset and phase offset; obtain the corrected second pulse signal output by the network card, wherein the frequency of the second pulse signal matches the frequency of the corrected network card, and the phase of the second pulse signal matches the phase of the corrected network card.

[0283] Optionally, as another embodiment, the processor 1010 is specifically used to perform the following operations: obtain the Precision Time Protocol (PTP) message provided by the master clock corresponding to the second clock source; and determine the second phase difference based on the PTP message.

[0284] Optionally, the PTP message includes a first timestamp of the master clock sending a synchronization message Sync, and a second timestamp of the master clock receiving a delay request message Delay_Req; the processor 1010 is specifically used to perform the following operations: query the third timestamp of the slave clock receiving the synchronization message Sync corresponding to the second clock source, and query the fourth timestamp of the slave clock sending the delay request message Delay_Req; determine a first time deviation based on the first timestamp and the third timestamp; determine a second time deviation based on the second timestamp and the fourth timestamp; and determine a second phase difference based on the first time deviation and the second time deviation.

[0285] Optionally, as another embodiment, the first clock source is a 1588v2 clock source, and the second clock source is a GNSS clock source; the processor 1010 is specifically used to perform the following operations: when the first phase difference meets the first set condition corresponding to the second clock source, determine the second phase difference between the master clock and the slave clock inside the first clock source; when the second phase difference meets the third set condition corresponding to the first clock source, control the base station to switch to the second clock source.

[0286] Optionally, as another embodiment, the first setting condition includes: a first phase difference greater than a first setting threshold; the third setting condition includes: a second phase difference greater than a second setting threshold. Optionally, as another embodiment, the processor 1010 is further configured to perform the following operations: receive a clock switching instruction; or, in response to a first clock source failure, generate a clock switching instruction.

[0287] Optionally, as another embodiment, the processor 1010 is further configured to perform the following operations: if the first phase difference does not meet the first set condition corresponding to the second clock source, control the base station to continue locking the first clock source; or, if the first phase difference does not meet the first set condition corresponding to the second clock source, control the base station to switch to a backup clock source of the same type as the first clock source.

[0288] Optionally, as another embodiment, there are multiple second clock sources, and the processor 1010 is specifically used to perform the following operations: when the first phase difference meets the set conditions corresponding to the second clock source, determine the target clock source from each second clock source according to the priority corresponding to each second clock source; and control the base station to switch to the target clock source.

[0289] It should be noted that the base station provided in this application embodiment is capable of achieving the above-mentioned... Figures 4 to 8 All method steps implemented in the method embodiment can achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiment and their beneficial effects will not be described in detail here.

[0290] With the above Figures 4 to 8 Corresponding to the base station clock switching method provided in the embodiments, this application also provides a base station clock switching device. Since the base station clock switching device provided in the embodiments of this application is similar to the one described above... Figures 4 to 8 The base station clock switching method provided in the embodiments corresponds to the base station clock switching method provided in the embodiments of this application. Therefore, the implementation method of the base station clock switching method is also applicable to the base station clock switching device provided in the embodiments of this application, and will not be described in detail in the embodiments of this application.

[0291] Figure 11 This is a schematic diagram of the structure of a base station clock switching device provided in an embodiment of this application.

[0292] As shown in Figure 11, the base station clock switching device 1100 may include: a first acquisition module 1101, a second acquisition module 1102, a processing module 1103, and a first control module 1104.

[0293] The first acquisition module 1101 is used to acquire the first pulse signal corresponding to the first clock source currently locked by the base station in response to the clock switching command.

[0294] The second acquisition module 1102 is used to acquire the second pulse signal corresponding to the second clock source to be switched to as indicated by the clock switching command.

[0295] The processing module 1103 is used to perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal.

[0296] The first control module 1104 is used to control the base station to switch to the second clock source when the first phase difference meets the first first set condition corresponding to the second clock source.

[0297] Optionally, in one possible implementation of this application embodiment, the first clock source is a Global Navigation Satellite System (GNSS) clock source, the second clock source is a 1588v2 clock source, and the first control module 1104 is specifically used to: determine the second phase difference between the master clock and slave clock inside the second clock source when the first phase difference meets the first set condition corresponding to the second clock source; and control the base station to switch to the second clock source when the second phase difference meets the second set condition corresponding to the second clock source.

[0298] Optionally, in one possible implementation of this application embodiment, the first setting condition includes: the first phase difference is less than a first setting threshold; the second setting condition includes: the second phase difference is less than a second setting threshold. Optionally, in one possible implementation of this application embodiment, the first acquisition module 1101 is specifically used to receive the antenna signal transmitted by GNSS; and to parse the antenna signal to obtain a first pulse signal. Correspondingly, the second acquisition module 1102 is specifically used to calculate the second phase difference to obtain the frequency offset and phase offset to be adjusted; to correct the frequency and phase of the network card corresponding to the second clock source based on the frequency offset and phase offset; and to acquire the second pulse signal output by the corrected network card, wherein the frequency of the second pulse signal matches the frequency of the corrected network card, and the phase of the second pulse signal matches the phase of the corrected network card.

[0299] Optionally, in one possible implementation of this application embodiment, the first control module 1104 is specifically used to obtain the Precision Time Protocol (PTP) message provided by the master clock corresponding to the second clock source; and determine the second phase difference based on the PTP message.

[0300] Optionally, in one possible implementation of this application embodiment, the PTP message includes a first timestamp of the master clock sending a synchronization message Sync, and a second timestamp of the master clock receiving a delay request message Delay_Req. The first control module 1104 is specifically used to query the third timestamp of the slave clock receiving the synchronization message Sync corresponding to the second clock source, and query the fourth timestamp of the slave clock sending the delay request message Delay_Req; determine a first time deviation based on the first timestamp and the third timestamp; determine a second time deviation based on the second timestamp and the fourth timestamp; and determine a second phase difference based on the first time deviation and the second time deviation.

[0301] Optionally, in one possible implementation of this application embodiment, the first clock source is a 1588v2 clock source, the second clock source is a GNSS clock source, and the first control module 1104 is specifically used to determine the second phase difference between the master clock and slave clock inside the first clock source when the first phase difference meets the first set condition corresponding to the second clock source; and to control the base station to switch to the second clock source when the second phase difference meets the third set condition corresponding to the first clock source.

[0302] Optionally, in one possible implementation of this application embodiment, the first setting condition includes: the first phase difference is greater than the first setting threshold; the third setting condition includes: the second phase difference is greater than the second setting threshold.

[0303] Optionally, in one possible implementation of this application embodiment, the base station clock switching device 1100 may further include:

[0304] The receiving module is used to receive clock switching commands.

[0305] Or include:

[0306] The generation module is used to generate clock switching instructions in response to a first clock source failure.

[0307] Optionally, in one possible implementation of this application embodiment, the base station clock switching device 1100 may further include:

[0308] The second control module is used to control the base station to continue locking the first clock source when the first phase difference does not meet the first set condition corresponding to the second clock source.

[0309] Or include:

[0310] The third control module is used to control the base station to switch to a backup clock source of the same type as the first clock source when the first phase difference does not meet the first set condition corresponding to the second clock source.

[0311] Optionally, in one possible implementation of this application embodiment, there are multiple second clock sources. The first control module 1104 is specifically used to determine the target clock source from each second clock source according to the priority of each second clock source when the first phase difference meets the first set condition corresponding to the second clock source; and control the base station to switch to the target clock source.

[0312] It should be noted that the base station clock switching device provided in this application embodiment can achieve the above-mentioned... Figures 4 to 8 All method steps implemented in the method embodiment can achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiment and their beneficial effects will not be described in detail here.

[0313] It should be noted that the division of units in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.

[0314] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network-side device, 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 USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0315] It should be noted that the apparatus provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0316] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to execute this application. Figures 4 to 8 The method shown in the embodiment.

[0317] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0318] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0319] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0320] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the processor-readable memory produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0321] These processors can execute instructions that can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0322] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A base station clock switching method, characterized in that, The method includes: In response to a clock switching command, the first pulse signal corresponding to the first clock source currently locked by the base station is obtained; Obtain the second pulse signal corresponding to the second clock source to which the clock switching instruction is to be switched; Phase detection processing is performed on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal; When the first phase difference satisfies the first preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source; In response to the first clock source being a GNSS clock source and the second clock source being a 1588v2 clock source, the step of controlling the base station to switch to the second clock source when the first phase difference satisfies the first preset condition corresponding to the second clock source includes: If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the second clock source is determined; When the second phase difference satisfies the second preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source; or, In response to the first clock source being a 1588v2 clock source and the second clock source being a GNSS clock source, the step of controlling the base station to switch to the second clock source when the first phase difference satisfies the first preset condition corresponding to the second clock source includes: If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the first clock source is determined; When the second phase difference satisfies the third preset condition corresponding to the first clock source, the base station is controlled to switch to the second clock source.

2. The method according to claim 1, characterized in that, The first clock source is a Global Navigation Satellite System (GNSS) clock source, and the second clock source is a 1588v2 clock source; The first setting condition includes: the first phase difference is less than a first setting threshold; The second setting condition includes: the second phase difference is less than the second setting threshold.

3. The method according to claim 1, characterized in that, The first clock source is a Global Navigation Satellite System (GNSS) clock source, and the second clock source is a 1588v2 clock source; The step of obtaining the first pulse signal corresponding to the first clock source currently locked by the base station includes: Receive antenna signals transmitted by GNSS; The antenna signal is analyzed to obtain the first pulse signal; Accordingly, obtaining the second pulse signal corresponding to the second clock source to be switched to as indicated by the clock switching command includes: The second phase difference is calculated to obtain the frequency offset and phase offset to be adjusted; Based on the frequency offset and the phase offset, the frequency and phase of the network card corresponding to the slave clock of the second clock source are corrected; Obtain the second pulse signal output by the corrected network card, wherein the frequency of the second pulse signal matches the frequency of the corrected network card, and the phase of the second pulse signal matches the phase of the corrected network card.

4. The method according to any one of claims 1-3, characterized in that, The first clock source is a GNSS clock source, and the second clock source is a 1588v2 clock source; determining the second phase difference between the master clock and slave clock within the second clock source includes: Obtain the Precision Time Protocol (PTP) message provided by the master clock corresponding to the second clock source; The second phase difference is determined based on the PTP message.

5. The method according to claim 4, characterized in that, The PTP message includes a first timestamp of the master clock sending the synchronization message Sync, and a second timestamp of the master clock receiving the delay request message Delay_Req; Determining the second phase difference based on the PTP message includes: Query the third timestamp of the slave clock receiving the synchronization message Sync corresponding to the second clock source, and query the fourth timestamp of the slave clock sending the delay request message Delay_Req; The first time deviation is determined based on the first timestamp and the third timestamp; The second time deviation is determined based on the second timestamp and the fourth timestamp; The second phase difference is determined based on the first time deviation and the second time deviation.

6. The method according to claim 1, characterized in that, The first clock source is a 1588v2 clock source, and the second clock source is a GNSS clock source; The first setting condition includes: the first phase difference is greater than a first setting threshold; The third setting condition includes: the second phase difference is greater than the second setting threshold.

7. The method according to claim 1, characterized in that, The method further includes: Receive clock switching command; or, In response to a failure of the first clock source, the clock switching command is generated.

8. The method according to claim 1, characterized in that, The method further includes: If the first phase difference does not meet the first set condition, the base station is controlled to continue locking the first clock source; or, If the first phase difference does not meet the first set condition, the base station is controlled to switch to a backup clock source of the same type as the first clock source.

9. The method according to claim 1, characterized in that, The second clock source is multiple, and the step of controlling the base station to switch to the second clock source when the first phase difference satisfies the first preset condition corresponding to the second clock source includes: When the first phase difference satisfies the first set condition corresponding to the second clock source, the target clock source is determined from each of the second clock sources according to the priority corresponding to each of the second clock sources. Control the base station to switch to the target clock source.

10. A base station, characterized in that, The base station includes a memory, a transceiver, and a processor; Memory, used to store computer programs; Transceiver, used to send and receive data under the control of the processor; Processor, configured to read the computer program in the memory and perform the following operations: In response to a clock switching command, the first pulse signal corresponding to the first clock source currently locked by the base station is obtained; Obtain the second pulse signal corresponding to the second clock source to which the clock switching instruction is to be switched; Phase detection processing is performed on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal; When the first phase difference satisfies the first preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source; In response to the first clock source being a GNSS clock source and the second clock source being a 1588v2 clock source, the processor is specifically configured to perform the following operations: If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the second clock source is determined; When the second phase difference satisfies the second preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source; or, In response to the first clock source being a 1588v2 clock source and the second clock source being a GNSS clock source, the processor is specifically configured to perform the following operations: If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the first clock source is determined; When the second phase difference satisfies the third preset condition corresponding to the first clock source, the base station is controlled to switch to the second clock source.

11. The base station according to claim 10, characterized in that, The first clock source is a Global Navigation Satellite System (GNSS) clock source, and the second clock source is a 1588v2 clock source; The first setting condition includes: the first phase difference is less than a first setting threshold; The second setting condition includes: the second phase difference is less than the second setting threshold.

12. The base station according to claim 10, characterized in that, The first clock source is a GNSS clock source, and the second clock source is a 1588v2 clock source; the processor is specifically used to perform the following operations: Receive antenna signals transmitted by GNSS; The antenna signal is analyzed to obtain the first pulse signal; The processor is also used to perform the following operations: The second phase difference is calculated to obtain the frequency offset and phase offset to be adjusted; Based on the frequency offset and the phase offset, the frequency and phase of the network card corresponding to the slave clock of the second clock source are corrected; Obtain the second pulse signal output by the corrected network card, wherein the frequency of the second pulse signal matches the frequency of the corrected network card, and the phase of the second pulse signal matches the phase of the corrected network card.

13. The base station according to any one of claims 10-12, characterized in that, The first clock source is a GNSS clock source, and the second clock source is a 1588v2 clock source; the processor is specifically used to perform the following operations: Obtain the Precision Time Protocol (PTP) message provided by the master clock corresponding to the second clock source; The second phase difference is determined based on the PTP message.

14. The base station according to claim 13, characterized in that, The PTP message includes a first timestamp of the master clock sending the synchronization message Sync, and a second timestamp of the master clock receiving the delay request message Delay_Req; The processor is specifically used to perform the following operations: Query the third timestamp of the slave clock receiving the synchronization message Sync corresponding to the second clock source, and query the fourth timestamp of the slave clock sending the delay request message Delay_Req; The first time deviation is determined based on the first timestamp and the third timestamp; The second time deviation is determined based on the second timestamp and the fourth timestamp; The second phase difference is determined based on the first time deviation and the second time deviation.

15. The base station according to claim 10, characterized in that, The first clock source is a 1588v2 clock source, and the second clock source is a GNSS clock source; The first setting condition includes: the first phase difference is greater than a first setting threshold; The third setting condition includes: the second phase difference is greater than the second setting threshold.

16. The base station according to claim 10, characterized in that, The processor is also used to perform the following operations: Receive clock switching command; or, In response to a failure of the first clock source, the clock switching command is generated.

17. The base station according to claim 10, characterized in that, The processor is also used to perform the following operations: If the first phase difference does not meet the first set condition corresponding to the second clock source, the base station is controlled to continue locking the first clock source; or, If the first phase difference does not meet the first set condition corresponding to the second clock source, the base station is controlled to switch to a backup clock source of the same type as the first clock source.

18. The base station according to claim 10, characterized in that, The second clock source is multiple, and the processor is specifically used to perform the following operations: When the first phase difference satisfies the first set condition corresponding to the second clock source, the target clock source is determined from each of the second clock sources according to the priority corresponding to each of the second clock sources. Control the base station to switch to the target clock source.

19. A base station clock switching device, characterized in that, include: The first acquisition module is used to acquire the first pulse signal corresponding to the first clock source currently locked by the base station in response to the clock switching command; The second acquisition module is used to acquire the second pulse signal corresponding to the second clock source to be switched to as indicated by the clock switching command; The processing module is used to perform phase detection processing on the first pulse signal and the second pulse signal to determine the first phase difference between the first pulse signal and the second pulse signal; The first control module is used to control the base station to switch to the second clock source when the first phase difference meets the first set condition corresponding to the second clock source; In response to the first clock source being a GNSS clock source and the second clock source being a 1588v2 clock source, the first control module is further configured to: If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the second clock source is determined; When the second phase difference satisfies the second preset condition corresponding to the second clock source, the base station is controlled to switch to the second clock source; or, In response to the first clock source being a 1588v2 clock source and the second clock source being a GNSS clock source, the first control module is further configured to: If the first phase difference satisfies the first set condition corresponding to the second clock source, the second phase difference between the master clock and the slave clock inside the first clock source is determined; When the second phase difference satisfies the third preset condition corresponding to the first clock source, the base station is controlled to switch to the second clock source.

20. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program that causes the processor to perform the method of claims 1-9.

Citation Information

Patent Citations

  • Clock reference seamless switching method and device

    CN106656392A

  • Method and device for clock switching

    JP2001244812A