Vehicle time synchronization method and device, storage medium and vehicle

By using a multi-time-source time synchronization method, the problem of time asynchrony between sensors and ECUs is solved, achieving accurate time synchronization in different scenarios and improving vehicle control precision and safety.

CN121750132APending Publication Date: 2026-03-27HAOMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In intelligent driving vehicles, time asynchrony between sensors and ECUs can lead to control strategy errors and safety accidents. Existing time synchronization solutions are prone to clock failures under certain operating conditions, making accurate synchronization impossible.

Method used

Multiple time sources are used for time synchronization. First, the international standard time is used as the first time source. If it cannot be obtained, the internal timer is used as the second time source. If it is invalid, the default time of the third time source is used to ensure accurate time synchronization in different scenarios.

Benefits of technology

It improves the vehicle's control precision and reliability, ensuring driving safety and comfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121750132A_ABST
    Figure CN121750132A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle time synchronization method and device, a storage medium and a vehicle, a first time synchronization signal of a first time source is acquired, time synchronization is performed on at least one control unit in the vehicle based on first target time in the first time synchronization signal, and the first time source performs timing according to international standard time; if the first time synchronization signal is not acquired, acquiring a second time synchronization signal of a second time source, and judging whether second target time in the second time synchronization signal is valid or not; if the second target time is valid, performing time synchronization based on the second target time in the second time synchronization signal; and if not, performing time synchronization according to the third target time of the third time source. When time synchronization is carried out, the time of a plurality of time sources exists, each time source uses different timing modes, and the time of each time source is used according to different priorities, so that accurate time synchronization can be carried out in various scenes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automobiles, and in particular to a vehicle time synchronization method and device, a storage medium, and a vehicle. BACKGROUND

[0002] With the rapid development of intelligent driving vehicles, there are more and more sensors and electronic control units (ECUs) between domains on the whole vehicle, and there is a large amount of data transmission in the whole vehicle network. For an intelligent driving operating system, in order to ensure the accuracy and reliability of the control strategy and decision of the vehicle, there is a high requirement for the synchronization of each sensor and ECU clock. In order to meet the requirements of the clock in the whole vehicle network, it is necessary to synchronize the time of each sensor and ECU between domains on the whole vehicle, and therefore a vehicle time synchronization method is needed to enable each component to operate on the same time reference point. SUMMARY

[0003] The present application provides a vehicle time synchronization method, device, storage medium, and vehicle, which can solve the technical problem of inaccurate synchronization of component time in the related art.

[0004] In a first aspect, an embodiment of the present application provides a vehicle time synchronization method, which comprises:

[0005] obtaining a first time synchronization signal of a first time source, and performing time synchronization on at least one control unit in the vehicle based on a first target time in the first time synchronization signal, wherein the first time source counts time according to international standard time;

[0006] if the first time synchronization signal is not obtained, obtaining a second time synchronization signal of a second time source, and determining whether a second target time in the second time synchronization signal is valid, wherein the second time source counts time using an internal timer;

[0007] if the second target time is valid, performing time synchronization on the at least one control unit in the vehicle based on the second target time in the second time synchronization signal;

[0008] if the second target time is invalid, performing time synchronization on the at least one control unit in the vehicle according to a third target time of a third time source.

[0009] In a second aspect, an embodiment of the present application provides a vehicle time synchronization device, which comprises:

[0010] a first time source obtaining module, configured to obtain a first time synchronization signal of a first time source, and perform time synchronization on at least one control unit in the vehicle based on a first target time in the first time synchronization signal, wherein the first time source counts time according to international standard time;

[0011] a second time source acquisition module, configured to acquire a second time synchronization signal of a second time source if the first time synchronization signal is not acquired, and determine whether a second target time in the second time synchronization signal is valid, the second time source using an internal timer to count time;

[0012] a second time source synchronization module, configured to perform time synchronization on at least one control unit in the vehicle based on the second target time in the second time synchronization signal if the second target time is valid;

[0013] a third time source synchronization module, configured to perform time synchronization on the at least one control unit in the vehicle according to a third target time of a third time source if the second target time is invalid.

[0014] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, the instructions being suitable for being loaded by a processor and performing the steps of the method described above.

[0015] In a fourth aspect, an embodiment of the present application provides a vehicle, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, the computer program being suitable for being loaded by the processor and performing the steps of the method described above.

[0016] The technical scheme provided by some embodiments of the present application has at least the following beneficial effects:

[0017] The vehicle time synchronization method provided by the present application comprises the following steps: acquiring a first time synchronization signal of a first time source, performing time synchronization on at least one control unit in the vehicle based on a first target time in the first time synchronization signal, and the first time source counting time according to international standard time; if the first time synchronization signal is not acquired, acquiring a second time synchronization signal of a second time source, and determining whether a second target time in the second time synchronization signal is valid, the second time source using an internal timer to count time; if the second target time is valid, performing time synchronization on the at least one control unit in the vehicle based on the second target time in the second time synchronization signal; and if the second target time is invalid, performing time synchronization on the at least one control unit in the vehicle according to a third target time of a third time source. Since there are multiple time sources when performing time synchronization, firstly, the first time source using international standard time is used; in the case that the second time source in the vehicle is valid when the first target time cannot be acquired, the second target time is used; if the second target time is invalid, the default time of the third time source is used to perform time synchronization. In this way, the time of each time source is used according to different priorities, accurate time synchronization can be performed in various scenarios, and the control accuracy and reliability of the vehicle are improved, and the safety and comfort of driving are ensured. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 An exemplary system architecture diagram of a vehicle time synchronization method provided in this application embodiment;

[0020] Figure 2 A flowchart illustrating a vehicle time synchronization method provided in an embodiment of this application;

[0021] Figure 3 A flowchart illustrating a vehicle time synchronization method provided in another embodiment of this application;

[0022] Figure 4 A step logic example diagram of a vehicle time synchronization method provided in this application embodiment;

[0023] Figure 5 A structural block diagram of a vehicle time synchronization device provided in an embodiment of this application;

[0024] Figure 6 This is a structural schematic diagram of a vehicle provided in an embodiment of this application. Detailed Implementation

[0025] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0027] With the rapid development of intelligent driving vehicles, there are more and more sensors and electronic control units (ECUs) between domains on the whole vehicle, and there is a large amount of data transmission in the whole vehicle network. Generally speaking, different sensors have different sampling frequencies, and each sensor has its own clock source. Due to the reasons of hardware clock signal deviation, bus arbitration, bus transmission, software processing, etc., there may be time delay between different sensors. This delay may cause inconsistency of sensor data, thereby affecting the control accuracy and stability of the vehicle. Secondly, in autonomous driving and intelligent connected vehicles, the information exchange between sensors and ECUs becomes more frequent and important. For example, the vehicle needs to rely on sensor data for positioning, obstacle detection, path planning, and other tasks. If the time between components is not synchronized, the vehicle's processing of these data may be erroneous, leading to control strategy errors and safety accidents. In addition, in the car, real-time communication and data exchange are needed between sensors and ECUs. If the time is not synchronized, the real-time and accuracy of the data will be affected, affecting the overall performance and safety of the vehicle.

[0028] Therefore, in order to solve the problem of inaccurate sensor sampling time, the vehicle needs to synchronize the time of each sensor and ECU, which can ensure that each component can operate on the same time reference point and guarantee the accuracy and reliability of the vehicle's control strategy and decision-making. This can be achieved by using high-precision time synchronization technology. Currently, a common time source is used as a reference to synchronize sensors and ECUs, so that the clock times of each component are synchronized. However, the existing time synchronization scheme has limitations and is prone to clock failure under certain working conditions, resulting in the whole vehicle clock being unable to synchronize.

[0029] Therefore, the embodiment of the present application provides a vehicle time synchronization method, which acquires a first time synchronization signal of a first time source, synchronizes at least one control unit in the vehicle based on a first target time in the first time synchronization signal, and the first time source counts time according to international standard time; if the first time synchronization signal is not acquired, a second time synchronization signal of a second time source is acquired, and it is judged whether a second target time in the second time synchronization signal is valid, and the second time source counts time using an internal timer; if the second target time is valid, at least one control unit in the vehicle is synchronized based on the second target time in the second time synchronization signal; if the second target time is invalid, at least one control unit in the vehicle is synchronized according to a third target time of a third time source, so as to solve the technical problem that the above-mentioned components cannot be accurately synchronized.

[0030] Please refer to Figure 1 , Figure 1 A schematic system architecture diagram of a vehicle time synchronization method provided by the embodiment of the present application.

[0031] As shown in Figure 1 The system architecture can include a vehicle 101, a network 102 and a server 103. The network 102 is used to provide a medium for a communication link between the vehicle 101 and the server 103. The network 102 can include various types of wired communication links or wireless communication links, for example, the wired communication links include optical fiber, twisted pair or coaxial cable, and the wireless communication links include Bluetooth communication link, Wireless-Fidelity (Wi-Fi) communication link or microwave communication link, etc.

[0032] The vehicle 101 can interact with the server 103 through the network 102 to receive a message from the server 103 or send a message to the server 103, or the vehicle 101 can interact with the server 103 through the network 102 to receive a message or data sent by other users to the server 103. The vehicle 101 can be hardware or software. When the vehicle 101 is hardware, it can be various electronic devices, including but not limited to smart watch, smart phone, tablet computer, laptop computer and desktop computer, etc. When the vehicle 101 is software, it can be installed in the above-mentioned electronic devices, which can be implemented as multiple software or software modules (for example, used to provide distributed services) or a single software or software module, which is not specifically limited here.

[0033] In the embodiments of the present application, the vehicle 101 acquires a first time synchronization signal of a first time source, performs time synchronization on at least one control unit in the vehicle based on a first target time in the first time synchronization signal, and the first time source counts time according to international standard time. If the first time synchronization signal is not acquired, the vehicle 101 continues to acquire a second time synchronization signal of a second time source, and judges whether a second target time in the second time synchronization signal is valid, and the second time source counts time using an internal timer. If the second target time is valid, the vehicle 101 can perform time synchronization on at least one control unit in the vehicle based on the second target time in the second time synchronization signal. If the second target time is invalid, the vehicle 101 needs to perform time synchronization on at least one control unit in the vehicle according to a third target time of a third time source.

[0034] The server 103 can be a service server providing various services. It should be noted that the server 103 can be hardware or software. When the server 103 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server 103 is software, it can be implemented as multiple software or software modules (for example, used to provide distributed services), or as a single software or software module, which is not specifically limited here.

[0035] Alternatively, the system architecture may not include server 103. In other words, server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification can be applied to a system structure that only includes vehicle 101. The embodiments of this application do not limit this.

[0036] It should be understood that Figure 1 The number of vehicles, networks, and servers shown is only illustrative; the number can be any number depending on the implementation requirements.

[0037] Please see Figure 2 , Figure 2 This is a flowchart illustrating a vehicle time synchronization method provided in an embodiment of this application. The execution subject in this embodiment can be a vehicle performing vehicle time synchronization, a processor within a vehicle performing the vehicle time synchronization method, or a vehicle time synchronization service within a vehicle performing the vehicle time synchronization method. For ease of description, the following uses a processor within a vehicle as the execution subject to illustrate the specific execution process of the vehicle time synchronization method.

[0038] like Figure 2 As shown, the vehicle time synchronization method, applied to vehicles, may include at least:

[0039] S202. Obtain the first time synchronization signal of the first time source, and synchronize the time of at least one control unit in the vehicle based on the first target time in the first time synchronization signal. The first time source keeps time according to the international standard time.

[0040] Optionally, after a vehicle is powered on and started, time synchronization is typically required to ensure the synchronization of various sensors and ECUs within the vehicle. Currently, time synchronization often uses a fixed time source as a reference, acquiring the time from that source and synchronizing it to each sensor and ECU. However, if a single time source malfunctions or erroneously, it can easily prevent the vehicle from obtaining a unified time for synchronization. The stability of a single time source is uncontrollable. Therefore, to achieve accurate time synchronization for the entire vehicle, multiple time sources can be introduced, and different time sources can be selected as the time synchronization reference in different scenarios, thereby improving the stability and accuracy of the vehicle's timekeeping.

[0041] Optionally, different time sources use various timing methods, and the timing principles of different timing methods are different, which leads to differences in the accuracy of each time source. Therefore, when there are multiple available time sources, the priority of each time source can be distinguished according to its accuracy, and the more accurate time source can be used in each scenario to achieve vehicle time synchronization.

[0042] Optionally, the time source can be based on International Standard Time (UTC), calculated using an internal timer program, or a timing sensor. UTC (Coordinated Universal Time), also known as World Unified Time, World Standard Time, or International Coordinated Time, is a global standard time system and one of the reference standards for time synchronization in digital clock systems. UTC is characterized by high precision, high stability, and high reliability, providing high-precision time synchronization services for digital clock systems. UTC is jointly determined by International Atomic Time (TAI, Temps Atomique Internationale) and Universal Time (UT1). International Atomic Time is measured by the International Atomic Energy Agency (IAEA) using multiple atomic clocks; it has very high stability and accuracy, and the IAEA regularly calibrates it to ensure consistency with the Earth's rotation period. Therefore, in this embodiment of the application, when prioritizing time sources according to their accuracy at the time of timing, a time source using international standard time can be used as the first time source, while a time source using an internal timer program can be used as the second time source, and a time source using a timing sensor can be used as the third time source, so that the accuracy of the first target time is greater than that of the effective second target time, and the accuracy of the effective second target time is greater than that of the third target time.

[0043] Furthermore, when time synchronization is required, the first time synchronization signal from the first time source is first acquired. After successfully acquiring the first time synchronization signal, at least one control unit in the vehicle is synchronized with the first target time within the first time synchronization signal. In one feasible implementation, the first time source can be the Global Positioning System (GPS). GPS time is based on UTC time provided by atomic clocks on GPS satellites, possessing extremely high accuracy and stability. Therefore, the first time synchronization signal is the GPS signal. If the GPS signal is acquired, its UTC time is transmitted to each domain ECU via the gPTP protocol. gPTP (Generalized Precision Time Protocol), also known as the IEEE 802.1AS protocol, is an extension of the IEEE 1588 protocol. It provides globally accurate time services for the TSN (Traffic Synchronization Network) to implement the stream synchronization function in the TSN standard group. Its aim is to synchronize all nodes in the network with a common reference time, and it is widely used in the time synchronization process of the entire vehicle.

[0044] S204. If the first time synchronization signal is not obtained, the second time synchronization signal of the second time source is obtained, and it is determined whether the second target time in the second time synchronization signal is valid. The second time source uses an internal timer to keep track of time.

[0045] Optionally, since the vehicle may encounter scenarios where GPS signals cannot be obtained, if the first time synchronization signal is not acquired, the time from a second time source can be selected for time synchronization. Specifically, the second time synchronization signal from the second time source is acquired. Considering that the second time source uses an internal timer for time calculation, and that the internal timer program may also have runtime errors, after acquiring the second time synchronization signal, it is necessary to determine whether the second target time indicated by the second time synchronization signal is valid, and the time synchronization reference is selected based on the validity of the second target time. In one feasible implementation, the second time source can be a HUT time source. The HUT is the multimedia user interaction system in the vehicle, which has network capabilities and uses an internal timer for time calculation, resulting in high accuracy and stability.

[0046] S206. If the second target time is valid, time synchronization is performed on at least one control unit in the vehicle based on the second target time in the second time synchronization signal.

[0047] Optionally, if the second target time is valid, it indicates that the timing of the second time source is normal. In this case, at least one control unit in the vehicle can be time-synchronized based on the second target time in the second time synchronization signal.

[0048] S208. If the second target time is invalid, then at least one control unit in the vehicle shall be time-synchronized according to the third target time of the third time source.

[0049] Optionally, if the second target time is invalid, it is considered unreliable. In this case, the third target time from the third time source is used directly to synchronize the time of at least one control unit in the vehicle. In one feasible implementation, the third time source can be the default time of the INMU integrated inertial navigation system. The default timing in the integrated inertial navigation system is based on crystal oscillator sensors and other devices installed inside, relying on the vehicle's own battery to support the operation of the crystal oscillator sensors. Its time accuracy depends on the performance and calibration accuracy of the sensors themselves, and it also has a certain degree of reliability. For time sources with different priorities, accurate time synchronization can be achieved in various scenarios, thereby improving the control accuracy and reliability of the vehicle and ensuring driving safety and comfort.

[0050] This application provides a vehicle time synchronization method applied to a vehicle. The method involves acquiring a first time synchronization signal from a first time source, synchronizing at least one control unit in the vehicle with time based on a first target time from the first time synchronization signal, where the first time source uses international standard time. If the first time synchronization signal is not acquired, a second time synchronization signal from a second time source is acquired, and it is determined whether a second target time in the second time synchronization signal is valid. The second time source uses an internal timer for timing. If the second target time is valid, at least one control unit in the vehicle is synchronized with time based on the second target time from the second time synchronization signal. If the second target time is invalid, at least one control unit in the vehicle is synchronized with time based on a third target time from a third time source. Since multiple time sources are used during time synchronization, the first time source (international standard time) is used first. If the first target time cannot be acquired, but the second time source within the vehicle is valid, the second target time is used. If the second target time is invalid, the default time of the third time source is used for time synchronization. By using the times of each time source according to different priorities, accurate time synchronization can be achieved in various scenarios, thereby improving the control accuracy and reliability of the vehicle and ensuring driving safety and comfort.

[0051] Please see Figure 3 , Figure 3 This is a flowchart illustrating a vehicle time synchronization method provided in another embodiment of this application.

[0052] like Figure 3 As shown, vehicle time synchronization methods may include at least:

[0053] S302. Obtain the first time synchronization signal of the first time source, and synchronize the time of at least one control unit in the vehicle based on the first target time in the first time synchronization signal. The first time source keeps time according to the international standard time.

[0054] For details regarding step S302, please refer to the description in step S202; it will not be repeated here.

[0055] S304. If the first time synchronization signal is not obtained, the second time synchronization signal of the second time source is obtained, and the second time source uses an internal timer for timing.

[0056] Optionally, please refer to Figure 4 , Figure 4 This is a step-by-step logic diagram illustrating a vehicle time synchronization method provided in an embodiment of this application. Figure 4As shown in the above embodiments, taking the timing operation performed by the INMU integrated inertial navigation system as an example, when the vehicle is powered on after hibernation, the INMU needs to provide timing for each sensor and each domain ECU. It will first acquire the first time synchronization signal from the first time source. If the first time synchronization signal is acquired, it will directly synchronize the time of at least one control unit in the vehicle based on the first target time in the first time synchronization signal. If the first time synchronization signal is not acquired, it will acquire the second time synchronization signal from the second time source and further determine whether the second time synchronization signal is available.

[0057] It should be noted that if the second time source is a HUT time source, then after the vehicle is powered on, in response to the power-on signal, it needs to acquire a network time signal. Based on this network time signal, it performs network time synchronization with the current time of the second time source, and then uses an internal timer for continuous timing after network time synchronization. Since the vehicle is in sleep mode after power-down, the current time of the second time source is generally delayed compared to the actual time after power-on. Therefore, network time synchronization is required after power-on, using an internet time protocol such as NTP (Network Time Protocol) to synchronize the computer or device's clock with an internet time server via a network connection to obtain accurate time information. After network time synchronization is complete, the internal timer is used for continuous timing calculation. If a network time signal is not acquired during network time synchronization, the second time source directly uses the internal timer to continuously count based on the current time.

[0058] S306. Compare the second target time in the second time synchronization signal with the third target time of the third time source.

[0059] Alternatively, please continue reading Figure 4 Before using the second time synchronization signal, it is necessary to determine the validity of the second time synchronization signal. HUT can accurately keep time after being synchronized with the network. The time of the third time source will also have a certain delay compared with the real time after the vehicle is powered on. Therefore, by comparing the second target time in the second time synchronization signal with the third target time of the third time source, we can determine which one is closer to the real time.

[0060] S308. If the second target time is greater than the third target time, the second target time is determined to be valid; if the second target time is less than or equal to the third target time, the second target time is determined to be invalid.

[0061] Alternatively, please continue reading Figure 4If the second target time is greater than the third target time, it means that the second time source network has successfully synchronized the time and is closer to the real time. In this case, at least one control unit in the vehicle can be synchronized based on the second target time. If the second target time is less than or equal to the third target time, it means that the second time source network has failed to synchronize the time or that the internal timer is faulty, resulting in an error. In this case, at least one control unit in the vehicle needs to be synchronized according to the third target time of the third time source.

[0062] S310. If the first time synchronization signal is not obtained, continuously monitor the communication status with the first time source according to the first cycle; when the communication status is normal, execute the step of obtaining the first time synchronization signal of the first time source.

[0063] Optionally, to use a higher priority and more accurate time source as the timing reference, please refer to [further details needed]. Figure 4 Even if the first time synchronization signal is not obtained, the communication status with the first time source can be continuously monitored according to the first cycle. This allows for the execution of the step of acquiring the first time synchronization signal from the first time source when the communication status is normal, thus immediately obtaining the accurate time from the first time source and completing time synchronization. The embodiments of this application do not specifically limit the setting of the first cycle; it can be set according to the time synchronization requirements of the actual scenario.

[0064] S312. If the first time synchronization signal is not obtained and the second target time is invalid, continuously acquire and determine whether the second target time is valid according to the second cycle.

[0065] Alternatively, please refer to the following: Figure 4 In the event that a first time synchronization signal is not obtained and the second target time is invalid, the system continuously acquires and determines the validity of the second target time according to a second cycle. This allows for immediate time synchronization of at least one control unit in the vehicle based on the second target time in the second time synchronization signal when a first time synchronization signal cannot be obtained but the second target time is valid. The embodiments of this application do not specifically limit the setting of the second cycle, and the second cycle can be the same as or different from the first cycle, depending on the time synchronization requirements of the actual scenario.

[0066] S314. If the second target time is valid, time synchronization is performed on at least one control unit in the vehicle based on the second target time in the second time synchronization signal.

[0067] S316. If the second target time is invalid, then at least one control unit in the vehicle shall be time-synchronized according to the third target time of the third time source.

[0068] For details regarding steps S314-S316, please refer to steps S206-S208; they will not be repeated here.

[0069] In this embodiment, a vehicle time synchronization method is provided. By comparing a second target time in a second time synchronization signal with a third target time from a third time source, the method determines which time is closer to the actual time. If the second target time is greater than the third target time, it indicates that the second time source network has successfully synchronized time, and at least one control unit in the vehicle can be synchronized based on the second target time. If the second target time is less than or equal to the third target time, it indicates that the second time source network has failed to synchronize time or that its internal timer is malfunctioning, and at least one control unit in the vehicle needs to be synchronized according to the third target time from the third time source. Without obtaining... When the first time synchronization signal is received, the communication status between the vehicle and the first time source is continuously monitored according to the first cycle. When the communication status is normal, the step of acquiring the first time synchronization signal of the first time source is executed, so that the accurate time of the first time source can be acquired immediately when the communication status is normal to complete the time synchronization. When the first time synchronization signal is not acquired and the second target time is invalid, the second time is continuously acquired and judged according to the second cycle to facilitate the immediate time synchronization based on the second target time when the first time synchronization signal cannot be acquired but the second target time is valid. By selecting and using time sources with various timing methods, the time synchronization needs of the vehicle in different scenarios can be met.

[0070] Please see Figure 5 , Figure 5 This is a structural block diagram of a vehicle time synchronization device provided in an embodiment of this application. Figure 5 As shown, the vehicle time synchronization device 500, applied to a vehicle, includes:

[0071] First time source acquisition module 510 is used to acquire the first time synchronization signal of the first time source, and to synchronize the time of at least one control unit in the vehicle based on the first target time in the first time synchronization signal. The first time source is used to keep time according to the international standard time.

[0072] The second time source acquisition module 520 is used to acquire the second time synchronization signal of the second time source if the first time synchronization signal is not acquired, and to determine whether the second target time in the second time synchronization signal is valid. The second time source uses an internal timer for timing.

[0073] The second time source synchronization module 530 is used to synchronize the time of at least one control unit in the vehicle based on the second target time in the second time synchronization signal if the second target time is valid.

[0074] The third time source synchronization module 540 is used to synchronize the time of at least one control unit in the vehicle according to the third target time of the third time source if the second target time is invalid.

[0075] Optionally, the accuracy of the first target time is greater than that of the effective second target time, and the accuracy of the effective second target time is greater than that of the third target time.

[0076] Optionally, the second time source acquisition module 520 is also used to compare the second target time in the second time synchronization signal with the third target time of the third time source; if the second target time is greater than the third target time, the second target time is determined to be valid; if the second target time is less than or equal to the third target time, the second target time is determined to be invalid.

[0077] Optionally, the vehicle time synchronization device 500 further includes: a second time source synchronization module, used to acquire a network time signal in response to the vehicle's power-on signal, perform network time synchronization of the current time of the second time source based on the network time signal, and use an internal timer to continuously count down after network time synchronization; if a network time signal is not acquired, the second time source uses an internal timer to continuously count down based on the current time.

[0078] Optionally, the vehicle time synchronization device 500 further includes: a first time source monitoring module, used to continuously monitor the communication status with the first time source according to a first cycle when the first time synchronization signal is not acquired; when the communication status is normal, the step of acquiring the first time synchronization signal of the first time source is executed.

[0079] Optionally, the vehicle time synchronization device 500 further includes a second time source monitoring module, used to continuously acquire and determine whether the second target time is valid according to a second cycle when the first time synchronization signal is not acquired and the second target time is invalid.

[0080] Optionally, the third time source uses a crystal oscillator sensor for crystal timing.

[0081] In this embodiment, a vehicle time synchronization device is provided, applied to a vehicle. The device includes: a first time source acquisition module for acquiring a first time synchronization signal from a first time source and synchronizing at least one control unit in the vehicle based on a first target time in the first time synchronization signal; the first time source timing according to international standard time; a second time source acquisition module for acquiring a second time synchronization signal from a second time source if the first time synchronization signal is not acquired, and determining whether a second target time in the second time synchronization signal is valid; the second time source timing using an internal timer; a second time source synchronization module for synchronizing at least one control unit in the vehicle based on the second target time in the second time synchronization signal if the second target time is valid; and a third time source synchronization module for synchronizing at least one control unit in the vehicle according to a third target time from a third time source if the second target time is invalid. Because multiple time sources are used during time synchronization, the first time source is the international standard time. If the first target time cannot be obtained, the second target time is used if the second time source in the vehicle is available. If the second target time is invalid, the default time of the third time source is used for time synchronization. By using the time sources according to different priorities, accurate time synchronization can be achieved in various scenarios, thereby improving the control precision and reliability of the vehicle and ensuring driving safety and comfort.

[0082] This application also provides a computer storage medium that can store multiple instructions adapted for loading by a processor and executing the steps of any of the methods described in the above embodiments.

[0083] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a vehicle provided in an embodiment of this application. Figure 6 As shown, vehicle 600 may include: at least one vehicle processor 601, at least one network interface 604, user interface 603, memory 605, and at least one communication bus 602.

[0084] The communication bus 602 is used to enable communication between these components.

[0085] The user interface 603 may include a display screen and a camera. Optionally, the user interface 603 may also include a standard wired interface and a wireless interface.

[0086] The network interface 604 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0087] The vehicle processor 601 may include one or more processing cores. The vehicle processor 601 connects to various parts within the vehicle 600 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 605, and by calling data stored in the memory 605. Optionally, the vehicle processor 601 may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The vehicle processor 601 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and Modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the vehicle processor 601.

[0088] The memory 605 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 605 may include a non-transitory computer-readable storage medium. The memory 605 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 605 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 605 may also be at least one storage device located remotely from the aforementioned vehicle processor 601. Figure 6 As shown, the memory 605, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a vehicle time synchronization program.

[0089] exist Figure 6In the vehicle 600 shown, the user interface 603 is mainly used to provide an input interface for the user and to obtain the user's input data; while the vehicle processor 601 can be used to call the vehicle time synchronization program stored in the memory 605 and specifically perform the following operations:

[0090] Acquire the first time synchronization signal of the first time source, and synchronize the time of at least one control unit in the vehicle based on the first target time in the first time synchronization signal. The first time source keeps time according to the international standard time.

[0091] If the first time synchronization signal is not obtained, the second time synchronization signal of the second time source is obtained, and it is determined whether the second target time in the second time synchronization signal is valid. The second time source uses an internal timer to keep track of time.

[0092] If the second target time is valid, at least one control unit in the vehicle is time-synchronized based on the second target time in the second time synchronization signal;

[0093] If the second target time is invalid, then at least one control unit in the vehicle is time-synchronized according to the third target time of the third time source.

[0094] In some embodiments, the accuracy of the first target time is greater than that of the effective second target time, and the accuracy of the effective second target time is greater than that of the third target time.

[0095] In some embodiments, when the vehicle processor 601 performs the following steps to determine whether the second target time in the second time synchronization signal is valid: comparing the second target time in the second time synchronization signal with the third target time of the third time source; if the second target time is greater than the third target time, then the second target time is determined to be valid; if the second target time is less than or equal to the third target time, then the second target time is determined to be invalid.

[0096] In some embodiments, the vehicle processor 601 further performs the following steps: in response to the vehicle's power-on signal, acquiring a network time signal, performing network time synchronization with the current time of the second time source based on the network time signal, and using an internal timer to continuously count down after network time synchronization; if the network time signal is not acquired, the second time source uses an internal timer to continuously count down based on the current time.

[0097] In some embodiments, the vehicle processor 601 further performs the following steps: in the absence of a first time synchronization signal, continuously monitors the communication status with the first time source according to a first cycle;

[0098] When the communication status is normal, execute the step of acquiring the first time synchronization signal of the first time source.

[0099] In some embodiments, the vehicle processor 601 further performs the following steps: if the first time synchronization signal is not acquired and the second target time is invalid, continuously acquire and determine whether the second target time is valid according to the second cycle.

[0100] In some embodiments, the third time source uses a crystal oscillator sensor for crystal timing.

[0101] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0102] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0103] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).

[0104] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0105] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0106] The above is a description of a vehicle time synchronization method, apparatus, storage medium, and vehicle provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A vehicle time synchronization method, characterized in that, Applied to vehicles, the method includes: Acquire a first time synchronization signal from a first time source, and synchronize at least one control unit in the vehicle with time based on a first target time in the first time synchronization signal, wherein the first time source is timed according to international standard time. If the first time synchronization signal is not obtained, the second time synchronization signal of the second time source is obtained, and it is determined whether the second target time in the second time synchronization signal is valid. The second time source uses an internal timer to keep track of time. If the second target time is valid, at least one control unit in the vehicle is time-synchronized based on the second target time in the second time synchronization signal; If the second target time is invalid, then at least one control unit in the vehicle is time-synchronized according to the third target time of the third time source.

2. The method according to claim 1, characterized in that, The accuracy of the first target time is greater than that of the effective second target time, and the accuracy of the effective second target time is greater than that of the third target time.

3. The method according to claim 1, characterized in that, The determination of whether the second target time in the second time synchronization signal is valid includes: Compare the second target time in the second time synchronization signal with the third target time of the third time source; If the second target time is greater than the third target time, then the second target time is determined to be valid; If the second target time is less than or equal to the third target time, then the second target time is determined to be invalid.

4. The method according to claim 1, characterized in that, The method further includes: In response to the vehicle's power-on signal, a network time signal is acquired, the current time of the second time source is synchronized with the network time signal, and the internal timer is used to perform continuous timing after the network time synchronization. If the network time signal is not obtained, the second time source uses the internal timer to continuously keep track of the current time.

5. The method according to claim 1, characterized in that, The method further includes: In the absence of the first time synchronization signal, the communication status with the first time source is continuously monitored according to the first cycle; When the communication status is normal, the step of acquiring the first time synchronization signal of the first time source is executed.

6. The method according to claim 2, characterized in that, The method further includes: If the first time synchronization signal is not obtained and the second target time is invalid, the second target time is continuously acquired and its validity is determined according to the second cycle.

7. The method according to claim 1, characterized in that, The third time source uses a crystal oscillator sensor for crystal timing.

8. A vehicle time synchronization device, characterized in that, Applied to vehicles, the device includes: The first time source acquisition module is used to acquire the first time synchronization signal of the first time source, and to synchronize the time of at least one control unit in the vehicle based on the first target time in the first time synchronization signal. The first time source is used to keep time according to the international standard time. The second time source acquisition module is used to acquire the second time synchronization signal of the second time source if the first time synchronization signal is not acquired, and to determine whether the second target time in the second time synchronization signal is valid. The second time source uses an internal timer for timing. The second time source synchronization module is used to synchronize the time of at least one control unit in the vehicle based on the second target time in the second time synchronization signal if the second target time is valid. The third time source synchronization module is used to synchronize the time of at least one control unit in the vehicle according to the third target time of the third time source if the second target time is invalid.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 7.

10. A vehicle, characterized in that, The vehicle is capable of performing the steps of the method as described in any one of claims 1 to 7.