Terminal time adjustment method and device, storage medium and electronic equipment
By monitoring the strength, delay and number of stars searches of GPS signals, judging its stability and switching adjustment methods, the problem of weather affecting the stability of GPS signals is solved, ensuring the accuracy of terminal time.
Patent Information
- Application Number
- CN202411373495.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
The weather affects the stability of the GPS signal, resulting in low terminal time accuracy.
By obtaining the signal strength, signal delay and number of star searches when receiving the GPS positioning signal, the signal stability is judged. If the preset conditions are met, the GPS signal will be used to adjust the terminal time, otherwise it will be switched to the network time or the local crystal oscillator for adjustment.
Ensure the accuracy of terminal time when the GPS signal is stable, and switch to the backup mode when the signal is unstable to ensure the accuracy of terminal time.
Smart Images

Figure CN119199916A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal time adjustment, and in particular to a terminal time adjustment method, device, storage medium and electronic device. Background Art
[0002] With the development of the Internet, in the prior art, a terminal can obtain accurate time through a Global Positioning System (GPS) signal to adjust the terminal's own time. However, GPS signals are easily affected by weather and become unstable, which affects the accuracy of the terminal's time. Summary of the invention
[0003] The present application provides a terminal time adjustment method, device, storage medium and electronic device to solve the technical problem that weather affects GPS signals and thus affects the terminal time accuracy.
[0004] In a first aspect, the present application provides a time adjustment method for a terminal, comprising: when the terminal receives a GPS positioning signal, obtaining the signal strength, signal delay and number of searched satellites of the GPS positioning signal; when the signal strength, signal delay and number of searched satellites meet preset conditions, determining that the GPS positioning signal is stable, and switching to a first adjustment method to adjust the time of the terminal, wherein the first adjustment method is to adjust the time of the terminal according to the GPS positioning signal; when the signal strength, signal delay and number of searched satellites do not meet the preset conditions, determining that the GPS positioning signal is unstable, and switching to a second adjustment method to adjust the time of the terminal, wherein the second adjustment method is to use network time or the local crystal oscillator of the terminal to adjust the time of the terminal.
[0005] In the second aspect, the present application provides a time adjustment device for a terminal, including: an acquisition module, used to obtain the signal strength, signal delay and number of searched satellites of the GPS positioning signal when the terminal receives the GPS positioning signal; a determination module, used to determine that the GPS positioning signal is stable when the signal strength, signal delay and number of searched satellites meet preset conditions, and switch to a first adjustment method to adjust the time of the terminal, wherein the first adjustment method is to adjust the time of the terminal according to the GPS positioning signal; when the signal strength, signal delay and number of searched satellites do not meet the preset conditions, it is determined that the GPS positioning signal is unstable, and switch to a second adjustment method to adjust the time of the terminal, wherein the second adjustment method is to use network time or the local crystal oscillator of the terminal to adjust the time of the terminal.
[0006] As an optional example, the determination module includes: a determination unit, used to determine that the signal strength, signal delay and number of search satellites meet the preset conditions when the signal strength is greater than or equal to the standard strength, the signal delay is less than or equal to the standard delay and the number of search satellites is greater than or equal to 4, wherein the standard strength is the minimum tracking sensitivity of the GPS positioning signal, and the standard delay is a predetermined delay; when the signal strength is less than the standard strength or the signal delay is greater than the standard delay or the number of search satellites is less than 4, determine that the signal strength, signal delay and number of search satellites do not meet the preset conditions.
[0007] As an optional example, the determination module further includes: a first adjustment unit, which is used to determine the signal strength input by the user in the adjustment instruction as the standard strength and the signal delay input by the user in the adjustment instruction as the standard delay when receiving the adjustment instruction.
[0008] As an optional example, the above-mentioned determination module includes: a second adjustment unit, used to determine the position of the above-mentioned terminal based on the above-mentioned GPS positioning signals of three satellites out of at least four satellites; determine the target time corresponding to the above-mentioned position according to the position of the above-mentioned terminal based on one satellite out of at least four satellites; and adjust the time of the above-mentioned terminal to the above-mentioned target time.
[0009] As an optional example, the above-mentioned determination module includes: a third adjustment unit, which is used to obtain the above-mentioned network time through a wireless network or a wired network when using network time to adjust the time of the above-mentioned terminal, wherein the above-mentioned network time is the time obtained after adjusting the world time according to the network delay of the above-mentioned terminal; and adjust the time of the above-mentioned terminal to the above-mentioned network time.
[0010] As an optional example, the determination module includes: a fourth adjustment unit, configured to adjust the time of the terminal backward by 1 second every time the local crystal oscillator vibrates a preset number of times when the local crystal oscillator is used to adjust the time of the terminal.
[0011] As an optional example, the above-mentioned device also includes: an analysis module, which is used to receive the above-mentioned GPS positioning signal in real time and obtain the signal strength, signal delay and number of searched satellites of the above-mentioned GPS positioning signal; analyze the signal strength, signal delay and number of searched satellites of the above-mentioned GPS positioning signal within a predetermined time length; and determine that the time adjustment method after the above-mentioned predetermined time length is the above-mentioned first adjustment method or the above-mentioned second adjustment method based on the signal strength, signal delay and number of searched satellites of the above-mentioned GPS positioning signal within the predetermined time length.
[0012] In a third aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the memory stores a computer program, and the processor is configured to implement any one of the above-mentioned terminal time adjustment methods when executing the computer program.
[0013] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the terminal time adjustment method described in any one of the above items of the present application.
[0014] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages over the prior art: the scheme provided by the embodiment of the present application, when the terminal receives the GPS positioning signal, obtains the signal strength, signal delay and number of searched satellites of the above-mentioned GPS positioning signal; when the above-mentioned signal strength, signal delay and number of searched satellites meet the preset conditions, determines that the above-mentioned GPS positioning signal is stable, and switches to the first adjustment method to adjust the time of the above-mentioned terminal, wherein the above-mentioned first adjustment method is to adjust the time of the above-mentioned terminal according to the above-mentioned GPS positioning signal; when the above-mentioned signal strength, signal delay and number of searched satellites do not meet the preset conditions, determines that the above-mentioned GPS positioning signal is unstable, and switches to the second adjustment method to adjust the time of the above-mentioned terminal, wherein the above-mentioned second adjustment method is to adjust the time of the above-mentioned terminal using the network time or the local crystal oscillator of the above-mentioned terminal, so that when the GPS positioning signal is stable, the terminal time can be adjusted according to the GPS positioning signal, and when the GPS positioning signal is unstable, the terminal time is adjusted according to the network time or the local crystal oscillator, which can ensure the accuracy of the terminal time. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0018] Figure 1 A flowchart of a time adjustment method for a terminal provided in an embodiment of the present application;
[0019] Figure 2 A flowchart of another method for adjusting time of a terminal provided in an embodiment of the present application;
[0020] Figure 3 A flowchart of another method for adjusting time of a terminal provided in an embodiment of the present application;
[0021] Figure 4 A flowchart of another method for adjusting time of a terminal provided in an embodiment of the present application;
[0022] Figure 5 A flowchart of another method for adjusting time of a terminal provided in an embodiment of the present application;
[0023] Figure 6 A flowchart of another method for adjusting time of a terminal provided in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of a time adjustment device for a terminal provided in an embodiment of the present application;
[0025] Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0027] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0028] In order to solve the technical problem in the prior art that weather affects the Global Positioning System (GPS) signal, thereby affecting the terminal time accuracy, the present application provides a terminal time adjustment method that can achieve the effect of ensuring the accuracy of the terminal time.
[0029] Figure 1 A flowchart of a time adjustment method for a terminal provided in an embodiment of the present application.
[0030] like Figure 1 As shown, the time adjustment method of the above terminal includes:
[0031] S102, when the terminal receives the GPS positioning signal, obtaining the signal strength, signal delay and number of searched satellites of the GPS positioning signal;
[0032] S104-1, when the signal strength, signal delay and number of searched satellites meet the preset conditions, determine that the GPS positioning signal is stable, and switch to the first adjustment mode to adjust the terminal time, wherein the first adjustment mode is to adjust the terminal time according to the GPS positioning signal;
[0033] S104-2, when the signal strength, signal delay and number of searched satellites do not meet the preset conditions, determine that the GPS positioning signal is unstable, and switch to the second adjustment method to adjust the terminal time, where the second adjustment method is to use the network time or the local crystal oscillator of the terminal to adjust the terminal time.
[0034] In this embodiment, the terminal may be a terminal with local time and capable of receiving GPS signals, for example, an electronic device in a car, a mobile phone, a computer, a wristband, etc. The terminal may synchronize the local time of the terminal through the received GPS signal.
[0035] The above-mentioned GPS positioning signal can be received by the terminal, and the GPS positioning signal can locate the position of the terminal. Once the position of the terminal is determined, the time of the position can be sent to the terminal according to the atomic clock. The terminal can use the time of the atomic clock to adjust its own time, thereby maintaining the accuracy of its own time. The atomic clock is the most accurate time, and adjusting the terminal time by the time of the atomic clock can maximize the accuracy of the terminal time.
[0036] The above-mentioned GPS positioning signal includes at least three attributes, namely the signal strength, signal delay and number of search satellites of the GPS positioning signal. The signal strength is the minimum tracking sensitivity of the GPS positioning signal, which means the minimum signal strength that can be used to locate the terminal position using the GPS positioning signal. The above-mentioned signal delay is the delay from the satellite transmitting the signal to the terminal receiving the signal. The above-mentioned number of search satellites is the number of satellites used to locate the terminal. If you want to determine the location and time of a terminal, at least 4 satellites are required.
[0037] In this embodiment, whether the GPS positioning signal is stable can be determined based on the signal strength, signal delay, and number of satellite searches of the GPS positioning signal. Whether the GPS positioning signal is stable is directly related to whether the time of the terminal adjusted by the GPS positioning signal is correct. If the GPS positioning signal is stable, the time of the terminal can be determined by the GPS positioning signal. If the GPS positioning signal is unstable, the time of the terminal can be adjusted by the network time or the local crystal oscillator until the GPS positioning signal is detected to be stable again, and then switch to the GPS positioning signal to adjust the time of the terminal.
[0038] Take an example to illustrate. For example, in life scenarios, weather factors such as cloudy days, rain and snow, strong winds, thunder and lightning weather, etc., have a greater impact on GPS positioning signals. In such weather, GPS positioning signals may not be able to provide accurate time to the terminal. Therefore, the present application proposes to monitor the GPS positioning signal. If the GPS positioning signal does not meet the preset conditions, it switches to using the local crystal oscillator or network time to adjust the time of the terminal. For example, the terminal is a user's mobile phone. When the user's mobile phone receives the GPS positioning signal, the signal strength, signal delay and number of search stars of the GPS positioning signal are obtained. Then, the terminal compares the signal strength with the standard strength, compares the signal delay with the standard delay, and compares the number of search stars with the number 4. If the comparison result of the GPS positioning signal meets the conditions, the GPS positioning signal is used to determine the time of the terminal. If the comparison result of the GPS positioning signal does not meet the conditions, it switches to using the local crystal oscillator or network time to determine the time of the terminal. In this process, the GPS positioning signal will continue to be received. Once the GPS positioning signal meets the preset conditions, it can be switched back to the GPS positioning signal to adjust the time of the terminal.
[0039] The solution provided in the embodiment of the present application obtains the signal strength, signal delay and number of searched satellites of the GPS positioning signal when the terminal receives the GPS positioning signal; when the signal strength, signal delay and number of searched satellites meet the preset conditions, it is determined that the GPS positioning signal is stable, and the terminal is switched to the first adjustment method to adjust the terminal time, wherein the first adjustment method is to adjust the terminal time according to the GPS positioning signal; when the signal strength, signal delay and number of searched satellites do not meet the preset conditions, it is determined that the GPS positioning signal is unstable, and the terminal is switched to the second adjustment method to adjust the terminal time, wherein the second adjustment method is to adjust the terminal time using the network time or the local crystal oscillator of the terminal, so that when the GPS positioning signal is stable, the terminal time can be adjusted according to the GPS positioning signal, and when the GPS positioning signal is unstable, the terminal time can be adjusted according to the network time or the local crystal oscillator, thereby ensuring the accuracy of the terminal time.
[0040] As an alternative example, Figure 2 As shown, determining whether the signal strength, signal delay, and number of satellites to be searched meet the preset conditions includes:
[0041] S202-1, when the signal strength is greater than or equal to the standard strength, the signal delay is less than or equal to the standard delay, and the number of searched satellites is greater than or equal to 4, determining that the signal strength, the signal delay, and the number of searched satellites meet preset conditions, wherein the standard strength is the minimum tracking sensitivity of the GPS positioning signal, and the standard delay is a predetermined delay;
[0042] S202-2: When the signal strength is less than the standard strength or the signal delay is greater than the standard delay or the number of searched satellites is less than 4, determine that the signal strength, signal delay and number of searched satellites do not meet the preset conditions.
[0043] In this embodiment, when determining whether the GPS positioning signal is stable according to the signal strength, signal delay and number of searched stars of the GPS positioning signal, the signal strength, signal delay and number of searched stars of the GPS positioning signal can be compared with the preset values. For the GPS positioning signal, it can be compared with the standard strength. The standard strength can be the minimum tracking sensitivity of the GPS positioning signal, that is, the minimum signal strength that can determine the GPS positioning of the terminal according to the GPS positioning signal. If the signal strength of the GPS signal is less than the standard strength, it can be considered that the GPS signal cannot be received or the received GPS signal is incoherent or the received GPS signal is inaccurate, and the position cannot be located and the atomic clock time cannot be determined. For the signal delay, it can be compared with the standard delay, and the standard delay can be a pre-set signal delay, which can be determined according to the empirical value. The standard delay is used to constrain the signal delay. For example, if the signal delay is greater than the standard delay, it can be considered that the delay is high. Even if a GPS signal with sufficient signal strength is obtained, the time of the terminal cannot be accurately determined according to the GPS signal due to the high delay. For the number of satellites to be searched, it can be determined whether it is greater than or equal to 4, because for GPS signals, at least 4 satellites are required to determine the location and time of the terminal. If the number of satellites is less than 4, the location and time of the terminal cannot be accurately determined.
[0044] By comparing the three data, if the signal strength is less than the standard strength or the signal delay is greater than the standard delay or the number of searched satellites is less than 4, it is considered that the preset conditions are not met and the terminal time needs to be determined based on the local crystal oscillator or network time.
[0045] As an optional example, the method further includes: when receiving an adjustment instruction, determining the signal strength input by the user in the adjustment instruction as the standard strength, and determining the signal delay input by the user in the adjustment instruction as the standard delay.
[0046] In this embodiment, the value to be compared for the number of satellites to be searched is 4, which is the minimum number of satellites for GPS positioning. Therefore, 4 cannot be modified. The standard strength and standard delay can be adjusted according to actual conditions. During the adjustment, an adjustment instruction from the user can be received, and the adjustment instruction can carry a new standard strength and standard delay.
[0047] As a method for determining standard strength and standard delay, it is possible to determine from historical data that when weather factors do not change significantly, the terminal time is determined by the GPS positioning signal instead of switching to the standard strength and standard delay of determining the terminal time by the local crystal oscillator or network time.
[0048] For example, historical data is obtained, which includes weather data, GPS positioning signal data, and the method used to determine the time of the terminal within a period of time. The historical data is divided into historical data under normal weather conditions and abnormal weather conditions, and then the signal strength and signal delay that will not be generated when switching from the first adjustment method to the second adjustment method are checked under normal weather conditions, and the signal strength and signal delay are used as the signal strength and signal delay used to determine whether to switch the adjustment method.
[0049] As an alternative example, Figure 3 As shown, switching to the first adjustment mode to adjust the terminal time includes:
[0050] S302, determining the location of the terminal according to GPS positioning signals of three satellites out of at least four satellites;
[0051] S304, determining a target time corresponding to the location according to the location of the terminal based on one of the at least four satellites;
[0052] S306: Adjust the terminal time to the target time.
[0053] In this embodiment, when using the GPS positioning signal to adjust the terminal time, at least 4 satellites corresponding to the GPS positioning signal can be determined, 3 of which are used to locate the terminal's position, including the terminal's latitude, longitude and altitude, and 1 satellite is used to determine the time corresponding to the terminal's position, and transmit the time to the terminal, which adjusts its own time.
[0054] As an alternative example, Figure 4 As shown, switching to the second adjustment mode to adjust the terminal time includes:
[0055] S402, when the network time is used to adjust the time of the terminal, the network time is obtained through a wireless network or a wired network, wherein the network time is the time obtained by adjusting the world time according to the network delay of the terminal;
[0056] S404, adjusting the terminal time to the network time.
[0057] In this embodiment, if the GPS positioning signal does not meet the preset conditions and switches to the method of using network time to adjust the terminal time, the network time can be obtained through a wireless network or a wired network. Since there is a delay in network transmission, after obtaining the network time, the network time can be fine-tuned according to the delay, and the fine-adjusted time can be used as the terminal time.
[0058] As an alternative example, Figure 5 As shown, switching to the second adjustment mode to adjust the terminal time includes:
[0059] S502, when the local crystal oscillator is used to adjust the time of the terminal, the local crystal oscillator vibrates a preset number of times and adjusts the time of the terminal backward by 1 second.
[0060] In this embodiment, if the GPS positioning signal does not meet the preset conditions and the method of using the local crystal oscillator to adjust the terminal time is switched, the current time of the terminal can be obtained, and the current time is the terminal time determined before the switch. Then, starting from this time, the number of vibrations of the crystal oscillator is recorded, and the terminal time is adjusted backward by 1 second for each preset number of vibrations.
[0061] The above preset number is the number of times the crystal oscillator vibrates in one second. By recording the number of times the crystal oscillator vibrates, the terminal time is adjusted. For example, the crystal oscillator vibrates 30,000 times per second, which is the fixed frequency of the crystal oscillator. Then, when the GPS positioning signal cannot be used to adjust the terminal time, the terminal time before switching to the local crystal oscillator can be recorded, and then after switching to the local crystal oscillator, the terminal time is adjusted back by 1 second for every 30,000 vibrations of the local crystal oscillator.
[0062] As an optional example, the above method also includes: receiving the GPS positioning signal in real time and obtaining the signal strength, signal delay and number of searched satellites of the GPS positioning signal; analyzing the signal strength, signal delay and number of searched satellites of the GPS positioning signal within a predetermined time period; and determining the time adjustment method after the predetermined time period as the first adjustment method or the second adjustment method based on the signal strength, signal delay and number of searched satellites of the GPS positioning signal within the predetermined time period.
[0063] In this embodiment, the GPS positioning signal can be received in real time, and after receiving the GPS positioning signal, it is determined whether the GPS positioning signal is stable within a predetermined time. That is to say, the signal strength, signal delay and number of searched satellites of the GPS positioning signal within the predetermined time all meet the preset conditions. Then, the GPS positioning signal can be continuously used to determine the time of the terminal. If the signal strength, signal delay and number of searched satellites of the GPS positioning signal within the predetermined time do not meet the preset conditions, the local crystal oscillator or network time can be switched to determine the time of the terminal, and in this process, the GPS positioning signal is still received, and it is still determined whether the GPS positioning signal is stable within the predetermined time. If the GPS positioning signal is stable within the predetermined time, it is switched back to the method of using the GPS positioning signal to adjust the time of the terminal.
[0064] Figure 6This is the flow chart of this embodiment. After acquiring the GPS positioning signal, this embodiment analyzes the signal strength, signal delay, number of satellites searched, etc. of the GPS positioning signal to infer whether the current operating environment of the terminal device is in bad weather. If it is in bad weather, that is, the GPS signal does not meet the preset conditions, the highest priority of GPS is intelligently deprived (the GPS source signal is not used to adjust the terminal time), and the network time or local clock of the second priority is switched to (the terminal time is adjusted using a ground-based source or a local source, i.e., a local crystal oscillator). In this process, the GPS signal is continuously analyzed, and when it is inferred that the bad weather has dissipated, the GPS positioning signal is switched back to adjust the terminal time.
[0065] Specifically, it is known that severe weather, such as rain, snow, lightning, hail and strong wind, will have a significant impact on GPS positioning signals. For example, rain can absorb and refract radio waves, thereby reducing the signal strength of the GPS positioning signal received by the terminal's receiver, resulting in a signal strength of <-160dBm (-160dBm refers to the minimum tracking sensitivity of the GPS module); lightning will produce electromagnetic interference, so that the receiver cannot receive satellites with weaker signals, resulting in the number of search satellites being less than 4 (the number of GPS search satellites should be greater than or equal to 4, because the location of a receiver requires information from at least 4 satellites for calculation, because the location calculation involves 4 unknowns (3-dimensional positions and a clock deviation)); hail will produce a large amount of scattering and multipath effects, resulting in signals that are sometimes strong and sometimes weak or delay fluctuations >100ns (delay refers to the time required for satellite signals to reach the receiver from the satellite); the algorithm here uses reverse thinking to infer that the device receiving antenna area is in severe weather from various fluctuations of the GPS signal, and adjusts the synchronization source of the terminal device's time to the network time or the local crystal oscillator based on this, to ensure the local clock synchronization accuracy of the terminal device.
[0066] In this embodiment, the GPS positioning signal can be received by the antenna of the terminal receiver to obtain the signal strength, signal delay, number of searched stars, etc. Then the algorithm analyzes the stability of the GPS positioning signal based on the GPS positioning signal over a period of time, and infers the influence of the current weather on the GPS positioning signal. If the weather is normal, the GPS module receiver carried by the device parses the GPS message to obtain information such as GPS signal strength, signal delay, number of searched stars, etc. For example, when the signal strength is > or = -160dBm; the delay fluctuation is < or = 100ns; the number of searched stars is > or = 4, and the above three conditions are met at the same time, the algorithm determines that the weather is normal at this time, the GPS signal is stable, the algorithm does not intervene, and the clock maintains the method of using the GPS positioning signal to adjust the terminal time.
[0067] If the weather is abnormal, the GPS module receiver on the device will parse the GPS message to obtain information such as GPS signal strength, delay, and number of searched satellites. For example, when the signal strength is greater than or equal to -160dBm, the delay fluctuation is less than or equal to 100ns, and the number of searched satellites is greater than or equal to 4, and any one of the conditions is not met, the algorithm determines that the weather is abnormal at this time, and the algorithm intervenes in the intelligent switching clock product to select other clock synchronization sources that are not affected by the weather but have slightly lower accuracy (such as network time or local crystal oscillator).
[0068] Because extreme weather usually lasts for a short time or the user's location will move, the algorithm will continue to analyze the GPS signal conditions for a period of time. When the GPS signal stabilizes again (meeting the three conditions of normal weather), it is determined that the extreme weather has dissipated and intelligently switches back to the more accurate GPS positioning signal to adjust the time.
[0069] In high-reliability application scenarios, the number of satellites, signal strength and other threshold settings can be increased. When the algorithm determines that the signal source of the current GPS positioning signal has begun to be affected based on the threshold, it will switch to other stable and effective sources in advance. When the GPS source becomes stable again and meets the threshold requirements, the source will be switched back to GPS.
[0070] In this embodiment, parameters such as GPS signal strength, signal delay, and number of satellites searched can be added to the terminal display page, and users can configure the standard strength and standard delay corresponding to the signal strength and signal delay. Logs or historical analysis curves can be added to record the process of terminal device switching.
[0071] Figure 7 This is a schematic diagram of the structure of a time adjustment device for a terminal provided in an embodiment of the present application. Figure 7 As shown, the time adjustment device of the above terminal includes:
[0072] The acquisition module 702 is used to acquire the signal strength, signal delay and number of searched satellites of the GPS positioning signal when the terminal receives the GPS positioning signal;
[0073] Determination module 704 is used to determine that the GPS positioning signal is stable when the signal strength, signal delay and number of searched satellites meet the preset conditions, and switch to the first adjustment method to adjust the terminal time, wherein the first adjustment method is to adjust the terminal time according to the GPS positioning signal; when the signal strength, signal delay and number of searched satellites do not meet the preset conditions, determine that the GPS positioning signal is unstable, and switch to the second adjustment method to adjust the terminal time, wherein the second adjustment method is to use the network time or the local crystal oscillator of the terminal to adjust the terminal time.
[0074] In this embodiment, the terminal may be a terminal with local time and capable of receiving GPS signals, for example, an electronic device in a car, a mobile phone, a computer, a wristband, etc. The terminal may synchronize the local time of the terminal through the received GPS signal.
[0075] The above-mentioned GPS positioning signal can be received by the terminal, and the GPS positioning signal can locate the position of the terminal. Once the position of the terminal is determined, the time of the position can be sent to the terminal according to the atomic clock. The terminal can use the time of the atomic clock to adjust its own time, thereby maintaining the accuracy of its own time. The atomic clock is the most accurate time, and adjusting the terminal time by the time of the atomic clock can maximize the accuracy of the terminal time.
[0076] The above-mentioned GPS positioning signal includes at least three attributes, namely the signal strength, signal delay and number of search satellites of the GPS positioning signal. The signal strength is the minimum tracking sensitivity of the GPS positioning signal, which means the minimum signal strength that can be used to locate the terminal position using the GPS positioning signal. The above-mentioned signal delay is the delay from the satellite transmitting the signal to the terminal receiving the signal. The above-mentioned number of search satellites is the number of satellites used to locate the terminal. If you want to determine the location and time of a terminal, at least 4 satellites are required.
[0077] In this embodiment, whether the GPS positioning signal is stable can be determined based on the signal strength, signal delay, and number of satellite searches of the GPS positioning signal. Whether the GPS positioning signal is stable is directly related to whether the time of the terminal adjusted by the GPS positioning signal is correct. If the GPS positioning signal is stable, the time of the terminal can be determined by the GPS positioning signal. If the GPS positioning signal is unstable, the time of the terminal can be adjusted by the network time or the local crystal oscillator until the GPS positioning signal is detected to be stable again, and then switch to the GPS positioning signal to adjust the time of the terminal.
[0078] Take an example to illustrate. For example, in life scenarios, weather factors such as cloudy days, rain and snow, strong winds, thunder and lightning weather, etc., have a greater impact on GPS positioning signals. In such weather, GPS positioning signals may not be able to provide accurate time to the terminal. Therefore, the present application proposes to monitor the GPS positioning signal. If the GPS positioning signal does not meet the preset conditions, it switches to using the local crystal oscillator or network time to adjust the time of the terminal. For example, the terminal is a user's mobile phone. When the user's mobile phone receives the GPS positioning signal, the signal strength, signal delay and number of search stars of the GPS positioning signal are obtained. Then, the terminal compares the signal strength with the standard strength, compares the signal delay with the standard delay, and compares the number of search stars with the number 4. If the comparison result of the GPS positioning signal meets the conditions, the GPS positioning signal is used to determine the time of the terminal. If the comparison result of the GPS positioning signal does not meet the conditions, it switches to using the local crystal oscillator or network time to determine the time of the terminal. In this process, the GPS positioning signal will continue to be received. Once the GPS positioning signal meets the preset conditions, it can be switched back to the GPS positioning signal to adjust the time of the terminal.
[0079] The solution provided in the embodiment of the present application obtains the signal strength, signal delay and number of searched satellites of the GPS positioning signal when the terminal receives the GPS positioning signal; when the signal strength, signal delay and number of searched satellites meet the preset conditions, it is determined that the GPS positioning signal is stable, and the terminal is switched to the first adjustment method to adjust the terminal time, wherein the first adjustment method is to adjust the terminal time according to the GPS positioning signal; when the signal strength, signal delay and number of searched satellites do not meet the preset conditions, it is determined that the GPS positioning signal is unstable, and the terminal is switched to the second adjustment method to adjust the terminal time, wherein the second adjustment method is to adjust the terminal time using the network time or the local crystal oscillator of the terminal, so that when the GPS positioning signal is stable, the terminal time can be adjusted according to the GPS positioning signal, and when the GPS positioning signal is unstable, the terminal time can be adjusted according to the network time or the local crystal oscillator, thereby ensuring the accuracy of the terminal time.
[0080] For other examples of this embodiment, please refer to the above examples and will not be described in detail here.
[0081] like Figure 8 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0082] Memory 113, used for storing computer programs;
[0083] In one embodiment of the present application, the processor 111 is configured to implement the terminal time adjustment method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113 .
[0084] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a time adjustment method for a terminal provided in any one of the aforementioned method embodiments is implemented.
[0085] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0087] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0088] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A time adjustment method for a terminal, characterized in that: include: When the terminal receives the GPS positioning signal, obtain the signal strength, signal delay and number of searched satellites of the GPS positioning signal; When the signal strength, signal delay and number of searched satellites meet preset conditions, determine that the GPS positioning signal is stable, and switch to a first adjustment mode to adjust the time of the terminal, wherein the first adjustment mode is to adjust the time of the terminal according to the GPS positioning signal; When the signal strength, signal delay and number of searched satellites do not meet the preset conditions, it is determined that the GPS positioning signal is unstable, and the second adjustment method is switched to adjust the terminal time, wherein the second adjustment method is to use network time or the local crystal oscillator of the terminal to adjust the terminal time.
2. The method according to claim 1, characterized in that Determining whether the signal strength, signal delay, and number of searched satellites meet preset conditions includes: When the signal strength is greater than or equal to the standard strength, the signal delay is less than or equal to the standard delay, and the number of searched satellites is greater than or equal to 4, determine that the signal strength, signal delay, and number of searched satellites meet the preset conditions, wherein the standard strength is the minimum tracking sensitivity of the GPS positioning signal, and the standard delay is a predetermined delay; When the signal strength is less than the standard strength or the signal delay is greater than the standard delay or the number of searched satellites is less than 4, it is determined that the signal strength, signal delay and number of searched satellites do not meet the preset conditions.
3. The method according to claim 2, characterized in that The method further comprises: When the adjustment instruction is received, the signal strength input by the user in the adjustment instruction is determined as the standard strength, and the signal delay input by the user in the adjustment instruction is determined as the standard delay.
4. The method according to claim 1, characterized in that: Switching to the first adjustment mode to adjust the time of the terminal includes: Determine the location of the terminal according to the GPS positioning signals of three of the at least four satellites; Determining a target time corresponding to the location according to the location of the terminal based on one of at least four satellites; The time of the terminal is adjusted to the target time.
5. The method according to claim 1, characterized in that Switching to the second adjustment mode to adjust the time of the terminal includes: When the network time is used to adjust the time of the terminal, the network time is obtained through a wireless network or a wired network, wherein the network time is the time obtained by adjusting the world time according to the network delay of the terminal; The time of the terminal is adjusted to the network time.
6. The method according to claim 1, characterized in that Switching to the second adjustment mode to adjust the time of the terminal includes: When the local crystal oscillator is used to adjust the time of the terminal, the time of the terminal is adjusted backward by 1 second every time the local crystal oscillator vibrates a preset number of times.
7. The method according to claim 1, characterized in that The method further comprises: Receive the GPS positioning signal in real time and obtain the signal strength, signal delay and number of searched satellites of the GPS positioning signal; Analyze the signal strength, signal delay and number of satellites searched by the GPS positioning signal within a predetermined time period; The time adjustment method after the predetermined time period is determined to be the first adjustment method or the second adjustment method according to the signal strength, signal delay and number of searched satellites of the GPS positioning signal within the predetermined time period.
8. A time adjustment device for a terminal, characterized in that: include: An acquisition module is used to acquire the signal strength, signal delay and number of searched satellites of the GPS positioning signal when the terminal receives the GPS positioning signal; A determination module is used to determine that the GPS positioning signal is stable when the signal strength, signal delay and number of searched satellites meet preset conditions, and switch to a first adjustment method to adjust the time of the terminal, wherein the first adjustment method is to adjust the time of the terminal according to the GPS positioning signal; when the signal strength, signal delay and number of searched satellites do not meet the preset conditions, determine that the GPS positioning signal is unstable, and switch to a second adjustment method to adjust the time of the terminal, wherein the second adjustment method is to use network time or a local crystal oscillator of the terminal to adjust the time of the terminal.
9. An electronic device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the memory stores a computer program, and when the processor executes the computer program, the terminal time adjustment method described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the terminal time adjustment method according to any one of claims 1 to 7 of the present application.
