Time synchronization method and system of vehicle-mounted sensor, vehicle and equipment

By acquiring a reference clock and calculating communication delay and clock drift, the local clock of the vehicle sensor is compensated and data aligned, solving the problems of sensor interface differences and crystal oscillator stability. This achieves accurate time synchronization of vehicle environmental perception and decision-making, improving reliability.

CN121508720APending Publication Date: 2026-02-10ANHUI DEEPWAY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511573951.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing vehicle sensor time synchronization solutions fail to effectively address communication delays caused by differences in sensor interfaces and the stability of internal crystal oscillators, resulting in inconsistent data transmission timing and deviations in vehicle environmental perception.

Method used

By acquiring the reference clock and the local clock of the vehicle-mounted sensors, calculating the communication delay and clock drift, compensating for the local clock of the sensors, and aligning the collected data with the reference clock, precise time synchronization is achieved.

Benefits of technology

It improves the reliability of vehicle environmental perception and decision-making, ensures the temporal consistency and accuracy of sensor data, and enhances driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121508720A_ABST
    Figure CN121508720A_ABST
Patent Text Reader

Abstract

The invention discloses a time synchronization method and system of a vehicle-mounted sensor, a vehicle and equipment. The time synchronization method of the vehicle-mounted sensor comprises the following steps: acquiring a reference clock and a local clock of the vehicle-mounted sensor; obtaining the communication delay and the clock drift distance of the vehicle-mounted sensor; compensating a local clock of the vehicle-mounted sensor according to the communication delay and the clock drift amount of the vehicle-mounted sensor to obtain a local correction clock of the vehicle-mounted sensor; and aligning the collected data of the vehicle-mounted sensor according to the reference clock and the local correction clock. According to the embodiment of the invention, the local clock of the vehicle-mounted sensor is compensated through the communication delay and the clock drift amount, and the reference clock is combined to align the data collected by the sensor, so that the precise time synchronization of the vehicle-mounted sensor can be realized, and the reliability of vehicle environment perception and decision making is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle electronics and time synchronization technology, and in particular to a time synchronization method, system, vehicle, and device for vehicle sensors. Background Technology

[0002] In autonomous driving and advanced driver assistance systems, data from different onboard sensors need to be fused in real time to ensure the accuracy of vehicle environmental perception and decision-making.

[0003] However, existing vehicle sensor time synchronization solutions still have some shortcomings: First, existing solutions usually do not fully consider the differences between different sensor interfaces. Due to different interface protocols, the communication delays of corresponding sensors vary significantly, and existing methods often lack cross-interface data alignment solutions, leading to timing inconsistencies during data transmission. Second, existing solutions often ignore the stability of the crystal oscillator inside the sensor. The crystal oscillator is susceptible to aging, temperature changes, and power fluctuations. Over long-term operation, it will accumulate clock drift errors, which can cause deviations in vehicle environmental perception and delays or misjudgments in decision-making, affecting driving safety. Summary of the Invention

[0004] Therefore, it is necessary to provide a time synchronization method, system, vehicle, and device for vehicle sensors to address the aforementioned technical problems. By compensating for the local clock of the vehicle sensors through communication delay and clock drift, and aligning the sensor data with a reference clock, accurate time synchronization of vehicle sensors can be achieved, thereby improving the reliability of vehicle environmental perception and decision-making.

[0005] Firstly, a time synchronization method for vehicle-mounted sensors is provided, comprising: Acquire the reference clock and the local clock of the vehicle's sensors; The communication delay and clock drift of the vehicle-mounted sensors are obtained; The local clock of the vehicle sensor is compensated based on the communication delay and clock drift of the vehicle sensor to obtain the local corrected clock of the vehicle sensor. The data collected by the vehicle-mounted sensors are aligned based on the reference clock and the local correction clock.

[0006] Further, the acquisition of the reference clock includes: When the satellite navigation system signal is normal, the clock of the satellite navigation system shall be used as the reference clock; In the event of signal loss or abnormality of the satellite navigation system, the reference time is obtained based on the clock of the Ethernet PTP protocol and a first time difference, or based on the local clock of the vehicle's main control ECU and a second time difference, wherein the first time difference is determined based on the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol, and the second time difference is determined based on the time difference between the clock of the satellite navigation system and the local clock of the main control ECU.

[0007] Further, wherein the first time difference is determined based on the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol, including: Obtain the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol; The time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol is smoothed to obtain the first time difference; The second time difference is determined based on the time difference between the clock of the satellite navigation system and the local clock of the main control ECU, including: Obtain the time difference between the clock of the satellite navigation system and the local clock of the main control ECU; The second time difference is obtained by smoothing the time difference between the clock of the satellite navigation system and the local clock of the main control ECU.

[0008] Furthermore, obtaining the communication delay of the vehicle-mounted sensor includes: Obtain the fixed interface delay of the vehicle-mounted sensor; Obtain the dynamic interface delay of the vehicle-mounted sensor; The communication delay of the vehicle sensor is determined based on the fixed delay and the dynamic delay of the interface.

[0009] Further, obtaining the clock drift of the vehicle-mounted sensor includes: Obtain the factors affecting the clock drift of the vehicle-mounted sensors; Based on the factors affecting clock drift, the amount of clock drift of the vehicle sensor is predicted.

[0010] Further, aligning the data collected by the vehicle-mounted sensors according to the reference clock and the local correction clock includes: Obtain the time difference between the reference clock and the local correction clock; The data collected by the vehicle-mounted sensors are aligned based on the time difference between the reference clock and the local correction clock.

[0011] Further, aligning the data collected by the vehicle-mounted sensors based on the time difference between the reference clock and the local correction clock includes: The alignment window of the data collected by the vehicle-mounted sensor is adjusted according to the time difference between the reference clock and the local correction clock. Based on the alignment window, a data stream of the vehicle-mounted sensor's acquired data with a unified time reference is obtained.

[0012] Secondly, a time synchronization system for vehicle-mounted sensors is provided, including: The acquisition module is used to acquire the reference clock and the local clock of the vehicle sensors; A calculation module is used to obtain the communication delay and clock drift of the vehicle-mounted sensors; The compensation module is used to compensate the local clock of the vehicle sensor based on the communication delay and clock drift of the vehicle sensor, so as to obtain the local corrected clock of the vehicle sensor. The synchronization module is used to align the data collected by the vehicle-mounted sensors according to the reference clock and the local correction clock.

[0013] Thirdly, a vehicle is provided, comprising: a time synchronization system for onboard sensors according to the second aspect described above.

[0014] Fourthly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the steps of the time synchronization method for vehicle sensors described in the first aspect and any possible implementation of the first aspect.

[0015] Fifthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the time synchronization method for vehicle sensors described in the first aspect and any possible implementation thereof.

[0016] According to the embodiments of this application, firstly, a reference clock and the local clock of the vehicle-mounted sensor are obtained; then, the communication delay and clock drift of the vehicle-mounted sensor are obtained; next, the local clock of the vehicle-mounted sensor is compensated based on the communication delay and clock drift to obtain the local corrected clock of the vehicle-mounted sensor; finally, the data collected by the vehicle-mounted sensor is aligned based on the reference clock and the local corrected clock. Therefore, by compensating for the local clock of the vehicle-mounted sensor based on the communication delay and clock drift, and simultaneously aligning the sensor data collected by the sensor with the reference clock, accurate time synchronization of the vehicle-mounted sensor can be achieved, improving the reliability of vehicle environmental perception and decision-making. Attached Figure Description

[0017] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 A flowchart illustrating the time synchronization method for vehicle-mounted sensors provided in this application embodiment; Figure 2 A structural block diagram of the time synchronization system for vehicle-mounted sensors provided in the embodiments of this application; Figure 3 This is a structural block diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0018] The present application will now be described in further detail with reference to the embodiments and accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.

[0019] It should be noted that, unless otherwise specified, the embodiments and features of the embodiments in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] The following describes in detail, with reference to the accompanying drawings, a method, system, vehicle, and device for synchronizing vehicle-mounted sensors according to embodiments of this application.

[0021] Figure 1 This is a flowchart of a time synchronization method for an on-board sensor according to an embodiment of this application. Figure 1 As shown, the time synchronization method for vehicle-mounted sensors according to an embodiment of this application includes the following steps: S101: Acquire the reference clock and the local clock of the vehicle sensors.

[0022] In one embodiment of this application, obtaining the reference clock includes: using the clock of the satellite navigation system as the reference clock when the satellite navigation system signal is normal; and obtaining the reference time based on the clock of the Ethernet PTP protocol and a first time difference when the satellite navigation system signal is lost or abnormal, or obtaining the reference time based on the local clock of the vehicle's main control ECU and a second time difference, wherein the first time difference is determined based on the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol, and the second time difference is determined based on the time difference between the clock of the satellite navigation system and the local clock of the main control ECU.

[0023] The first time difference is determined based on the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol, including: acquiring the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol; and smoothing the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol to obtain the first time difference. The second time difference is determined based on the time difference between the clock of the satellite navigation system and the local clock of the main control ECU, including: acquiring the time difference between the clock of the satellite navigation system and the local clock of the main control ECU; and smoothing the time difference between the clock of the satellite navigation system and the local clock of the main control ECU to obtain the second time difference.

[0024] Specifically, when the satellite navigation system signal is lost or abnormal, the system will automatically switch to the clock provided by the Precision Time Protocol (PTP) or the local clock of the vehicle's electronic control unit (ECU), and determine the reference clock by combining the first time difference or the second time difference calculated in the above steps; when the satellite navigation system signal is restored, the system will revert to using the satellite navigation system clock as the reference clock, and will make gradual adjustments during this process to avoid time jumps.

[0025] In addition, since the clock frequencies and accuracies of various vehicle sensors differ, the local clocks of each vehicle sensor, including cameras, millimeter-wave radar, lidar, inertial measurement units (IMU), and global navigation satellite system (GNSS) modules, are read through the driver layer interface, and a unified timestamp acquisition channel is established.

[0026] S102: Obtain the communication delay and clock drift of the vehicle-mounted sensor.

[0027] In one embodiment of this application, obtaining the communication delay of the vehicle-mounted sensor includes: obtaining the fixed interface delay of the vehicle-mounted sensor; obtaining the dynamic interface delay of the vehicle-mounted sensor; and determining the communication delay of the vehicle-mounted sensor based on the fixed interface delay and the dynamic interface delay.

[0028] Specifically, the communication interface of vehicle sensors may have a certain delay, which will cause the local clock of the vehicle sensors to deviate. Therefore, the communication delay caused by different vehicle sensor communication interfaces, such as Ethernet interface, Controller Area Network (CAN) interface, Mobile Industry Processor (MIPI) interface and Serial Peripheral (SPI) interface, is calculated.

[0029] Communication latency consists of two parts: fixed interface latency and dynamic interface latency. Fixed interface latency, such as driver buffer latency and protocol stack processing latency, can be measured through experimental calibration. Dynamic interface latency, such as bus congestion and buffer queuing, can be achieved through statistical models or online estimation.

[0030] In one embodiment of this application, obtaining the clock drift of the vehicle sensor includes: acquiring the clock drift influencing factors of the vehicle sensor; and predicting the clock drift of the vehicle sensor based on the clock drift influencing factors.

[0031] Specifically, the local clock of the vehicle sensor may drift to a certain extent due to factors such as crystal oscillator aging, temperature changes, and power fluctuations. To compensate for this, the system collects parameters such as the degree of crystal oscillator aging, temperature changes, and power fluctuations of the vehicle sensor in real time. Based on prediction models such as Kalman filtering or linear fitting, the system predicts the amount of clock drift of the vehicle sensor. Subsequently, the predicted clock drift is stored in the established drift compensation table to provide a basis for subsequent time correction.

[0032] S103: Compensate the local clock of the vehicle sensor based on the communication delay and clock drift of the vehicle sensor to obtain the local corrected clock of the vehicle sensor.

[0033] Specifically, based on the communication delay and clock drift of the vehicle sensors obtained in the above steps, the local clock of the vehicle sensors is adjusted. For sensors that can be directly adjusted, the clock is adjusted through the driver layer; for sensors that cannot be directly adjusted, the timestamp of the acquired data is corrected in the upper-layer module. A closed-loop feedback method is used for compensation control. In a specific example, the clock error can converge to within microseconds.

[0034] S104: Align the data collected by the vehicle-mounted sensor according to the reference clock and the local correction clock.

[0035] In one embodiment of this application, aligning the data collected by the vehicle-mounted sensor according to the reference clock and the local correction clock includes: obtaining the time difference between the reference clock and the local correction clock; and aligning the data collected by the vehicle-mounted sensor according to the time difference between the reference clock and the local correction clock.

[0036] In one embodiment of this application, aligning the data collected by the vehicle sensor according to the time difference between the reference clock and the local correction clock includes: adjusting the alignment window of the data collected by the vehicle sensor according to the time difference between the reference clock and the local correction clock; and obtaining a data stream of the data collected by the vehicle sensor with a unified time reference according to the alignment window.

[0037] By comprehensively calculating communication latency and predicting clock drift, and combining this with reference clock alignment, clock synchronization of vehicle sensors can be achieved. For example, in a fleet collaborative driving scenario, there is an unstable network latency issue. The system can combine communication latency and drift to perform dynamic clock compensation, thereby achieving time synchronization across vehicles. In addition, in a smart cockpit scenario, to meet the data alignment requirements of multiple cameras and microphone arrays, the system can combine the local clock information of the electronic control unit with a drift compensation mechanism to achieve unified timestamp management of multimodal data, thereby ensuring the consistency of information in time sequence.

[0038] According to the time synchronization method for vehicle-mounted sensors in this application, a reference clock and the local clock of the vehicle-mounted sensor are first acquired; then, the communication delay and clock drift of the vehicle-mounted sensor are obtained; next, the local clock of the vehicle-mounted sensor is compensated based on the communication delay and clock drift to obtain a locally corrected clock for the vehicle-mounted sensor; finally, the data collected by the vehicle-mounted sensor is aligned based on the reference clock and the locally corrected clock. Therefore, by compensating for the local clock of the vehicle-mounted sensor based on the communication delay and clock drift, and simultaneously aligning the sensor data collected by the sensor using the reference clock, accurate time synchronization of the vehicle-mounted sensor can be achieved, improving the reliability of vehicle environmental perception and decision-making.

[0039] Figure 2 This is a structural block diagram of a vehicle-mounted sensor time synchronization system according to an embodiment of this application. Figure 2 As shown, a time synchronization system for an on-board sensor according to an embodiment of this application includes: an acquisition module 210, a calculation module 220, a compensation module 230, and a synchronization module 240, wherein: The acquisition module 210 is used to acquire the reference clock and the local clock of the vehicle sensor; Calculation module 220 is used to obtain the communication delay and clock drift of the vehicle-mounted sensor; The compensation module 230 is used to compensate the local clock of the vehicle sensor according to the communication delay and clock drift of the vehicle sensor, so as to obtain the local corrected clock of the vehicle sensor. The synchronization module 240 is used to align the data collected by the vehicle-mounted sensor according to the reference clock and the local correction clock.

[0040] According to the vehicle-mounted sensor time synchronization system of this application embodiment, firstly, a reference clock and the local clock of the vehicle-mounted sensor are acquired; then, the communication delay and clock drift of the vehicle-mounted sensor are obtained; next, the local clock of the vehicle-mounted sensor is compensated based on the communication delay and clock drift to obtain a locally corrected clock for the vehicle-mounted sensor; finally, the data collected by the vehicle-mounted sensor is aligned based on the reference clock and the locally corrected clock. Therefore, by compensating for the local clock of the vehicle-mounted sensor based on the communication delay and clock drift, and simultaneously aligning the sensor data collected by the sensor with the reference clock, accurate time synchronization of the vehicle-mounted sensor can be achieved, improving the reliability of vehicle environmental perception and decision-making.

[0041] Specific limitations regarding the time synchronization system for vehicle-mounted sensors can be found in the limitations of the time synchronization method for vehicle-mounted sensors described above, and will not be repeated here. Each module of the aforementioned time synchronization system for vehicle-mounted sensors can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0042] Furthermore, a vehicle is provided, including a time synchronization system for on-board sensors according to any of the above embodiments. The vehicle first acquires a reference clock and the local clock of the on-board sensors; then, it acquires the communication delay and clock drift of the on-board sensors; next, it compensates for the local clock of the on-board sensors based on the communication delay and clock drift to obtain a locally corrected clock for the on-board sensors; finally, it aligns the collected data of the on-board sensors based on the reference clock and the locally corrected clock. Thus, by compensating for the local clock of the on-board sensors based on communication delay and clock drift, and simultaneously aligning the sensor collected data with the reference clock, accurate time synchronization of the on-board sensors can be achieved, improving the reliability of vehicle environmental perception and decision-making.

[0043] Furthermore, other components and functions of the vehicle according to the embodiments of this application are known to those skilled in the art and will not be described in detail here.

[0044] The following is for reference. Figure 3 , Figure 3 A schematic diagram of a computer device structure suitable for implementing embodiments of this application is shown.

[0045] like Figure 3As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1002 or programs loaded from storage section 1008 into random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the system's operating instructions. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0046] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1010 as needed so that computer programs read from it can be installed into storage section 1008 as needed.

[0047] Specifically, according to embodiments of this application, the flowchart above refers to... Figure 1 The described process can be implemented as a computer-readable storage medium. For example, embodiments of this application include a computer-readable storage medium comprising a computer program containing program code for performing the methods shown in the flowchart, such as performing: acquiring a reference clock and a local clock of an onboard sensor; acquiring the communication delay and clock drift of the onboard sensor; compensating the local clock of the onboard sensor based on the communication delay and clock drift of the onboard sensor to obtain a locally corrected clock of the onboard sensor; and aligning the acquired data of the onboard sensor based on the reference clock and the locally corrected clock.

[0048] Specifically, according to embodiments of this application, the flowchart above refers to... Figure 1The described process can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart, such as performing: acquiring a reference clock and a local clock of an onboard sensor; acquiring the communication delay and clock drift of the onboard sensor; compensating the local clock of the onboard sensor based on the communication delay and clock drift of the onboard sensor to obtain a locally corrected clock of the onboard sensor; and aligning the acquired data of the onboard sensor based on the reference clock and the locally corrected clock.

[0049] In such an embodiment, the computer program includes program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable media 1011. When the computer program is executed by the central processing unit (CPU) 1001, it performs the functions defined in the system of this application.

[0050] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0051] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operational instructions of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two connected blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified functions or operational instructions, or using a combination of dedicated hardware and computer instructions.

[0052] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be located in a processor. The names of these units or modules do not, in certain circumstances, constitute a limitation on the unit or module itself.

[0053] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0054] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A time synchronization method for vehicle-mounted sensors, characterized in that, include: Acquire the reference clock and the local clock of the vehicle's sensors; The communication delay and clock drift of the vehicle-mounted sensors are obtained; The local clock of the vehicle sensor is compensated based on the communication delay and clock drift of the vehicle sensor to obtain the local corrected clock of the vehicle sensor. The data collected by the vehicle-mounted sensors are aligned based on the reference clock and the local correction clock.

2. The time synchronization method for vehicle-mounted sensors according to claim 1, characterized in that, The acquisition of the reference clock includes: When the satellite navigation system signal is normal, the clock of the satellite navigation system shall be used as the reference clock; In the event of signal loss or abnormality of the satellite navigation system, the reference time is obtained based on the clock of the Ethernet PTP protocol and a first time difference, or based on the local clock of the vehicle's main control ECU and a second time difference, wherein the first time difference is determined based on the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol, and the second time difference is determined based on the time difference between the clock of the satellite navigation system and the local clock of the main control ECU.

3. The time synchronization method for vehicle-mounted sensors according to claim 2, characterized in that, in, The first time difference is determined based on the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol, including: Obtain the time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol; The time difference between the clock of the satellite navigation system and the clock of the Ethernet PTP protocol is smoothed to obtain the first time difference; The second time difference is determined based on the time difference between the clock of the satellite navigation system and the local clock of the main control ECU, including: Obtain the time difference between the clock of the satellite navigation system and the local clock of the main control ECU; The second time difference is obtained by smoothing the time difference between the clock of the satellite navigation system and the local clock of the main control ECU.

4. The time synchronization method for vehicle-mounted sensors according to claim 1, characterized in that, The process of obtaining the communication delay of the vehicle-mounted sensor includes: Obtain the fixed interface delay of the vehicle-mounted sensor; Obtain the dynamic interface delay of the vehicle-mounted sensor; The communication delay of the vehicle sensor is determined based on the fixed delay and the dynamic delay of the interface.

5. The time synchronization method for vehicle-mounted sensors according to claim 1, characterized in that, Obtaining the clock drift of the vehicle-mounted sensor includes: Obtain the factors affecting the clock drift of the vehicle-mounted sensors; Based on the factors affecting clock drift, the amount of clock drift of the vehicle sensor is predicted.

6. The time synchronization method for vehicle-mounted sensors according to any one of claims 1-5, characterized in that, The step of aligning the data collected by the vehicle-mounted sensors according to the reference clock and the local correction clock includes: Obtain the time difference between the reference clock and the local correction clock; The data collected by the vehicle-mounted sensors are aligned based on the time difference between the reference clock and the local correction clock.

7. The time synchronization method for vehicle-mounted sensors according to claim 6, characterized in that, The step of aligning the data collected by the vehicle-mounted sensors based on the time difference between the reference clock and the local correction clock includes: The alignment window of the data collected by the vehicle-mounted sensor is adjusted according to the time difference between the reference clock and the local correction clock. Based on the alignment window, a data stream of the vehicle-mounted sensor's acquired data with a unified time reference is obtained.

8. A time synchronization system for an on-board sensor, characterized in that, include: The acquisition module is used to acquire the reference clock and the local clock of the vehicle sensors; A calculation module is used to obtain the communication delay and clock drift of the vehicle-mounted sensors; The compensation module is used to compensate the local clock of the vehicle sensor based on the communication delay and clock drift of the vehicle sensor, so as to obtain the local corrected clock of the vehicle sensor. The synchronization module is used to align the data collected by the vehicle-mounted sensors according to the reference clock and the local correction clock.

9. A vehicle, characterized in that, include: The time synchronization system for vehicle-mounted sensors according to claim 8.

10. A computer device 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 program, it implements the time synchronization method for vehicle-mounted sensors according to any one of claims 1-7.