A method and device for providing a time source for automatic driving

By providing two independent time sources in the autonomous driving system, using the first crystal oscillator and GNSS signals, the problem of unstable time synchronization is solved, ensuring the safety of the system and the stability of time synchronization, and avoiding time jumps changes to meet the needs of world standard time.

CN114641951BActive Publication Date: 2024-09-10YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980102106.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-20
Publication Date
2024-09-10
Estimated Expiration
2039-11-20

AI Technical Summary

Technical Problem

The time synchronization in the autonomous driving system is unstable, resulting in time jumps, affecting the safety of the algorithm, and posing potential risks of traffic accidents.

Method used

Provides two independent time sources, driven by the first crystal oscillator and GNSS signal respectively, ensuring continuous and stable time synchronization services in any scenario, avoiding time jumps, and meeting the time requirements for security audits and driving data to the cloud .

Benefits of technology

It ensures the time synchronization stability of the autonomous driving system in any scenario, avoids time jump problems, improves the safety and reliability of the system, and meets the needs of world standard time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114641951B
    Figure CN114641951B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method and device for providing a time source for autonomous driving, which can be applied to vehicle autonomous driving in the field of artificial intelligence. The method includes providing a first time source to a first subsystem of the autonomous driving system through a first crystal oscillator, and providing a second time source to a second subsystem of the autonomous driving system according to a received satellite time signal. By implementing the embodiment of the present invention, a stable and reliable global time source reference can be provided for the autonomous driving system, ensuring the safe operation of the autonomous driving system, and meeting the system's demand for world standard time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of time synchronization technology, and in particular to a method and device for providing a time source for autonomous driving. Background Art

[0002] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Autonomous driving is a mainstream application in the field of artificial intelligence. Autonomous driving technology relies on the collaboration of computer vision, radar, monitoring devices and global positioning systems to enable motor vehicles to achieve autonomous driving without the need for human active operation. Autonomous vehicles use various computing systems to help transport passengers from one location to another. Some autonomous vehicles may require some initial or continuous input from operators (such as navigators, drivers, or passengers). Autonomous vehicles allow operators to switch from manual operation mode to autonomous driving mode or a mode between the two. Since autonomous driving technology does not require humans to drive motor vehicles, it can theoretically effectively avoid human driving errors, reduce the occurrence of traffic accidents, and improve the transportation efficiency of roads. Therefore, autonomous driving technology is receiving more and more attention.

[0003] In the autonomous driving system, there are a large number of heterogeneous computing nodes related to autonomous driving, such as various sensors, central computing nodes, microcontroller unit (MCU) control nodes, power management nodes and safety monitoring nodes. Maintaining high-precision time synchronization between these nodes is a basic and necessary condition for the safe and reliable operation of autonomous driving perception, positioning and fusion control algorithms. In addition, in addition to ensuring the time synchronization of nodes related to autonomous driving, it is also necessary to provide accurate world standard time services for other businesses involved in the autonomous driving system (such as management business) to meet the needs of real time records for businesses such as security audits, maintenance logs, and real-time cloud upload of driving data.

[0004] In the prior art, in order to achieve the goal of high-precision time synchronization in the autonomous driving system, there are a variety of mature time synchronization protocols and standards according to the different communication buses and protocol types used. Regardless of the protocol or standard based on which time synchronization is achieved, a stable and reliable global unified time source is required to provide a time synchronization benchmark for each subnode in the autonomous driving system. In the current autonomous driving system, the time signal of the Global Navigation Satellite System (GNSS) is generally tracked as the master clock of the entire system (i.e., the global root clock) to provide a time benchmark for other nodes. When the GNSS signal is available, the local clock is adjusted to keep in sync with the GNSS time source. When the GNSS signal is not available, the system time is completely dependent on the free oscillation of the crystal oscillator to maintain operation. In the process of tracking the GNSS signal, the GNSS signal may not be received, blocked, or received incorrectly; and due to the instability of the GNSS signal, time jumps often occur during vehicle driving, affecting the safety and reliability of the autonomous driving algorithm, bringing serious potential safety hazards to the safety of autonomous driving, and even causing serious traffic accidents.

[0005] Therefore, how to provide a stable and reliable global time source benchmark for the autonomous driving system to ensure the safe operation of the autonomous driving system and meet the system's demand for world standard time is an urgent problem to be solved. Summary of the invention

[0006] The embodiments of the present invention provide a method and device for providing a time source for autonomous driving, which can provide a stable and reliable global time source reference for the autonomous driving system, ensure the safe operation of the autonomous driving system, and meet the system's requirements for world standard time.

[0007] In a first aspect, an embodiment of the present invention provides a device for providing a time source for autonomous driving, which is applied to an autonomous driving system of a vehicle, comprising: a first processor, and a first crystal oscillator connected to the first processor; wherein:

[0008] The first processor is used to provide a first time source to a first subsystem of the autonomous driving system through the first crystal oscillator, and to provide a second time source to a second subsystem of the autonomous driving system according to a received satellite time signal; the first subsystem is used to process driving business-related data of the vehicle; and the second subsystem is used to process management-related data of the vehicle.

[0009] In an embodiment of the present invention, independent time sources are provided to different subsystems (including a first subsystem and a second subsystem); wherein the first time source is used to provide a time source to the first subsystem (e.g., a driving service subsystem related to autonomous driving decision-making, control, and perception) as the master clock of the first subsystem; and the second time source is used to provide a time source to the second subsystem (e.g., a management subsystem related to security auditing, maintenance and measurement log recording, and cloud-based driving data) as the master clock of the second subsystem. The above two sets of independent clock sources operate in the corresponding clock systems, respectively, to provide reference time for other nodes in their respective clock systems. Specifically, after obtaining the startup time, the first time source does not rely on the GNSS signal even if the GNSS signal can be received, but only maintains the accuracy of the time in the system through the first crystal oscillator (hereinafter referred to as the first crystal oscillator, for example, an onboard high-precision temperature compensated crystal oscillator); the second time source tracks the GNSS clock provided by the satellite when the vehicle can receive the satellite time signal (i.e., the GNSS signal). The embodiment of the present invention achieves the functions of isolating the time sources from each other, operating independently, and not affecting each other by providing two independent time sources and corresponding clock systems; thereby ensuring that the clock (or time source) that the first subsystem relies on is not affected by external factors in any driving scenario, and providing continuous and stable time synchronization services for nodes such as internal algorithms and external sensors. It solves the problems of unreliable, unstable, and unsafe time sources in the current time synchronization scheme of autonomous driving systems, avoids the problem of time jumps that are prone to occur in the time synchronization tracking process, and meets the time requirements of security audits, digital certificate validity checks, and driving data cloud uploads, ensuring that no matter what scenario the autonomous driving vehicle is running in, it provides a stable and reliable global time source benchmark and time service for the autonomous driving system, ensuring the safe operation of the autonomous driving system and meeting the system's requirements for world standard time.

[0010] In a possible implementation manner, the first processor is further configured to:

[0011] In the case where the satellite time signal is not received, the second time source is provided to the second subsystem through the first crystal oscillator. In the embodiment of the present invention, in the case where the vehicle cannot receive the satellite signal GNSS signal, the second time source is provided to the corresponding clock system through the first crystal oscillator; therefore, in the case where the vehicle cannot receive the satellite signal GNSS, receives an erroneous satellite signal, or receives an unstable satellite signal, the time source that the first subsystem relies on is still reliable, avoiding the problem of unstable time in the subsystem due to signal reasons.

[0012] In a possible implementation, the device further includes a signal receiving module connected to the first processor; the signal receiving module is used to provide a reference frequency to the second time source according to the satellite time signal when the satellite time signal is received; the first processor is specifically used to: generate the second time source according to the reference frequency, and provide the second time source to the second subsystem. In an embodiment of the present invention, a satellite signal (satellite signal may include a satellite time signal) is received by a signal receiving module; and the GNSS time of the satellite is obtained according to the time information contained in the received satellite time signal, so as to ensure that when the satellite time signal is available, the time of each distributed subsystem of the autonomous driving system can be adjusted according to the world standard time to prevent the time error caused by the crystal oscillator offset.

[0013] In a possible implementation, the device further includes: a first clock module connected to the first processor; the first clock module is used to synchronize a third time source based on the second time source according to a preset adjustment period, and the third time source is a time source provided by the first clock module. In an embodiment of the present invention, by using the second time source (i.e., GNSS clock) during the vehicle's automatic driving process, the third time source (i.e., RTC clock) is periodically adjusted to keep the RTC clock synchronized with the GNSS clock, so as to ensure that after each vehicle start, the time of the automatic driving system is less different from the UTC time, effectively preventing the time of the first time source from drifting infinitely.

[0014] In a possible implementation manner, the first processor is further configured to:

[0015] Determine frequency ratios of three groups of time sources, wherein the frequency ratios of the three groups of time sources include a first frequency ratio of the first time source to the second time source, a second frequency ratio of the first time source to the third time source, and a third frequency ratio of the second time source to the third time source;

[0016] Determine a frequency ratio difference value of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each group of the three groups of time sources, wherein the frequency ratio difference values ​​of the three groups of time sources include a first frequency ratio difference value between the first frequency ratio and a historical first frequency ratio, a second frequency ratio difference value between the second frequency ratio and a historical second frequency ratio, and a third frequency ratio difference value between the third frequency ratio and a historical third frequency ratio;

[0017] According to the first frequency ratio difference, the second frequency ratio difference and the third frequency ratio difference, it is determined that the crystal oscillator frequency corresponding to the target time source in the first time source, the second time source or the third time source deviates from a preset frequency range.

[0018] The embodiment of the present invention uses a preset algorithm to regularly collect frequency ratio changes of three groups of clocks (i.e., three groups of time sources, including a first time source, a second time source, and a third time source) at a fixed period to monitor the operating status of the onboard crystal oscillator; and monitors whether the three time sources are reliable by determining whether the crystal oscillator of any of the three clocks fails.

[0019] In a possible implementation manner, the first processor is specifically configured to:

[0020] By formula

[0021]

[0022]

[0023]

[0024] Determine the first frequency ratio FR1, the second frequency ratio FR2 and the third frequency ratio FR3; wherein OS_CLK Frequency is the clock frequency of the first time source; GNSS_CLK Frequency is the clock frequency of the second time source; RTC_CLK Freauency is the clock frequency of the third time source.

[0025] In an embodiment of the present invention, the clock frequencies of the first time source, the second time source and the third time source are first determined, and then three sets of frequency ratios of the first time source, the second time source and the third time source are determined according to the above formula; it is convenient to determine the deviations of the three time sources from the historical frequency ratios according to the frequency ratios and the latest historical frequency ratios, so as to find failed time sources with excessive deviations.

[0026] In a possible implementation manner, the first processor is specifically configured to:

[0027] By formula

[0028] ΔFR1=abs(FR1-FR1 AVG )

[0029] ΔFR2=abs(FR2-FR2 AVG )

[0030] ΔFR3=abs(FR3-FR3 AVG )

[0031] Determine the first frequency ratio difference ΔFR1, the second frequency ratio difference ΔFR2 and the third frequency ratio difference ΔFR3; wherein abs(FR1-FR1 AVG) is the absolute value of the difference between the first frequency ratio and the historical first frequency ratio; abs(FR2-FR2 AVG ) is the absolute value of the difference between the second frequency ratio and the historical second frequency ratio; abs(FR3-FR3 AVG ) is the absolute value of the difference between the third frequency ratio and the historical third frequency ratio. In the embodiment of the present invention, after calculating the three sets of frequency ratios, the difference between the frequency ratio and the corresponding historical frequency is used to determine the degree of deviation of the calculated current frequency ratio from the historical average. According to the degree of deviation and the voting principle, the time source with the most obvious deviation is determined as an invalid time source, which is conducive to adjusting the time source.

[0032] In a possible implementation manner, the first processor is further configured to:

[0033] According to a preset measurement period, determining a kth first frequency ratio, a kth second frequency ratio, and a kth third frequency ratio, until N first frequency ratios, N second frequency ratios, and N third frequency ratios are determined; 0<k≤N, k is an integer;

[0034] According to the N first frequency ratios, the N second frequency ratios and the N third frequency ratios, the historical frequency ratio corresponding to each of the three groups of frequency ratios is determined, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and a third historical frequency ratio corresponding to the third frequency ratio. In an embodiment of the present invention, the historical frequency ratio corresponding to each group of frequency ratios is calculated based on a plurality of three groups of frequency ratios collected historically, and is subsequently used as a comparison with the current frequency ratio.

[0035] In a possible implementation manner, the first processor is specifically configured to:

[0036] By formula

[0037]

[0038]

[0039]

[0040] Determine the first historical frequency ratio FR1 AVG The second historical frequency ratio FR2 AVG , the third historical frequency ratio FR3 AVG ; Among them, fr11, fr12, fr13, ..., fr1 NThey are the 1st first frequency ratio, the 2nd first frequency ratio, the 3rd first frequency ratio, ..., the Nth first frequency ratio; fr21, fr22, fr23, ..., fr2 N They are respectively the first second frequency ratio, the second second frequency ratio, the third second frequency ratio, ..., the Nth second frequency ratio; fr31, fr32, fr33, ..., fr3 N They are the first third frequency ratio, the second third frequency ratio, the third third frequency ratio, ..., the Nth third frequency ratio. In the embodiment of the present invention, the above formula is used to first accumulate multiple historical frequency ratios corresponding to each group of frequency ratios, and then the sum of the accumulated historical frequency ratios is divided by the number of samples to obtain the accurate historical frequency ratio corresponding to each group. Based on the historical frequency ratios, it is determined whether the frequency ratios of the current three groups of time sources are normal, so as to invent abnormal time sources that deviate from the range.

[0041] In a possible implementation, the device further includes: a second processor connected to the first processor, wherein the second processor is a backup processor of the first processor; the second processor is also connected to a second crystal oscillator and a second clock module respectively; the second crystal oscillator is a backup crystal oscillator of the first crystal oscillator; the second clock module is a backup module of the first clock module. In an embodiment of the present invention, by setting a backup system on chip (including a backup processor (i.e., the second processor), a temperature compensated crystal oscillator (i.e., the second crystal oscillator), and an RTC clock chip (i.e., the second clock module), etc.), a dual-chip system disaster recovery backup root clock solution is provided, that is, under normal circumstances, the backup processor is in a silent state, and when a switch between the primary and backup processors occurs, the backup processor takes over the primary processor to provide clock services for other nodes in the corresponding system.

[0042] In a possible implementation, the first subsystem is used to process the driving business-related data of the vehicle; the second subsystem is used to process the management-related data of the vehicle. In an embodiment of the present invention, the driving business-related data of the vehicle includes data processed or involved by various sensors, central computing nodes, MCU control nodes, power management nodes, and security monitoring nodes. The management-related data includes data involving real time such as security audits, digital certificate validity checks, and real-time cloud upload of driving data. Among them, the first subsystem is specifically used to execute the driving business logic of the core algorithms of the autonomous driving system, such as autonomous driving perception, fusion and path planning, as well as vehicle control command generation and issuance; the second subsystem is specifically used for the issuance of autonomous driving business configuration data, as well as the related business logic of monitoring and recording the operating status of autonomous driving services, such as equipment management, logging, vehicle-mounted black boxes, and security audits.

[0043] In a possible implementation, the first crystal oscillator is a temperature compensated crystal oscillator. In the embodiment of the present invention, when no satellite time signal is received, the onboard high-precision temperature compensated crystal oscillator provides an accurate oscillation frequency to the target time source (such as the first time source) as an input pulse signal of the clock.

[0044] In a second aspect, an embodiment of the present invention provides a method for providing a time source for autonomous driving, which is applied to an autonomous driving system of a vehicle, and the method includes:

[0045] A first time source is provided to a first subsystem of the autonomous driving system through a first crystal oscillator, and a second time source is provided to a second subsystem of the autonomous driving system based on a received satellite time signal; the first subsystem is used to process driving business-related data of the vehicle; and the second subsystem is used to process management-related data of the vehicle.

[0046] In a possible implementation, the method further includes:

[0047] In the event that the satellite time signal is not received, the second time source is provided to the second subsystem via the first crystal oscillator.

[0048] In a possible implementation, providing a second time source to a second subsystem of the autonomous driving system according to the received satellite time signal includes:

[0049] Using the satellite time signal as the reference frequency of the second time source to generate the second time source, wherein the satellite time signal is received by a signal receiving module;

[0050] The second time source is provided to the second subsystem.

[0051] In a possible implementation, the method further includes:

[0052] According to a preset adjustment period, a third time source is synchronized based on the second time source, and the third time source is a time source provided by the first clock module.

[0053] In a possible implementation, the method further includes:

[0054] Determine frequency ratios of three groups of time sources, wherein the frequency ratios of the three groups of time sources include a first frequency ratio of the first time source to the second time source, a second frequency ratio of the first time source to the third time source, and a third frequency ratio of the second time source to the third time source;

[0055] Determine a frequency ratio difference value of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each group of the three groups of time sources, wherein the frequency ratio difference values ​​of the three groups of time sources include a first frequency ratio difference value between the first frequency ratio and a historical first frequency ratio, a second frequency ratio difference value between the second frequency ratio and a historical second frequency ratio, and a third frequency ratio difference value between the third frequency ratio and a historical third frequency ratio;

[0056] According to the first frequency ratio difference, the second frequency ratio difference and the third frequency ratio difference, it is determined that the crystal oscillator frequency corresponding to the target time source in the first time source, the second time source or the third time source deviates from the preset frequency range.

[0057] In a possible implementation manner, determining the frequency ratios of the three groups of time sources includes:

[0058] By formula

[0059]

[0060]

[0061]

[0062] Determine the first frequency ratio FR1, the second frequency ratio FR2 and the third frequency ratio FR3; wherein OS_CLK Frequency is the clock frequency of the first time source; GNSS_CLK Frequency is the clock frequency of the second time source; RTC_CLK Freauency is the clock frequency of the third time source.

[0063] In a possible implementation, determining the frequency ratio differences of the three groups of time sources according to the frequency ratios of the three groups of time sources and the historical frequency ratios corresponding to each of the three groups of frequency ratios includes:

[0064] By formula

[0065] ΔFR1=abs(FR1-FR1 AVG )

[0066] ΔFR2=abs(FR2-FR2 AVG )

[0067] ΔFR3=abs(FR3-FR3 AVG )

[0068] Determine the first frequency ratio difference ΔFR1, the second frequency ratio difference ΔFR2 and the third frequency ratio difference ΔFR3; wherein abs(FR1-FR1AVG ) is the absolute value of the difference between the first frequency ratio and the historical first frequency ratio; abs(FR2-FR2 AVG ) is the absolute value of the difference between the second frequency ratio and the historical second frequency ratio; abs(FR3-FR3 AVG ) is the absolute value of the difference between the third frequency ratio and the historical third frequency ratio.

[0069] In a possible implementation, the method further includes:

[0070] According to a preset measurement period, determining a kth first frequency ratio, a kth second frequency ratio, and a kth third frequency ratio, until N first frequency ratios, N second frequency ratios, and N third frequency ratios are determined; 0<k≤N, k is an integer;

[0071] According to the N first frequency ratios, the N second frequency ratios and the N third frequency ratios, the historical frequency ratio corresponding to each of the three groups of frequency ratios is determined, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and a third historical frequency ratio corresponding to the third frequency ratio.

[0072] In a possible implementation manner, determining, according to the N first frequency ratios, the N second frequency ratios, and the N third frequency ratios, a historical frequency ratio corresponding to each of the three groups of frequency ratios includes:

[0073] By formula

[0074]

[0075]

[0076]

[0077] Determine the first historical frequency ratio FR1 AVG The second historical frequency ratio FR2 AVG , the third historical frequency ratio FR3 AVG ; Among them, fr11, fr12, fr13, ..., fr1 N They are the 1st first frequency ratio, the 2nd first frequency ratio, the 3rd first frequency ratio, ..., the Nth first frequency ratio; fr21, fr22, fr23, ..., fr2 N They are respectively the first second frequency ratio, the second second frequency ratio, the third second frequency ratio, ..., the Nth second frequency ratio; fr31, fr32, fr33, ..., fr3 NThey are respectively the 1st third frequency ratio, the 2nd third frequency ratio, the 3rd third frequency ratio, ..., the Nth third frequency ratio.

[0078] In a possible implementation manner, the first crystal oscillator is a temperature compensated crystal oscillator.

[0079] In a third aspect, an embodiment of the present invention provides another device for providing a time source for autonomous driving, including:

[0080] The first time source unit is used to provide a first time source to a first subsystem of the autonomous driving system through a first crystal oscillator, and to provide a second time source to a second subsystem of the autonomous driving system according to the received satellite time signal.

[0081] In a possible implementation manner, the apparatus further includes a second time source unit, configured to:

[0082] In case the satellite time signal is not received, the second time source is provided to the second subsystem via a first crystal oscillator.

[0083] In a possible implementation manner, the first time source unit is specifically configured to:

[0084] Using the satellite time signal as the reference frequency of the second time source to generate the second time source, wherein the satellite time signal is received by a signal receiving module;

[0085] The second time source is provided to the second subsystem.

[0086] In a possible implementation manner, the device further includes an adjustment unit, configured to:

[0087] According to a preset adjustment period, a third time source is synchronized based on the second time source, and the third time source is a time source provided by the first clock module.

[0088] In a possible implementation manner, the device further includes:

[0089] a calculation unit, configured to determine frequency ratios of three groups of time sources, wherein the frequency ratios of the three groups of time sources include a first frequency ratio of the first time source to the second time source, a second frequency ratio of the first time source to the third time source, and a third frequency ratio of the second time source to the third time source;

[0090] a comparing unit, configured to determine a frequency ratio difference value of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each of the three groups of time sources, wherein the frequency ratio difference values ​​of the three groups of time sources include a first frequency ratio difference value between the first frequency ratio and a historical first frequency ratio, a second frequency ratio difference value between the second frequency ratio and a historical second frequency ratio, and a third frequency ratio difference value between the third frequency ratio and a historical third frequency ratio;

[0091] A determination unit is used to determine whether the crystal oscillator frequency corresponding to the target time source in the first time source, the second time source or the third time source deviates from a preset frequency range based on the first frequency ratio difference, the second frequency ratio difference and the third frequency ratio difference.

[0092] In a possible implementation manner, the computing unit is specifically configured to:

[0093] By formula

[0094]

[0095]

[0096]

[0097] Determine the first frequency ratio FR1, the second frequency ratio FR2 and the third frequency ratio FR3; wherein OS_CLK Frequency is the clock frequency of the first time source; GNSS_CLK Freauency is the clock frequency of the second time source; RTC_CLK Freauency is the clock frequency of the third time source.

[0098] In a possible implementation, the comparison unit is specifically configured to:

[0099] By formula

[0100] ΔFR1=abs(FR1-FR1 AVG )

[0101] ΔFR2=abs(FR2-FR2 AVG )

[0102] ΔFR3=abs(FR3-FR3 AVG )

[0103] Determine the first frequency ratio difference ΔFR1, the second frequency ratio difference ΔFR2 and the third frequency ratio difference ΔFR3; wherein abs(FR1-FR1 AVG) is the absolute value of the difference between the first frequency ratio and the historical first frequency ratio; abs(FR2-FR2 AVG ) is the absolute value of the difference between the second frequency ratio and the historical second frequency ratio; abs(FR3-FR3 AVG ) is the absolute value of the difference between the third frequency ratio and the historical third frequency ratio.

[0104] In a possible implementation manner, the device further includes:

[0105] A measuring unit, used to determine the kth first frequency ratio, the kth second frequency ratio and the kth third frequency ratio according to a preset measurement period, until N first frequency ratios, N second frequency ratios and N third frequency ratios are determined; 0<k≤N, k is an integer;

[0106] a historical frequency ratio unit, for determining, according to the N first frequency ratios, the N second frequency ratios and the N third frequency ratios, a historical frequency ratio corresponding to each of the three groups of frequency ratios, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and a third historical frequency ratio corresponding to the third frequency ratio.

[0107] In a possible implementation manner, the historical frequency ratio unit is specifically used to:

[0108] By formula

[0109]

[0110]

[0111]

[0112] Determine the first historical frequency ratio FR1 AVG The second historical frequency ratio FR2 AVG , the third historical frequency ratio FR3 AVG ; Among them, fr11, fr12, fr13, ..., fr1 N They are the 1st first frequency ratio, the 2nd first frequency ratio, the 3rd first frequency ratio, ..., the Nth first frequency ratio; fr21, fr22, fr23, ..., fr2 N They are respectively the first second frequency ratio, the second second frequency ratio, the third second frequency ratio, ..., the Nth second frequency ratio; fr31, fr32, fr33, ..., fr3 N They are respectively the 1st third frequency ratio, the 2nd third frequency ratio, the 3rd third frequency ratio, ..., the Nth third frequency ratio.

[0113] In a possible implementation manner, the first crystal oscillator is a temperature compensated crystal oscillator.

[0114] In a fourth aspect, the present application provides a device for providing a time source for autonomous driving, and the device for providing a time source has the function of implementing any of the above methods for providing a time source. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0115] In a fifth aspect, the present application provides a terminal, the terminal including a processor, the processor being configured to support the terminal to perform the corresponding functions in a method for providing a time source provided in the second aspect. The terminal may also include a memory, the memory being coupled to the processor, which stores necessary program instructions and data for the terminal. The terminal may also include a communication interface for the terminal to communicate with other devices or a communication network.

[0116] In a sixth aspect, the present application provides a chip system, which can execute any method involved in the second aspect above, so that the relevant functions can be realized. In a possible design, the chip system also includes a memory, which is used to store necessary program instructions and data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0117] In the seventh aspect, the present application provides a vehicle, which is equipped with the device for providing a time source as described in the first aspect and the corresponding automatic driving system, and can be used to execute any method involved in the second aspect, so that the relevant functions can be realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0118] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below.

[0119] Figure 1 is a schematic diagram of the architecture of an autonomous driving vehicle provided by an embodiment of the present invention;

[0120] Figure 2 is a schematic diagram of an autonomous driving hardware architecture provided by an embodiment of the present invention;

[0121] Figure 3 It is a hardware logic architecture diagram provided by an embodiment of the present invention;

[0122] Figure 4 It is a schematic diagram of a hardware structure principle provided by an embodiment of the present invention;

[0123] Figure 5It is a schematic diagram of a principle of providing a time source for autonomous driving provided by an embodiment of the present invention;

[0124] Figure 6 It is another schematic diagram of the principle of providing a time source for autonomous driving provided by an embodiment of the present invention;

[0125] Figure 7 is a flow chart of a method for providing a time source for autonomous driving provided by an embodiment of the present invention;

[0126] Figure 8 This is a schematic diagram of generating a time source provided by an embodiment of the present invention;

[0127] Fig. 9 is another schematic diagram of generating a time source provided by an embodiment of the present invention;

[0128] Fig.10 This is a schematic diagram of a startup time setting provided by an embodiment of the present invention;

[0129] Fig.11 This is a schematic diagram of a main and standby SOC connection provided by an embodiment of the present invention;

[0130] Fig.12 It is a schematic diagram of a time source adjustment process provided by an embodiment of the present invention;

[0131] Fig.13 is a structural schematic diagram of a device for providing a time source for autonomous driving provided by an embodiment of the present invention;

[0132] Fig.14 is a schematic diagram of the structure of a chip provided by an embodiment of the present invention;

[0133] Fig.15 It is a schematic diagram of a vehicle provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0134] The embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0135] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0136] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0137] As used in this specification, the terms "component", "module", "system", etc. are used to refer to computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside in a process and / or execution thread, and a component can be located on one computer and / or distributed between two or more computers.

[0138] First, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0139] (1) Crystal oscillator, referred to as crystal oscillator, refers to a crystal element that adds an integrated circuit inside the package to form an oscillation circuit. It should be noted that the crystal oscillators mentioned in this application all refer to the above-mentioned crystal oscillators. Crystal oscillators include several types such as non-temperature compensated crystal oscillators, temperature compensated crystal oscillators (Temperature Compensate X′tal (crystal) Oscillator, TCXO), voltage-controlled crystal oscillators, and constant temperature controlled crystal oscillators. Among them, a temperature compensated crystal oscillator (hereinafter referred to as a temperature compensated crystal oscillator) is a quartz crystal oscillator that reduces the oscillation frequency change caused by ambient temperature changes through an additional temperature compensation circuit.

[0140] (2) Coordinated Universal Time (CUT), also known as the world unified time, world standard time, and international coordinated time. Due to the different abbreviations in English and French, it can also be referred to as UTC. UTC or CUT mentioned in this application refers to the above-mentioned Coordinated Universal Time. Coordinated Universal Time is a time measurement system based on the length of atomic time seconds and is as close to the world time as possible in terms of time.

[0141] (3) Real-time clock (RTC) is an integrated circuit, usually called a clock chip or real-time clock chip, which provides an accurate time reference for electronic systems. Currently, most real-time clock chips use a high-precision crystal oscillator as the clock source. Some clock chips require an external battery to continue to work when the main power is off.

[0142] (4) System-on-a-chip (SoC) refers to a technology that integrates a complete system on a single chip and packages all or part of the necessary electronic circuits. The so-called complete system generally includes a processor, memory, and peripheral circuits. SoC is developed in parallel with other technologies, such as insulator silicon, which can provide enhanced clock frequency and thus reduce the power consumption of microchips.

[0143] (5) A multi-core CPU integrates multiple CPU cores into a single chip. Each CPU core is a separate processor. Each CPU core can have its own cache, or multiple CPU cores can share the same cache.

[0144] (6) Serial Peripheral Interface (SPI) is a high-speed, full-duplex, synchronous communication bus that occupies only four wires on the chip pins, saving chip pins and saving space on the printed circuit board layout, providing convenience.

[0145] (7) Inter-Integrated Circuit (IIC) is a serial data bus with only two signal lines, one is a bidirectional data line and the other is a clock line. The two lines can connect multiple devices. IIC devices (most of them) have a fixed address and will only respond when the value transmitted on the two lines is equal to the fixed address of the IIC device. IIC devices are usually divided into master devices and slave devices.

[0146] (8) Controller Area Network (CAN) is an internationally standardized serial communication protocol specified by the International Organization for Standardization. Distributed control systems based on the CAN bus have obvious advantages in the following aspects: strong real-time data communication between network nodes; short development cycle; and an internationally standardized field bus.

[0147] (9) LAN switches are devices used for data exchange in a switched LAN. In a switched LAN, after using switches, as long as the source node and destination node of the data do not conflict, the data transmission is completely parallel, which increases the data transmission rate.

[0148] (10) The generalized time precision protocol (gPTP) is defined by IEEE 802.1AS. It adds some features based on the precision time protocol to improve time accuracy and lock time.

[0149] (11) Pulse Per Second (PPS). In the global satellite positioning system GPS, the GPS second pulse signal PPS is one second. Its function is to indicate the moment of the whole second, which is usually marked by the rising edge of the PPS second pulse. GPS can give the UTC time, but there will be a delay when the user receives it. In order to accurately synchronize time, the rising edge of the PPS signal is introduced to mark the whole second of UTC. The accuracy is very high, down to the nanosecond level, and there is no cumulative error.

[0150] (12) Time-Sensitive Networking (TSN), also known as time-sensitive networking, is a series of standards developed by the TSN working group in the IEEE802.1 working group. This standard defines the mechanism for time-sensitive transmission on Ethernet.

[0151] (13) Application Programming Interface (API) is a set of predefined functions or agreements that connect different components of a software system. It provides application and developer access to a set of routines based on a certain software or hardware without accessing the original code or understanding the details of the internal working mechanism. Kernel state and user state are two operating levels of the operating system. Kernel state has high permissions and user state has low permissions. Therefore, kernel state interfaces have high permissions and user state interfaces have low permissions.

[0152] (14) Complex Programmable Logic Device (CPLD) uses programming technologies such as CMOS EPROM, EEPROM, flash memory and SRAM to form a high-density, high-speed and low-power programmable logic device.

[0153] Next, we will describe one of the application architectures on which the embodiments of the present invention are based. Figure 1 , Figure 11 is a schematic diagram of an architecture of an autonomous driving vehicle provided by an embodiment of the present invention, and the method and device for providing a time source proposed in this application can be applied to the architecture. The architecture of the vehicle 100 may include a computer system 110 (including a processor 111 and a memory 112), a travel system 120, a sensor system 130, a control system 140, a peripheral device 150, a user interface 170, and a power supply 160, etc.; Figure 1 The various components shown are only exemplary descriptions, and the actual architecture may include but is not limited to the above components. Among them, the method and device for providing a time source can be applied to the processor 111 in the architecture. The memory 112 can store relevant programs or codes for executing the method for providing a time source. Optionally, the vehicle 100 may include more or fewer subsystems, and each subsystem may include multiple elements. In addition, each subsystem and element of the vehicle 100 can be interconnected by wire or wirelessly.

[0154] Among them, the travel system 102 may include components that provide powered movement for the vehicle 100. In one embodiment, the travel system 102 may include an engine, an energy source, a transmission and wheels / tires. The engine may be an internal combustion engine, an electric motor, an air compression engine or other types of engine combinations, such as a hybrid engine consisting of a gas-oil engine and an electric motor, and a hybrid engine consisting of an internal combustion engine and an air compression engine. The engine converts the energy source into mechanical energy. The energy source may include gasoline, diesel, other petroleum-based fuels, propane, other compressed gas-based fuels, ethanol, solar panels, batteries and other sources of electricity. The energy source may also provide energy for other systems of the vehicle 100. The transmission may transmit mechanical power from the engine to the wheels. The transmission may include a gearbox, a differential and a drive shaft. In one embodiment, the transmission may also include other devices, such as a clutch. Among them, the drive shaft may include one or more shafts that can be coupled to one or more wheels.

[0155] The sensing system 130 may include several sensors that sense information about the environment around the vehicle 100. For example, the sensing system 130 may include a positioning system (the positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a radar, a laser rangefinder, and a camera. The sensing system 130 may also include sensors of the internal systems of the monitored vehicle 100 (e.g., an in-vehicle air quality monitor, a fuel gauge, an oil temperature gauge, etc.). Sensor data from one or more of these sensors may be used to detect objects and their corresponding characteristics (position, shape, direction, speed, etc.). Such detection and recognition are key functions for the safe operation of the autonomous vehicle 100. The positioning system may be used to estimate the geographic location of the vehicle 100. The IMU is used to sense the position and orientation changes of the vehicle 100 based on inertial acceleration. In one embodiment, the IMU may be a combination of an accelerometer and a gyroscope. The radar may use radio signals to sense objects in the surrounding environment of the vehicle 100. In some embodiments, in addition to sensing objects, the radar may also be used to sense the speed and / or direction of travel of the object. The laser rangefinder may utilize lasers to sense objects in the environment in which the vehicle 100 is located. In some embodiments, the laser rangefinder may include one or more laser sources, a laser scanner, and one or more detectors, among other system components. The camera may be used to capture multiple images of the surrounding environment of the vehicle 100. The camera may be a still camera or a video camera.

[0156] The control system 140 is for controlling the operation of the vehicle 100 and its components. The control system 140 may include various components, including a steering system, a throttle, a brake unit, a computer vision system, a route control system, and an obstacle avoidance system. The steering system is operable to adjust the forward direction of the vehicle 100. For example, in one embodiment, it may be a steering wheel system. The throttle is used to control the operating speed of the engine and thus control the speed of the vehicle 100. The brake unit is used to control the deceleration of the vehicle 100. The brake unit may use friction to slow down the wheel. In other embodiments, the brake unit may convert the kinetic energy of the wheel into an electric current. The brake unit may also take other forms to slow down the wheel speed to control the speed of the vehicle 100. The computer vision system may be operated to process and analyze the images captured by the camera in order to identify objects and / or features in the surrounding environment of the vehicle 100. The objects and / or features may include traffic signals, road boundaries, and obstacles. The computer vision system may use object recognition algorithms, Structure from Motion (SFM) algorithms, video tracking, and other computer vision technologies. In some embodiments, the computer vision system may be used to map the environment, track objects, estimate the speed of objects, and the like. The route control system is used to determine the driving route of the vehicle 100. In some embodiments, the route control system may combine data from sensors, GPS, and one or more predetermined maps to determine the driving route for the vehicle 100.

[0157] The obstacle avoidance system is used to identify, evaluate and avoid or otherwise navigate potential obstacles in the environment of the vehicle 100. Of course, in one example, the control system 140 may include additional or alternative components other than those shown and described. Alternatively, some of the components shown above may be reduced.

[0158] The vehicle 100 interacts with external sensors, other vehicles, other computer systems, or users through the peripheral device 150. The peripheral device 150 may include a wireless communication system, an onboard computer, a microphone, and / or a speaker. In some embodiments, the peripheral device 150 provides a means for the user of the vehicle 100 to interact with the user interface 170. For example, the onboard computer may provide information to the user of the vehicle 100. The user interface 170 may also operate the onboard computer to receive the user's input. The onboard computer may be operated through a touch screen. In other cases, the peripheral device 150 may provide a means for the vehicle 100 to communicate with other devices located in the vehicle. For example, the microphone may receive audio (e.g., voice commands or other audio input) from the user of the vehicle 100. Similarly, the speaker may output audio to the user of the vehicle 100. The wireless communication system may communicate wirelessly with one or more devices directly or via a communication network. For example, the wireless communication system may use 3G cellular communication, such as CDMA, EVDO, GSM / GPRS, or 4G cellular communication, such as LTE. Or 5G cellular communication. The wireless communication system 146 may communicate with a wireless local area network (WLAN) using WiFi. In some embodiments, the wireless communication system may communicate directly with the device using an infrared link, Bluetooth, or ZigBee. Other wireless protocols, such as various vehicle communication systems, for example, the wireless communication system may include one or more dedicated short range communications (DSRC) devices, which may include public and / or private data communications between vehicles and / or roadside stations.

[0159] The power source 160 can provide power to various components of the vehicle 100. In one embodiment, the power source 160 can be a rechargeable lithium-ion or lead-acid battery. One or more battery packs of such batteries can be configured as a power source to provide power to various components of the vehicle 100. In some embodiments, the power source 160 and the energy source can be implemented together, such as in some all-electric vehicles.

[0160] The user interface 170 is used to provide information to or receive information from a user of the vehicle 100. Optionally, the user interface 170 may include one or more input / output devices within the set of peripherals 150, such as a wireless communication system, a vehicle computer, a microphone, and a speaker.

[0161] Some or all functions of the vehicle 100 are controlled by a computer system 110. The computer system 110 may include at least one processor 111 that executes instructions stored in a non-transitory computer-readable medium such as a data storage device. The computer system 110 may also be a plurality of computing devices that control individual components or subsystems of the vehicle 100 in a distributed manner. The processor 111 may be any conventional processor, such as a commercially available CPU. Alternatively, the processor may be a dedicated device such as an ASIC or other hardware-based processor. A person of ordinary skill in the art will appreciate that the processor, computer, or memory may actually include multiple processors, computers, or memories that may or may not be stored in the same physical housing. For example, the memory may be a hard drive or other storage medium located in a housing different from the computer. Therefore, references to processors or computers will be understood to include references to a collection of processors or computers or memories that may or may not operate in parallel. Different from using a single processor to perform the steps described herein, some components such as steering components and deceleration components may each have their own processor that performs only calculations related to component-specific functions.

[0162] In various aspects described herein, the processor may be located remote from the vehicle and in wireless communication with the vehicle. In other aspects, some of the processes described herein are performed on a processor disposed within the vehicle and others are performed by a remote processor, including taking the necessary steps to perform a single maneuver.

[0163] Computer system 110 may control functions of vehicle 100 based on input received from various subsystems (e.g., travel system 120, sensing system 130, and control system 140) and from user interface 170. For example, computer system 110 may utilize input from control system 140 in order to control a steering unit to avoid obstacles detected by sensing system 130 and obstacle avoidance system. In some embodiments, computer system 112 may be operable to provide control over many aspects of vehicle 100 and its subsystems.

[0164] Alternatively, one or more of these components described above may be installed or associated separately from the vehicle 100 .

[0165] Optionally, the above components are only an example. In practical applications, the components in the above modules may be added or deleted according to actual needs, which should not be construed as a limitation on the embodiments of the present invention.

[0166] The vehicle 100 may be a car, truck, motorcycle, bus, ship, airplane, helicopter, lawn mower, recreational vehicle, amusement park vehicle, construction equipment, tram, golf cart, train, and cart, etc., and the embodiments of the present invention do not make any particular limitation.

[0167] Optionally, the computer system 110 may include multiple processors, and different processors process data for different businesses; for example, processor A is used to provide a time source, processor B is a backup processor of processor A, and processor C is used to calculate data related to the autonomous driving business.

[0168] Optionally, the computer system may include a processor, which is divided into multiple sub-processing modules according to its functions, and different sub-modules are used to process data of different services. For example, sub-module A is used to provide a time source, and sub-module B is used to process data related to driving logs and vehicle safety performance.

[0169] Optionally, the vehicle 100 may include one or more computer systems, for example, computer system A is a main computer system, and computer system B is a backup system of the main computer system. Optionally, the computer system may be a SOC, that is, a multifunctional integrated chip.

[0170] Understandably, Figure 1 The system in the embodiment of the present invention is only an exemplary application architecture. The application architecture in the embodiment of the present invention includes but is not limited to the above application architecture.

[0171] The following embodiment of the present invention is described by taking the vehicle circuit board deploying two chips (i.e., each chip runs a computer system, one is the main computer system (hereinafter referred to as the main system), and the other is the backup computer system (hereinafter referred to as the backup system)) as an example to form a main and backup chip. Among them, in the embodiment of the present invention, both chips can be SOCs, and the two chips can be connected through a bus. That is, the main computer system 110 and the backup computer system 110'.

[0172] See also Figure 2 , Figure 2 is a schematic diagram of an autonomous driving hardware architecture provided by an embodiment of the present invention; Figure 2 As shown, each chip integrates multiple cores (i.e., multiple processors), for example, Figure 2Processor 301, processor 302, processor 303 and processor 304 in the main system. Processor 301 in the main system is used to run the operating system (i.e., the main operating system, Master OS) running on the main computer system; processor 301' in the backup system is used to run the operating system (i.e., the backup operating system, Backup OS) running on the backup computer system; processor 303, processor 304, processor 303' and processor 304' are all exemplary descriptions, and the specific functions are not limited. Processor 302 and processor 302' are used to run the same AOOS, which refers to the operating system on a subsystem that always keeps the power-on working state in the automatic driving system. When the Master OS and Backup OS of the main and backup systems are started, the system is responsible for obtaining the time from the onboard RTC real-time clock and setting this time as the startup time of the Master OS and Backup OS. Optionally, when the main system fails, the backup system can run instead of the main system. In addition, when the main system is working normally, the backup system can also perform the same computing business as the main system to verify the calculation results of the main system.

[0173] Combination Figure 2 The main and backup system architecture and specific component logical relationships are described in detail for a hardware logical architecture involved in an embodiment of the present invention. Figure 3 , Figure 3 is a hardware logic architecture diagram provided by an embodiment of the present invention; Figure 3 As shown, the main chip (taking SOC as an example, the backup chip hereinafter is also described taking SOC as an example) 110 may include a processor 111 and a memory 112, and the processor 111 may include a processor 301 (i.e., processor 1), a processor 302 (i.e., processor 2), a processor 303 (i.e., processor 3) and a processor 304 (i.e., processor 4);

[0174] The processor 301 is used to run the Master OS, and the processor 2 is used to run the AO OS.

[0175] Processor 303 is used to calculate business data related to autonomous driving; the business data related to autonomous driving includes data processed or involved by various sensors, central computing nodes, MCU control nodes, power management nodes, and safety monitoring nodes. Specifically, the aforementioned business data involves the driving business logic of the core algorithms of the autonomous driving system, such as the execution of autonomous driving perception, fusion and path planning, as well as the generation and issuance of vehicle control commands;

[0176] Processor 304 is used to calculate management data related to audit, log, and cloud-based driving data. The relevant management data includes real-time data such as security audit, digital certificate validity check, and real-time cloud-based driving data. Specifically, the aforementioned management data involves the process of issuing configuration data for autonomous driving services, as well as the relevant business logic for monitoring and recording the operating status of autonomous driving services, such as device management, log recording, vehicle-mounted black box, and security audit.

[0177] The main SOC may also include one or more processors, memories and other functional components or modules, such as a graphics processing unit (GPU), a random access memory (RAM) and an encoder. The main SOC is connected to a signal receiving module (such as a GNSS module), an end node 307 ( Figure 3 The example lists end nodes 1, end nodes 2, ..., end nodes Q, where Q is an integer greater than 0; the main SOC provides a time reference to multiple end nodes, and the embodiment of the present invention does not limit the specific connection method; wherein the end node may be an end node (End Point, EP) that requires time synchronization, such as sensors such as vehicle-mounted laser radars and millimeter-wave radars), a first crystal oscillator 305 (the first crystal oscillator may be a high-precision temperature-compensated crystal oscillator), and a clock module (such as an RTC real-time clock chip). Optionally, the main SOC may also be connected to the backup SOC for communication and interaction between chips.

[0178] Optionally, the backup processor (i.e., standby SOC) can run simultaneously when the main processor (i.e., main SOC) is working normally, and is used to process the same business as the main SOC; for example, the first time source of the backup SOC tracks the first time source of the main SOC, and compares the time-related calculation results of the backup with the time-related calculation of the main SOC to verify the time accuracy of the first time source in the main SOC. When the main processor fails, stop tracking the first time source of the main SOC.

[0179] It should be noted that the standby SOC110' is connected to a temperature compensated crystal oscillator (i.e., a second crystal oscillator), an RTC clock chip (i.e., a second clock module), and a signal receiving module 308; at the same time, the standby SOC is also connected to one or more end nodes, but does not provide a time reference to each end node EP when the main SOC is operating normally.

[0180] exist Figure 3Based on the hardware logic architecture shown, the following describes the relevant hardware structure of the main SOC involved in the embodiment of the present invention and the method of providing a time source for autonomous driving; the relevant principles and methods of the backup SOC can refer to the main SOC, and the backup SOC and the connection between it and the main SOC are not repeated here.

[0181] See also Figure 4 , Figure 4 Schematic diagram of a hardware structure principle provided by an embodiment of the present invention; Figure 4 As shown, in the embodiment of the present invention, the first crystal oscillator is a temperature compensated crystal oscillator, the first clock module is an RTC clock chip (i.e., a real-time clock chip), the satellite signal receiving module (or signal receiving module) can be a GNSS module, and the end node EP takes a sensor as an example; in the embodiment of the present invention, the hardware structure of the main SOC includes a processor 301, a processor 302, a processor 303, a processor 304, a memory 112, a bus bridge 401, a system bus 402, an I / O interface 403, a network interface 404, and the like; the main SOC is also connected to the GNSS module 308 through the illustrated I (dedicated CAN bus) for receiving GNSS signals; connected to the RTC clock chip 306 through the illustrated II (such as SPI or IIC bus) for obtaining real real-time time; connected to the sensor 406 through the I / O interface 403 to provide a time reference to the sensor and other end nodes 307; and connected to the temperature compensated crystal oscillator 305 on the circuit board to obtain the oscillation frequency of the temperature compensated crystal oscillator to maintain the operation of the system time. Optionally, the main SOC may also be connected to a network via a network interface to obtain required information or real-time data.

[0182] Combination Figure 4 The hardware structure shown in the figure is described below. The principle of providing a time source for autonomous driving involved in the embodiment of the present invention is described below. Figure 5 , Figure 5 is a schematic diagram of a principle of providing a time source for autonomous driving provided by an embodiment of the present invention; Figure 5The embodiment of the present invention shown in the figure is described by taking the processor 301, processor 302 (running AOOS), processor 303 and processor 304 in the main SOC 110, as well as the GNSS module (i.e., signal receiving module) 308, temperature-compensated crystal oscillator 305 and onboard RTC (i.e., onboard real-time clock chip) 306 as examples. Two sets of clocks are deployed in the processor 301 of the main SOC, namely, the first time source OS-CLK and the second time source GNSS-CLK. Regardless of whether the vehicle can receive the GNSS signal, the OS-CLK relies on the temperature-compensated crystal oscillator 305 on the board to operate; when the vehicle can obtain the GNSS signal, the GNSS-CLK tracks the GNSS time provided by the satellite according to the GNSS signal; when the GNSS signal cannot be obtained, the GNSS module is fed back by the message (the GNSS module is connected to the C interface (i.e., the CAN interface, hereinafter referred to as the C interface, and will not be described later)), and switches to relying on the temperature-compensated crystal oscillator to maintain the normal operation of the system time. When the system starts or wakes up from sleep mode, the onboard RTC provides the startup time to the main SOC and the backup SOC. The startup time is used to set the OS-CLK and GNSS-CLK in the two SOCs. Figure 5 As shown, the processor 301 sends a time synchronization message (Anounce / Sync packet) to the LAN switch (Lan Switch) through the network port M (for example, the network port M is a Ten-Gigabit Ethernet port (XGE)); the LAN switch then acts as a boundary clock to send the above time synchronization message to multiple end nodes to ensure the time synchronization of each time node. The processor 301 can also provide the OS-CLK time synchronization message to the processor 303, and provide the GNSS-CLK time synchronization message to the processor 304. It can be understood that the time stabilization principle and structure of the standby SOC are basically the same as those of the main SOC, and will not be repeated here.

[0183] Optionally, the OS-CLK of the Backup OS in the standby SOC is also used to track the OS-CLK of the Master OS in the active SOC; see Figure 6 , Figure 6 FIG. 1 is another schematic diagram of the principle of providing a time source for autonomous driving provided by an embodiment of the present invention. Figure 6As shown, processor 302 and processor 302' both run the same AOOS. Among them, the GNSS-CLK of the backup SOC has the same working principle as the GNSS-CLK in the main SOC, and the main SOC and the backup SOC are connected to the same signal receiving module (i.e., GNSS module 308). The main and backup SOCs are each connected to different temperature-compensated crystal oscillators, but because the OS-CLK of the backup SOC is based on the OS-CLK time of the main SOC (i.e., the main chip), the backup SOC (i.e., the backup chip) can be used as the secondary master clock of the OS-CLK of the main SOC when the main SOC is operating normally, and provide a time reference to other end nodes, which is equivalent to expanding the network port or port of the main OS-CLK connection node. For example, Figure 6 The Lan Switch 1 (LSW1) shown receives time synchronization messages from both the active SOC and the backup SOC. When the active SOC is operating normally, the time error provided by the backup and active SOCs is within an acceptable range and has little impact on driving services (such as the accuracy of the timestamp of sensor data collection). LSW1 can choose the time synchronization message sent by the active SOC as the standard; each LSW is connected to the corresponding network port of the active and backup SOCs at the same time. Figure 6 As shown in the figure, Lan Switch0 / Lan Switch1, as an internal switching node, also runs the gPTP protocol stack and acts as an 802.1AS boundary clock. It receives and processes gPTP messages sent by a Master port of the main plane from one of its ports, measures and calculates the deviation (time deviation and frequency deviation) between the local clock and the Master clock and the path delay based on the protocol algorithm, and adjusts the local clock and the Master clock to achieve a 10us synchronization accuracy (this step is optional, and the behavior is similar to the Transparent Clock of 1588, which only corrects the residence time of the gPTP event message and then forwards the gPTP event message), becoming the next-level Master Clock in the synchronization network. Afterwards, time synchronization messages such as Anounce and Sync can be continuously sent to the end nodes (End Points) that ultimately need time synchronization through its Master clock port, such as sensor nodes such as vehicle-mounted laser radars and millimeter-wave radars. As an End Point sensor, it runs the gPTP protocol stack software, receives and processes Anounce and Sync message packets, and calculates and adjusts the deviation between the local clock and the GMC clock and the path transmission delay based on the timestamp information carried in these packets, and adjusts the local clock time to keep it synchronized with the GMC time. Through such a clock transmission hierarchy, the time deviation of all destination nodes and the GMC time is controlled within the set range, for example, within 10us.

[0184] It should be noted that Figure 6 The content shown is Figure 5 An extension of the content shown, for Figure 6 The corresponding contents of processor 303, processor 304, and processor 302 not involved in the description will not be repeated here.

[0185] In combination with the above hardware structure and the principle of providing a time source for autonomous driving, a method for providing a time source for autonomous driving according to an embodiment of the present invention is described below. Figure 7 , Figure 7 is a flow chart of a method for providing a time source for autonomous driving provided by an embodiment of the present invention; Figure 7 As shown, the method uses processor 301 (ie, the first processor) as an execution body and may include steps S701 to S702.

[0186] Step S701: providing a first time source to a first subsystem of the autonomous driving system via a first crystal oscillator, and providing a second time source to a second subsystem of the autonomous driving system based on a received satellite time signal.

[0187] Specifically, the first subsystem is used to process the vehicle's driving business related data; the second subsystem is used to process the vehicle's management related data. Figure 8 , Figure 8 Schematic diagram of a time source generation provided by an embodiment of the present invention; Figure 8As shown, after the system is started and the GNSS module is able to receive the GNSS signal (i.e., satellite time signal), to ensure the safety of autonomous driving, the first time source (i.e., OS-CLK) completely relies on the onboard temperature-compensated crystal oscillator (e.g., with an accuracy of 10ppm) to run; the hardware clock inside the M network port is also adjusted to the same time as OS-CLK, and then through the Master port (i.e., M network port), according to the frequency required by the gPTP protocol specification, Anounce and Sync messages (i.e., time synchronization messages) are continuously sent, making OS-CLK the master clock of the entire network. When the GNSS signal is available, the reference frequency is provided for the second time source (i.e., GNSS-CLK) based on the GNSS signal, and the GNSS-CLK is adjusted to ensure that it is synchronized with the GNSS time source (i.e., the GNSS time of the satellite). After synchronization, the error between its clock and the GNSS time source is controlled within 10us. Among them, OS-CLK is dedicated to the autonomous driving computing business (i.e. the business of the first subsystem). After startup, it only relies on the onboard crystal oscillator to run, and serves as the root clock (or master clock) in the time synchronization network of the system to provide a global time source for other nodes in the autonomous driving plane. GNSS-CLK is used for vehicle management-related services (i.e. the business of the second subsystem). It can be understood that the business planes in the vehicle are basically divided into the driving plane and the management plane. The driving plane is used to process data related to vehicle driving calculations, and the management plane is used to process auditing, logging, driving data management and other related data. Both the driving plane and the management plane can be considered to contain or correspond to one or more subsystems, such as a travel system, a sensor system, and a control system, etc.

[0188] Optionally, the GNSS signal (including time position) is directly connected to the system through the CAN bus and PPS clock signal line; and both the active and standby SOCs can receive the GNSS signal. Accessing the GNSS signal in this way ensures that the GNSS-CLK of the active SOC and the standby GNSS-CLK effectively receive the GNSS signal, ensures the consistency of signal transmission, and further ensures the stability of the subsequent time source.

[0189] In a possible implementation, providing a second time source to a second subsystem of the autonomous driving system based on the received satellite time signal includes: using the satellite time signal as a reference frequency of the second time source to generate the second time source, the satellite time signal being received through a signal receiving module; and providing the second time source to the second subsystem.

[0190] Step S702: When the satellite time signal is not received, provide the second time source to the second subsystem via the first crystal oscillator.

[0191] Specifically, see Fig. 9, Fig. 9 FIG. 1 is another schematic diagram of generating a time source provided by an embodiment of the present invention; Fig. 9 As shown, when the GNSS module cannot track the satellite (i.e., it cannot receive the GNSS signal), the GNSS module itself will still output the time, but this time may drift slowly; after receiving the feedback from the GNSS module, the GNSS-CLK generally does not continue to track the time output by the GNSS module, but relies on the first crystal oscillator to maintain the normal timing service of the system time. OS-CLK (i.e., the first time source) still relies on the first crystal oscillator to maintain the normal operation of the system time. Among them, UTC time service is provided, and the clock tracks GNSS time and provides UCT time for management plane transactions. Optionally, GNSS-CLK can select a network port hardware clock that does not need to participate in time synchronization or use a pure software method to implement a set. This clock is also after the initial startup time provided by AO OS after the vehicle is cold started or woken up from sleep. When GNSS is available, track the GNSS time source, and when GNSS is not available, use its own crystal oscillator to maintain time. To meet the management plane business's demand for UTC time. Of course, time jump problems may also occur when tracking GNSS, but it does not affect the safety of autonomous driving, and the impact on the time accuracy of management plane data is negligible.

[0192] In a possible implementation, the GNSS-CLK clock needs to specifically encapsulate user-mode and kernel-mode API interfaces for modules that require accurate UTC time. The user-mode API interface is provided to users to operate and adjust the time information for users in the management subsystem under normal circumstances; while the kernel-mode API interface is provided to obtain manual adjustments and operations on the system time when necessary, which has a greater impact on the overall system. Generally, corresponding permissions are required to operate the system time through this interface. It can be understood that operations such as time synchronization are considered to be operations performed at the kernel level. For users, if they want to obtain the time in the management subsystem (for example, the date of the maintenance log), they cannot obtain the system's underlying time by relying solely on the user-mode interface, but can only obtain the processed time information. The system's underlying time can only be obtained through the kernel-mode interface.

[0193] In a possible implementation, the startup time is obtained from the first clock module, and the startup time is the startup time of the first time source and the second time source. Fig.10 , Fig.10 Schematic diagram of a startup time setting provided by an embodiment of the present invention; Fig.10In ①, AO OS (i.e., an operating system running on processor 302) obtains the startup time or startup moment (e.g., 13:40) from the onboard real-time clock chip (i.e., onboard RTC) 306. And sets the startup time as the startup time of Master OS (i.e., processor 301); specifically, sets the startup time as the startup time of OS-CLK and GNSS-CLK. For example, when the system starts or wakes up from sleep, AO OS obtains the startup time from the onboard RTC real-time clock to set the startup time of OS-CLK and GNSS-CLK of the main plane.

[0194] In one possible implementation, the main and backup SOCs are directly connected through a network port, where the OS-CLK of the backup SOC tracks the OS-CLK of the main plane based on the TSN protocol. Fig.11 , Fig.11 is a schematic diagram of a main and standby SOC connection provided by an embodiment of the present invention; Fig.11 As shown in ②, the main SOC is connected to the temperature-compensated crystal oscillator 305, and the temperature-compensated crystal oscillator 305 provides a reference oscillation frequency to the OS-CLK; the OS-CLK serves as the master clock in the corresponding clock system, and provides the processor 303 (used to process autonomous driving related services) and multiple M network ports (used to send time synchronization messages to end nodes, and provide a time reference to the standby SOC110'). Fig.11 As shown in ③-④, the main SOC and the backup SOC are connected to different temperature-compensated crystal oscillators, but the error can be corrected by the way the M network port is connected to the S network port. Although the backup SOC relies on different temperature-compensated crystal oscillators, when the main SOC is operating normally, it still tracks the OS-CLK of the main SOC as the time reference. Among them, the Master port clock refers to a clock role specified in the gPTP protocol. Only the port clock in the Master state can send time synchronization messages to the outside, and has higher clock accuracy. The Slave port clock refers to a clock role specified in the gPTP protocol. The port clock in the Slave state is not allowed to send time synchronization messages to the outside, and can only receive and process the synchronization messages sent by the upper-level Master clock, and the clock needs to be adjusted to maintain synchronization with the Master clock. In an embodiment of the present invention, the main and backup SOCs constitute a pair of Master port clocks and Slave port clocks. It can be understood that the main SOC and other boundary clocks, or the next-level nodes also constitute a pair of Master port clocks and Slave port clocks respectively.

[0195] In a possible implementation, the method further includes: synchronizing a third time source based on the second time source according to a preset adjustment period, wherein the third time source is a time source provided by the first clock module. Fig.12, Fig.12 is a schematic diagram of a time source adjustment process provided by an embodiment of the present invention; Fig.12 As shown in ①-④, first, within the adjustment period, the current GNSS time fed back by the GNSS module is received through the GNSS interface; GNSS-CLK tracks the GNSS signal; and the RTC time is synchronized with the GNSS time of GNSS-CLK through AOOS.

[0196] For example, the clock OS-CLK related to autonomous driving calculations is provided with the initial startup time by AO OS after the vehicle is cold started or awakened from sleep. After that, it completely relies on its own crystal oscillator to maintain the operation of the OS clock and no longer tracks the GNSS time source. Other nodes on the board use the gPTP protocol to track this OS-CLK to achieve the goal of clock synchronization across the entire network. In this case, due to the drift of its own crystal oscillator, the OS-CLK will gradually deviate, and the clocks of other nodes will also deviate. Therefore, during the autonomous driving process, GNSS-CLK is used to regularly adjust the RTC clock to keep the RTC clock synchronized with the GNSS clock. This method can ensure that after each vehicle start, the time of the autonomous driving system will not differ too much from the UTC time, which can effectively prevent the OS-CLK time from drifting indefinitely.

[0197] In the above-mentioned embodiment of the invention, three sets of clocks with independent crystal oscillators are deployed on a single board: OS-CLK, GNSS-CLK, and RTC-CLK. Since the autonomous driving plane OS-CLK mainly relies on the self-oscillation operation of the onboard temperature-compensated crystal oscillator, in order to prevent the temperature-compensated crystal oscillator from being abnormal or failing, it is necessary to monitor the operating status of the temperature-compensated crystal oscillator. Based on this, a timing (for example, 50ms) monitoring program is designed to prevent the root clock time from jumping due to the abnormality of the crystal oscillator itself, thereby affecting the safety of autonomous driving. Therefore, the monitoring algorithm provided in the embodiment of the present invention is used to monitor and adjust the OS-CLK.

[0198] The specific algorithm is as follows:

[0199] Determine frequency ratios of three groups of time sources, wherein the frequency ratios of the three groups of time sources include a first frequency ratio of the first time source to the second time source, a second frequency ratio of the first time source to the third time source, and a third frequency ratio of the second time source to the third time source;

[0200] Determine a frequency ratio difference value of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each group of the three groups of time sources, wherein the frequency ratio difference values ​​of the three groups of time sources include a first frequency ratio difference value between the first frequency ratio and a historical first frequency ratio, a second frequency ratio difference value between the second frequency ratio and a historical second frequency ratio, and a third frequency ratio difference value between the third frequency ratio and a historical third frequency ratio;

[0201] According to the first frequency ratio difference, the second frequency ratio difference and the third frequency ratio difference, it is determined that the crystal oscillator frequency corresponding to the target time source in the first time source, the second time source or the third time source deviates from the preset frequency range.

[0202] In a possible implementation manner, determining the frequency ratios of the three groups of time sources includes:

[0203] By formula

[0204]

[0205]

[0206]

[0207] Determine the first frequency ratio FR1, the second frequency ratio FR2 and the third frequency ratio FR3; wherein OS_CLK Frequency is the clock frequency of the first time source; GNSS_CLK Frequency is the clock frequency of the second time source; RTC_CLK Frequency is the clock frequency of the third time source.

[0208] Optionally, during operation, the frequency of each physical clock actually jitters, so the frequency ratio of the two clocks will also jitter. According to the method recommended in the 802.1-AS protocol, the timestamp sequence of the two clocks can be measured continuously at a fixed time. The size of this sequence is fixed. For example, each clock's timestamp sequence stores 7 to 10 timestamps internally. This timestamp sequence can be implemented using a queue. After the queue becomes full, each time a new timestamp enters the queue, the oldest timestamp at the end of the queue will be eliminated. Then, the difference ratio after subtracting the first and last timestamps of the timestamp sequence of the two clocks is:

[0209]

[0210] For example, TN may be the seventh timestamp, T0 may be the first timestamp, and the difference may be the time between the first timestamp and the seventh timestamp.

[0211] The reciprocal ratio of the above difference is taken as the frequency ratio of the two clocks:

[0212]

[0213] In a possible implementation, determining the frequency ratio differences of the three groups of time sources according to the frequency ratios of the three groups of time sources and the historical frequency ratios corresponding to each of the three groups of frequency ratios includes:

[0214] By formula

[0215] ΔFR1=abs(FR1-FR1 AVG )

[0216] ΔFR2=abs(FR2-FR2 AVG )

[0217] ΔFR3=abs(FR3-FR3 AVG )

[0218] Determine the first frequency ratio difference ΔFR1, the second frequency ratio difference ΔFR2 and the third frequency ratio difference ΔFR3; wherein abs(FR1-FR1 AVG ) is the absolute value of the difference between the first frequency ratio and the historical first frequency ratio; abs(FR2-FR2 AVG ) is the absolute value of the difference between the second frequency ratio and the historical second frequency ratio; abs(FR3-FR3 AVG ) is the absolute value of the difference between the third frequency ratio and the historical third frequency ratio. For example, the latest measured frequency ratio of the two CLKs can be marked as FR_Curr (i.e., FR1 in the above formula), and ΔFR is defined as the difference between the current frequency ratio and the historical average frequency ratio. Under normal circumstances, ΔFR varies within an expected reasonable value range, and the concept of simultaneous frequency jumps or failures of the three sets of clocks can be infinitely small. Therefore, it can be inferred that: if a certain ΔFR suddenly increases beyond the set threshold value, it can be inferred that one of the two clocks is suspected of failure. Which one can be found out through three comparisons, for example: the frequency ratio change between OS-CLK and GNSS-CLK ΔFR1; the frequency ratio change between OS-CLK and RTC-CLK ΔFR2; the frequency ratio change between GNSS-CLK and RTC-CLK ΔFR3.

[0219] Optionally, based on the voting principle, find out which clock crystal oscillator is abnormal, because the probability of the three sets of clock frequencies jumping or failing at the same time is infinitely small and can be considered to be unlikely. If ΔFR1 and ΔFR2 suddenly change and exceed the threshold, but ΔFR3 is within the normal value range, it can be determined that the crystal oscillator frequency of the OS-CLK clock is abnormal.

[0220] Optionally, once an abnormal clock oscillator frequency is detected, a clock abnormality alarm needs to be reported to an upper-layer management plane.

[0221] It is mentioned above that the mean of the frequency ratio needs to be calculated. The following provides a method for calculating the mean of the historical frequency, and the method also includes:

[0222] According to a preset measurement period, determining a kth first frequency ratio, a kth second frequency ratio, and a kth third frequency ratio, until N first frequency ratios, N second frequency ratios, and N third frequency ratios are determined; 0<k≤N, k is an integer;

[0223] According to the N first frequency ratios, the N second frequency ratios and the N third frequency ratios, the historical frequency ratio corresponding to each of the three groups of frequency ratios is determined, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and a third historical frequency ratio corresponding to the third frequency ratio.

[0224] In a possible implementation manner, determining, according to the N first frequency ratios, the N second frequency ratios, and the N third frequency ratios, a historical frequency ratio corresponding to each of the three groups of frequency ratios includes:

[0225] By formula

[0226]

[0227]

[0228]

[0229] Determine the first historical frequency ratio FR1 AVG The second historical frequency ratio FR2 AVG , the third historical frequency ratio FR3 AVG ; Among them, fr11, fr12, fr13, ..., fr1 N They are the 1st first frequency ratio, the 2nd first frequency ratio, the 3rd first frequency ratio, ..., the Nth first frequency ratio; fr21, fr22, fr23, ..., fr2 N They are respectively the first second frequency ratio, the second second frequency ratio, the third second frequency ratio, ..., the Nth second frequency ratio; fr31, fr32, fr33, ..., fr3 NThey are the first third frequency ratio, the second third frequency ratio, the third third frequency ratio, ..., the Nth third frequency ratio, respectively. N may represent the number of the latest frequency ratio samples, and may be between 7 and 10.

[0230] Optionally, since the above-mentioned crystal oscillator failure detection method is implemented by software, since the software needs to collect, process and calculate a large amount of data, and also relies on the scheduling strategy of the OS, it may cause the detection results to be not timely enough. You can consider using a dedicated hardware logic circuit to implement it, or write these hardware detection logics into the on-board CPLD device to achieve faster and more accurate crystal oscillator failure detection.

[0231] The method of the embodiment of the present invention is described in detail above, and the following provides a related virtual device of the embodiment of the present invention.

[0232] See also Fig.13 , Fig.13 1 is a schematic diagram of a device for providing a time source for autonomous driving provided by an embodiment of the present invention; the device 131 for providing a time source for autonomous driving includes a first time source unit 131, a second time source unit 132, an adjustment unit 133, a calculation unit 134, a comparison unit 135, a determination unit 136, a measurement unit 137 and a historical frequency ratio unit 138. Among them,

[0233] The first time source unit 131 is used to provide a first time source to the first subsystem of the autonomous driving system through a first crystal oscillator, and to provide a second time source to the second subsystem of the autonomous driving system according to a received satellite time signal.

[0234] In a possible implementation manner, the apparatus further includes a second time source unit 132, configured to:

[0235] In case the satellite time signal is not received, the second time source is provided to the second subsystem via a first crystal oscillator.

[0236] In a possible implementation, the first time source unit 131 is specifically configured to:

[0237] Using the satellite time signal as the reference frequency of the second time source to generate the second time source, wherein the satellite time signal is received by a signal receiving module;

[0238] The second time source is provided to the second subsystem.

[0239] In a possible implementation, the apparatus further includes an adjusting unit 133, configured to:

[0240] According to a preset adjustment period, a third time source is synchronized based on the second time source, and the third time source is a time source provided by the first clock module.

[0241] In a possible implementation manner, the device further includes:

[0242] a calculation unit 134, configured to determine frequency ratios of three groups of time sources, wherein the frequency ratios of the three groups of time sources include a first frequency ratio of the first time source to the second time source, a second frequency ratio of the first time source to the third time source, and a third frequency ratio of the second time source to the third time source;

[0243] A comparing unit 135 is used to determine a frequency ratio difference value of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each group of the three groups of time sources, wherein the frequency ratio difference values ​​of the three groups of time sources include a first frequency ratio difference value between the first frequency ratio and the historical first frequency ratio, a second frequency ratio difference value between the second frequency ratio and the historical second frequency ratio, and a third frequency ratio difference value between the third frequency ratio and the historical third frequency ratio;

[0244] The determination unit 136 is used to determine whether the crystal oscillator frequency corresponding to the target time source in the first time source, the second time source or the third time source deviates from a preset frequency range based on the first frequency ratio difference, the second frequency ratio difference and the third frequency ratio difference.

[0245] In a possible implementation, the calculation unit 134 is specifically configured to:

[0246] By formula

[0247]

[0248]

[0249]

[0250] Determine the first frequency ratio FR1, the second frequency ratio FR2 and the third frequency ratio FR3; wherein OS_CLK Frequency is the clock frequency of the first time source; GNSS_CLK Frequency is the clock frequency of the second time source; RTC_CLK Frequency is the clock frequency of the third time source.

[0251] In a possible implementation, the comparing unit 135 is specifically configured to:

[0252] By formula

[0253] ΔFR1=abs(FR1-FR1 AVG )

[0254] ΔFR2=abs(FR2-FR2 AVG )

[0255] ΔFR3=abs(FR3-FR3 AVG )

[0256] Determine the first frequency ratio difference ΔFR1, the second frequency ratio difference ΔFR2 and the third frequency ratio difference ΔFR3; wherein abs(FR1-FR1 AVG ) is the absolute value of the difference between the first frequency ratio and the historical first frequency ratio; abs(FR2-FR2 AVG ) is the absolute value of the difference between the second frequency ratio and the historical second frequency ratio; abs(FR3-FR3 AVG ) is the absolute value of the difference between the third frequency ratio and the historical third frequency ratio.

[0257] In a possible implementation manner, the device further includes:

[0258] The measuring unit 137 is used to determine the kth first frequency ratio, the kth second frequency ratio and the kth third frequency ratio according to a preset measurement period, until N first frequency ratios, N second frequency ratios and N third frequency ratios are determined; 0<k≤N, k is an integer;

[0259] The historical frequency ratio unit 138 is used to determine the historical frequency ratio corresponding to each of the three groups of frequency ratios according to the N first frequency ratios, the N second frequency ratios and the N third frequency ratios, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and a third historical frequency ratio corresponding to the third frequency ratio.

[0260] In a possible implementation, the historical frequency ratio unit 138 is specifically configured to:

[0261] By formula

[0262]

[0263]

[0264]

[0265] Determine the first historical frequency ratio FR1 AVG The second historical frequency ratio FR2 AVG , the third historical frequency ratio FR3AVG ; Among them, fr11, fr12, fr13, ..., fr1 N They are the 1st first frequency ratio, the 2nd first frequency ratio, the 3rd first frequency ratio, ..., the Nth first frequency ratio; fr21, fr22, fr23, ..., fr2 N They are respectively the first second frequency ratio, the second second frequency ratio, the third second frequency ratio, ..., the Nth second frequency ratio; fr31, fr32, fr33, ..., fr3 N They are respectively the 1st third frequency ratio, the 2nd third frequency ratio, the 3rd third frequency ratio, ..., the Nth third frequency ratio.

[0266] In a possible implementation manner, the first crystal oscillator is a temperature compensated crystal oscillator.

[0267] It should be noted that the device for providing a time source for automatic driving described in the embodiments of the present invention can be found in the above Figure 7 The relevant description of the method for providing a time source for autonomous driving in the method embodiment described herein will not be repeated here.

[0268] like Fig.14 As shown, Fig.14 is a schematic diagram of the structure of a chip provided by an embodiment of the present invention. A device 13 for providing a time source for automatic driving can be used Fig.14 The device 14 includes at least one processor 141 and at least one memory 142. In addition, the device may also include common components such as an antenna, which will not be described in detail here.

[0269] The processor 141 may be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.

[0270] The memory 142 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.

[0271] The memory 142 is used to store application code for executing the above solution, and the execution is controlled by the processor 141. The processor 141 is used to execute the application code stored in the memory 142.

[0272] Fig.14 When the chip shown is a device that provides a time source for autonomous driving, the code stored in the memory 142 can execute the above Figure 7 A method for providing a time source for autonomous driving is provided. For example, when a satellite time signal is received, a first time source is provided to a first subsystem of the autonomous driving system through a first crystal oscillator, and a second time source is provided to a second subsystem of the autonomous driving system based on the received satellite time signal.

[0273] It should be noted that the functions of the chip 14 described in the embodiment of the present invention can be found in the above Figure 7 The relevant description of the method embodiments described in will not be repeated here.

[0274] The embodiment of the present invention also provides a vehicle equipped with an automatic driving system, see Fig.15 , Fig.15 is a schematic diagram of a vehicle provided by an embodiment of the present invention; Fig.15 As shown, the vehicle 15 includes an onboard computer 151, and the vehicle 15 can receive the satellite time signal sent by the satellite 16. The onboard computer can execute the above Figure 7-Figure 12Any part or all of the steps described in the corresponding method embodiment. For example, when a satellite time signal is received, a first time source that relies on a first crystal oscillator and a second time source that relies on a satellite signal are provided; when a satellite time signal is not received, a first time source that still relies on the first crystal oscillator and a second time source that switches to the first crystal oscillator are provided. Optionally, the vehicle may also include a backup onboard computer to prevent a single point failure of the autonomous driving system and improve the overall reliability of the system.

[0275] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0276] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0277] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

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

[0279] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0280] Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc., specifically a processor in a computer device) to perform all or part of the steps of the above methods in various embodiments of the present application. Among them, the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (Read-Only Memory, abbreviated: ROM) or random access memory (Random Access Memory, abbreviated: RAM) and other media that can store program codes.

[0281] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A device for providing a time source for automatic driving, characterized in that: An automatic driving system for a vehicle includes: a first processor, and a first crystal oscillator connected to the first processor; wherein: The first processor is used to provide a first time source to a first subsystem of the autonomous driving system through the first crystal oscillator, and to provide a second time source to a second subsystem of the autonomous driving system according to a received satellite time signal; the first subsystem is used to process driving service-related data of the vehicle; the second subsystem is used to process management-related data of the vehicle; the management-related data includes real-time related data, and the real-time related data includes at least one of security audit, digital certificate validity check, and real-time cloud-uploaded data in driving data.

2. The device according to claim 1, characterized in that The first processor is further configured to: In the event that the satellite time signal is not received, the second time source is provided to the second subsystem via the first crystal oscillator.

3. The device according to claim 1, characterized in that The device further comprises a signal receiving module connected to the first processor; the signal receiving module is configured to provide a reference frequency to the second time source according to the satellite time signal when the satellite time signal is received; The first processor is specifically configured to: The second time source is generated according to the reference frequency, and the second time source is provided to the second subsystem.

4. The device according to any one of claims 1 to 3, characterized in that: The device further comprises: a first clock module connected to the first processor; The first clock module is used to synchronize a third time source based on the second time source according to a preset adjustment period, and the third time source is a time source provided by the first clock module.

5. The device according to claim 4, characterized in that The first processor is further configured to: Determine frequency ratios of three groups of time sources, wherein the frequency ratios of the three groups of time sources include a first frequency ratio of the first time source to the second time source, a second frequency ratio of the first time source to the third time source, and a third frequency ratio of the second time source to the third time source; Determine a frequency ratio difference value of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each group of the three groups of time sources, wherein the frequency ratio difference values ​​of the three groups of time sources include a first frequency ratio difference value between the first frequency ratio and a historical first frequency ratio, a second frequency ratio difference value between the second frequency ratio and a historical second frequency ratio, and a third frequency ratio difference value between the third frequency ratio and a historical third frequency ratio; According to the first frequency ratio difference, the second frequency ratio difference and the third frequency ratio difference, it is determined that the crystal oscillator frequency corresponding to the target time source in the first time source, the second time source or the third time source deviates from a preset frequency range.

6. The device according to claim 5, characterized in that The first processor is specifically configured to: By formula Determine the first frequency ratio FR1, the second frequency ratio FR2 and the third frequency ratio FR3; wherein OS-CLK Frequency is the clock frequency of the first time source; GNSS_CLK Frequency is the clock frequency of the second time source; RTC_CLK Frequency is the clock frequency of the third time source.

7. The device according to claim 5 or 6, characterized in that The first processor is specifically configured to: By formula ΔFR1=abs(FR1-FR1 AVG ) <h2 style=";text-align:left;direction:ltr">ΔFR2 = abs(FR2-FR2<h2 style=";text-align:left;direction:ltr"> AVG <h2 style=";text-align:left;direction:ltr"> ) ΔFR3=abs(FR3-FR3 AVG ) Determine the first frequency ratio difference ΔFR1, the second frequency ratio difference ΔFR2 and the third frequency ratio difference ΔFR3; wherein abs(FR1-FR1 AVG ) is the absolute value of the difference between the first frequency ratio and the historical first frequency ratio; abs(FR2-FR2 AVG ) is the absolute value of the difference between the second frequency ratio and the historical second frequency ratio; abs(FR3-FR3 AVG ) is the absolute value of the difference between the third frequency ratio and the historical third frequency ratio.

8. The device according to any one of claims 5 to 6, characterized in that: The first processor is further configured to: According to a preset measurement period, determining a kth first frequency ratio, a kth second frequency ratio, and a kth third frequency ratio, until N first frequency ratios, N second frequency ratios, and N third frequency ratios are determined; 0<k≤N, k is an integer; According to the N first frequency ratios, the N second frequency ratios and the N third frequency ratios, the historical frequency ratio corresponding to each of the three groups of frequency ratios is determined, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and a third historical frequency ratio corresponding to the third frequency ratio.

9. The device according to claim 8, characterized in that The first processor is specifically configured to: By formula Determine the first historical frequency ratio FR1 AVG The second historical frequency ratio FR2 AVG , the third historical frequency ratio FR3 AVG ; Among them, fr11, fr12, fr13, ..., fr1 N They are the 1st first frequency ratio, the 2nd first frequency ratio, the 3rd first frequency ratio, ..., the Nth first frequency ratio; fr21, fr22, fr23, ..., fr2 N They are respectively the first second frequency ratio, the second second frequency ratio, the third second frequency ratio, ..., the Nth second frequency ratio; fr31, fr32, fr33, ..., fr3 N They are respectively the 1st third frequency ratio, the 2nd third frequency ratio, the 3rd third frequency ratio, ..., the Nth third frequency ratio.

10. The device according to any one of claims 1 to 3, characterized in that: The device further includes: a second processor connected to the first processor, wherein: The second processor is a backup processor of the first processor; The second processor is also connected to a second crystal oscillator and a second clock module respectively; the second crystal oscillator is a backup crystal oscillator of the first crystal oscillator; the second clock module is a backup module of the first clock module.

11. The device according to any one of claims 1 to 3, characterized in that: The first crystal oscillator is a temperature compensated crystal oscillator.

12. A method for providing a time source for autonomous driving, characterized in that: An automatic driving system for a vehicle, the method comprising: A first time source is provided to a first subsystem of the autonomous driving system through a first crystal oscillator, and a second time source is provided to a second subsystem of the autonomous driving system according to a received satellite time signal; the first subsystem is used to process driving business-related data of the vehicle; the second subsystem is used to process management-related data of the vehicle; the management-related data includes real-time related data, and the real-time related data includes at least one of security audit, digital certificate validity check, and real-time cloud-uploaded data in driving data.

13. The method according to claim 12, characterized in that The method further comprises: In the event that the satellite time signal is not received, the second time source is provided to the second subsystem via the first crystal oscillator.

14. The method according to claim 12, characterized in that The providing a second time source to a second subsystem of the automatic driving system according to the received satellite time signal comprises: Using the satellite time signal as the reference frequency of the second time source to generate the second time source, wherein the satellite time signal is received by a signal receiving module; The second time source is provided to the second subsystem.

15. The method according to any one of claims 12 to 14, characterized in that: The method further comprises: According to a preset adjustment period, a third time source is synchronized based on the second time source, and the third time source is a time source provided by the first clock module.

16. The method according to claim 15, characterized in that The method further comprises: Determine frequency ratios of three groups of time sources, wherein the frequency ratios of the three groups of time sources include a first frequency ratio of the first time source to the second time source, a second frequency ratio of the first time source to the third time source, and a third frequency ratio of the second time source to the third time source; Determine a frequency ratio difference value of each of the three groups of time sources according to the frequency ratio of the three groups of time sources and the historical frequency ratio corresponding to each group of the three groups of time sources, wherein the frequency ratio difference values ​​of the three groups of time sources include a first frequency ratio difference value between the first frequency ratio and a historical first frequency ratio, a second frequency ratio difference value between the second frequency ratio and a historical second frequency ratio, and a third frequency ratio difference value between the third frequency ratio and a historical third frequency ratio; According to the first frequency ratio difference, the second frequency ratio difference and the third frequency ratio difference, it is determined that the crystal oscillator frequency corresponding to the target time source in the first time source, the second time source or the third time source deviates from a preset frequency range.

17. The method according to claim 16, characterized in that The determining of the frequency ratios of the three groups of time sources comprises: By formula Determine the first frequency ratio FR1, the second frequency ratio FR2 and the third frequency ratio FR3; wherein OS_CLK Frequency is the clock frequency of the first time source; GNSS_CLK Frequency is the clock frequency of the second time source; RTC_CLK Frequency is the clock frequency of the third time source.

18. The method according to claim 16 or 17, characterized in that Determining the frequency ratio differences of the three groups of time sources according to the frequency ratios of the three groups of time sources and the historical frequency ratios corresponding to each of the three groups of frequency ratios includes: By formula ΔFR1=abs(FR1-FR1 AVG ) <h2 style=";text-align:left;direction:ltr">ΔFR2 = abs(FR2-FR2<h2 style=";text-align:left;direction:ltr"> AVG <h2 style=";text-align:left;direction:ltr"> ) ΔFR3=abs(FR3-FR3 AVG ) Determine the first frequency ratio difference ΔFR1, the second frequency ratio difference ΔFR2 and the third frequency ratio difference ΔFR3; wherein abs(FR1-FR1 AVG ) is the absolute value of the difference between the first frequency ratio and the historical first frequency ratio; abs(FR2-FR2 AVG ) is the absolute value of the difference between the second frequency ratio and the historical second frequency ratio; abs(FR3-FR3 AVG ) is the absolute value of the difference between the third frequency ratio and the historical third frequency ratio.

19. The method according to any one of claims 16-17, characterized in that: The method further comprises: According to a preset measurement period, determining a kth first frequency ratio, a kth second frequency ratio, and a kth third frequency ratio, until N first frequency ratios, N second frequency ratios, and N third frequency ratios are determined; 0<k≤N, k is an integer; According to the N first frequency ratios, the N second frequency ratios and the N third frequency ratios, the historical frequency ratio corresponding to each of the three groups of frequency ratios is determined, wherein the historical frequency ratio corresponding to each of the three groups of frequency ratios includes a first historical frequency ratio corresponding to the first frequency ratio, a second historical frequency ratio corresponding to the second frequency ratio, and a third historical frequency ratio corresponding to the third frequency ratio.

20. The method according to claim 19, characterized in that Determining the historical frequency ratio corresponding to each of the three groups of frequency ratios according to the N first frequency ratios, the N second frequency ratios, and the N third frequency ratios includes: By formula Determine the first historical frequency ratio FR1 AVG The second historical frequency ratio FR2 AVG , the third historical frequency ratio FR3 AVG ; Among them, fr11, fr12, fr13, ..., fr1 N They are the 1st first frequency ratio, the 2nd first frequency ratio, the 3rd first frequency ratio, ..., the Nth first frequency ratio; fr21, fr22, fr23, ..., fr2 N They are respectively the first second frequency ratio, the second second frequency ratio, the third second frequency ratio, ..., the Nth second frequency ratio; fr31, fr32, fr33, ..., fr3 N They are respectively the 1st third frequency ratio, the 2nd third frequency ratio, the 3rd third frequency ratio, ..., the Nth third frequency ratio.

21. The method according to any one of claims 12 to 14, characterized in that: The first crystal oscillator is a temperature compensated crystal oscillator.

22. A chip system, characterized in that: The chip system comprises the device as described in any one of claims 1-11.