Method and device for setting system time after T-BOX restart and automobile

By judging the T-BOX restart working condition and calculating the correction time, the problem of inaccurate time acquisition after T-BOX restart is solved, the normal operation of the vehicle-side function and the accuracy of system time is achieved, and it is suitable for T-BOX on cars .

CN119211876APending Publication Date: 2024-12-27DEEPAL AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411213309.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

After T-BOX restarts, the time-related functions cannot be accurately obtained, resulting in the vehicle-side time-related functions that cannot be performed normally. The existing technology cannot effectively solve this problem, especially when the base station, GPS signal or network signal is unstable.

Method used

Determine the restart time △t by judging the T-BOX restart condition, and calculate the correction time T using the formula T=T0+△t, write it to the timer as the system time. If the actual time can be obtained later, correct it to ensure the system time accuracy.

Benefits of technology

After the T-BOX restarts, through adaptive iterative restart time correction, we ensure that functions such as vehicle appointments can be performed normally before the network is connected, reducing costs and improving the accuracy and reliability of system time. It is suitable for T on cars -BOX.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211876A_ABST
    Figure CN119211876A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for setting system time after T-BOX restart and an automobile, and the method comprises the steps: taking correction time as system time when the T-BOX restart is not successfully networked so as to meet the normal operation of related functions such as reservation of an automobile end, and taking obtained current actual time as the system time after the T-BOX restart is successfully networked so as to meet the normal operation of the related functions such as reservation of the automobile end. According to the method, the T-BOX restart working condition is determined, the current restart reference time corresponding to the T-BOX restart working condition is determined, iteration is carried out for correction time calculation after next T-BOX restart, the accuracy of system time can be guaranteed, and it is guaranteed that the correction time of follow-up calculation is more accurate and more reasonable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of automobile networking, and particularly relates to a method and device for setting the system time after a T-BOX is restarted, and a vehicle. Background Art

[0002] With the development of intelligent and connected vehicles, T-BOX, as an important on-board device, is widely used in fields such as remote vehicle monitoring, dispatching, and management. However, because T-BOX is typically installed inside the vehicle, it is susceptible to factors such as vehicle movement, temperature, electromagnetic interference, its own software, and external factors such as the base station, making it difficult to ensure the accuracy of its acquisition time.

[0003] Currently, three methods are commonly used to calibrate the T-Box system time. The first method uses base station timing, where the T-Box uses the base station time as the T-Box's time reference when communicating with the base station. However, if the T-Box cannot establish communication with the base station or the base station fails to provide timing, the MPU will not be able to obtain the base station's time information if it restarts, affecting the normal operation of time-related functions on the vehicle. The second method uses GPS satellite timing, where GPS satellite signals are received and used as the T-Box's time reference. However, in urban areas with densely populated buildings, GPS signals are easily obstructed, resulting in reduced time accuracy. The third method uses network time synchronization, where network time is obtained by synchronizing with an Internet time server and used as the T-Box's time reference. However, in unstable network conditions, network time synchronization is prone to delays and packet loss, resulting in reduced time accuracy. These three calibration methods require the vehicle to be powered on and the software is operating normally, and they do not address the situation where the T-Box cannot obtain time after a restart.

[0004] CN111007916A discloses a terminal device time setting method and system, storage medium, and terminal device. The method uses the sum of the detected terminal device restart process time and the terminal device restart start time as the current time (i.e., set as the system time), which can ensure that some functions operate normally. However, there are the following problems: (1) After the terminal device restarts, the above time is always used as the system time. If the detected terminal device restart process time is inaccurate, the system time will also be inaccurate; (2) A special timing detector is required to detect the terminal device restart process time, which is costly and not suitable for T-BOX in automobiles. Summary of the Invention

[0005] The purpose of the present invention is to provide a method, device and vehicle for setting the system time after T-BOX restart, so as to accurately set the system time after T-BOX restart, so that related functions such as reservations on the vehicle side can be carried out normally before connecting to the network.

[0006] In a first aspect, the present invention provides a method for setting the system time after a T-BOX is restarted, comprising: S11. After the T-BOX is restarted, it is determined whether the current actual time can be obtained through the base station, GPS, or network. If so, S12 is executed; otherwise, S13 is executed.

[0007] S12: Write the acquired current actual time into the timer as the system time, and then end.

[0008] S13: Determine the restart time Δt based on the T-BOX restart condition, and then execute S14. The restart time refers to the time required for the T-BOX to restart.

[0009] S14. Calculate the corrected time T using the formula: T = T0 + Δt, and then execute S15. T0 represents the stored time point at which the T-BOX restarted. When the T-BOX restarts, it records the restart start time T0 and stores it in a register.

[0010] S15. Write the corrected time T into the timer as the system time, and then execute S16.

[0011] S16: Determine whether the current actual time T can be obtained through the base station, GPS or network. act If yes, execute S17, otherwise continue to execute S16.

[0012] S17, first record the current system time T ref (The current system time T ref The corrected time T is used as the time base), and then the current actual time T is obtained. act Write it into the timer as the system time, and then execute S18.

[0013] S18: Determine and store the restart reference time corresponding to the T-BOX restart condition, and then end. The restart reference time refers to the reference value of the time required for the T-BOX restart process.

[0014] Preferably, the method for determining the restart time Δt according to the T-BOX restart condition is: If the T-BOX restart condition is the first preset condition, then △t=t n-1 ; where t n-1 represents the last restart reference time stored corresponding to the first preset working condition, t n-1 The initial value of is the pre-stored initial restart reference time t0 corresponding to the first preset operating condition.

[0015] If the T-BOX restart condition is the second preset condition, then △t=t' n-1 ; where t' n-1 Indicates the last restart reference time stored corresponding to the second preset working condition, t' n-1 The initial value of is the pre-stored initial restart reference time t'0 corresponding to the second preset operating condition.

[0016] If the T-BOX restart condition is the third preset condition, set △t=t" n-1 ; where t" n-1 Indicates the last restart reference time stored corresponding to the third preset working condition, t" n-1 The initial value of is the pre-stored initial restart reference time t"0 corresponding to the third preset operating condition.

[0017] Preferably, the first preset operating condition is an abnormal base station timing condition, the second preset operating condition is an abnormal program process condition, and the third preset operating condition is an abnormal network condition.

[0018] Preferably, the method for determining the current restart reference time corresponding to the T-BOX restart condition in S18 includes: First use the formula: δ=T act -T ref , calculate the restart time error δ.

[0019] Then use the formula: △tt=△t+δ to calculate the actual restart time △tt. The actual restart time refers to the actual time required for the T-BOX to restart.

[0020] Finally, the smaller value between △tt and △t is used as the restart reference time corresponding to the T-BOX restart condition.

[0021] Compare the actual restart time, △tt, with the reference time of the previous restart (corresponding to the restart time, △t). The smaller value is used as the reference time for the current restart corresponding to the T-BOX restart condition and stored. This value is used to calculate the corrected time after the next T-BOX restart under the same restart condition. The calculated corrected time may be slower than the actual time, but the time associated with the scheduled function occurs in the future. This prevents the scheduled time from expiring, thus preventing the function from being unable to function. If the larger value of △tt or △t is selected as the reference time for the current restart corresponding to the T-BOX restart condition and used to calculate the corrected time after the next T-BOX restart under the same restart condition, in extreme cases, the time may have already occurred, making the relevant scheduled function ineffective.

[0022] Preferably, if the T-BOX restart condition is the first preset condition, the smaller value between Δtt and Δt is used as the current restart reference time t corresponding to the first preset condition. n If the T-BOX restart condition is the second preset condition, the smaller value of △tt and △t is used as the reference time t' for this restart corresponding to the second preset condition. n If the T-BOX restart condition is the third preset condition, the smaller value between △tt and △t is used as the restart reference time t'' corresponding to the third preset condition. n .

[0023] Preferably, the initial restart reference time t0 corresponding to the first preset operating condition is obtained by: First, perform m T-BOX restart tests under the first preset working condition, record the time required for each restart process, and obtain m first restart times.

[0024] Then average the m first restart times to get the average first restart time t avg .

[0025] Finally, the first restart time average t avg As the initial restart reference time t0 corresponding to the first preset operating condition; wherein m is an integer and m≥5.

[0026] Preferably, the initial restart reference time t'0 corresponding to the second preset operating condition is obtained by: First, perform m T-BOX restart tests under the second preset working condition, record the time required for each restart process, and obtain m second restart times.

[0027] Then average the m second restart times to get the average second restart time t' avg .

[0028] Finally, the second restart time average t' avg As the initial restart reference time t'0 corresponding to the second preset operating condition; wherein m is an integer and m≥5.

[0029] Preferably, the initial restart reference time t"0 corresponding to the third preset operating condition is obtained by: First, perform m T-BOX restart tests under the third preset working condition, record the time required for each restart process, and obtain m third restart times.

[0030] Then average the m third restart times to get the average third restart time t'' avg .

[0031] Finally, the third restart time average t" avgas the initial restart reference time t"0 corresponding to the third preset operating condition; wherein m is an integer and m≥5.

[0032] There are three main T-BOX restart conditions: abnormal base station timing, abnormal program processing, and abnormal network conditions. Because the T-BOX restart time varies under different T-BOX restart conditions, a large number of T-BOX restart tests (bench tests) were conducted based on these three restart conditions. The average restart time for each restart condition was taken to ensure that the initial restart reference time obtained for each restart condition is closer to the actual restart time, ensuring that subsequent correction times are close to the actual time, and ensuring that related functions such as vehicle-side appointments can be better performed before connecting to the network.

[0033] In a second aspect, the present invention provides a device for setting the system time after a T-BOX restart, comprising a T-BOX controller configured to execute the above-mentioned method for setting the system time after a T-BOX restart.

[0034] In a third aspect, the present invention provides a car, comprising the above-mentioned system time setting device after the T-BOX is restarted.

[0035] Compared with the prior art, the present invention has the following effects: (1) The restart time △t is determined according to the T-BOX restart working condition. Different T-BOX restart working conditions will result in different restart time △t. It takes more factors into consideration, making the correction time calculated later closer to the real time.

[0036] (2) The restart time △t is the time after the stored adaptive iteration. It does not require a timing detector for real-time detection, is not prone to transient fluctuations, has better reliability, and also reduces costs. It is suitable for T-BOX in automobiles.

[0037] (3) Only when the network connection fails after restart (i.e., the current actual time cannot be obtained through the base station, GPS, or network), the corrected time T is used as the system time to ensure that the appointment and other related functions on the vehicle side are carried out normally; after the network connection is successful (i.e., the current actual time can be obtained through the base station, GPS, or network), the obtained current actual time is used as the system time, ensuring the accuracy of the system time.

[0038] (4) After the T-BOX restarts and first experiences the correction time T as the system time, and then successfully connects to the network, the restart reference time corresponding to the T-BOX restart condition will be determined, and it will be iteratively used to calculate the correction time after the next T-BOX restart, thereby realizing adaptive correction of the restart reference time, ensuring that the subsequent calculated correction time T is more accurate and reasonable, and thus ensuring that related functions such as appointments on the vehicle side are better carried out and the user experience is good. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a flow chart of a method for setting the system time after T-BOX restarts according to an embodiment of the present invention.

[0040] Figure 2 Flowchart of a method for determining a current restart reference time corresponding to a T-BOX restart condition in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present invention, the implementation of the embodiments of the present invention is described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference only and are not intended to limit the embodiments of the present invention.

[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are for the purpose of describing embodiments of the present invention only and are not intended to limit the present invention.

[0043] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0044] It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present invention are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0045] like Figure 1 As shown, the method for setting the system time after T-BOX restart in an embodiment of the present invention includes the following steps: S11. After the T-BOX is restarted, it is determined whether the current actual time can be obtained through the base station, GPS, or network. If so, S12 is executed; otherwise, S13 is executed.

[0046] S12: Write the acquired current actual time into the timer as the system time, and then end.

[0047] S13: Determine the restart time Δt based on the T-BOX restart condition, and then execute S14. The restart time refers to the time required for the T-BOX to restart.

[0048] In some embodiments, the method for determining the restart time Δt according to the T-BOX restart condition is: If the T-BOX restart condition is the first preset condition, the restart time △t=t n-1 ; where t n-1represents the last restart reference time stored corresponding to the first preset working condition, t n-1 The initial value of is the pre-stored initial restart reference time t0 corresponding to the first preset operating condition.

[0049] In some embodiments, the initial restart reference time t0 corresponding to the first preset working condition is obtained by first performing m T-BOX restart tests under the first preset working condition, recording the time required for each restart process, and obtaining m first restart times; then averaging the m first restart times to obtain the average first restart time t avg ; Finally, the first restart time average t avg As the initial restart reference time t0 corresponding to the first preset operating condition; wherein m is an integer and m≥5, such as 20, 50, etc.

[0050] As an example, the first preset operating condition is an abnormal base station timing condition, such as antenna failure, unstable transmission link, internal device hardware failure, system software failure, software upgrade abnormality, base station signal interference, etc. The method for determining abnormal base station timing conditions belongs to the prior art.

[0051] If the T-BOX restart condition is the second preset condition, the restart time △t=t' n-1 ; where t' n-1 Indicates the last restart reference time stored corresponding to the second preset working condition, t' n-1 The initial value of is the pre-stored initial restart reference time t'0 corresponding to the second preset operating condition.

[0052] In some embodiments, the initial restart reference time t'0 corresponding to the second preset working condition is obtained by: first, performing m T-BOX restart tests under the second preset working condition, recording the time required for each restart process, and obtaining m second restart times; then averaging the m second restart times to obtain the second restart time average value t' avg ; Finally, the second restart time average t' avg As the initial restart reference time t'0 corresponding to the second preset operating condition; wherein m is an integer and m≥5, such as 20, 50, etc.

[0053] As an example, the second preset operating condition is an abnormal program process condition, such as program crash, program unresponsiveness, excessive resource usage, permission error, program incompatibility with the operating system or other software, etc. Methods for determining abnormal program process conditions are known in the art.

[0054] If the T-BOX restart condition is the third preset condition, the restart time △t=t" n-1 ; where t" n-1Indicates the last restart reference time stored corresponding to the third preset working condition, t" n-1 The initial value of is the pre-stored initial restart reference time t"0 corresponding to the third preset operating condition.

[0055] In some embodiments, the initial restart reference time t"0 corresponding to the third preset operating condition is obtained by first performing m T-BOX restart tests under the third preset operating condition, recording the time required for each restart process, and obtaining m third restart times; then averaging the m third restart times to obtain the third restart time average value t'' avg ; Finally, the third restart time average t" avg As the initial restart reference time t"0 corresponding to the third preset operating condition; where m is an integer and m≥5, such as 20, 50, etc.

[0056] As an example, the third preset working condition is an abnormal network working condition, such as network equipment failure, line failure, network setting error, network congestion, network service provider equipment failure, etc. The method for determining abnormal network working conditions belongs to the prior art.

[0057] S14. Calculate the corrected time T using the formula: T = T0 + Δt, and then execute S15. T0 represents the stored time point at which the T-BOX restarted. When the T-BOX restarts, it records the restart start time T0 and stores it in a register.

[0058] S15. Write the corrected time T into the timer as the system time, and then execute S16.

[0059] S16: Determine whether the current actual time T can be obtained through the base station, GPS or network. act If yes, execute S17, otherwise continue to execute S16. In this step, if the current actual time T can be obtained through the base station or GPS or network act , it means the vehicle is powered on and the software is running normally.

[0060] S17, first record the current system time T ref (The current system time T ref The corrected time T is used as the time base), and then the current actual time T is obtained. act Write it into the timer as the system time, and then execute S18.

[0061] S18: Determine and store the restart reference time corresponding to the T-BOX restart condition, and then end. The restart reference time refers to the reference value of the time required for the T-BOX restart process.

[0062] In some embodiments, a method for determining the current restart reference time corresponding to the T-BOX restart condition (see Figure 2 )include: First use the formula: δ=T act -T ref , calculate the restart time error δ.

[0063] Then use the formula: △tt=△t+δ to calculate the actual restart time △tt.

[0064] Finally, the smaller value between △tt and △t is used as the restart reference time corresponding to the T-BOX restart condition.

[0065] In some embodiments, if the T-BOX restart condition is the first preset condition, the smaller value of Δtt and Δt is used as the current restart reference time t corresponding to the first preset condition. n If the T-BOX restart condition is the second preset condition, the smaller value of △tt and △t is used as the reference time t' for this restart corresponding to the second preset condition. n If the T-BOX restart condition is the third preset condition, the smaller value between △tt and △t is used as the restart reference time t'' corresponding to the third preset condition. n .

[0066] Compare the actual restart time, △tt, with the reference time of the previous restart (corresponding to the restart time, △t). The smaller value is used as the reference time for the current restart corresponding to the T-BOX restart condition and stored. This value is used to calculate the corrected time after the next T-BOX restart under the same restart condition. The calculated corrected time may be slower than the actual time, but the time associated with the scheduled function occurs in the future. This prevents the scheduled time from expiring, thus preventing the function from being unable to function. If the larger value of △tt or △t is selected as the reference time for the current restart corresponding to the T-BOX restart condition and used to calculate the corrected time after the next T-BOX restart under the same restart condition, in extreme cases, the time may have already occurred, making the relevant scheduled function ineffective.

[0067] An embodiment of the present invention further provides a device for setting the system time after a T-BOX restart, comprising a T-BOX controller configured to execute the above-mentioned method for setting the system time after a T-BOX restart.

[0068] An embodiment of the present invention further provides a car, which includes the above-mentioned system time setting device after the T-BOX is restarted.

[0069] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with this technical field within the technical scope disclosed in the present invention should be covered by the scope of protection of the present invention.

Claims

1. A method for setting the system time after T-BOX restarts, characterized in that: include: S11. After the T-BOX is restarted, it is determined whether the current actual time can be obtained through the base station, GPS or network. If so, S12 is executed; otherwise, S13 is executed. S12, writing the acquired current actual time into the timer as the system time, and then ending; S13, determining the restart time △t according to the T-BOX restart condition, and then executing S14; S14, using the formula: T=T0+△t, calculate the correction time T, and then execute S15; wherein T0 represents the time point at which the stored T-BOX starts to restart; S15, write the corrected time T into the timer as the system time, and then execute S16; S16: Determine whether the current actual time T can be obtained through the base station, GPS or network. act , if yes, execute S17, otherwise continue to execute S16; S17, first record the current system time T ref , and then obtain the current actual time T act Write it into the timer as the system time, and then execute S18; S18: Determine the current restart reference time corresponding to the T-BOX restart condition, store it, and then end.

2. The method for setting the system time after T-BOX restart according to claim 1, characterized in that: The method for determining the restart time △t according to the T-BOX restart condition is: If the T-BOX restart condition is the first preset condition, then △t=t n-1 ; where t n-1 represents the last restart reference time corresponding to the first preset working condition stored, t n-1 The initial value of is the pre-stored initial restart reference time t0 corresponding to the first preset working condition; If the T-BOX restart condition is the second preset condition, then △t=t' n-1 ; where t' n-1 represents the last restart reference time corresponding to the second preset working condition, t' n-1 The initial value of is the pre-stored initial restart reference time t'0 corresponding to the second preset working condition; If the T-BOX restart condition is the third preset condition, set △t=t" n-1 ; where t" n-1 Indicates the last restart reference time stored corresponding to the third preset working condition, t" n-1 The initial value of is the pre-stored initial restart reference time t"0 corresponding to the third preset operating condition.

3. The method for setting the system time after T-BOX restart according to claim 2, characterized in that: The first preset operating condition is an abnormal base station timing condition, the second preset operating condition is an abnormal program process condition, and the third preset operating condition is an abnormal network condition.

4. The method for setting the system time after T-BOX restart according to claim 2 or 3, characterized in that: The method for determining the current restart reference time corresponding to the T-BOX restart condition in S18 includes: First use the formula: δ=T act -T ref , calculate the time error δ of this restart; Then use the formula: △tt=△t+δ to calculate the actual restart time △tt; Finally, the smaller value between △tt and △t is used as the restart reference time corresponding to the T-BOX restart condition.

5. The method for setting the system time after T-BOX restart according to claim 4, characterized in that: If the T-BOX restart condition is the first preset condition, the smaller value between △tt and △t is used as the current restart reference time t corresponding to the first preset condition. n ; If the T-BOX restart condition is the second preset condition, the smaller value between △tt and △t is used as the current restart reference time t' corresponding to the second preset condition. n ; If the T-BOX restart condition is the third preset condition, the smaller value between △tt and △t is used as the current restart reference time t'' corresponding to the third preset condition. n .

6. The method for setting the system time after T-BOX restart according to claim 4, characterized in that: The initial restart reference time t0 corresponding to the first preset operating condition is obtained by: First, perform m T-BOX restart tests under the first preset working condition, record the time required for each restart process, and obtain m first restart times; Then average the m first restart times to get the average first restart time t avg ; Finally, the first restart time average t avg As the initial restart reference time t0 corresponding to the first preset operating condition; wherein m is an integer and m≥5.

7. The method for setting the system time after T-BOX restart according to claim 4, characterized in that: The initial restart reference time t'0 corresponding to the second preset operating condition is obtained by: First, perform m T-BOX restart tests under the second preset working condition, record the time required for each restart process, and obtain m second restart times; Then average the m second restart times to get the average second restart time t' avg ; Finally, the second restart time average t' avg As the initial restart reference time t'0 corresponding to the second preset operating condition; wherein m is an integer and m≥5.

8. The method for setting the system time after T-BOX restart according to claim 4, characterized in that: The initial restart reference time t"0 corresponding to the third preset operating condition is obtained by: First, perform m T-BOX restart tests under the third preset working condition, record the time required for each restart process, and obtain m third restart times; Then average the m third restart times to get the average third restart time t'' avg ; Finally, the third restart time average t" avg as the initial restart reference time t"0 corresponding to the third preset operating condition; wherein m is an integer and m≥5.

9. A device for setting the system time after a T-BOX is restarted, comprising a T-BOX controller, characterized in that: The T-BOX controller is configured to execute the system time setting method according to any one of claims 1 to 8.

10. An automobile, characterized in that: It comprises the system time setting device as claimed in claim 9.