Disclosure of Invention
The invention mainly aims to provide a GPS time service method, a GPS time service device, electronic equipment and a computer readable storage medium, and aims to solve the problem that in the prior art, when a GPS is used as a time service device, the GPS is influenced by weather positions and is easy to cause an output clock to be unstable, so that system equipment works abnormally.
In order to achieve the purpose, the invention provides a GPS time service method, which comprises the following steps:
acquiring a target 1pps signal corresponding to the GPS;
acquiring a first air interface signal of a communication network according to the target 1pps signal;
and when the GPS is in an unlocked state, synchronously calibrating the target 1pps signal through the first air interface signal to obtain a calibrated target 1pps signal for GPS time service.
Optionally, after acquiring the air interface signal of the communication network according to the target 1pps signal, the method further includes the following steps:
calculating the offset of the target 1pps signal;
and if the offset of the target 1pps signal is greater than a preset value, judging that the GPS is in an out-of-lock state.
Optionally, before the synchronous calibration of the target 1pps signal by the first air interface signal, the method further includes the following steps:
intercepting a second air interface signal of a corresponding time length according to a locked 1pps signal when the GPS is in a locked state;
calculating a first correlation peak of the locked 1pps signal and a second correlation peak of the second air interface signal;
determining a first relative position of the first correlation peak and the second correlation peak, and recording the first relative position as first relative time shift information.
Optionally, the recording the first relative position as first relative time offset information includes:
calculating first relative time offset information of the locking 1pps signal and the second air interface signal at the time of t-1, and recording relative time offset information of a locking state;
and calculating second relative time offset information of the locking 1pps signal and the second air interface signal at the time t, and updating the locking state relative time offset information by using the second relative time offset information.
Optionally, the performing, when the GPS is in an out-of-lock state, synchronous calibration on the target 1pps signal through the first air interface signal includes:
calculating a third correlation peak of the second air interface signal when the GPS is in a lock losing state;
calculating a third relative position of the second correlation peak and the third correlation peak, and recording the third relative position as third phase time offset information;
calculating a calibration parameter according to the locking state relative time offset information and the third phase relative time offset information;
and synchronously sampling the target 1pps signal through the calibration parameter.
Optionally, the calculating a calibration parameter according to the locking state relative time offset information and the third phase relative time offset information includes:
calculating the difference value of the locking state relative time deviation information and the third phase relative time deviation information;
and taking the difference value of the locking state relative time offset information and the third phase relative time offset information as the calibration parameter.
Optionally, the number of the second correlation peaks is n, the number of the third correlation peaks is m, m is smaller than or equal to n, the difference is an average difference, and the calculating the difference between the locked state relative time offset information and the third phase relative time offset information includes:
calculating a difference between the stationary state relative time offset information and the third phase relative time offset information by the following equation pair:
in the formula (I), the compound is shown in the specification,
the average difference value is represented by the average difference value,
indicating the locking state relative time shift information corresponding to the ith second correlation peak in the locking state at time #,
is shown in&And third phase time offset information corresponding to the jth third correlation peak in the out-of-lock state at the moment, wherein i = j,&x is an integer greater than or equal to 1, and x represents the xth time in the continuous out-of-lock state.
In addition, in order to achieve the above object, the present invention further provides a GPS time service device, including:
the first acquisition module is used for acquiring a target 1pps signal corresponding to the GPS;
a second obtaining module, configured to obtain a first air interface signal of a communication network according to the target 1pps signal;
and the calibration module is used for synchronously calibrating the target 1pps signal through the first air interface signal when the GPS is in an out-of-lock state, so as to obtain the calibrated target 1pps signal for GPS time service.
In addition, to achieve the above object, the present invention also provides an electronic device, including: the GPS time service program is stored in the memory and runs on the processor, and when being executed by the processor, the GPS time service program realizes the steps of the GPS time service method.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, wherein a GPS time service program is stored in the computer-readable storage medium, and when being executed by a processor, the GPS time service program implements the steps of the GPS time service method according to any one of the above aspects.
The technical scheme of the invention provides a GPS time service method, which comprises the following steps: acquiring a target 1pps signal corresponding to the GPS; acquiring a first air interface signal of a communication network according to the target 1pps signal; and when the GPS is in an unlocked state, synchronously calibrating the target 1pps signal through the first air interface signal to obtain a calibrated target 1pps signal for GPS time service. In the prior art, the GPS is used as a time service device, and the requirement on weather and position is high. When the weather is bad, and in the environment such as indoor or basement, the GPS signal is extremely weak, and the GPS is probably in the out-of-lock state at this time, so that the time service information is inaccurate, for example, 1pps can drift, the output clock is unstable, and the system equipment can possibly work abnormally. Aiming at the condition that a GPS module is unlocked due to weak satellite signals in severe weather or indoor environment, the method can utilize broadcast channel information (PBCH) of a mobile communication network to carry out air interface synchronization, and then calibrate 1pps output by the unlocked GPS according to the synchronized information, thereby achieving the purpose of acquiring accurate time service information.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention.
Generally, an electronic device includes: at least one processor 301, a memory 302, and a GPS time service program stored on the memory and operable on the processor, the GPS time service program being configured to implement the steps of the GPS time service method as described above.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. Processor 301 may also include an AI (Artificial Intelligence) processor for processing operations related to the GPS time service method, such that the GPS time service method model may be trained autonomously, improving efficiency and accuracy.
Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 302 is used for storing at least one instruction for execution by the processor 301 to implement the GPS timing method provided by the method embodiments in the present application.
In some embodiments, the terminal may further include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected by a bus or signal lines. Various peripheral devices may be connected to communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, a display screen 305, and a power source 306.
The communication interface 303 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the communication interface 303 may be implemented on a single chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, the front panel of the electronic device; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display screen 305 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 306 is used to power various components in the electronic device. The power source 306 may be alternating current, direct current, disposable or rechargeable. When the power source 306 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a GPS time service program is stored on the computer-readable storage medium, and when the GPS time service program is executed by a processor, the steps of the GPS time service method described above are implemented. Therefore, a detailed description thereof will be omitted. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application. It is determined that the program instructions may be deployed to be executed on one electronic device or on multiple electronic devices located at one site or distributed across multiple sites and interconnected by a communication network, as examples.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The computer-readable storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Based on the hardware structure, the embodiment of the GPS time service method is provided.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a GPS time service system according to the present invention, where the GPS time service method is operated in the GPS time service system, as shown in fig. 3:
the GPS time service system comprises an antenna, a GPS time service module and a device needing time service. Wherein, the GPS time service module comprises
The GPS time service module comprises at least one antenna, an air interface synchronization module and a calibration compensation module, wherein the air interface synchronization module and the calibration compensation module are used for executing a GPS time service program, and the GPS time service program is configured to realize the steps of the GPS time service method. The GPS time service module acquires GPS signals and communication network signals through an antenna, processes the GPS signals and the communication network signals through the air interface synchronization module, outputs corresponding calibration parameters, calibrates the GPS signals through the calibration parameters, and outputs calibrated time service signals to equipment needing time service.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an air interface synchronization module of the present invention, as shown in fig. 4:
the air interface synchronization module comprises a radio frequency unit and a baseband processing unit, wherein the baseband processing unit is used for carrying out PBCH down-conversion, low-pass filtering, operation, timing calculation and logic judgment on air interface signals of a communication network, data to be processed in the air interface synchronization module are complex signals (IQ data streams) of a digital domain, have no specific data format and are 32-bit (16-bit I-path signals and 16-bit Q-path signals) stream data. The radio frequency unit may be a radio frequency unit based on a communication network, and specifically, may be a radio frequency unit based on a mobile communication network, such as a radio frequency unit of a mobile communication network of 3g, 4g, 5g, and the like, the radio frequency unit may be high frequency modulation (up-down frequency conversion) at a 3.5ghz point, and the baseband processing unit may be 0 frequency, 100mhz signal bandwidth.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a calibration compensation module according to the present invention, as shown in fig. 4:
the input of the calibration compensation module is a GPS signal and calibration parameters, the GPS signal is calibrated through the calibration parameters, and a calibrated time service signal is output.
In the embodiment of the invention, because the time reference source of the communication network is also a satellite navigation system, the calibration of 1pps output by the GPS can be realized according to the broadcast signal of the base station of the communication network, so that the calibration of 1pps output by the GPS is completed by carrying out air interface synchronization with the network in the areas without satellite signal coverage, such as severe weather, indoor or basement, and the like, and a high-precision clock reference signal can be obtained as a time service signal.
Referring to fig. 6, fig. 6 is a schematic flow chart of a GPS time service method of the present invention, where the method includes the following steps:
step S11: and acquiring a target 1pps signal corresponding to the GPS.
It should be noted that, the execution main body of the present invention is an electronic device or a GPS time service module, a GPS time service program is stored in the electronic device, the structure of the electronic device refers to the above description, and details are not repeated here, and when the electronic device executes the GPS time service program, the steps of the GPS time service method of the present invention are implemented.
The target 1pps signal corresponding to the GPS may be acquired through a satellite antenna, and after the GPS locks the satellite signal, an accurate 1pps (pulse per second) signal is output. In locations where the signal is weak or weather conditions, the GPS may not be able to lock onto the satellite signal and, therefore, an accurate 1pps signal may not be available.
Step S12: and acquiring a first air interface signal of the communication network according to the target 1pps signal.
The communication network may be a mobile communication network or a wired communication network, and in the embodiment of the present invention, a mobile communication network is preferable. The mobile communication network communicates through a mobile communication base station, and the data frame format of the mobile communication base station on the air interface is strictly aligned with 1pps signal. The mobile communication network may be an existing mobile communication network of 3g, 4g, 5g, or the like.
Taking the time position of the PBCH signal in a certain parameter mode of the NR (5G) network as an example, the time distance between the time position of the broadcast signal sent by the NR network base station and the 1pps signal is strictly determined according to different parameters, as shown in fig. 7, and fig. 7 is a schematic diagram of the time position of the multi-beam broadcast signal of the 5G base station of the present invention.
Step S13: and when the GPS is in an unlocked state, synchronously calibrating the target 1pps signal through the first air interface signal to obtain the calibrated target 1pps signal for GPS time service.
It should be noted that, due to bad weather or indoor environment, the GPS may not be able to lock the satellite signal, resulting in the GPS being in an out-of-lock state. In the out-of-lock condition, the output target 1pps signal is inaccurate.
In the embodiment of the invention, a target 1pps signal corresponding to a GPS is obtained; acquiring a first air interface signal of a communication network according to the target 1pps signal; and when the GPS is in an unlocked state, synchronously calibrating the target 1pps signal through the first air interface signal to obtain a calibrated target 1pps signal for GPS time service. Aiming at the condition that a GPS module is unlocked due to weak satellite signals in severe weather or indoor environment, the method provided by the invention is adopted, the broadcast channel information (PBCH) of the mobile communication network is utilized to carry out air interface synchronization, and then 1pps output by the unlocked GPS is calibrated according to the synchronized information, so that the aim of acquiring accurate time service information is fulfilled.
It should be noted that, since the time reference source of the communication network is also a satellite navigation system, it may be implemented to check 1pps output by the GPS according to the broadcast signal of the base station of the communication network, so that, in an area without satellite signal coverage, such as severe weather, indoor or basement, the calibration of 1pps output by the GPS is completed by performing air interface synchronization with the network, and a high-precision clock reference signal may be obtained as a time service signal.
Further, after step S12, the method further includes: calculating the offset of the target 1pps signal; and if the offset of the target 1pps signal is greater than a preset value, judging that the GPS is in an out-of-lock state.
It should be noted that, when the GPS is in the locked state, the output 1pps signal is a standard 1pps signal, and 1 second outputs one pulse, which is very accurate. If a pulse is output for 0.99 seconds, it means that the offset of the 1pps signal is 0.01, and the preset value of the offset can be set to 0. And when the offset of the target 1pps signal is greater than 0, judging that the GPS is in an out-of-lock state.
Further, before step S13, the method further includes: intercepting a second air interface signal of a corresponding time length according to a locked 1pps signal when the GPS is in a locked state; calculating a first correlation peak of the locked 1pps signal and a second correlation peak of the second air interface signal; determining a first relative position of the first correlation peak and the second correlation peak, and recording the first relative position as first relative time shift information.
Further, first relative time offset information of the locking 1pps signal and the second air interface signal at the time of t-1 can be calculated, and locking state relative time offset information is recorded; and calculating second relative time offset information of the locking 1pps signal and the second air interface signal at the time t, and updating the locking state relative time offset information by using the second relative time offset information. The locking state relative time offset information is updated through the second relative time offset information, and the locking state relative time offset information can be updated in real time, so that the locking state relative time offset information can be updated in real time.
Further, step S13 may include calculating a third correlation peak of the second air interface signal when the GPS is in an out-of-lock state; calculating a third relative position of the second correlation peak and the third correlation peak, and recording the third relative position as third phase time offset information; calculating a calibration parameter according to the locking state relative time offset information and the third phase relative time offset information; and synchronously sampling the target 1pps signal through the calibration parameter.
Further, a difference between the locked state relative time offset information and a third phase relative time offset information may be calculated; and taking the difference value of the locking state relative time offset information and the third phase relative time offset information as the calibration parameter.
Further, the number of the second correlation peaks is n, the number of the third correlation peaks is m, m is smaller than or equal to n, the difference is an average difference, and the difference between the fixed-state relative time offset information and the third-state relative time offset information can be calculated by the following formula:
in the formula (I), the compound is shown in the specification,
the average difference value is represented by the average difference value,
indicating the locking state relative time shift information corresponding to the ith second correlation peak in the locking state at time #,
is shown in&And third phase time offset information corresponding to the jth third correlation peak in the out-of-lock state at the moment, wherein i = j,&x is an integer greater than or equal to 1, and x represents the xth time in the continuous out-of-lock state.&Indicates the time when the lock loss occurs, and # indicates the time of the previous lock state when the lock loss occurs. For example, the locking state relative time shift information corresponding to the 2 nd second correlation peak at the # time is shown,
indicating the locking state relative time shift information corresponding to the 2 nd second correlation peak at the # time,
to represent&And third phase time offset information corresponding to the 2 nd third correlation peak at the moment. When x is equal to 1, the state is described as the locked state at time # and the unlocked state at
time # +1, and when x is equal to 2, the state is described as the locked state at time # and the unlocked state at time # +1 and the unlocked state at
time # +2,
respectively&The time #2 corresponds to the 2 nd time in the continuous out-of-lock state.
It should be noted that, the air interface synchronization module is started, and the baseband processing unit starts to intercept time domain data (communication network signal) with a certain time length according to the 1pps pulse signal to perform baseband signal processing as shown in fig. 4; after the baseband signal processing, NR can obtain at most 8 large correlation peaks (LTE can obtain 1), based on the example of 5G mobile network, the relative position of each peak to 1pps is determined, as shown in fig. 8, the stronger the peak of the correlation peak is, the more accurate the corresponding 1pps signal is. According to the relative position of each peak value and 1pps, the beam ID corresponding to the peak value can be determined, and meanwhile, according to the deviation between the calculated time position and a theoretical value, the time delay information of the terminal and the base station relative to 1pps can be obtained and recorded as first relative time offset information. The calculated terminal related peak position information is stored in a table 1, and auxiliary calculation can be performed when the GPS signal is weak or even loses lock indoors and the like. Specifically, table 1 is as follows:
TABLE 1
Beam numbering
|
Beam #0
|
Beam #1
|
Beam #2
|
Beam #3
|
Beam #4
|
Beam #5
|
Beam #6
|
Beam #7
|
Base station broadcast time position
| Position | 0
|
Position 1
|
Position 2
|
Position 3
|
Position 4
|
Position 5
|
Position 6
|
Position 7
|
Terminal correlation peak position
| Time | 0
|
Time 1
|
Time 2
|
Time 3
|
Time 4
|
Time 5
|
Time 5
|
Time 6 |
Further, when the GPS is in an out-of-lock state, the synchronization module may be periodically turned on, and the baseband processing unit may have a certain drift according to the 1pps pulse signal, at this time, the 1pps may have a certain drift, but the extreme drift position may be controlled by the period, as shown in fig. 9. Beginning to intercept time domain data (communication network signals) of a certain time length for the baseband signal processing of fig. 4; after the baseband signal is processed according to the method, at most 8 large correlation peak values can be obtained, and at the moment, the time position between the correlation peak value and 1pps is calculated (third phase to time offset information); determining detected beam IDs according to the number of the detected correlation peaks, wherein the beam IDs are beam # 0-beam #7 in sequence when 8 correlation peaks are detected, the beam IDs correspond from back to front when less than 8 correlation peaks are detected, for example, when only 6 correlation peaks exist, the beam IDs are beam # 2-beam #7 in sequence, and meanwhile, calculating time positions (third phase to time offset information) between the correlation peaks and 1 pps; obtaining a set of difference values by using the 8 pieces of correlation peak position information under the condition of GPS locking and the corresponding correlation peak position information detected under the condition of lock losing (because less than 8 peak values may be detected under the condition of lock losing); ideally, the set of differences should be 0, but since 1pps has drifted in the case of loss of lock, we will get a set of differences, which are averaged: mean _ diff = (diff _0+ … + diff _7)/8, then mean _ diff is input into the calibration module, the time deviation is compensated to the time of 1pps output, and 1pps of calibrated accuracy is obtained.
It should be noted that the broadcast time position of the base station refers to a fixed time offset relative to 1 pps; the position of the terminal correlation peak refers to a time offset of 1pps relative to the air interface synchronization, and ideally, the two offsets are the same. Under the GPS locking state, the air interface synchronization calculation can be utilized to obtain 8 correlation peaks and the time offset between the 8 correlation peaks and 1pps (locking state relative time offset information); and under the condition of GPS lock loss, the homologous utilizes an air interface to calculate synchronously to obtain 8 or <8 correlation peaks, if 8 peak values are obtained, the correlation peaks correspond to beam #0 to beam #7, if 6 correlation peaks are obtained, the correlation peaks correspond to beam #2 to beam #7, and the like.
Specifically, referring to fig. 10, fig. 10 is a schematic diagram of a signaling flow of the GPS time service system according to the present invention. As shown in fig. 10, the GPS time service module further includes a storage module, and the GPS time service module performs locking state detection; and at the moment 1, the GPS is in a locked state, synchronization indication is initiated to an air interface synchronization module, and the air interface synchronization module stores the calculated time offsets time #0 to time #7 in a storage module. At the time 2, the GPS is in a locked state, synchronization indication is initiated to the air interface synchronization module, and the air interface synchronization module updates time #0 to time # 7. And at the moment 3, the GPS is in a lock losing state, synchronization indication is initiated to the air interface synchronization module, and the air interface synchronization module stores the calculated time offsets time #00 to time #07 in the storage module. And taking out corresponding differences from time #0 to time #7 and from time #00 to time #07 from the storage module to obtain 8 corresponding difference values for averaging, and inputting the average value serving as a calibration parameter into the calibration module. And at the moment 4, the GPS is in a lock losing state, synchronization indication is initiated to the air interface synchronization module, and the air interface synchronization module stores the calculated time offsets time #00 to time #07 in the storage module. And taking out corresponding differences from time #0 to time #7 and from time #00 to time #07 from the storage module to obtain 8 corresponding difference values for averaging, and inputting the average value serving as a calibration parameter into the calibration module. And at the moment k, the GPS is in a locked state, a synchronization instruction is initiated to the air interface synchronization module, and the air interface synchronization module updates time #0 to time # 7.
Further, a difference between the terminal correlation peak offset times obtained by the air interface synchronization calculation under the locking condition and the air interface synchronization calculation under the unlocking condition is calculated, which is specifically shown in the following table 2:
TABLE 2
Beam numbering
|
beam #0
|
beam #1
|
beam #2
|
beam #3
|
beam #4
|
beam #5
|
beam #6
|
beam #7
|
GPS lock out condition
Lower terminal correlation
Peak position
| time | 0
|
time 1
|
time 2
|
time 3
|
time 4
|
time 5
|
time 5
|
time 6
|
GPS out-of-lock condition
Lower terminal correlation
Peak position
| time | 00
|
time 01
|
time 02
|
time 03
|
time 04
|
time 05
|
time 05
|
time 06
|
Difference calculation
| diff | 0 =
(time 0 -
time 00)
|
diff 1 =
(time 1 -
time 01)
|
diff 2 =
(time 2 -
time 02)
|
diff 3 =
(time 3 -
time 03)
|
diff 4 =
(time 4 -
time 04)
|
diff 5 =
(time 5 -
time 05)
|
diff 6 =
(time 6 -
time 06)
|
diff 7 =
(time 7 -
time 07) |
In the embodiment of the invention, aiming at the condition that the GPS module is unlocked due to weak satellite signals in severe weather or indoor environment, the method of the invention is adopted, the broadcast channel information (PBCH) of the mobile communication network is utilized to carry out air interface synchronization, and then 1pps output by the unlocked GPS is calibrated according to the synchronized information, so that the aim of acquiring the accurate time service information is achieved. Specifically, since the time reference source of the communication network is also a satellite navigation system, the calibration of 1pps output by the GPS can be realized according to the broadcast signal of the base station of the communication network, so that in the area without satellite signal coverage such as severe weather, indoors or basements, the calibration of 1pps output by the GPS is completed by performing air interface synchronization with the network, and a high-precision clock reference signal can be obtained as a time service signal.
Referring to fig. 11, fig. 11 is a block diagram of a GPS time service device according to the present invention, which is used in an electronic device, and based on the same inventive concept as the foregoing embodiment, the device includes:
the first acquisition module 10 is configured to acquire a target 1pps signal corresponding to a GPS;
a second obtaining module 20, configured to obtain a first air interface signal of a communication network according to the target 1pps signal;
and the calibration module 30 is configured to perform synchronous calibration on the target 1pps signal through the first air interface signal when the GPS is in an out-of-lock state, so as to obtain a calibrated target 1pps signal, and perform GPS time service.
Optionally, the apparatus further comprises:
the offset calculation module is used for calculating the offset of the target 1pps signal;
and the judging module is used for judging that the GPS is in the out-of-lock state if the offset of the target 1pps signal is greater than a preset value.
Optionally, the apparatus further comprises the following steps:
the intercepting module is used for intercepting a second air interface signal with corresponding time length according to the locked 1pps signal when the GPS is in a locked state;
a correlation peak calculation module for calculating a first correlation peak of the locked 1pps signal and a second correlation peak of the second air interface signal;
and the processing module is used for determining a first relative position of the first correlation peak and the second correlation peak and recording the first relative position as first relative time offset information.
Optionally, the processing module is further configured to calculate first relative time offset information of the locked 1pps signal and the second air interface signal at time t-1, and record locking state relative time offset information; and calculating first relative time offset information of the locking 1pps signal and the second air interface signal at the time t, and updating the locking state relative time offset information by using the second relative time offset information.
Optionally, the calibration module 30 is further configured to calculate a third correlation peak of the second air interface signal when the GPS is in an out-of-lock state; calculating a third relative position of the second correlation peak and the third correlation peak, and recording the third relative position as third phase time offset information; calculating a calibration parameter according to the locking state relative time offset information and the third phase relative time offset information; and synchronously sampling the target 1pps signal through the calibration parameter.
Optionally, the calibration module 30 is further configured to calculate a difference between the locking state relative time offset information and the third phase relative time offset information; and taking the difference value of the locking state relative time offset information and the third phase relative time offset information as the calibration parameter.
Optionally, the number of the second correlation peaks is n, the number of the third correlation peaks is m, m is smaller than or equal to n, and the difference is an average difference, and the calibration module 30 is further configured to calculate the difference between the fixed-state relative time offset information and the third phase relative time offset information according to the following formula pair:
in the formula (I), the compound is shown in the specification,
the average difference value is represented by the average difference value,
indicating the locking state relative time shift information corresponding to the ith second correlation peak in the locking state at time #,
is shown in&Third phase-to-time offset information corresponding to the jth third correlation peak in the out-of-lock state at the moment, wherein i = j,&x is an integer greater than or equal to 1, and x represents the xth time in the continuous out-of-lock state.
It should be noted that, since the steps executed by the apparatus of this embodiment are the same as the steps of the foregoing method embodiment, the specific implementation and the achievable technical effects thereof can refer to the foregoing embodiment, and are not described herein again.
The above description is only an alternative embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.