Electronic device, and GPS cycle rollover method and medium thereof

By incorporating parameters such as vehicle speed, acceleration, and Coordinated Universal Time into the vehicle terminal, the time rollback problem caused by GPS week reversal was resolved, improving accuracy and effectiveness while reducing the workload of the vehicle terminal.

CN113945957BActive Publication Date: 2026-02-03HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110383360.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-30
Filing Date
2021-04-09
Publication Date
2026-02-03
Estimated Expiration
2041-04-09

AI Technical Summary

Technical Problem

The GPS week rollover issue causes time rollback in vehicle terminals, especially when the signal is weak or under attack from external simulated GPS signals. There is a low probability of incorrect GPS time parsing, resulting in inaccurate week rollover.

Method used

By judging parameters such as vehicle speed, vehicle acceleration, and Coordinated Universal Time, the preset writing conditions are determined, and the GPS week-flipping processing program is written into the vehicle terminal in advance, reducing the reception and parsing of GPS signals and improving the accuracy and effectiveness of the judgment.

Benefits of technology

The processing program is written before the GPS week number flip, which avoids week number overflow and flip, improves the accuracy and effectiveness of time writing, and reduces the workload of the vehicle terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113945957B_ABST
    Figure CN113945957B_ABST
Patent Text Reader

Abstract

The application relates to the GPS time service positioning technical field, and discloses a GPS week number flip method of an electronic device, which comprises the following steps: determining whether the current time is within a preset writing time range; judging whether GPS time obtained based on a GPS signal received by the electronic device meets a preset writing condition; and writing a GPS week number flip processing program into the electronic device under the condition that it is judged that the GPS time information meets the preset writing condition. Whether the vehicle speed, vehicle acceleration, coordinated universal time and other parameters meet the writing condition is judged, and the GPS week number flip processing program is written into the electronic device under the condition that the parameters meet the writing condition. The accuracy of the GPS week number flip processing program writing time can be improved after the vehicle speed and other parameters are introduced, and the effectiveness that the writing time does not directly lead to the week number flip can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the GPS time service positioning field, in particular to an electronic device and a GPS week number rollover method and medium thereof. BACKGROUND

[0002] The global positioning system (GPS) is composed of three parts: space part, ground control system and user equipment part, namely GPS signal receiver. It can provide accurate positioning, speed measurement and high-precision standard time for most areas on the earth (98%).

[0003] The internal system time of the vehicle terminal is synchronized by the GPS clock, and the GPS clock synchronization is the most basic service in the vehicle terminal.

[0004] However, GPS has a defect: GPS week number rollover problem. Specifically, the time of GPS is encoded by "week number" + "second within the week". The word length allocated to "week number" at the beginning of GPS design is 10 bits, that is, GPS system can only represent 0-1023 weeks. When the running time of the GPS system exceeds 1023 weeks, the "week number" will overflow and roll over, that is, it will start counting from 0, so that the time directly calculated by the receiver will be rolled back to before 1024 weeks.

[0005] As described above, there is a problem of week number rollover. Currently, there is a problem that when the signal is weak or attacked by external simulated GPS signal, there is a certain low probability that the vehicle terminal receives damaged GPS data packets, and based on the damaged GPS data packets, the wrong GPS time is parsed, and then the week number rollover occurs directly at the wrong time instead of at the time when the week number rollover should occur, that is, 1024 weeks are directly added to the current wrong time. SUMMARY

[0006] The electronic device and the GPS week number rollover method and medium thereof provided by the embodiments of the present application can improve the accuracy of the GPS week number rollover processing program writing time and the effectiveness that the writing time will not directly cause the week number rollover after introducing the vehicle speed, vehicle acceleration and other parameters.

[0007] In a first aspect, the embodiments of the present application provide a GPS week number rollover method of an electronic device, the method comprising: determining whether the current time is within a preset writing time range; judging whether the GPS time obtained based on the GPS signal received by the electronic device meets a preset writing condition; and writing a GPS week number rollover processing program to the electronic device in the case that the GPS time information meets the preset writing condition.

[0008] In this embodiment, taking the vehicle-mounted terminal 100 as an example, the GPS week-flipping processing program is written before the GPS week-flipping event occurs, thus resolving the GPS week-flipping problem when such an event occurs. Simultaneously, the program is written to the vehicle-mounted terminal 100 based on whether the GPS time derived from the GPS signal received by the terminal meets preset writing conditions. Thus, by determining whether parameters such as vehicle speed, vehicle acceleration, and Coordinated Universal Time (UTC) meet the writing conditions, the program is written to the electronic device only if these parameters do. Introducing these parameters improves the accuracy of the GPS week-flipping processing program's writing time and ensures that the writing process does not directly cause a week-flipping event.

[0009] In one possible implementation of the first aspect above, the method further includes:

[0010] The current time is the GPS time derived from the GPS signal received by the electronic device.

[0011] That is, the preset write time range is determined based on the GPS time. The preset write time is the write time range of the GPS week number flipping process, including the lower limit time before the most recent GPS week number flipping time should have occurred; in order to ensure that the GPS week number flipping process writes before the GPS week number flipping time occurs.

[0012] In one possible implementation of the first aspect above, the method further includes:

[0013] The current time includes the current time of the electronic device and the GPS time derived from the GPS signal received by the electronic device. That is, first, the current time of the electronic device is used to determine whether it is within the preset write time range, and then the GPS time derived from the received GPS signal is used to determine whether the current time is within the preset write time range.

[0014] In this embodiment, instead of directly acquiring the GPS signal, the internal system time of the vehicle terminal 100 is obtained first. This reduces the amount of GPS signal received and parsed, alleviating the workload of the vehicle terminal 100. Directly determining whether the internal system time data is within the preset writing time range, rather than parsing the GPS signal first, can improve the working efficiency of the vehicle terminal 100 to a certain extent.

[0015] In one possible implementation of the first aspect above, the method further includes:

[0016] If the difference between the GPS time and Coordinated Universal Time is less than a predetermined time difference, it is determined that the GPS time information meets the preset writing conditions.

[0017] In this embodiment of the application, Coordinated Universal Time (UTC) is more accurate than GPS time. Compared with UTC, it can improve the accuracy of determining whether the GPS time information meets the preset writing conditions.

[0018] In one possible implementation of the first aspect above, the method further includes:

[0019] The electronic device is the vehicle-mounted terminal 100, but it can also be used with other similar electronic devices.

[0020] In one possible implementation of the first aspect above, the method further includes:

[0021] If the vehicle's speed is greater than a predetermined speed or the vehicle's acceleration is greater than a predetermined acceleration, it is determined that the GPS time information meets the preset writing conditions.

[0022] In this embodiment, when a vehicle is traveling or parked in a relatively enclosed area, it often travels at a slower speed, receiving weaker signals or being vulnerable to external simulated GPS signal attacks. There is a low probability that the vehicle terminal 100 will receive a damaged GPS data packet and parse an incorrect GPS time based on it, leading to a week-number rollover occurring at the wrong time instead of the expected time. Specifically, the week-number rollover is directly increased by 1024 weeks. When the vehicle is in an open area, it receives a stronger signal, and the vehicle's speed generally exceeds that of a relatively enclosed environment, thus minimizing the week-number rollover problem. Furthermore, the vehicle cannot distinguish between damaged and normal GPS data packets based on the strength of the GPS signal. Therefore, it is necessary to obtain parameters that can, to a certain extent, determine whether the GPS data packet is normal, such as vehicle speed, vehicle acceleration, and a relatively accurate external reference time. Introducing these parameters can improve the accuracy of the GPS week-number rollover processing program's writing time, ensure that writing does not directly cause a week-number rollover, and quickly and efficiently determine whether the GPS time obtained from the GPS signal received by the electronic device meets the preset writing conditions.

[0023] In one possible implementation of the first aspect above, the method further includes:

[0024] If the vehicle speed is determined to be greater than a predetermined speed or the vehicle acceleration is determined to be greater than a predetermined acceleration multiple times in a row, the GPS time information is determined to meet the preset writing conditions.

[0025] Multiple consecutive judgments are made, with each judgment spaced at a certain interval.

[0026] Repeatedly performing this procedure can ensure the accuracy and validity of the GPS time obtained from the GPS signals received by the electronic device.

[0027] In one possible implementation of the first aspect above, the method further includes:

[0028] If the vehicle speed is greater than a predetermined speed and the difference between the GPS time and Coordinated Universal Time is less than a predetermined time difference, it is determined that the GPS time information meets the preset writing conditions.

[0029] In one possible implementation of the first aspect above, the method further includes:

[0030] If the current time is determined to be within a preset writing time range multiple times in a row, and the GPS time obtained based on the GPS signal received by the electronic device is determined to meet the preset writing conditions, a GPS week number flipping processing program is written to the electronic device, wherein each of the multiple consecutive times is spaced at a preset time interval.

[0031] Secondly, this application provides a machine-readable medium storing instructions that, when executed on a machine, cause the machine to perform the aforementioned GPS week-flipping method for electronic devices.

[0032] Thirdly, embodiments of this application also provide an electronic device, including:

[0033] Memory is used to store instructions executed by one or more processors of the system, and

[0034] The processor is one of the processors in an electronic device, used to execute the GPS week-flipping method of the electronic device described above. Attached Figure Description

[0035] Figure 1 The diagram shown is an application scenario diagram of a GPS week-flipping method for an electronic device provided in an embodiment of this application;

[0036] Figure 2 The diagram shown is a structural schematic of a vehicle-mounted terminal provided in an embodiment of this application;

[0037] Figure 3 The diagram shown is a flowchart illustrating a GPS week-flipping method for an electronic device according to an embodiment of this application.

[0038] Figure 4A The diagram shown is a vehicle terminal control interface provided in an embodiment of this application;

[0039] Figure 4B The diagram shown is a vehicle terminal control interface provided in an embodiment of this application;

[0040] Figure 5 The diagram shown is a flowchart illustrating a GPS week-flipping method for an electronic device according to an embodiment of this application. Detailed Implementation

[0041] The present application will be further described below with reference to specific embodiments and accompanying drawings. It should be noted that in this specification, similar reference numerals and letters in the following drawings indicate similar items.

[0042] The illustrative embodiments of this application include, but are not limited to, a GPS week-flipping method, apparatus, medium, and device for an electronic device.

[0043] This application discloses a GPS week-reversal method, apparatus, medium, and device for an electronic device. When the current time is determined to be within a preset writing time range, the method determines whether parameters such as vehicle speed, vehicle acceleration, and Coordinated Universal Time (UTC) meet the writing conditions. If the parameters meet the writing conditions, a GPS week-reversal processing program is written into the electronic device. Introducing these parameters improves the accuracy of the GPS week-reversal processing program's writing time and ensures that the writing process does not directly cause a week-reversal.

[0044] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0045] Figure 1 This illustration shows an application scenario of a GPS week-flipping method for an electronic device according to an embodiment of this application. Taking an electronic device as an in-vehicle terminal 100 as an example, as... Figure 1 As shown, the scenario includes a vehicle-mounted terminal 100 and a satellite device 200.

[0046] Specifically, the vehicle-mounted terminal 100 and the satellite device 200 can be connected via a wireless link. The satellite device 200 is used to send GPS signals to the vehicle-mounted terminal 100 in real time, periodically, or when receiving a GPS acquisition request. The vehicle-mounted terminal 100 can acquire parameters such as the current GPS signal sent by the satellite device 200, the vehicle speed and acceleration provided by the devices in the vehicle, and the Coordinated Universal Time provided by external devices. Based on the GPS time and parameters in the current GPS signal, it determines whether to write a GPS week-flipping processing program to the vehicle-mounted terminal 100. Specifically, the GPS week-flipping processing program can be written to the GPS chip in the vehicle-mounted terminal 100.

[0047] Specifically, the vehicle terminal 100 can be a vehicle infotainment system, a vehicle T-BOX, etc., but is not limited to these.

[0048] Specifically, Figure 2 A schematic diagram of the hardware structure of an in-vehicle terminal 100 according to an embodiment of this application is shown below; in conjunction with the following... Figure 2 This section introduces the internal hardware structure of the vehicle-mounted terminal 100.

[0049] like Figure 2 As shown, the vehicle terminal 100 may include a GPS receiver 120, a processor 120, a sensor module 130, and a display screen 140, etc.

[0050] It is understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the vehicle terminal 100. In other embodiments of this application, the vehicle terminal 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0051] GPS receiver 120 may include an antenna, and transmits and receives electromagnetic waves via the antenna. GPS receiver 120 can provide wireless communication solutions, including Global Positioning System (GPS), for use in vehicle terminal 100. GPS receiver 101 is used to receive GPS signals.

[0052] The sensor module 130 may include an accelerometer 131, a gyroscope, etc. The accelerometer 131 is used to detect the vehicle's speed and acceleration and transmit these parameters to the processor 120. The vehicle's speed can also be provided by a speed sensor; the speed sensor can be a pulse speed sensor connected to the wheels to detect the vehicle speed and transmit it to the processor 120 via a CAN bus (Controller Area Network, CAN).

[0053] The processor 120 determines whether parameters such as vehicle speed and acceleration meet the conditions for writing the GPS week-flipping processing program. If the conditions are met, the processor 120 calls the GPS week-flipping processing program stored in its memory and writes it to the vehicle's GPS chip. The processor 120 may include one or more processing units, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microcontroller unit (MCU), an AI (Artificial Intelligence) processor, or a field-programmable gate array (FPGA). These processing units may be independent devices or integrated into one or more processors. The processor 120 may include memory units for storing instructions and data. The memory units in the processor 120 store the GPS week-flipping processing program. In some embodiments, the memory units in the processor 120 are cache memories.

[0054] The display screen 140 is used to display human-computer interaction interfaces, images, videos, etc. The display screen 140 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0055] The driving module 140 may include a display processing unit 141. In this embodiment, the display processing unit 141 is used to convert the signal transmitted from the processor to prompt the user to determine whether to continue the judgment operation or pause the judgment operation according to the current environment into an image, thereby driving the display screen to display the prompt message "GPS time does not meet the preset writing conditions after multiple judgments. Please determine whether to continue the judgment".

[0056] The power module 150 may include a power supply, a power management component, etc. The power supply may be a battery. The power management component manages the charging of the power supply and the power supply to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module receives charging input from a charger; the power management module connects to the power supply and the processor 120. The power management module receives input from the power supply and / or the charging management module to power the processor 120, drive module 140, display screen 150, sensor module 130, and GPS receiver 120, etc.

[0057] Interface module 160 includes a CAN bus (Controller Area Network, CAN) interface, an external memory interface, and a universal serial bus (USB) interface. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the vehicle terminal 100. The external memory card communicates with the processor 120 through the external memory interface to perform data storage. The CAN bus interface is used to communicate with devices in the vehicle; for example, if the vehicle speed sensor is located at the tires, the speed sensor transmits the vehicle's acceleration to the processor via the CAN bus. The universal serial bus interface is used for communication with other electronic devices.

[0058] The GPS week-flipping method for electronic devices will be described in detail below based on an embodiment of this application.

[0059] Example 1

[0060] According to some embodiments of this application, Figure 3 A flowchart illustrating a GPS week-flipping method for an electronic device is shown, as follows: Figure 3 As shown, the method includes:

[0061] 301: The vehicle terminal 100 acquires the current GPS signal.

[0062] It is understandable that GPS signals contain relatively accurate time, and the vehicle terminal 100 can calibrate its internal system time based on the time in the GPS signal. The clock in the vehicle terminal 100 can then continue to keep time based on the calibrated time.

[0063] 302: The vehicle terminal 100 determines the current GPS time in the current GPS signal.

[0064] It is understandable that some fields in a GPS signal contain time information. Therefore, the vehicle terminal 100 needs to extract the current GPS time from the current GPS signal. For example, a GPS signal includes 25 frames of GPS navigation messages, totaling 37,500 bits. The first two fields (e.g., 60 bits) of the first frame provide time information including "week number" and "seconds within the week". It can be understood that the "week number" and "seconds within the week" information represent time information relative to the initial UTC standard time, such as the week number and seconds within the week relative to the early morning of January 6, 1980. GPS time can be week number and / or seconds within the week information.

[0065] 303: The vehicle terminal 100 continuously checks whether the current GPS time is within the preset write time range.

[0066] It is understandable that the GPS week number flipping process needs to be written into the vehicle terminal 100 before the GPS week number flips, so that the vehicle terminal 100 can add 1024 weeks to the current time after determining that the vehicle terminal 100 has exceeded 1023 weeks. In this way, the "week number" can be prevented from overflowing and flipping after the vehicle terminal 100 exceeds 1023 weeks, and the counting will start from 0 again.

[0067] Furthermore, it can be understood that the preset write time range is the write time range for the GPS week-flipping handler. The lower limit of this write time range includes a time before the most recent expected GPS week-flipping date. This ensures that the GPS week-flipping handler is written before the actual GPS week-flipping date. For example, if the first week-flipping date is August 21, 1999, and the second week-flipping date is April 6, 2019, the week-flipping would revert to August 21, 1999. To prevent this, the preset GPS week-flipping handler write time range is one year earlier, from April 6, 2018 to April 5, 2019. One year equals 52.1428571429 weeks. Taking this as an example, if the GPS time in the GPS time is week 976, the default write time range is week 972 to week 1024, with week 976 falling within the range of week 972 to week 1024. It can also be two years. The default GPS week number flipping processing program's write time range can be set based on practical experience.

[0068] Furthermore, it can be understood that "multiple consecutive" means that the number of judgments is multiple, with each judgment spaced at a certain time interval. Specifically, this includes:

[0069] The vehicle-mounted terminal 100 acquires GPS signals;

[0070] The vehicle-mounted terminal 100 extracts the GPS time from the GPS signal;

[0071] The vehicle terminal 100 continuously checks whether the parsed GPS time is within the preset writing time range. If the GPS time is found to be within the preset writing time range, then the current time is determined to be within the preset writing time range.

[0072] Thus, by repeatedly determining whether the parsed GPS time is within the preset writing time range, the accuracy of determining that the GPS time is within the preset writing time range can be improved.

[0073] In some other embodiments, unlike the examples above, before the vehicle terminal 100 acquires the GPS signal, a pre-determination is made as to whether the current time is within a preset writing time range. Specifically, this includes:

[0074] The vehicle terminal 100 obtains the internal system time of the vehicle terminal 100;

[0075] The vehicle terminal 100 determines whether the internal system time of the vehicle terminal 100 is within the preset write time range;

[0076] If the vehicle terminal 100 determines that its internal system time is within the preset write time range, then the vehicle terminal 100 acquires the GPS signal.

[0077] The vehicle-mounted terminal 100 extracts the GPS time from the GPS signal;

[0078] The vehicle terminal 100 determines whether each GPS time is within the preset writing time range. If it determines that all GPS times are within the preset writing time range, it determines that the current time is within the preset writing time range.

[0079] Taking the first cycle rollover date of August 21, 1999 as an example, the second cycle rollover date is April 6, 2019. If the internal system time of the vehicle terminal 100 is April 7, 2018, then it is determined that April 7, 2018 is within the preset time range (April 6, 2018 to April 5, 2019).

[0080] In this embodiment, instead of directly acquiring the GPS signal, the internal system time of the vehicle terminal 100 is obtained first. This reduces the amount of GPS signal received and parsed, alleviating the workload of the vehicle terminal 100. Directly determining whether the internal system time data is within the preset writing time range, rather than parsing the GPS signal first, can improve the working efficiency of the vehicle terminal 100 to a certain extent.

[0081] In some embodiments, the vehicle terminal 100 may begin acquiring GPS signals immediately after determining that the vehicle has started. Alternatively, in other embodiments, the vehicle terminal 100 begins acquiring GPS signals in response to a user's GPS week-flipping method, such as... Figure 4A As shown, Figure 4A This is a control interface diagram of a vehicle-mounted terminal 100 according to an embodiment of this application. The control interface 40 of the vehicle-mounted terminal 100 includes a touch area 50 and a button area 60. The vehicle-mounted terminal 100 can start acquiring GPS signals in response to a user clicking the GPS week number flip touch control 51 on the display screen. Alternatively, the vehicle-mounted terminal 100 can start acquiring GPS signals in response to a user pressing the request button 601. The GPS week number flip touch control 51 and the request button 601 can coexist in the same vehicle-mounted terminal 100, or either one can be set in the vehicle-mounted terminal 100.

[0082] It is understandable that when a vehicle is driving or parked in a relatively enclosed area, it often travels at a slower speed, receiving weaker signals or being vulnerable to external simulated GPS signal attacks. There is a low probability that the onboard terminal 100 will receive a damaged GPS data packet, and based on this damaged packet, erroneous GPS time will be deciphered. This can lead to a week-number rollover occurring at the incorrect time instead of the expected rollover time, essentially adding 1024 weeks to the current erroneous time. When the vehicle is in an open area, it receives a stronger signal, and the vehicle's speed generally exceeds that of a relatively enclosed environment. Therefore, this week-number rollover problem is less likely to occur, and the vehicle cannot distinguish between damaged and normal GPS data packets based on signal strength. Thus, it is necessary to obtain parameters that can, to a certain extent, determine whether a GPS data packet is normal, such as vehicle speed, vehicle acceleration, and a relatively accurate external reference time. Introducing these parameters would improve the accuracy of the GPS week-number rollover processing program's write time, ensure that the write operation does not directly cause a week-number rollover, and quickly and efficiently determine whether the GPS time derived from the received GPS signal meets the preset write conditions.

[0083] 302: The vehicle terminal 100 continuously checks whether the GPS time obtained from the received GPS signal meets the preset writing conditions.

[0084] In the first embodiment, the GPS time is determined to meet a preset writing condition based on the vehicle speed. For example, if the vehicle speed is determined to be greater than a predetermined speed multiple times consecutively, the GPS time is determined to meet the preset writing condition.

[0085] That is, if the vehicle speed is greater than the predetermined speed, the current vehicle speed is retrieved again after a preset interval, and the GPS time is still determined to meet the preset writing condition until the GPS time meets the preset writing condition within a preset number of checks; if the GPS time is determined not to meet the preset writing condition after or within the preset number of checks, such as Figure 4B As shown, Figure 4B According to a control interface diagram of a vehicle-mounted terminal 100 in this embodiment, the display screen of the vehicle-mounted terminal 100 control interface 40 shows the prompt message 52: "GPS time does not meet the preset writing conditions after multiple judgments. Please confirm whether to continue judgment." This prompts the user to decide whether to continue the judgment operation or pause the judgment operation based on the current environment, improving the user experience. If the user clicks "Continue" 53, the prompt message disappears, and the vehicle-mounted terminal 100 continues the judgment. If the user clicks "Pause" 54, the judgment operation is paused. When the vehicle is started again, the vehicle-mounted terminal 100 may display the above prompt message for a period of time to allow the user to make a decision, ensuring that the GPS week number flipping processing program is written to the GPS chip of the vehicle-mounted terminal 100 at the writing time. It can be understood that "multiple times" can be a set number of times, and the time interval between each two times is a preset time interval. For example, the set number of times is 2 times, 3 times, etc. The preset time interval can be 5 minutes, 10 minutes, 30 minutes, 1 hour, 2 hours, 3 hours, 12 hours, 24 hours, etc.

[0086] In the second embodiment, unlike the previous embodiment, the GPS time is determined to meet a preset writing condition based on the vehicle's acceleration. For example, if the vehicle's acceleration is determined to be greater than a predetermined acceleration multiple times consecutively, the GPS time is deemed to meet the preset writing condition. It can be understood that "multiple times consecutively" can be a set number of times, and the time interval between each two times is a preset time interval. For example, the set number of times could be 2 times, 3 times, etc. The preset time interval could be 5 minutes, 10 minutes, 30 minutes, 1 hour, 2 hours, 3 hours, 12 hours, 24 hours, etc.

[0087] In the third embodiment, unlike the embodiments described above, the GPS time is determined to meet the preset writing conditions using Coordinated Universal Time (UTC). For example, if the difference between the GPS time and UTC is less than a predetermined time difference, the GPS time is determined to meet the preset writing conditions. UTC is more accurate than GPS time, and compared to UTC, this improves the accuracy of determining whether the GPS time meets the preset writing conditions. The reference time can be provided by a UTC server. Specifically, a request to obtain UTC is sent to the UTC server, and the UTC returned by the UTC server is received. In this way, the received GPS signal can be more accurately determined to be an accurate time signal.

[0088] In the fourth embodiment, unlike the embodiments described above, the GPS time is determined to meet preset writing conditions based on vehicle speed and acceleration. For example, if the vehicle speed and acceleration are both greater than a predetermined speed and acceleration multiple times consecutively, the GPS time is deemed to meet the preset writing conditions. It can be understood that "multiple times consecutively" can be a set number of times, and the time interval between each two times is a preset time interval. For example, the set number of times could be 2 times, 3 times, etc. The preset time interval could be 5 minutes, 10 minutes, 30 minutes, 1 hour, 2 hours, 3 hours, 12 hours, 24 hours, etc.

[0089] In the fifth embodiment, unlike the embodiments described above, the GPS time is determined to meet the preset writing conditions based on vehicle speed, vehicle acceleration, and Coordinated Universal Time (UTC). For example, after repeatedly determining that the vehicle speed is greater than a predetermined speed, the vehicle acceleration is greater than a predetermined acceleration, and the GPS time is within a certain range, if the difference between the GPS time and UTC is less than a predetermined time difference, the GPS time is deemed to meet the preset writing conditions. It can be understood that "repeatedly" can be a set number of times, and the time interval between each two times is a preset time interval. For example, the set number of times could be 2 times, 3 times, etc. The preset time interval could be 5 minutes, 10 minutes, 30 minutes, 1 hour, 2 hours, 3 hours, 12 hours, 24 hours, etc.

[0090] S303: When the vehicle terminal 100 determines that the GPS time meets the preset writing conditions, it writes the GPS week number flipping processing program into the vehicle terminal 100.

[0091] In some implementations, if the vehicle terminal 100 determines that the GPS time meets the preset writing conditions, it repeats steps S301 and S302 after a set time until the GPS time still meets the preset writing conditions after a set number of iterations. It is understood that if any one of these determinations fails to meet the preset writing conditions, it indicates that the parsed GPS time may be based on a corrupted GPS data packet, resulting in an incorrect GPS time. Therefore, the parsed GPS time needs to be discarded, and the determination process ends. Alternatively, the GPS signal can be acquired again, parsed, and then the determination process resumes.

[0092] In some embodiments, the vehicle terminal 100 writes a GPS week-reversal processing program. Specifically, the GPS week-reversal processing program is written into the GPS signal receiver or GPS synchronization clock of the vehicle terminal 100. Further, the GPS week-reversal processing program is written into the GPS chip of the vehicle terminal 100.

[0093] In one embodiment, the GPS week number flipping process is a program consisting of a series of logical instructions for processing GPS week number flips. The GPS week number flipping process is used to, at a specified time, add 1024 multiplied by M to the current week number, where M is the cumulative number of flips from the initial flip to the current flip. It then determines whether the parameter value in the GPS time of the subsequent GPS signal is less than the GPS time parameter value in the preceding GPS signal. For example, if the current week number in the subsequent GPS time is less than the current week number in the preceding GPS time, then the current week number is added to the value of 1024 multiplied by M, where M is the cumulative number of flips from the initial flip to the current flip.

[0094] Example 2

[0095] The difference between Example 2 and Example 1 is that in Example 2, determining whether the current GPS time is within the preset writing time range and whether the GPS time obtained from the received GPS signal meets the preset writing conditions are considered as one judgment. These judgments are then repeated after a preset time interval, until the set number of judgments is reached. The following explanation uses determining whether the GPS time meets the preset writing conditions based on vehicle speed as an example.

[0096] According to some embodiments of this application, Figure 5 A flowchart illustrating a GPS week-flipping method for an electronic device is shown, as follows: Figure 5 As shown, the method includes:

[0097] 501: The vehicle terminal 100 obtains the current GPS signal and vehicle speed.

[0098] S502 and S506 are based on the same application concept as S302 and S305, respectively, and will not be elaborated here.

[0099] 503: The vehicle terminal 100 determines whether the current GPS time is within the preset write time range.

[0100] 504: The vehicle terminal 100 determines that the vehicle speed is greater than the vehicle speed threshold.

[0101] It is understandable that the vehicle terminal 100 can perform other condition checks when writing the cycle-flipping logic, introducing vehicle speed as one of the judgment conditions. Only when the vehicle speed reaches a certain value will the current time be considered valid. Moreover, multiple repeated checks should be performed, such as requiring two or more checks to confirm that the current time is accurate, thereby avoiding incorrect GPS time caused by abnormal scenarios or GPS emulation attacks. This improves the terminal's ability to write the cycle-flipping logic in the correct time range.

[0102] 505: The vehicle terminal 100 calculates the number of judgments and determines whether the number of judgments is greater than or equal to the set value.

[0103] It is understandable that when the time reaches the preset write time range (the write interval of the flip logic), it is determined whether the current vehicle speed meets or exceeds the set speed value. If both the time and speed value are met, a count is performed (the number of judgments). That is, steps 503 and 504 are treated as a set of judgments. Each time a set of judgments is performed, it is counted as one judgment count.

[0104] After a certain set time interval (preset time), the next time judgment is entered. The vehicle terminal 100 judges whether it meets the preset writing time range (the writing interval of the flip logic) and whether the current vehicle speed meets or exceeds the set speed value. If both are met, a count is performed. Only when the count value reaches the set range will the flip logic write be performed.

[0105] In summary, this embodiment of the application enters the logic judgment to determine whether to write the cycle flip within the time range of the vehicle terminal approaching the cycle flip period. To determine whether it is within the correct time range, the vehicle speed must first reach or exceed a set speed value. If the vehicle speed condition is met, the current time is then judged. If both conditions are met, it is considered a valid count. This judgment logic requires multiple valid counts, and the period between two judgments can be set to exceed a certain time range. The judgment for the second count is the same as the first. Similarly, the time judgment is only performed if the vehicle speed meets or exceeds the set value. After both conditions are met, another count is performed. Only after the counting condition is met two or more times is the accurate time determined, and only then is the flip logic written. This can avoid GPS chip decoding errors causing time errors that lead to the writing of the cycle flip logic, and it can also avoid the problem of the vehicle terminal failing due to premature writing of the flip logic caused by GPS emulation attacks.

[0106] Embodiments of this application also provide a machine-readable medium storing instructions that, when executed on a machine, cause the machine to perform a GPS week number flipping method.

[0107] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0108] Embodiments of this application also provide an electronic device, which includes:

[0109] Memory is used to store instructions executed by one or more processors of the system, and

[0110] A processor, one of the processors in an electronic device, is used to execute the GPS week-reversal method. The electronic device has the function of implementing the GPS week-reversal method. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned function.

[0111] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.

Claims

1. A method for GPS week number flipping in an electronic device, characterized in that, The electronic device is an in-vehicle terminal on a vehicle, and the method includes: The current time is determined to be within a preset write time range; the preset write time range is the GPS week number flipping process write time range, and the lower limit of the GPS week number flipping process write time range includes the time before the most recent GPS week number flipping should have occurred; the current time is the GPS time derived based on the GPS signal received by the electronic device, or the current time includes the current time of the electronic device and the GPS time derived based on the GPS signal received by the electronic device. Determine whether the GPS time obtained based on the GPS signal received by the electronic device meets the preset writing conditions; If the GPS time information meets the preset writing conditions, a GPS week number flipping processing program is written to the electronic device. Among them, the situations in which the GPS time information is determined to meet the preset writing conditions include the situations in which the vehicle speed is greater than the predetermined speed or the vehicle acceleration is greater than the predetermined acceleration.

2. The method according to claim 1, characterized in that, After determining that the vehicle's speed is greater than a predetermined speed or the vehicle's acceleration is greater than a predetermined acceleration, and if the difference between the GPS time and Coordinated Universal Time is less than a predetermined time difference, it is determined that the GPS time information meets the preset writing conditions.

3. The method according to claim 1, characterized in that, If the vehicle speed is determined to be greater than a predetermined speed or the vehicle acceleration is determined to be greater than a predetermined acceleration multiple times in a row, the GPS time is determined to meet the preset writing conditions.

4. The method according to claim 1, characterized in that, If the current time is determined to be within a preset writing time range multiple times in a row, and the GPS time obtained based on the GPS signal received by the electronic device is determined to meet the preset writing conditions, a GPS week number flipping processing program is written to the electronic device, wherein each of the multiple consecutive times is spaced at a preset time interval.

5. A machine-readable medium, characterized in that, The machine-readable medium stores instructions that, when executed on the machine, cause the machine to perform the GPS week-flipping method of the electronic device according to any one of claims 1 to 4.

6. An electronic device, characterized in that, include: Memory is used to store instructions executed by one or more processors of the system, and The processor is one of the processors in an electronic device, used to execute the GPS week number flipping method of the electronic device according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Receiving apparatus, date and time calculation method and date and time calculation program

    JP2020098133A