Time synchronization method and apparatus, vehicle, and readable storage medium

By working together with the main controller and the redundant controller, time synchronization switching is achieved in case of failure, which solves the problem of time synchronization failure of vehicle components and improves the reliability and cost-effectiveness of autonomous driving.

CN116566534BActive Publication Date: 2026-06-19GREAT WALL MOTOR CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GREAT WALL MOTOR CO LTD
Filing Date
2023-05-29
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, time synchronization of vehicle components suffers from failures, affecting the reliability of autonomous driving.

Method used

The system employs a primary controller and a redundant controller to send time synchronization signals separately, and switches to the redundant controller for time synchronization in the event of a primary controller failure through status message interaction, ensuring that the time of the components is consistent.

Benefits of technology

It improves the effectiveness of time synchronization, ensures the reliability of autonomous driving systems, and reduces reliance on high-cost in-vehicle communication terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116566534B_ABST
    Figure CN116566534B_ABST
Patent Text Reader

Abstract

This application relates to the field of automotive technology and provides a time synchronization method, apparatus, vehicle, and readable storage medium. The time synchronization method includes: the vehicle sending respective time synchronization signals to each component of the vehicle via a main controller and a redundancy controller; the main controller sending a status message carrying a status identifier to the redundancy controller, wherein when the main controller detects a fault, the status identifier carried in the status message is a fault identifier; in response to the redundancy controller receiving the status message carrying the fault identifier, the redundancy controller sending a status management signal to each component of the vehicle, wherein the status management signal sent by the redundancy controller instructs each component of the vehicle to use the time synchronization signal sent by the redundancy controller for time synchronization. Embodiments of this application can improve the effectiveness of time synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of automotive technology, and particularly relates to a time synchronization method, apparatus, vehicle, and readable storage medium. Background Technology

[0002] In autonomous driving, data from numerous components is fused for processing. These components include, but are not limited to, sensors such as LiDAR, cameras, radar, and inertial measurement units (IMUs). If the time signatures of these components are inconsistent, inaccurate obstacle detection and missed detections are highly likely. For the entire autonomous driving system, because the clock sources of each component experience time drift, and each clock source has a different time drift, even if the time signals of all components are initially aligned, they will still deviate after a period of operation. Therefore, to unify the time signals of all components, continuous time synchronization is necessary. Related technologies typically use independent controllers to synchronize the time of each component. However, in practical applications, this method has been found to experience time synchronization failures, which is detrimental to the autonomous driving of the vehicle. Summary of the Invention

[0003] This application provides a time synchronization method, apparatus, vehicle, and readable storage medium, which can solve the problem of low effectiveness of time synchronization in related technologies.

[0004] A first aspect of this application provides a time synchronization method applied to a vehicle, the vehicle being configured with a main controller and a redundant controller, the main controller and the redundant controller being respectively used to send their respective time synchronization signals to various components of the vehicle; the time synchronization method includes: sending a status message carrying a status identifier to the redundant controller through the main controller, wherein when the main controller detects a fault, the status identifier carried in the status message is a fault identifier; in response to the redundant controller receiving the status message carrying the fault identifier, sending a status management signal to each component of the vehicle through the redundant controller, the status management signal sent by the redundant controller being used to instruct each component of the vehicle to use the time synchronization signal sent by the redundant controller for time synchronization.

[0005] A second aspect of this application provides a time synchronization device configured in a vehicle. The vehicle is equipped with a main controller and a redundant controller. The main controller and the redundant controller are respectively used to send their respective time synchronization signals to various components of the vehicle. The time synchronization device includes: a message interaction unit, used to send a status message carrying a status identifier to the redundant controller through the main controller. When the main controller detects a fault, the status identifier carried in the status message is a fault identifier. A status management unit, used to respond to the redundant controller receiving the status message carrying the fault identifier, send a status management signal to each component of the vehicle through the redundant controller. The status management signal sent by the redundant controller is used to instruct each component of the vehicle to use the time synchronization signal sent by the redundant controller for time synchronization.

[0006] A third aspect of this application provides a vehicle including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the time synchronization method described above.

[0007] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described time synchronization method.

[0008] The fifth aspect of this application provides a computer program product that, when run on a vehicle, causes the vehicle to execute the aforementioned time synchronization method.

[0009] In the embodiments of this application, the main controller and the redundant controller respectively send their respective time synchronization signals to each component of the vehicle, and the main controller sends a status message carrying a status identifier to the redundant controller. When the main controller detects a fault, the status identifier carried in the status message is a fault identifier. After receiving the status message carrying the fault identifier, the redundant controller sends a status management signal to each component of the vehicle to instruct each component of the vehicle to use the time synchronization signal sent by the redundant controller for time synchronization. When the main controller fails and the components cannot use the time synchronization signal of the main controller for effective time synchronization, the components can switch to use the time synchronization signal sent by the redundant controller for time synchronization, thus ensuring the effectiveness of time synchronization. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, 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.

[0011] Figure 1 This is a schematic diagram illustrating the implementation process of a time synchronization method provided in an embodiment of this application;

[0012] Figure 2 This is a schematic diagram of the vehicle architecture provided in an embodiment of this application;

[0013] Figure 3 This is a schematic diagram of the structure of a time synchronization device provided in an embodiment of this application;

[0014] Figure 4 This is a schematic diagram of the vehicle structure provided in the embodiments of this application. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are protected by this application.

[0016] In related technologies, independent controllers are typically used to synchronize the time of each component. However, in practical applications, this approach has been found to experience time synchronization failures, which are detrimental to autonomous driving. Specifically, when a controller malfunctions, it may stop sending time synchronization signals or send signals with significant errors. In this case, the components cannot continue to synchronize their time, and the reliability of the vehicle's autonomous driving will be affected.

[0017] In view of this, this application proposes a time synchronization method that can perform time synchronization through multiple controllers. When the main controller fails, redundant controllers are used to synchronize the time of vehicle components, thereby improving the effectiveness of time synchronization.

[0018] To illustrate the technical solution of this application, specific embodiments are described below.

[0019] Figure 1 The illustration shows a schematic diagram of the implementation process of a time synchronization method provided in an embodiment of this application. This method can be applied to vehicles and is suitable for situations where the effectiveness of time synchronization needs to be improved.

[0020] The aforementioned vehicles may be gasoline-powered vehicles, new energy vehicles, hybrid vehicles, or other types of vehicles, and this application does not impose any restrictions on this.

[0021] In the embodiments of this application, the vehicle may be equipped with a main controller and a redundant controller. The main controller serves as the primary control device for vehicle control and decision-making, while the redundant controller serves as a backup device for vehicle control and decision-making. When the main controller fails, the vehicle can be controlled and made decisions through the redundant controller, ensuring the reliability of vehicle decisions (such as autonomous driving decisions).

[0022] It should be understood that the number of redundant controllers can be one or more. When there are multiple redundant controllers and the main controller fails, the vehicle can be controlled and make decisions through any of the redundant controllers.

[0023] In embodiments of this application, the main controller and the redundant controller can be used to send their respective time synchronization signals to the various components of the vehicle. Each time synchronization signal can be used to synchronize the time of the various components of the vehicle according to the time signal of the corresponding controller.

[0024] The various components of a vehicle include, but are not limited to, the vehicle's sensors, chips, and control components.

[0025] Specifically, the time signal carries the local time of the corresponding controller, which can be used to unify the time of various components to the local time of the corresponding controller. In other words, the time synchronization signal sent by the main controller enables the various components of the vehicle to synchronize according to the local time of the main controller, while the time synchronization signal sent by the redundant controller enables the various components of the vehicle to synchronize according to the local time of the redundant controller. For the components of the vehicle, they can simultaneously receive time synchronization signals from both the main controller and the redundant controller, and choose one of them for time synchronization.

[0026] The above-mentioned time synchronization method may include the following steps S101 to S102.

[0027] Step S101: The main controller sends a status message carrying a status identifier to the redundant controller.

[0028] In the embodiments of this application, a status identifier can be used to characterize the fault state of the main controller. The main controller can periodically send status messages to the redundant controller. When the main controller detects a fault, it indicates that the time synchronization signal sent by the main controller is unreliable, and the time synchronization of various components of the vehicle based on the time synchronization signal sent by the main controller is prone to failure. At this time, the status identifier carried in the status message is a fault identifier. That is, the vehicle can control the main controller to send a status message carrying a fault identifier to the redundant controller. This fault identifier can indicate that the main controller has detected a fault and is in a fault state.

[0029] Specifically, the main controller can perform fault detection through self-testing. The detected faults can be computer program faults or hardware faults, and this application does not limit this. For example, the main controller can detect its own electrical parameters such as current, voltage, and power. If the detected values ​​of these electrical parameters exceed the preset normal range, a fault can be confirmed. Conversely, if the detected values ​​of these electrical parameters are within the preset normal range, no fault can be confirmed. As another example, the main controller can perform self-testing during the transmission of time synchronization signals. Each component can send a feedback signal to the main controller based on the integrity of the time synchronization signal after receiving it. Based on the feedback signal, if the time synchronization signal is incomplete, a fault can be confirmed; if the time synchronization signal is complete, no fault can be confirmed.

[0030] The status identifier can be a code segment in the fault management status message. When the code is 0x0, the status identifier is normal, indicating that the main controller has not detected a fault. When the code is 0x1, the status identifier is a fault, indicating that the main controller has detected a fault. The normal identifier is different from the fault identifier; the normal identifier indicates that the main controller is in a normal working state.

[0031] In step S102, in response to the redundant controller receiving a status message carrying a fault identifier, a status management signal is sent to each component of the vehicle through the redundant controller.

[0032] The status management signal sent by the redundant controller can be used to instruct the various components of the vehicle to use the time synchronization signal sent by the redundant controller for time synchronization. Specifically, before the main controller detects a fault, each component can use the time synchronization signal sent by the main controller for time synchronization. After the main controller detects a fault, the redundant controller can receive a status message carrying a fault indicator. At this time, the redundant controller will send a status management signal to each component of the vehicle, notifying each component to use the time synchronization signal sent by the redundant controller during time synchronization and discard the invalid time synchronization signal sent by the main controller. At this point, each component will unify its time to the local time of the redundant controller during time synchronization.

[0033] In the embodiments of this application, the main controller and the redundant controller respectively send their respective time synchronization signals to each component of the vehicle, and the main controller sends a status message carrying a status identifier to the redundant controller. When the main controller detects a fault, the status identifier carried in the status message is a fault identifier. After receiving the status message carrying the fault identifier, the redundant controller sends a status management signal to each component of the vehicle to instruct each component of the vehicle to use the time synchronization signal sent by the redundant controller for time synchronization. When the main controller fails and the components cannot use the time synchronization signal of the main controller for effective time synchronization, the components can switch to use the time synchronization signal sent by the redundant controller for time synchronization, thus ensuring the effectiveness of time synchronization.

[0034] It should be noted that in step S102, the redundant controller sends status management signals to each component of the vehicle. This is because a failure of the main controller may affect the sending of status management signals by the main controller. Therefore, sending status management signals to each component of the vehicle by the redundant controller can further improve the effectiveness of time synchronization.

[0035] Specifically, such as Figure 2 As shown, Figure 2The diagram illustrates the architecture of the aforementioned vehicle, which can be configured with a main controller, a redundant controller, a gateway, an in-vehicle communication terminal, and multiple LiDARs. The main controller can refer to an Intelligent Drive Controller (IDC), the redundant controller to a Redundant Intelligent Drive Controller (RIDC), the gateway to a Great Wall (GW) data processing unit, and the in-vehicle communication terminal to a Telematics-Box (TBOX). The LiDARs can specifically include a front LiDAR (FL), a rear LiDAR (RL), a left front LiDAR (FLL), and a right front LiDAR (FRL).

[0036] In some implementations, the electronic device can acquire the time signal collected by the vehicle communication terminal and use the time signal collected by the vehicle communication terminal to synchronize the time of the main controller and the redundant controller.

[0037] Specifically, Figure 2 In the vehicle architecture shown, the main controller, redundant controller, gateway, vehicle communication terminal and multiple LiDARs can be connected via Ethernet interface (ETH) or Controller Area Network (CAN) bus.

[0038] The vehicle-mounted communication terminal can obtain high-precision time signals through the Global Navigation Satellite System (GNSS). Specifically, it can acquire time signals from the Global Positioning System (GPS), which supports outputting pulse-per-second (PPS) signals accurate to milliseconds and NMEA (National Marine Electronics Association) commands containing year, month, day, hour, minute, and second information. After obtaining the PPS, the vehicle-mounted communication terminal can adjust its own time and synchronize it with the main controller and redundant controllers via a gateway.

[0039] The main controller and redundant controllers can be connected to the vehicle communication terminal via a gateway. When the gateway and the vehicle communication terminal are connected via CAN, the vehicle communication terminal, controller, and various components can synchronize time according to the CAN TSN standard, where TSN stands for Time-Sensitive Network. When the gateway and the vehicle communication terminal are connected via ETH, the vehicle communication terminal, controller, and various components can synchronize time according to the General Precise Time Protocol (gPTP).

[0040] Because low-cost in-vehicle communication terminals can only obtain high-precision time signals at a relatively low frequency, typically below the time synchronization frequency required for autonomous driving, to adapt to these terminals, the main controller and redundant controller can acquire the time signal collected by the in-vehicle communication terminal each time the vehicle is powered on. This time signal is then used to synchronize the main controller and redundant controller. Once the main controller and redundant controller have completed local time synchronization, time synchronization based on the in-vehicle communication terminal's time signal ceases, and only the local time of the main controller or redundant controller is used for time synchronization of each component.

[0041] Considering that the clock may shift between the main controller and the redundant controller over time, after local time synchronization is completed, the vehicle can send the main controller's time synchronization signal to the redundant controller through the main controller, so that the redundant controller can synchronize its time according to the main controller's time synchronization signal.

[0042] Specifically, in response to the redundant controller receiving the time synchronization signal from the master controller, the redundant controller can acquire its own time signal and calculate the time difference between its own time signal and the master controller's time synchronization signal. If the time difference is greater than a threshold, it indicates a significant time discrepancy between the redundant and master controllers. In this case, the redundant controller's time signal can be adjusted based on the master controller's time synchronization signal to synchronize with the redundant controller. If the time difference is less than or equal to the threshold, it indicates a small time discrepancy between the redundant and master controllers, and no adjustment to the redundant controller's time signal is necessary.

[0043] Correspondingly, the vehicle's main controller and redundant controller can send their respective time synchronization signals to each component of the vehicle based on their respective time signals.

[0044] For example, such as Figure 2As shown, the main controller and redundant controller can include a system-on-chip (SoC) and an interaction unit (Switch). The main controller and redundant controller can be interconnected through their respective Switches. FL and RL can be connected to the main controller's Switch, and FLL and FRL can be connected to the redundant controller's Switch. FL and RL send point cloud data to the redundant controller, while FLL and FRL send point cloud data to the main controller. Both the main controller and redundant controller send time synchronization signals to the four LiDARs.

[0045] In some implementations, status messages can be exchanged between the primary controller and the redundant controller.

[0046] Specifically, when the main controller does not detect a fault, the status message carries a normal status identifier. That is, the vehicle can send a status message with a normal identifier to the redundant controller via the main controller. When the main controller does not detect a fault, it can also send status management signals to various components of the vehicle. These status management signals can be used to instruct the various components of the vehicle to use the time synchronization signal sent by the main controller for time synchronization.

[0047] Specifically, the status management signal can be a segment of coding in the status management message. When the coding is 0x0, it indicates that the main controller is selected, and when the coding is 0x1, it indicates that the redundant controller is selected. When the main controller does not detect a fault, it sends a status management signal set to 0x0 to each component, so that each component of the vehicle uses the time synchronization signal sent by the main controller for time synchronization.

[0048] Accordingly, in step S101, when the main controller detects a fault, it can send a status message carrying a fault identifier to the redundant controller. Then, the redundant controller can send a status management signal set to 0x1 to each component of the vehicle so that each component of the vehicle can use the time synchronization signal sent by the redundant controller for time synchronization.

[0049] Subsequently, if the main controller recovers, it can resend the status management signal set to 0x0 to each component. Correspondingly, in response to the redundant controller receiving a status message carrying a normal identifier, the vehicle can control the redundant controller to stop sending status management signals to each component of the vehicle, so that each component of the vehicle can re-use the time synchronization signal sent by the main controller for time synchronization.

[0050] In order to enable the vehicle to switch to the redundant controller for time synchronization in a timely manner when the main controller detects a fault, in some implementations, the main controller may send status messages carrying fault indicators at a higher frequency than it sends status messages carrying normal indicators.

[0051] Accordingly, in some implementations, the redundant controller may also periodically send status messages carrying status identifiers to the primary controller. When the redundant controller detects a fault, it may send a status message carrying a fault identifier to the primary controller.

[0052] If both the main controller and the redundant controller detect a fault, the time synchronization signals of both the main controller and the redundant controller will be unreliable. In this case, the redundant controller does not need to send status management signals to each component of the vehicle, but can report fault information to alert the user to the fault.

[0053] Based on the time synchronization method provided in this application, time synchronization can be performed by receiving the TBOX time signal only once upon power-up, reducing the demand for TBOX and adapting to low-cost TBOX. At the same time, it can achieve time synchronization of multiple components under dual redundant domain control. When the main controller detects its own fault, it also maximizes the reliability of the time synchronization of the downstream components and ensures the effectiveness of the vehicle's time synchronization.

[0054] It should be noted that, for the sake of simplicity, the aforementioned 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, because according to this application, some steps can be performed in other orders.

[0055] like Figure 3 The diagram shown is a structural schematic of a time synchronization device 300 provided in an embodiment of this application. The time synchronization device 300 is configured on a vehicle. The vehicle's main controller and redundant controller can respectively send their respective time synchronization signals to various components of the vehicle.

[0056] Specifically, the time synchronization device 300 may include:

[0057] The message interaction unit 301 is used to send a status message carrying a status identifier to the redundant controller through the main controller. When the main controller detects a fault, the status identifier carried in the status message is a fault identifier.

[0058] The status management unit 302 is used to respond to the redundant controller receiving a status message carrying the fault identifier, and to send a status management signal to each component of the vehicle through the redundant controller. The status management signal sent by the redundant controller is used to instruct each component of the vehicle to use the time synchronization signal sent by the redundant controller for time synchronization.

[0059] In some embodiments of this application, when the main controller does not detect a fault, the status identifier carried in the status message is a normal identifier, and the normal identifier is a different identifier from the fault identifier; the aforementioned status management unit 302 can be specifically used to: send status management signals to each component of the vehicle through the main controller, and the status management signals sent by the main controller are used to instruct each component of the vehicle to use the time synchronization signal sent by the main controller for time synchronization.

[0060] In some embodiments of this application, in response to the redundant controller receiving a status message carrying the normal identifier, the status management unit 302 may be specifically used to: control the redundant controller to stop sending status management signals to the various components of the vehicle.

[0061] In some embodiments of this application, the vehicle is further equipped with an on-board communication terminal; the time synchronization device 300 may further include a time synchronization unit, specifically used for: acquiring the time signal collected by the on-board communication terminal each time the vehicle is powered on; and synchronizing the main controller and the redundant controller using the time signal collected by the on-board communication terminal.

[0062] In some embodiments of this application, the time synchronization unit described above can be specifically used to: send the time synchronization signal of the main controller to the redundant controller through the main controller, so that the redundant controller can perform time synchronization according to the time synchronization signal of the main controller.

[0063] In some embodiments of this application, in response to the redundant controller receiving the time synchronization signal, the time synchronization unit may be specifically used to: acquire the time signal of the redundant controller; calculate the time difference between the time signal of the redundant controller and the time synchronization signal of the main controller; and when the time difference is greater than a difference threshold, adjust the time signal of the redundant controller according to the time synchronization signal of the main controller.

[0064] It should be noted that, for the sake of convenience and brevity, the specific working process of the time synchronization device 300 described above can be found in the following reference: Figures 1 to 2 The corresponding process of the method will not be described in detail here.

[0065] like Figure 4 The diagram shown is a schematic representation of a vehicle according to an embodiment of this application. Specifically, the vehicle 4 may include: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40, such as a time synchronization program. When the processor 40 executes the computer program 42, it implements the steps in the various time synchronization method embodiments described above, for example... Figure 1 The steps S101 to S102 are shown. Alternatively, when the processor 40 executes the computer program 42, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3 The functions of the message interaction unit 301 and the status management unit 302 shown are illustrated.

[0066] The computer program can be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the vehicle.

[0067] For example, the computer program can be divided into a message interaction unit and a status management unit. The specific functions of each unit are as follows: The message interaction unit is used to send a status message carrying a status identifier to the redundancy controller through the main controller. When the main controller detects a fault, the status identifier carried in the status message is a fault identifier. The status management unit is used to, in response to the redundancy controller receiving a status message carrying the fault identifier, send a status management signal to each component of the vehicle through the redundancy controller. The status management signal sent by the redundancy controller is used to instruct each component of the vehicle to use the time synchronization signal sent by the redundancy controller for time synchronization.

[0068] The vehicle may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that... Figure 4 This is merely an example of a vehicle and does not constitute a limitation on the vehicle. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the vehicle may also include input / output devices, network access devices, buses, etc.

[0069] The processor 40 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0070] The memory 41 can be an internal storage unit of the vehicle, such as a hard drive or RAM. Alternatively, the memory 41 can be an external storage device of the vehicle, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 41 can include both internal and external storage units. The memory 41 is used to store the computer program and other programs and data required by the vehicle. The memory 41 can also be used to temporarily store data that has been output or will be output.

[0071] It should be noted that, for the sake of convenience and brevity, the structure of the vehicle described above can also be referred to the specific description of the structure in the method embodiment, which will not be repeated here.

[0072] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

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

[0074] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for various specific applications, but such implementations should not be considered beyond the scope of this application.

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

[0076] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0077] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0078] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0079] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A time synchronization method, characterized in that, Applied to vehicles, the vehicles are equipped with a main controller and a redundant controller, the main controller and the redundant controller being used to send their respective time synchronization signals to various components of the vehicle; The time synchronization method includes: Each time the vehicle is powered on, the time signal collected by the vehicle communication terminal is acquired; The time signal collected by the vehicle-mounted communication terminal is used to synchronize the time of the main controller and the redundant controller. The main controller sends a status message carrying a status identifier to the redundant controller. When the main controller detects a fault, the status identifier carried in the status message is a fault identifier. When the main controller does not detect a fault, the status identifier carried in the status message is a normal identifier, which is used to indicate that the main controller has not detected a fault. The main controller sends status management signals to each component of the vehicle. The status management signals sent by the main controller are used to instruct each component of the vehicle to use the time synchronization signal sent by the main controller for time synchronization when they simultaneously receive time synchronization signals sent by the main controller and the redundant controller. The time synchronization signal sent by the main controller to the redundant controller is used to synchronize the time of the redundant controller. In response to the redundancy controller receiving a status message carrying the fault identifier, the redundancy controller sends a status management signal to each component of the vehicle. The status management signal sent by the redundancy controller is used to instruct each component of the vehicle to use the time synchronization signal sent by the redundancy controller for time synchronization when it simultaneously receives time synchronization signals sent by the main controller and the redundancy controller.

2. The time synchronization method as described in claim 1, characterized in that, In response to the redundant controller receiving a status message carrying the normal identifier, the time synchronization method further includes: The redundant controller is controlled to stop sending status management signals to the various components of the vehicle.

3. The time synchronization method as described in claim 1, characterized in that, The frequency at which the main controller sends status messages carrying the fault identifier is higher than the frequency at which it sends status messages carrying the normal identifier.

4. The time synchronization method as described in claim 1, characterized in that, In response to the redundant controller receiving a time synchronization signal from the primary controller, the time synchronization method further includes: Obtain the time signal of the redundant controller; Calculate the time difference between the time signal of the redundant controller and the time synchronization signal of the main controller; When the time difference is greater than the difference threshold, the time signal of the redundant controller is adjusted according to the time synchronization signal of the main controller.

5. A time synchronization device, characterized in that, Configured in a vehicle, the vehicle is equipped with a main controller and a redundant controller, the main controller and the redundant controller being used to send their respective time synchronization signals to various components of the vehicle; The time synchronization device includes: The time synchronization unit is used to acquire the time signal collected by the vehicle communication terminal each time the vehicle is powered on; and to synchronize the time of the main controller and the redundant controller using the time signal collected by the vehicle communication terminal. The message interaction unit is used to send a status message carrying a status identifier to the redundant controller through the main controller. When the main controller detects a fault, the status identifier carried in the status message is a fault identifier. A status management unit is configured to: when the main controller does not detect a fault, carry a normal status identifier in the status message, the normal status identifier indicating that the main controller has not detected a fault; send status management signals to each component of the vehicle through the main controller, the status management signals sent by the main controller instructing each component of the vehicle to use the time synchronization signal sent by the main controller for time synchronization when simultaneously receiving time synchronization signals from both the main controller and the redundancy controller; and send the main controller's time synchronization signal to the redundancy controller for time synchronization of the redundancy controller; and, in response to the redundancy controller receiving a status message carrying the fault identifier, send status management signals to each component of the vehicle through the redundancy controller, the status management signals sent by the redundancy controller instructing each component of the vehicle to use the time synchronization signal sent by the redundancy controller for time synchronization when simultaneously receiving time synchronization signals from both the main controller and the redundancy controller.

6. A vehicle comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the time synchronization method as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the time synchronization method as described in any one of claims 1 to 4.