Clock synchronization method and device, and vehicle

The method and apparatus for flexible clock synchronization in autonomous vehicles address GNSS signal blockages by allowing dual-clock modes, ensuring stable operation and smooth vehicle control through adaptive clock source usage.

JP7722790B2Active Publication Date: 2025-08-13YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2024513521
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-09-27
Filing Date
2022-09-01
Publication Date
2025-08-13
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

Existing autonomous driving systems face challenges in clock synchronization due to GNSS signal blockages, leading to time jumps that disrupt autonomous driving logic, especially at SAE L3 and higher levels, where external interaction is required.

Method used

A method and apparatus for flexible clock synchronization in autonomous vehicles, allowing the data plane and control plane clocks to use the same or different clock sources based on signal quality, enabling dual-clock synchronous or asynchronous modes to adapt to various scenarios.

Benefits of technology

Ensures stable operation of autonomous driving algorithms by minimizing time jumps and adapting to different scenarios, ensuring smooth and efficient vehicle control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007722790000001
    Figure 0007722790000001
  • Figure 0007722790000002
    Figure 0007722790000002
  • Figure 0007722790000003
    Figure 0007722790000003
Patent Text Reader

Abstract

The present application provides a time synchronization method and apparatus, and a vehicle. The method and apparatus are applied to a vehicle. The method includes: acquiring a first signal, where the first signal includes clock information of an external clock source; determining a signal quality of the first signal; and determining a clock mode based on the signal quality of the first signal, where the clock mode includes a first clock mode or a second clock mode, and when the vehicle operates in the first clock mode, the vehicle acquires the first clock information from the external clock source, or when the vehicle operates in the second clock mode, the vehicle acquires the first clock information and the second clock information from the external clock source and an internal clock source, respectively, where the internal clock source is located in the vehicle. The clock synchronization method in the present application may be used in autonomous driving or intelligent driving scenarios, so that different clock schemes may be configured based on different scenario requirements.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to Chinese Patent Application No. 202111134429.6, entitled "Clock Synchronization Method and Apparatus, and Vehicle," filed with the State Intellectual Property Office of the People's Republic of China on September 27, 2021. This Chinese patent application is incorporated herein by reference in its entirety.

[0002] The present application relates to the field of autonomous driving, and more particularly to a clock synchronization method and apparatus, and a vehicle. [Background technology]

[0003] With the development of autonomous driving technology, autonomous vehicles are integrating many sensors and ECUs. Different data sources need to be converted to a unified time scale for comparison, analysis, calculation, etc. Engineering practices often require unifying signals such as global navigation satellite systems (GNSS), inertial measurement units (IMU), and vehicle status signals to the same time scale for calculation.

[0004] GNSS clocks are primarily used in existing autonomous driving. However, during vehicle movement, scenarios such as tunnels or underground garages inevitably occur where GNSS signals are blocked. As a result, universal time coordinated (UTC) time cannot be received. When GNSS signals return to perform time synchronization again, the time jumps caused by time synchronization affect the autonomous driving application logic. However, at SAE L3 and higher levels, autonomous driving has external interaction requirements. Because the time of the local (hardware real-time) clock cannot be close to UTC time, external interaction is inconvenient. As a result, the local clock cannot be directly used in autonomous driving. Some existing autonomous driving systems use both GNSS clocks and local clocks. Regardless of whether the GNSS clock is accurate, the local clock is synchronized based on the GNSS clock. Thus, time jumps generated during time synchronization cannot be avoided, which inevitably affects the autonomous driving application logic.

[0005] Therefore, how to flexibly implement clock synchronization for autonomous driving to meet different requirements has become an urgent problem to be solved. Summary of the Invention

[0006] The present application provides a clock synchronization method and apparatus, a controller, and a vehicle, so that clock synchronization is performed for autonomous driving to meet different requirements.

[0007] According to a first aspect, there is provided a time synchronization method, the method being applicable to a vehicle and comprising: acquiring a first signal, the first signal including clock information of an external clock source; determining a signal quality of the first signal; and determining a clock mode based on the signal quality of the first signal, the clock mode including a first clock mode or a second clock mode, wherein when the vehicle operates in the first clock mode, the vehicle acquires the first clock information from the external clock source, or when the vehicle operates in the second clock mode, the vehicle acquires the first clock information and the second clock information from the external clock source and an internal clock source, respectively, wherein the internal clock source is located within the vehicle.

[0008] Specifically, the vehicle includes a data plane clock and a control plane clock, and the first clock mode may mean that the data plane clock and the control plane clock use the same clock source, and the second clock mode may mean that the data plane clock and the control plane clock use different clock sources.

[0009] Optionally, the external clock source may be a GNSS clock or a network time protocol (NTP) clock.

[0010] According to the method of this embodiment of the present application, the clock mode may be determined based on the signal quality of the first signal, so that the first clock mode or the second clock mode can be configured for the autonomous driving algorithm based on different scenario requirements, thereby ensuring the stability of the autonomous driving algorithm application logic. In this way, the hardware or software logic of the same domain controller can meet the requirements of different clock schemes in different scenarios.

[0011] In relation to the first aspect, in some implementations of the first aspect, determining the clock mode based on the signal quality of the first signal includes determining that the clock mode is the first clock mode if the signal quality of the first signal is greater than or equal to a first threshold; or determining that the clock mode is the second clock mode if the signal quality of the first signal is less than the first threshold.

[0012] Specifically, the first threshold may represent a signal quality threshold of a first signal that may be obtained by the vehicle from an external clock source and used to provide stable clock information for autonomous driving.

[0013] In some possible implementations, the clock mode is determined to be the first clock mode if the signal quality of the first signal is greater than or equal to a first threshold and the duration during which the signal quality of the first signal is greater than or equal to the first threshold is greater than or equal to the first duration.

[0014] In some possible implementations, the clock mode is determined to be the second clock mode if the signal quality of the first signal is less than a first threshold and the duration during which the signal quality of the first signal is less than the first threshold is greater than or equal to a second duration.

[0015] In relation to the first aspect, in some implementations of the first aspect, the clock mode is a second clock mode, and the method further includes synchronizing a management plane clock based on the first clock information and synchronizing a data plane clock based on the second clock information.

[0016] Specifically, when the clock mode is the second clock mode, the management plane clock is synchronized based on first clock information obtained from an external clock source, and the data plane clock is synchronized based on second clock information obtained from an internal clock source. The data plane clock and the management plane clock are synchronized based on the first clock information obtained from the external clock source and the second clock information obtained from the internal clock source, respectively. Thus, the data plane clock and the management plane clock may be synchronized or not synchronized. Optionally, the second clock mode may include a dual-clock synchronous mode or a dual-clock asynchronous mode, where the dual-clock synchronous mode indicates synchronization between the data plane clock and the management plane clock, and the dual-clock asynchronous mode indicates asynchronous between the data plane clock and the management plane clock.

[0017] In this embodiment of the present application, when the clock mode is the second clock mode, the data plane clock and the management plane clock may obtain clock information from different clock sources and synchronize with different clock sources, respectively, so that the data plane clock and the management plane clock may be synchronized or not synchronized. That is, the second clock mode may be a dual-clock synchronous mode or a dual-clock asynchronous mode, so that when autonomous operation is performed based on the second clock mode, the requirements of different scenarios may be met.

[0018] In relation to the first aspect, in some implementations of the first aspect, the method further includes synchronizing the data plane clock based on the management plane clock.

[0019] Specifically, the data plane clock is synchronized based on the management plane clock, so that the management plane clock and the data plane clock are synchronized, that is, the second clock mode may be a dual-clock synchronization mode.

[0020] In relation to the first aspect, in some implementations of the first aspect, prior to the step of synchronizing the data plane clock based on the management plane clock, the method further includes a step of determining that the vehicle needs to communicate with an external device.

[0021] Optionally, when the vehicle needs to communicate with an external device, it may be determined that the second clock mode is the dual-clock synchronous mode to meet the requirements of the external interaction. Alternatively, when the vehicle does not need to communicate with an external device, it may be determined that the second clock mode is the dual-clock asynchronous mode, so that when the vehicle has no external interaction requirements, autonomous driving can be performed based on an internal clock source, and time jumps of the data plane clock may be avoided, thereby ensuring stable operation of autonomous driving.

[0022] In relation to the first aspect, in some implementations of the first aspect, prior to the step of synchronizing the data plane clock based on the management plane clock, the method further includes a step of determining that the time difference between the data plane clock and the management plane clock is greater than or equal to a second threshold.

[0023] Specifically, the second threshold may indicate a time difference threshold for whether the data plane clock and the management plane clock are synchronized. For example, if the time difference between the data plane clock and the management plane clock is greater than or equal to the second threshold, this indicates that the data plane clock and the management plane clock are no longer synchronized. If the time difference between the data plane clock and the management plane clock is less than the second threshold, this indicates that the data plane clock and the management plane clock are synchronized.

[0024] In this embodiment of the present application, before synchronizing the data plane clock based on the management plane clock, a value relationship between the time difference between the data plane clock and the management plane clock and a second threshold is determined, so that excessively frequent synchronization of the data plane clock based on the management plane clock can be avoided and resource consumption caused by time synchronization can be reduced.

[0025] In relation to the first aspect, in some implementations of the first aspect, before the step of synchronizing the data plane clock based on the management plane clock, the method further includes a step of determining that the vehicle speed of the vehicle is less than or equal to a third threshold.

[0026] Specifically, the third threshold may indicate a maximum vehicle speed that may allow a time jump in autonomous driving in the current scenario. In other words, if the vehicle speed of the vehicle is less than or equal to the third threshold, autonomous driving may be performed normally even when a time jump exists.

[0027] In this embodiment of the present application, if the vehicle speed of the vehicle is determined to be less than or equal to a third threshold before synchronizing the data plane clock based on the control plane clock, and as a result, the data plane clock is synchronized based on the control plane clock, stable operation of autonomous driving can be ensured even when there is a time jump.

[0028] In relation to the first aspect, in some implementations of the first aspect, before the step of synchronizing the data plane clock based on the management plane clock, the method further includes a step of determining that the vehicle has been taken over.

[0029] In this embodiment of the present application, since the vehicle is in a takeover state before the data plane clock is synchronized based on the control plane clock, if the data plane clock is synchronized based on the control plane clock, the safe and stable operation of the vehicle can still be guaranteed even when the autonomous driving application logic is disrupted or the autonomous driving crashes due to a time jump.

[0030] In relation to the first aspect, in some implementations of the first aspect, the method further includes determining the external clock source based on an environment in which the vehicle is located.

[0031] Specifically, the external clock source may be a GNSS clock or an NTP clock. The environment in which the vehicle is located may be the environment in which the vehicle is currently located or the environment in which the vehicle is about to be located.

[0032] In relation to the first aspect, in some implementations of the first aspect, the step of determining the external clock source based on the environment in which the vehicle is located includes determining that the external clock source is a GNSS clock if the vehicle is located on a wide road or at an entrance / exit between a tunnel and a highway; or determining that the external clock source is an NTP clock if the vehicle is in a tunnel, under a bridge, or in an underground garage.

[0033] In this embodiment of the present application, since the control plane clock cannot obtain accurate time information from the clock source of the control plane clock, in order to avoid impact on the autonomous driving application logic, an external clock source is determined based on the environment in which the vehicle is located, and the clock source with more accurate time can be selected for the control plane clock.

[0034] In relation to the first aspect, in some implementations of the first aspect, the vehicle includes a first device and a second device, both of which include the data plane clock and the management plane clock; the step of synchronizing the data plane clock based on the management plane clock includes a step of synchronizing the data plane clock of the first device based on the management plane clock of the first device; and the method further includes a step of backing up data of the first device to the second device; and a step of controlling the operation of the vehicle by the second device based on the backed up data of the first device.

[0035] In this embodiment of the present application, when the data of a first device that controls the running of a vehicle is backed up to a second device, and the second device controls the running of the vehicle, and as a result, the data plane clock of the first device is synchronized based on the management plane clock of the first device, it is possible to prevent the time jump caused by clock synchronization from affecting autonomous driving, and to ensure the stable operation of autonomous driving.

[0036] In relation to the first aspect, in some implementations of the first aspect, after synchronization between the data plane clock of the first device and the management plane clock of the first device is completed in the first device, the method further includes a step of controlling the operation of the vehicle by the first device.

[0037] In this embodiment of the present application, data from the second device for controlling the vehicle's operation is backed up to the first device, and the first device is switched back to control the vehicle's operation, so that the device with the higher performance can control the vehicle's execution. In this way, the autonomous driving algorithm can operate more smoothly and efficiently.

[0038] In relation to the first aspect, in some implementations of the first aspect, after the step of controlling the vehicle's operation by the first device based on the backed-up data of the second device, the method further includes a step of synchronizing a data plane clock of the second device based on a management plane clock of the second device.

[0039] In this embodiment of the present application, after the first device resumes control of the vehicle's running, the second device synchronizes its data plane clock based on the control plane clock of the second device, so that when the device for controlling the vehicle needs to be switched from the first device to the second device thereafter, it is possible to avoid the impact on autonomous driving caused by the asynchronization between the data plane clock and the control plane clock of the second device.

[0040] According to a second aspect, there is provided a time synchronization device for use in a vehicle, the device including an acquisition module and a processing module. The acquisition module is configured to acquire a first signal, the first signal including clock information and an external clock source. The processing module is configured to determine a signal quality of the first signal; the processing module is further configured to determine a clock mode based on the signal quality of the first signal, the clock mode including a first clock mode or a second clock mode. When the vehicle operates in the first clock mode, the vehicle acquires the first clock information from the external clock source; or when the vehicle operates in the second clock mode, the vehicle acquires the first clock information and the second clock information from the external clock source and an internal clock source, respectively, the internal clock source being located within the vehicle.

[0041] In relation to the second aspect, in some implementations of the second aspect, the processing module is specifically configured to determine that the clock mode is the first clock mode when the signal quality of the first signal is greater than or equal to a first threshold; or to determine that the clock mode is the second clock mode when the signal quality of the first signal is less than the first threshold.

[0042] In relation to the second aspect, in some implementations of the second aspect, when the clock mode is the second clock mode, the processing module is further configured to synchronize a management plane clock based on the first clock information and synchronize a data plane clock based on the second clock information.

[0043] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to synchronize the data plane clock based on the management plane clock.

[0044] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to determine that the vehicle needs to communicate with an external device before synchronizing the data plane clock based on the management plane clock.

[0045] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to determine that a time difference between the data plane clock and the management plane clock is greater than or equal to a second threshold before synchronizing the data plane clock based on the management plane clock.

[0046] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to determine that a vehicle speed of the vehicle is less than or equal to a third threshold before synchronizing the data plane clock based on the management plane clock.

[0047] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to determine that a user has taken over the vehicle before synchronizing the data plane clock based on the management plane clock.

[0048] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to determine the external clock source based on an environment in which the vehicle is located.

[0049] In relation to the second aspect, in some implementations of the second aspect, the processing module is configured to determine that the external clock source is a GNSS clock, specifically when the vehicle is located on a wide road or at an entrance / exit between a tunnel and a highway; or when the vehicle is in a tunnel, under a bridge, or in an underground garage, the processing module is configured to determine that the external clock source is a Network Time Protocol (NTP) clock.

[0050] In relation to the second aspect, in some implementations of the second aspect, the processing module has a first device and a second device, both of which include the data plane clock and the management plane clock; the processing module is specifically configured to synchronize the data plane clock of the first device based on the management plane clock of the first device; and the processing module is further configured to back up data of the first device to the second device; and to control the running of the vehicle based on the backed up data of the first device by using the second device.

[0051] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to control the running of the vehicle by using the first device after synchronization between the data plane clock of the first device and the management plane clock of the first device is completed.

[0052] In relation to the second aspect, in some implementations of the second aspect, the processing module is further configured to synchronize the data plane clock of the second device based on the control plane clock of the second device after controlling the vehicle's running using the first device.

[0053] According to a third aspect, there is provided an apparatus for use in a vehicle, the apparatus including a processor and a memory, the memory configured to store program instructions, and the processor configured to invoke the program instructions, enabling the apparatus to perform a method according to the first aspect or any possible implementation thereof.

[0054] According to a fourth aspect, there is provided a vehicle, the vehicle including an apparatus according to the second or third aspect.

[0055] According to a fifth aspect, there is provided a computer program product comprising instructions which, when executed on a computer, enable the computer to perform a method according to the first aspect or any implementation of the first aspect.

[0056] According to a sixth aspect, there is provided a computer-readable storage medium having stored thereon program instructions which, when executed by a processor, enable a computer to perform a method according to the first aspect or any possible implementation of the first aspect.

[0057] According to a seventh aspect, there is provided a chip, the chip comprising: a processor and a data interface, the processor using the data interface to read instructions stored in a memory to perform a method according to the first aspect or any possible implementation thereof. [Brief explanation of the drawings]

[0058] [Figure 1] FIG. 1 is a functional block diagram of a vehicle according to an embodiment of the present application.

[0059] [Figure 2] FIG. 1 is a schematic diagram of a clock synchronization system architecture according to an embodiment of the present application.

[0060] [Figure 3] FIG. 1 is a schematic diagram of an implementation of a clock synchronization system architecture according to an embodiment of the present application.

[0061] [Figure 4] 1 is a flowchart of a clock synchronization method according to an embodiment of the present application;

[0062] [Figure 5] 1 is an exemplary flowchart of a clock synchronization method according to an embodiment of the present application;

[0063] [Figure 6A] 1 is an exemplary flowchart of a method for using a dual-clock synchronization mode, according to an embodiment of the present application. [Figure 6B] 1 is an exemplary flowchart of a method for using a dual-clock synchronization mode, according to an embodiment of the present application. [Figure 6C] 1 is an exemplary flowchart of a method for using a dual-clock synchronization mode, according to an embodiment of the present application.

[0064] [Figure 7] 1 is an exemplary flowchart of a method for synchronizing a management plane clock based on a data plane clock according to an embodiment of the present application;

[0065] [Figure 8] 1 is an exemplary diagram of the structure of a time synchronizer according to an embodiment of the present application;

[0066] [Figure 9] 1 is an exemplary diagram of the structure of an apparatus according to an embodiment of the present application;

[0067] [Figure 10] FIG. 1 is an exemplary diagram of a computer program product according to an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION

[0068] The technical solutions of the present application will be described below with reference to the accompanying drawings.

[0069] 1 illustrates an application scenario of the fault detection method according to an embodiment of the present application, which may include a vehicle 100 and an external clock source 180. The vehicle 100 and the external clock source 180 may communicate with each other through a network.

[0070] Some or all of the functions of vehicle 100 are controlled by computing platform 150. Computing platform 150 may include at least one processor 151. Processor 151 may execute instructions 153 stored on a non-transitory computer-readable medium, such as memory 152.

[0071] In some embodiments, computing platform 150 may alternatively be multiple computing devices that control individual components or subsystems of vehicle 100 in a distributed manner. Processor 151 may be any conventional processor, such as a central processing unit (CPU). Alternatively, processor 151 may further include an image processor (graphics process unit (GPU)), a field programmable gate array (FPGA), a system on chip (SOC), an application-specific integrated circuit (ASIC), or a combination thereof.

[0072] In addition to instructions 153, memory 152 may also store data, such as road maps, route information, location, direction, speed, and other such vehicle data, and other information for the vehicle 100. Such information may be used by vehicle 100 and computing platform 150 during operation of vehicle 100 in autonomous, semi-autonomous, and / or manual modes.

[0073] It should be understood that the vehicle configuration in FIG. 1 should not be construed as a limitation on this embodiment of the present application.

[0074] Optionally, vehicle 100 may include one or more different types of transportation means, and may also include one or more different types of transportation tools or movable objects that operate or move on land (e.g., highways, roads, or railroads), on water (e.g., waterways, rivers, or oceans), or in space. For example, vehicle may include a car, a bicycle, a motorcycle, a train, a subway, a plane, a boat, an aircraft, a robot, another type of transportation vehicle or movable object, etc. This is not limited in this embodiment of the present application.

[0075] In addition, the application scenario shown in Figure 1 may further include an external clock source 180, which may be located in a network device, such as a base station, Wi-Fi, or satellite. In this embodiment of the present application, the external clock source may provide first clock information for the vehicle and then perform the operation of the autonomous driving algorithm, thereby ensuring the operation of the autonomous driving.

[0076] Correspondingly, the vehicle 100 may include a receiver 120 configured to receive clock information transmitted by an external clock source 180 .

[0077] In the embodiments of the present application, GNSS refers to a satellite navigation system configured to provide positioning, navigation, and time services on a global or regional basis, and may be a global system, such as the Global Positioning System (GPS), the BeiDou navigation satellite system (BDS), the Glonass system (GLONASS), the Galileo positioning system (GALILEO), or other global satellite navigation systems under development and future; or a regional system, such as the Indian regional navigation satellite system (IRNSS), the quasi-zenith satellite system (QZSS), or other regional satellite navigation systems under development and future; or an associated augmentation system, such as the wide area augmentation system (WAAS), the European geostationary navigation overlay service (EGNOS), the multi-functional satellite augmentation system (MAS), or other related augmentation systems. It should be understood that the present invention may be implemented using a multi-sensor system (MSAS) and related augmentation systems under development and in the future, but this is not limited to this embodiment of the present application.

[0078] 2 is a schematic diagram of a clock synchronization system architecture according to one embodiment of the present application. Data plane clocks and / or management plane clocks can be synchronized using the clock synchronization system architecture. As shown in FIG. 2, the system architecture includes an external clock source, an internal clock source, a logic module, and a time synchronization module. The time synchronization module includes a data plane clock and a management plane clock.

[0079] An external clock source refers to an external clock source located outside the vehicle, for example a GNSS clock provided by a GNSS satellite, or an NTP clock provided by a communication network, for example a base station or Wi-Fi.

[0080] The internal clock source may be a local clock source, for example, a local hardware real-time clock (RTC) or an operating system clock.

[0081] The time synchronization module may implement synchronization between the data plane clock and the management plane clock. For example, the time of the data plane clock is set to be the same as or similar to the time of the management plane clock. The time synchronization module may be a control unit, such as a microcontroller unit (MCU) or an SoC. There may be one or more time synchronization modules. This is not limited in the embodiments of the present application.

[0082] It should be understood that based on different configurations, the data plane clock may or may not be synchronized with the management plane clock.

[0083] The data plane clock is a clock configured to provide time data for data processing in the autonomous driving algorithm logic, for example, a clock that may provide time data in the timestamps of sensor data.

[0084] A management plane clock is a clock configured to maintain, measure, and manage an autonomous driving system, such as a clock configured to provide time information for printing and saving autonomous driving system logs, or for data exchange between an autonomous driving system and an external device (e.g., another vehicle, a base station, or a cloud control platform). For brevity, examples will not be provided one by one here.

[0085] It should be understood that the data plane clock and the management plane clock may be distinguished in terms of function or entity, i.e., the data plane clock and the management plane clock may be two different clocks. Alternatively, the same clock may be used as a data plane clock to provide time data for data processing in the autonomous driving algorithm logic and as a management plane clock to maintain and manage the autonomous driving algorithm. This is not limited to this embodiment of the present application.

[0086] The logical module may receive first and second clock information provided by an external clock source and an internal clock source, respectively, and transmit the clock information to the time synchronization module. Optionally, the first and second clock information may be transmitted to the data plane clock and the management plane clock, respectively. The first clock information includes a first time synchronization indication and first time information, and the second clock information includes a second time synchronization indication and second time information. The first time synchronization indication instructs the management plane clock to synchronize with the external clock source based on the first time information. The second time synchronization indication instructs the data plane clock to synchronize with the internal clock source based on the second time information. For example, the first and second time synchronization indications may be pulses per second (PPS), and the pulses per second may be a high-level pulse signal. For example, the pulses per second transmitted by the external clock source may indicate that the management plane clock is synchronized with the external clock source at a particular time point. This time point may be the rising edge phase, high level phase, falling edge phase of the pulse, or a time point before or after the pulse. This is not limited in this embodiment of the present application. It should be understood that the above-mentioned first time synchronization indication or second time synchronization indication, which indicate that the management plane clock and the data plane clock are synchronized with the external clock source and the internal clock source, respectively, are merely examples. This is not limited in this embodiment of the present application.

[0087] Optionally, the logic module may be a programmable logic device, and may be various chips or circuits that have data processing functions and are compatible with two PPS signals, such as a complex programmable logic device (CPLD), an FPGA, or a digital signal processor (DSP), which is not limited in the embodiments of the present application.

[0088] Optionally, the management plane clock may be synchronized with an external clock source. Specifically, the time synchronization module may acquire first time information and a first time synchronization indication, and adjust the data plane clock based on the first time information and the first time synchronization indication. For example, the external clock source may transmit the first time information and the first time synchronization indication. The time synchronization module may acquire the first time information and the first time synchronization indication transmitted by the external clock source. After acquiring the first time information, the time synchronization module synchronizes the management plane clock with the external clock source based on the first time synchronization indication. By using the above method, the management plane clock may use the external clock source as a clock source for the management plane clock, so that synchronization between the management plane clock and the external clock source may be implemented.

[0089] It should be understood that the time synchronization module may obtain the first time information and / or the first time synchronization indication directly from the external clock source, or may obtain the first time information and / or the first time synchronization indication transmitted by the external clock source from another module. For example, the external clock source may transmit the first time synchronization indication to the logical module, and the time management module obtains the first time synchronization indication from the logical module. In another example, the external clock source may transmit the first time information and the first time synchronization indication to a first clock receiving module (not shown in FIG. 2), which may transmit the first time synchronization indication to the logic module, or the first clock receiving module may transmit the first time information to the time synchronization module. The time synchronization module may obtain the first time synchronization indication and the first time information from the logic module and the first clock receiving module, respectively. In another example, the external clock source may transmit the first time information and / or the first time synchronization indication to the first clock receiving module, and the time synchronization module obtains the first time information and / or the first time synchronization indication from the first clock receiving module. It should be understood that after receiving the first time information and / or the first time synchronization indication, another module may choose not to transmit the first time information and / or the first time synchronization indication to the time synchronization module. Thus, the time synchronization module cannot obtain the first time information and / or the first time synchronization indication and cannot synchronize the management plane clock with the external clock source. It should be understood that there may be one or more clock synchronization modules.

[0090] It should be understood that the above-described method of synchronizing the management plane clock with an external clock source is merely an example, which is not limited to the embodiments of the present application.

[0091] Optionally, the data plane clock may be synchronized with an internal clock source. Specifically, the time synchronization module may acquire second time information and a second time synchronization indication, and adjust the data plane clock based on the second time information and the second time synchronization indication. For example, the internal clock source may transmit the second time information and the second time synchronization indication. The time synchronization module may acquire the second time information and the second time synchronization indication transmitted by the internal clock source. After acquiring the second time information, the time synchronization module synchronizes the data plane clock with the internal clock source based on the second time synchronization indication. By using the above method, the data plane clock may use the internal clock source as its clock source, so that synchronization between the data plane clock and the internal clock source may be implemented.

[0092] It should be understood that the time synchronization module may obtain the second time information and / or the second time synchronization indication directly from the internal clock source, or may obtain the second time information and / or the second time synchronization indication transmitted by the internal clock source from another module. For example, the internal clock source may transmit the second time synchronization indication to the logical module, and the time management module obtains the second time synchronization indication from the logical module. It should be understood that after receiving the second time information and / or the second time synchronization indication, the other module may choose not to transmit the second time information and / or the second time synchronization indication to the time synchronization module. Therefore, the time synchronization module cannot obtain the second time information and / or the second time synchronization indication and cannot synchronize the data plane clock with the internal clock source.

[0093] It should be understood that the above-described method of synchronizing the data plane clock with the internal clock source is merely an example, which is not limited to the embodiments of the present application.

[0094] For example, if the internal clock source does not transmit the second time information and / or the second time synchronization indication, the time synchronization module cannot obtain the second time information and / or the second time synchronization indication, and the data plane clock cannot synchronize with the internal clock source. To maintain stable operation of the data plane clock, the data plane clock may obtain the time information of the management plane clock and synchronize with the management plane clock, or may obtain the first time information and / or the first time synchronization indication from an external clock source and synchronize with the external clock source. In the above manner, the data plane clock and the management plane clock may use the same clock source. It should be understood that, since the data plane clock and the management plane clock are synchronized, the data plane clock and the management plane clock may alternatively be the same clock. This same clock may use the internal clock source as a clock source and function as both the data plane clock and the management plane clock. In other words, time synchronization Period The module may obtain the second time information and the second time synchronization indication, set only one clock, and synchronize this clock with an internal clock source. This clock may be used as a data plane clock to provide time data for data processing in the autonomous driving algorithm logic, or as a control plane clock to maintain and manage the autonomous driving algorithm. It should be understood that the above-described scheme of using the same clock source for the data plane clock and the control plane clock is merely an example and is not a limitation of the present application.

[0095] For example, if the internal clock source transmits the second time information and / or the second time synchronization indication after acquiring the second time information and / or the second time synchronization indication, another module may choose not to transmit the second time information and / or the second time synchronization indication, and the time synchronization module may not acquire the second time information and / or the second time synchronization indication from this module. As a result, the data plane clock may not be synchronized with the internal clock source. The data plane clock may acquire the time information of the management plane clock and synchronize with the management plane clock to ensure stable operation of the data plane clock. In this manner, the data plane clock and the management plane clock may use the same clock source. For example, the internal clock source may transmit the second time information to the time synchronization module, and the internal clock source may transmit the second time synchronization indication to the logic module. The logic module may choose not to transmit the second time synchronization indication after acquiring the second time synchronization indication from the internal clock source. In this case, the time synchronization module may acquire the second time information but may not acquire the second time synchronization indication. As a result, the data plane clock cannot be synchronized with an internal clock source. In this case, the data plane clock may obtain time information from the management plane clock and synchronize with the management plane clock. Since the data plane clock is synchronized with the management plane clock and there is only one clock source, it should be understood that the data plane clock and the management plane clock may alternatively be the same clock, and a second clock may be used as the clock source and be used as both the data plane clock and the management plane clock. Details will not be described again here. It should be understood that the above-described scheme of using the same clock source for the data plane clock and the management plane clock is merely an example, and is not a limitation of this application.

[0096] It should be understood that the data plane clock and the management plane clock may not be synchronized because they may use different clock sources, but the data plane clock and the management plane clock may be synchronized because a time synchronization module can implement synchronization between the data plane clock and the management plane clock.

[0097] According to the system architecture in this embodiment of the present application, the data plane clock and the management plane clock may use the same clock source. Alternatively, the data plane clock and the management plane clock may use different clock sources and be synchronized. Alternatively, the data plane clock and the management plane clock may use different clock sources and remain asynchronous. In other words, based on the system architecture in this embodiment of the present application, multiple different clock schemes may be implemented.

[0098] It should be understood that the above description is only used as one implementation, and the actual operation can be determined with reference to the actual situation, which is not limited in this specification.

[0099] It should be understood that the aforementioned modules may be hardware modules in a hardware device, software modules running on dedicated hardware, or virtualized modules instantiated on a platform (e.g., a cloud platform). Optionally, the aforementioned modules may be implemented by one device, or may be jointly implemented by multiple devices, or may be implemented by functional modules in one device. This is not particularly limited in the embodiments of the present application.

[0100] It should be understood that the above-described system architecture applied to the embodiments of the present application is merely an example of a system architecture described from the perspective of clock synchronization for autonomous driving, and that the system architecture applicable to the embodiments of the present application is not limited to this. Any system architecture that can implement the functions of the above-described modules is applicable to the embodiments of the present application.

[0101] In this embodiment of the present application, synchronization between the management plane clock and the first clock may be implemented based on the first time information, or synchronization between the data plane clock and the second clock may be implemented based on the second time information. Therefore, during the execution of the autonomous driving algorithm, multiple different clock schemes may be used based on different requirements. In this way, different requirements, such as stable operation of the autonomous driving algorithm and external interaction, can be met.

[0102] For example, for ease of understanding, FIG. 3 is a schematic diagram of one implementation of a clock synchronization system architecture. A CPLD is used as an example of a logic module, an MCU is used as an example of a first time synchronization module, an SoC is used as an example of a second time synchronization module, a GNSS clock (GNSS_CLK) is used as an example of an external clock source, an operating system clock (Os_CLK) is used as an example of an internal clock source, and correspondingly, a GNSS_CLK PPS is used as an example of a first time synchronization indication, and an integrated inertial positioning system is used as an example of a first clock receiving module. The first clock receiving module is configured to receive first time information and the first time synchronization indication transmitted by the external clock source. The first time information may be included in a GNSS_CLK GPRMC message. The Os_CLK PPS is used as an example of a second time synchronization indication. Methods for data plane clock synchronization and management plane clock synchronization of MCUs in the system architecture will be described separately.

[0103] For example, the following describes how the system architecture in this embodiment of the present application synchronizes the management plane clock with an external clock source.

[0104] As shown in FIG. 3, after receiving the time information of the GNSS_CLK, the integrated inertial positioning system transmits a PPS signal of the GNSS_CLK, i.e., a GNSS_CLK PPS, to the CPLD every second. After receiving the GNSS_CLK PPS, the CPLD may transmit the PPS to the MCU, and the PPS may indicate the time when the control plane clock is synchronized with the GNSS clock. For example, the control plane clock may be synchronized with the GNSS clock when the GNSS_CLK PPS is received. It should be understood that the above-mentioned time of synchronization between the control plane clock and the GNSS clock is merely an example for explanation, and is not limited in this embodiment of the present application.

[0105] The integrated inertial positioning system may send a GPRMC message corresponding to the GNSS_CLK PPS to the MCU, and the GPRMC message may include time information of the GNSS clock, i.e., first time information, and GNSS status information. The GNSS status information may indicate whether the GNSS positioning status is valid. For example, if the number of satellites in the current antenna view is greater than or equal to three, or if the number of satellites used by the GNSS is greater than or equal to three, the GNSS positioning is considered valid, i.e., valid positioning can be achieved based on the current GNSS, or the GNSS status is valid. If the number of satellites in the current antenna view is less than three, or if the number of satellites used by the GNSS is less than three, the GNSS positioning is considered invalid, i.e., valid positioning cannot be achieved based on the current GNSS, or the GNSS status is invalid. It should be understood that the above relationship between the GNSS status and the number of satellites in the current antenna view is merely an example for explanation, and is not limited to this embodiment of the present application.

[0106] The MCU can obtain the GNSS clock time information and GNSS status information from the GPRMC message. If the GNSS status is invalid, the MCU can stop synchronizing the management plane clock with the external clock source. If the GNSS status is valid, the MCU can synchronize the management plane clock based on the GNSS clock. For example, the MCU can adjust the time of the management plane clock in the MCU by using the GNSS clock time information in the GPRMC message. In another example, the MCU can adjust the time of the management plane clock in the MCU by using integer second information of the GNSS clock time in the GPRMC message and delay information, where the delay information may be preset in the system configuration or may be obtained through calculation based on the vehicle status. This is not limited in the present application. It should be understood that the above management plane clock synchronization method is merely an example for ease of explanation. This is not limited in this embodiment of the present application.

[0107] For example, the following describes how the system architecture in this embodiment of the present application synchronizes the data plane clock with an internal clock source.

[0108] 3, after the CPLD is started, the CPLD can output an Os_CLK pulse per second, i.e., Os_CLK_PPS, to the MCU and SoC every second based on the local crystal oscillator. The time when the CPLD transmits the Os_CLK_PPS may be the same as the time when the CPLD transmits the GNSS_CLK_PPS, or may be different from the time when the CPLD transmits the GNSS_CLK_PPS. This is not limited in this embodiment of the present application.

[0109] After receiving the Os_CLK PPS transmitted by the CPLD, the MCU may synchronize the data plane clock with the Os_CLK. For example, the MCU may adjust the time of the data plane clock in the MCU by using the Os_CLK time information. In another example, the MCU may adjust the time of the data plane clock in the MCU by using the integer second information of the Os_CLK time and the delay information. The integer second information of the Os_CLK time may be obtained by rounding off the non-integer second portion of the Os_CLK time. That is, if the non-integer second portion of the Os_CLK time is less than 500 ms, the integer second value of the Os_CLK time is used. If the non-integer second portion of the Os_CLK time is greater than or equal to 500 ms, the integer second value of the Os_CLK time plus 1 is used. The delay information may be preset in the system configuration or may be obtained through calculation based on the vehicle status. This is not limited to this embodiment of the present application.

[0110] It should be understood that the data plane clock within the MCU can be fine-tuned along with the Os_CLK_PPS sent by the CPLD.

[0111] It should be understood that if the CPLD does not send Os_CLK pulses per second to the MCU, the data plane clock may not be synchronized with Os_CLK. Based on the system configuration, the data plane clock may obtain time information from the management plane clock, synchronize with the management plane clock, and then synchronize with the GNSS clock. Alternatively, the data plane clock may obtain time information from the GNSS clock and synchronize with the GNSS clock. Alternatively, the data plane clock and the management clock may be the same clock, and the clock is synchronized with the GNSS clock. The above method of synchronizing the data plane clock with the GNSS clock is merely one example for ease of explanation. This is not limiting in this embodiment of the present application.

[0112] It should be understood that based on the system architecture in this embodiment of the present application, the data plane clock and the management plane clock may use the same clock source, for example, a GNSS clock source. Alternatively, the data plane clock and the management plane clock may use different clock sources. It should be understood that the data plane clock and the management plane clock in the MCU may use different clocks as their clock sources, and therefore the data plane clock and the management plane clock may or may not be synchronized. For example, the data plane clock and the management plane clock use different clocks as their clock sources, respectively, and remain synchronized. For example, the data plane clock uses Os_CLK as its clock source, the management plane clock uses GNSS_CLK as its clock source, and the data plane clock is synchronized with the management plane clock, that is, the synchronization mode of the data plane clock and the management plane clock is determined to be synchronous. Alternatively, the data plane clock and the management plane clock may use different clock sources and not be synchronized. For example, the data plane clock uses Os_CLK as a clock source, the management plane clock uses GNSS_CLK as a clock source, and the data plane clock and the management plane clock are not synchronized, that is, the synchronization mode of the data plane clock and the management plane clock is determined to be asynchronous. It should be understood that multiple different clock schemes can be implemented based on the system architecture in the embodiments of the present application.

[0113] It should be understood that when multiple time synchronization modules exist, the management plane clock synchronization and data plane clock synchronization schemes of the multiple time synchronization modules may be similar to those of the MCU. For example, the data plane clock synchronization and management plane clock synchronization of the second clock synchronization module SoC are similar to those of the first clock synchronization module MCU. For brevity, the details will not be described again here.

[0114] It should be understood that the above description is only used as one implementation of the time synchronization system architecture, and the actual operation can be determined with reference to the actual situation, which is not limited in this specification.

[0115] 4 is a flowchart of a clock synchronization method according to an embodiment of the present application. The method 200 includes steps S210 to S220. The steps of the method S200 are described in detail below.

[0116] S210: Obtain a first signal including clock information of an external clock source.

[0117] Specifically, the external clock source may be a GNSS clock or an NTP clock. If the external clock source is a GNSS clock, the first signal may be a GNSS signal. The vehicle may acquire the GNSS signal from a global positioning satellite system, and this signal includes clock information of the GNSS clock. If the external clock source is an NTP clock, the first signal may be a mobile signal. The vehicle may acquire the mobile signal from a network device, such as a base station or Wi-Fi. This signal includes clock information of the NTP clock.

[0118] It should be understood that the first signal can be acquired by using a receiving module, such as an antenna, a signal receiving unit, or an external device, which can be an inertial navigation system, a telematics box (T-BOX), etc. This is not limited in the present application.

[0119] S215: Determine the signal quality of the first signal.

[0120] Specifically, the signal quality of the first signal may be determined based on the acquired first signal.

[0121] Optionally, the signal quality of the first signal may be a signal strength of the first signal, or may be a signal-to-noise ratio of the first signal, or may be another indicator used to represent the signal quality of the first signal.

[0122] It should be understood that the signal quality of the first signal may be evaluated by using one or more signal parameters. For example, signal strength may be used to represent the signal quality of the GNSS signal, or multiple signal parameters may be used to represent the signal quality of the GNSS signal. For example, signal strength, GNSS status, and signal-to-noise ratio may be used to evaluate the quality of the GNSS signal. In other words, the signal quality of the GNSS signal may be evaluated by using one or more GNSS signal parameters. This is not limited to this embodiment of the present application.

[0123] S220: Determine a clock mode, including a first clock mode and a second clock mode, based on a signal quality of the first signal, where when the vehicle operates in the first clock mode, the vehicle acquires first clock information from an external clock source, or when the vehicle operates in the second clock mode, the vehicle acquires the first clock information and the second clock information from an external clock source and an internal clock source, respectively, where the internal clock source is located within the vehicle.

[0124] It should be understood that the first clock mode means that the data plane clock and the management plane clock use the same clock source. Specifically, the data plane clock and the management plane clock use an external clock source as their clock source. For example, both the data plane clock and the management plane clock use a GNSS clock as their clock source. The second clock mode means that the data plane clock and the management plane clock use different clock sources. Specifically, the clock source of the management plane clock is an external clock source, which may be a GNSS clock or an NTP clock, and the clock source of the data plane clock is an internal clock source, which may be a local hardware real-time clock.

[0125] It should be understood that the first clock mode may mean that the data plane clock and the management plane clock use the same clock source, and that in the time synchronization module, the same clock is used as the data plane clock to provide time data for data processing in the autonomous driving algorithm logic and as the management plane clock to manage and maintain the autonomous driving algorithm, and the clock uses an external clock source as the clock source; or that in the time synchronization module, two clocks are used as the data plane clock and the management plane clock, respectively, and the data plane clock and the management plane clock use the same clock source.

[0126] Optionally, the clock mode may be determined based on a system configuration, for example, when autonomous driving is initiated for the first time, the clock mode may be determined based on a default clock scheme configured in the system.

[0127] It should be understood that if signal quality does not need to be confirmed, the clock mode is determined to be the first clock mode or the second clock mode based on the system configuration. For example, the clock mode may be determined to be the first clock mode or the second clock mode based on the system configuration, so that autonomous driving can operate only in the first clock mode or the second clock mode without confirming the signal quality of the first signal or adjusting the clock mode based on a change in the signal quality of the first signal. The system configuration may indicate a clock scheme for the vehicle, i.e., instruct the vehicle to run in the first clock mode or the second clock mode. It should be understood that the above-described manner of determining the clock mode based on the system configuration is merely an example and is not limiting in this application.

[0128] Optionally, the clock mode is determined to be a first clock mode when a signal quality of the first signal is greater than or equal to a first threshold, wherein the first threshold indicates a signal quality threshold of the first signal that can provide stable clock information for autonomous driving.

[0129] It should be understood that when a signal parameter is used to represent the first signal, the first threshold may be a threshold related to the indicator. For example, when signal strength is used to represent the signal quality of a GNSS signal, the first threshold may be −130 dBm. When signal strength is used to represent a mobile signal transmitted by a base station, the first threshold may be −90 dBm. When multiple signal parameters are used to represent a GNSS signal or a radio signal transmitted by a base station, the first threshold may be a threshold related to the multiple signal parameters. For example, when signal strength and signal-to-noise ratio are used to represent the signal quality of a GNSS signal, the corresponding first threshold may be a signal strength of −130 dBm and an SNR of 70 dB, or may be a score value for scoring different parameters. It should be understood that the above example of the first threshold is merely for ease of understanding and is not limited to this embodiment of the present application.

[0130] For example, if the signal strength of the first signal is greater than or equal to a first threshold, the clock mode may be determined to be the first clock mode. For example, if the signal strength of the acquired GNSS signal is greater than or equal to -130 dBm, the GNSS signal quality may be deemed sufficient to provide a stable signal for autonomous driving, and the clock mode may be determined to be the first clock mode. In another example, if the signal strength of the acquired GNSS signal is less than -130 dBm for some time periods, but the duration during which the GNSS strength signal is less than -130 dBm is less than 200 ms, the GNSS signal quality may be deemed sufficient to provide a stable signal for autonomous driving, and the clock mode may be determined to be the first clock mode.

[0131] For example, when GNSS signals transmitted from multiple satellites are acquired, if the signal strengths of the GNSS signals transmitted from more than a specified number of satellites are received and all of them are greater than a specified GNSS signal strength threshold, the clock mode is determined to be the first clock mode. For example, when GNSS signals transmitted from 10 satellites are acquired and the signal strengths of the GNSS signals transmitted from greater than or equal to five of the 10 satellites are greater than or equal to -130 dBm, it is determined that good GNSS quality can provide stable signals for autonomous driving. That is, in this case, the first threshold can be understood as the signal strengths of the GNSS signals transmitted from five satellites being greater than or equal to -130 dBm. If the signal quality of the GNSS signals is greater than or equal to the first threshold, the clock mode is determined to be the first clock mode.

[0132] For example, if the GNSS status is valid or the number of satellites on the current antenna view is greater than or equal to a first threshold, it is determined that the clock mode is the first clock mode. For example, if the number of satellites on the current antenna view is 5 or more, i.e., if the current number of satellites is 5 or more, it is deemed that the current GNSS may provide a valid signal for autonomous driving, and the clock mode may be set to the first clock mode.

[0133] For example, if the signal-to-noise ratio of the GNSS signal is equal to or greater than a first threshold, it is determined that the clock mode is the first clock mode. For example, if the signal-to-noise ratio is equal to or greater than 70 dB, it is considered that the current GNSS may provide a stable signal for autonomous driving, and the clock mode may be set to the first clock mode.

[0134] For example, if the difference between the period between GNSS signal update times and the standard period exceeds a specified threshold multiple times in a row, the clock mode is determined to be the first clock mode. For example, for a GNSS signal with an update frequency of 1 Hz, if the time difference between the period between two GNSS signal update times (e.g., 1.02 seconds) and the standard GNSS signal update period (e.g., 1 second) is less than a specified threshold (e.g., 0.05 seconds) multiple times in a row (e.g., three times in a row), it is deemed that the current GNSS can provide a stable signal for autonomous driving, and the clock mode may be set to the first clock mode. For brevity, multiple examples will not be provided one by one.

[0135] It should be understood that different first thresholds may be set based on different requirements of the autonomous driving algorithm for GNSS signal quality, and the clock mode is determined based on the first thresholds.

[0136] It should be understood that the external clock source may be determined based on the signal quality of the first signal. For example, if the signal strength of the first signal is greater than a first threshold, autonomous driving may be performed in a first clock mode, and if the signal strength of the first signal is less than a clock signal switching threshold, the clock source may be switched. When the vehicle runs in the first clock mode, the clock signal switching threshold may indicate a threshold used to determine the signal quality of the first signal of the external clock source. It should be understood that the clock signal switching threshold is greater than the first threshold. For example, when a vehicle is running in a first clock mode, the current external clock source is a GNSS clock, the first signal is a GNSS signal, the signal strength (e.g., −123 dBm) of the GNSS signal is higher than a first threshold (e.g., −130 dBm) and lower than a corresponding clock signal switching threshold (e.g., −120 dBm), and the signal strength (e.g., −80 dBm) of a mobile signal currently acquired by the vehicle from a base station is higher than a corresponding clock signal switching threshold (e.g., −83 dBm) and higher than a corresponding first threshold (e.g., −90 dBm), the external clock source may be switched from the GNSS clock to the NTP clock when this signal is used as the first signal. For brevity, multiple examples will not be provided one by one. In this manner, a more accurate clock may be provided for the first clock mode, thereby ensuring stable operation of autonomous driving.

[0137] Optionally, the external clock source may be determined based on the signal quality of the first signal and the environment in which the vehicle is located. For example, when the vehicle is driving on an urban highway in a first clock mode and then enters an underground garage, the current external clock source of the vehicle is the GNSS clock. The corresponding first signal is a GNSS signal, and the signal strength (e.g., −120 dBm) is higher than a first threshold (e.g., −130 dBm). When the signal strength (e.g., −80 dBm) of a mobile signal acquired by the vehicle from a base station is higher than the corresponding first threshold (e.g., −90 dBm), if this signal is used as the first signal, the vehicle cannot acquire a stable GNSS signal in the underground garage. Therefore, the external clock source may be switched from the GNSS clock to the NTP clock, thereby ensuring smooth autonomous driving after the vehicle enters the underground garage. It should be understood that the environment in which the vehicle is located can be determined based on image information acquired by the vehicle, acquired GNSS signals, or interactions between the vehicle and the outside. In this way, a more accurate clock is provided for the first clock mode, which can ensure stable operation of autonomous driving.

[0138] Optionally, if the quality of the GNSS signal is less than a first threshold, the clock mode is determined to be the second clock mode.

[0139] For example, if the GNSS signal strength is less than the first threshold, for example, if the GNSS signal strength is less than −130 dBm, it is determined that the clock mode is the second clock mode. Details will not be described again here.

[0140] For example, if the GNSS status is invalid, or if the number of satellites on the current antenna view is less than a first threshold, for example, if the number of satellites on the current antenna view is less than 3, the clock mode is determined to be dual clock mode.

[0141] For example, if the signal-to-noise ratio of the GNSS signal is smaller than a first threshold, for example, if the signal-to-noise ratio of the GNSS signal is smaller than 70 dB, it is determined that the clock mode is the dual-clock mode.

[0142] It should be understood that if the signal quality of the first signal acquired by the vehicle changes, the clock mode may be adjusted accordingly. For example, when the vehicle is running in the first clock mode and the signal quality of the GNSS signal acquired by the vehicle changes from greater than or equal to the first threshold to less than the first threshold, for example, when the signal strength of the GNSS signal changes from −120 dBm to −135 dBm, and the corresponding first threshold is −130 dBm, the clock mode may be adjusted from the first clock mode to the second clock mode, and the vehicle may then run in the second clock mode. For brevity, multiple examples will not be provided one by one. It should be understood that the above-described method of adjusting the clock mode based on the signal quality of the first signal is merely an example, and is not limited to this embodiment of the present application.

[0143] It should be understood that the above-described method of determining the clock mode based on the first threshold is merely an example, which is not limiting in the present application.

[0144] It should be appreciated that after the clock mode is determined, the data plane clock and the management plane clock are synchronized with their respective clock sources.

[0145] It should be understood that the data plane clock and the management plane clock can be synchronized with the clock source of the data plane clock and the management plane clock based on the time synchronization system architecture in this embodiment of the present application, and the details will not be described again here.

[0146] According to the method of this embodiment of the present application, the clock mode may be determined based on the signal quality of the first signal, so that the vehicle can run in the first clock mode or the second clock mode based on different scenario requirements, thereby ensuring the stability of the autonomous driving algorithm application logic. In this way, the hardware or software logic of the same domain controller can meet the requirements of different clock schemes in different scenarios.

[0147] It should be understood that in this embodiment of the present application, when the quality of the first signal is good, the clock mode is determined to be the first clock mode, so that the clock information provided by the first signal is sufficient to maintain the stability of the autonomous driving algorithm application logic, and the clock synchronization logic can be simplified and the energy and computing resource dissipation caused by the clock synchronization can be reduced. When the signal quality of the first signal is poor, the clock mode is determined to be the second clock mode, so that time jumps caused by the poor signal quality of the first signal when only the external clock source is used as the clock source can be avoided and the autonomous driving algorithm application logic can be kept stable.

[0148] Optionally, the second clock mode includes a dual-clock synchronous mode and a dual-clock asynchronous mode. The second clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode based on whether an external interaction is performed. The dual-clock synchronous mode means that the data plane clock may be synchronized based on the management plane clock, resulting in the data plane clock and the management plane clock being synchronized. The dual-clock asynchronous mode means that the data plane clock and the management plane clock may not be synchronized. The external interaction refers to an interaction between the vehicle and another device for communication, such as an interaction between another vehicle (vehicle to vehicle, V2V), an interaction between infrastructure (vehicle to infrastructure, V2I), or an interaction between a cloud control platform (vehicle to cloud, V2C).

[0149] In this embodiment of the present application, if there is no external interaction requirement, it may be determined that the second clock mode is a dual-clock asynchronous mode, so that synchronization between the data plane clock and the management plane clock is not performed. Therefore, when the signal quality of the first signal is low, a time jump caused by synchronization between the management plane clock and the external clock source is prevented from affecting the data plane clock, thereby avoiding the impact of the time jump on the autonomous driving application logic and maintaining stable operation of autonomous driving. If there is an external interaction requirement, it may be determined that the second clock mode is a dual-clock synchronous mode, so that the data plane clock is synchronized with the management plane clock, so that the external interaction requirement of autonomous driving can be met. The second clock mode is distinguished into a dual-clock synchronous mode or a dual-clock asynchronous mode, so that the vehicle can determine a more reasonable clock scheme according to different requirements.

[0150] It should be understood that the second clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode based on a system configuration. For example, when autonomous operation is initiated for the first time, the second clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode based on a default clock scheme configured in the system.

[0151] It should be understood that the second clock mode is determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode based on the system configuration without checking the requirements of external interaction. For example, the second clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode based on the system configuration, so that the vehicle may not need to determine the signal quality of the first signal and the requirements of external interaction. Alternatively, if the second clock mode does not need to be adjusted to the dual-clock synchronous mode or the dual-clock asynchronous mode based on changes in external requirements, only the dual-clock synchronous mode or the dual-clock asynchronous mode is used, and the system configuration may indicate the clock scheme of the vehicle and indicate that the vehicle is running in the dual-clock synchronous mode or the dual-clock asynchronous mode. It should be understood that the above-described manner of determining the clock mode based on the system configuration is merely an example and is not limiting in this application.

[0152] It should be understood that synchronization between the data plane clock and the management plane clock may mean that the time of the data plane clock and the time of the management plane clock are exactly the same, or may mean that the time difference between the data plane clock and the management plane clock is within a small range. For example, if the time difference between the data plane clock and the management plane clock is within a second threshold, the data plane clock and the management plane clock are considered to be synchronized.

[0153] Optionally, in the dual-clock synchronization mode, the external clock source may be determined based on the environment in which the vehicle is located. In other words, the clock source of the management plane clock in the dual-clock synchronization mode may be determined based on the vehicle driving scenario.

[0154] For example, the environment in which the vehicle is located may be determined based on image data acquired by the vehicle. The environment in which the vehicle is located may be determined based on acquired GNSS signals. The environment in which the vehicle is located may be determined based on acquired interactions between the vehicle and the outside (vehicle to everything, V2X). Alternatively, the driving scenario of the vehicle may be determined based on other acquired information. It should be understood that the above-mentioned method of determining the environment in which the vehicle is located is merely an example for ease of explanation, and is not limited to this embodiment of the present application.

[0155] Optionally, the scenario management module may determine the environment in which the vehicle is located. The scenario management module determines the vehicle's driving scenario, i.e., the environment in which the vehicle is located, based on the acquired information. For example, the scene management module may determine the environment in which the vehicle is located based on one or more of image data, GNSS signals, or information about interactions between the vehicle and the outside, or may determine the environment in which the vehicle is located in another manner, for example, through detection results of an on-board radar. It should be understood that the above-mentioned method of determining the vehicle driving scenario by the scenario management module is merely an example, and is not limited to this embodiment of the present application.

[0156] For example, determining the external clock source, i.e., the clock source of the control plane clock, based on the environment in which the vehicle is located may be determining the clock source of the control plane clock based on the current environment in which the vehicle is located. For example, when the vehicle is on an urban highway, it is deemed that GNSS signals in the environment in which the vehicle is currently located can provide clock information, and the external clock source is determined to be a GNSS clock. Alternatively, when the vehicle is located in an underground garage, it is deemed that GNSS signals cannot provide stable clock information in the current environment of the vehicle, and the external clock source is determined to be an NTP clock. Alternatively, when the vehicle is in a tunnel or under a bridge, it is determined that the external clock source is an NTP clock. Alternatively, when the vehicle is at an entrance / exit between a tunnel and a highway, it is determined that the external clock source is an NTP clock. Alternatively, when the vehicle is located in an indoor parking lot, it is determined that the external clock source is an NTP clock. Alternatively, when the vehicle is in an outdoor bicycle parking lot, it is determined that the external clock source is a GNSS clock. Alternatively, when the vehicle is in another scenario, it may be determined that the external clock source is a GNSS clock or an NTP clock. The above-described manner of determining the external clock source based on the current environment of the vehicle is merely an example, and is not limited to this embodiment of the present application.

[0157] For example, determining the clock source of the control plane clock based on the environment in which the vehicle is located may alternatively be determining an external clock source based on the environment in which the vehicle will be located in the future. For example, if the vehicle is on an urban highway and then enters an underground garage, when the vehicle is on the urban highway before entering the underground garage, the external clock source may be adjusted from the GNSS clock to the NTP clock to meet the requirement of smooth operation of the autonomous driving function after the vehicle enters the underground garage and to avoid the impact of time jumps caused by improper clock synchronization on the autonomous driving application logic. The above-described method of determining the external clock source based on the environment in which the vehicle will be located in the future is merely an example. This is not limited to this embodiment of the present application.

[0158] In this embodiment of the present application, since the control plane clock cannot obtain accurate time information from the clock source of the control plane clock, to avoid impact on the autonomous driving application logic, an external clock source is determined and a better clock source can be selected for the control plane clock.

[0159] Optionally, when the second clock mode is a dual-clock synchronization mode, the management plane clock may be used to synchronize the data plane clock based on a second threshold. Specifically, when the time difference between the data plane clock and the management plane clock is greater than a second threshold, time_gap, the management plane clock is used to synchronize the data plane clock. For example, when the time difference between the data plane clock and the management plane clock is greater than or equal to 200 ms, the data plane clock is synchronized based on the management plane clock. Alternatively, when the time difference between the data plane clock and the management plane clock is less than or equal to the second threshold, the management plane clock and the data plane clock are not synchronized. It should be understood that the above-described method of synchronizing the data plane clock based on the second threshold by using the management plane clock is merely an example, and is not a limitation of the present application.

[0160] Optionally, when the second clock mode is a dual-clock synchronization mode, the control plane clock may be used to synchronize the data plane clock based on the vehicle's vehicle speed. Specifically, when the vehicle's vehicle speed is less than a third threshold, the data plane clock is synchronized based on the control plane clock. For example, when the vehicle speed is less than or equal to 5 km / h, the data plane clock is synchronized based on the control plane clock. Alternatively, when the vehicle speed is greater than or equal to the third threshold, the control plane clock and the data plane clock are not synchronized. The third threshold indicates a maximum vehicle speed at which a time jump is allowed for autonomous driving in the current scenario. It should be understood that the third threshold may be a fixed value or a different threshold determined based on different scenarios. For example, when the vehicle is driving on an urban road, the third threshold may be 5 km / h, or when the vehicle is driving on an outdoor highway, the third threshold may be 85 km / h. It should be understood that the above-described method of synchronizing the data plane clock based on the vehicle speed of the vehicle by using the control plane clock is merely an example, and is not a limitation of the present application.

[0161] Optionally, when the second clock mode is a dual-clock synchronization mode, the control plane clock may be used to synchronize the data plane clock based on whether the vehicle is taken over. For example, a driver monitoring system (DMS) recognizes the current driver status, and when it is determined that the vehicle is taken over by a user, the data plane clock may be synchronized based on the control plane clock. According to this method, when the vehicle is in a safe state where the vehicle is taken over, the data plane clock may be synchronized based on the control plane clock to avoid any impact on the autonomous driving algorithm.

[0162] It should be understood that the control plane clock may be used to synchronize the data plane clock based on a second threshold with reference to the vehicle's speed. Specifically, if the time difference between the data plane clock and the control plane clock is greater than the second threshold, time_gap, the synchronized data plane clock and the control plane clock may be determined based on the vehicle speed. For example, if the vehicle speed is less than a third threshold, the data plane clock may be synchronized based on the control plane clock. For example, if the vehicle is operating on a complex urban road, e.g., a congested urban road section during peak commuting hours, the time difference between the data plane clock and the control plane clock may be greater than time_gap. If the vehicle speed is less than a third threshold, e.g., 1 km / h, it may be determined based on the vehicle status that the vehicle speed is less than the third threshold that clock synchronization in the current status does not affect autonomous driving, and the data plane clock may be synchronized based on the control plane clock. In another example, when a vehicle is traveling at high speed in a single road condition, for example, when the vehicle is traveling on a highway with no other vehicles, the time difference between the data plane clock and the control plane clock is greater than time_gap. If the vehicle speed is less than a third threshold, for example, 85 km / h, it may be determined based on the vehicle status where the vehicle speed is less than the third threshold that clock synchronization in the current status does not affect autonomous driving, and the data plane clock may be synchronized based on the control plane clock.

[0163] For example, if the time difference between the data plane clock and the control plane clock is greater than a second threshold, it is determined that the vehicle has been taken over before the control plane clock is used to synchronize the data plane clock. For example, when the vehicle is traveling at a speed greater than a second threshold on an urban road with complex road conditions, if the time difference between the data plane clock and the control plane clock is greater than time_gap, it is determined that the vehicle has been taken over. If the vehicle has been taken over, it may be considered that the vehicle is currently in a safe state. The time jump generated when the control plane clock is used to synchronize the data plane clock does not affect autonomous driving. If the vehicle has not been taken over, it is determined that the vehicle has exited autonomous driving, and if the vehicle has not exited autonomous driving, the user is reminded to take over the vehicle or exit autonomous driving.

[0164] It should be understood that the above method of synchronizing the data plane clock based on the management plane clock is merely an example for ease of explanation, which is not limited to this embodiment of the present application.

[0165] It should be understood that the data plane clock and the control plane clock can be synchronized based on system settings. For example, when developing an autonomous driving algorithm, an algorithm development user sets clock synchronization methods and conditions, etc. For example, during the vehicle driving process, the data plane clock and the control plane clock can be synchronized based on system settings.

[0166] For example, when autonomous operation is initiated for the first time, the dual-clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode according to the default clock scheme configured in the system.

[0167] Optionally, the vehicle may include a first device and a second device, both of which include a data plane clock and a control plane clock, and both of which can control the running of the vehicle.

[0168] For example, when a first device controls the running of a vehicle and the data plane clock needs to be synchronized based on the management plane clock, for example, when the time difference between the data plane clock and the management plane clock in the first device is greater than a second threshold, data of the first device may be backed up to a second device, and the second device controls the running of the vehicle based on the backed up data of the first device and synchronizes the data plane clock of the first device based on the management plane clock of the first device. The data of the first device may be data used by the first device to control the running of the vehicle.

[0169] In this embodiment of the present application, when the data of a first device for controlling the running of a vehicle is backed up to a second device, and the second device controls the running of the vehicle, and as a result, the data plane clock is synchronized based on the management plane clock of the first device, the impact on the autonomous driving application logic can be avoided and the stable operation of autonomous driving can be ensured.

[0170] Furthermore, after the data plane clock of the first device is synchronized based on the control plane clock of the first device, the first device may control the running of the vehicle.

[0171] Specifically, data of the second device may be backed up to the first device, so that the first device can again control the running of the vehicle based on the backed-up data of the second device. The data of the second device may be data used by the second device to control the running of the vehicle.

[0172] In this embodiment of the present application, the data of the second device for temporarily controlling the driving of the vehicle is backed up to the first device, and the first device can control the driving of the vehicle again after synchronizing the data plane clock based on the control plane clock. If the performance of performing autonomous driving by the first device is higher than that of the second device, the autonomous driving algorithm can operate more smoothly and efficiently.

[0173] Furthermore, after the first device takes control of the vehicle again, the second device may synchronize the data plane clock of the second device based on the control plane clock of the second device, thereby avoiding any impact on autonomous driving caused by asynchronization between the data plane clock and the control plane clock of the second device when the second device subsequently needs to control the vehicle.

[0174] In this embodiment of the present application, if the algorithm development user can obtain clock synchronization permission in the domain controller, the algorithm development user can develop a user-configured system configuration according to this algorithm, and adjust the first device or the second device to control the running of the vehicle by coordinating the internal execution and status switching between the vehicle and the domain controller, so as to maintain stable operation of autonomous driving by implementing synchronization between the management plane clock and the data plane clock.

[0175] In this embodiment of the present application, synchronization is performed between the data plane clock and the management plane clock, so that the impact of time jumps on autonomous driving can be avoided while satisfying external interactions, and the stable operation of autonomous driving application logic can be guaranteed.

[0176] For example, Figure 5 is an exemplary flowchart of a clock synchronization method according to an embodiment of the present application. As shown in Figure 5, it includes the following steps:

[0177] S310: Configure a clock scheme through system configuration.

[0178] Optionally, the clock scheme may be configured in the system configuration. It should be understood that the system configuration may include one or more of parameters such as the clock mode, the first threshold used to determine the clock mode, the clock signal switching threshold used to determine the external clock source, the synchronization mode between the data plane clock and the management plane clock, the second threshold, the third threshold, and the vehicle environment used to determine the external clock source. For example, if the clock mode is set to the first clock mode in the system configuration or if the clock mode is set to the second clock mode, a default clock mode may be configured for the vehicle. Optionally, the synchronization mode between the data plane clock and the management plane clock may be configured in the system configuration. For example, if the clock mode is set to the second clock mode and the synchronization mode between the data plane clock and the management plane clock is set to synchronous, i.e., the second clock mode is configured as a dual-clock synchronous mode, or if the synchronization mode between the data plane clock and the management plane clock is set to asynchronous, i.e., the second clock mode is configured as a dual-clock asynchronous mode. Optionally, a second threshold time_gap for triggering synchronization of the data plane clock based on the management plane clock may be configured in the system configuration. For example, the second threshold for triggering synchronization may be as follows: if the time difference between the data plane clock and the management plane clock is smaller than the second threshold, the data plane clock and the management plane clock are considered to be in a synchronized state, the requirement for autonomous operation is met, and the data plane clock does not need to be synchronized based on the management plane clock. If the time difference between the data plane clock and the management plane clock is greater than or equal to the second threshold, the data plane clock and the management plane clock are considered to be in an asynchronous state, and the data plane clock may be synchronized based on the management plane clock.It should be understood that the above-described method of configuring the clock scheme in the system configuration is merely an example for ease of explanation, which is not limited to this embodiment of the present application.

[0179] S320: Enable autonomous driving.

[0180] It should be understood that the autonomous driving domain controller may be powered on to start autonomous driving, or a controller, such as an on-board central computer, an on-board central computing platform, or an on-board cloud computing device, may be powered on to start autonomous driving, which is not limited to this embodiment of the present application.

[0181] S330: The time synchronization basic service function module determines whether the clock mode is the first clock mode or the second clock mode. If it is determined that the clock mode is the first clock mode, S340 is executed. If it is determined that the clock mode is the second clock mode, S350 is executed.

[0182] Optionally, the clock mode may be determined based on a signal quality of the GNSS signal: if the GNSS signal quality is greater than or equal to a first threshold, the clock mode is determined to be the first clock mode; if the GNSS signal quality is less than the first threshold, the clock mode is determined to be the second clock mode.

[0183] It should be appreciated that the clock mode is determined based on the signal quality of the GNSS signal, and the GNSS signal is acquired before the clock mode is determined.

[0184] For example, when the vehicle is traveling on a wide road with a good GNSS signal, the clock mode may be determined to be a first clock mode based on good GNSS signal quality. For example, when a signal parameter of the GNSS signal is greater than or equal to a first threshold, the clock mode may be determined to be the first clock mode to simplify clock synchronization logic and reduce resource overhead used for clock synchronization when autonomous driving requirements are met. When the vehicle is traveling through a tunnel, the clock mode may be determined to be a second clock mode based on low signal quality of the GNSS signal, so that autonomous driving execution can be maintained based on the internal clock source when the GNSS signal quality is low.

[0185] It should be understood that step S330 may correspond to step S220 and will not be described in detail again here.

[0186] Optionally, the clock mode may be determined based on a system configuration. For example, the system configuration in step S310 may be read to obtain configuration information of the clock mode in the system configuration in step S310, and the clock mode is determined based on the configuration information.

[0187] S340: The vehicle performs autonomous driving based on the first clock mode.

[0188] It should be appreciated that in the first clock mode, the clock source for the data plane clock and the management plane clock may be the GNSS clock.

[0189] For example, the first clock mode may be applied to an autonomous driving scenario in which the GNSS signal quality is good, or may be applied to an autonomous driving scenario that can tolerate a GNSS clock jump. It should be understood that different first thresholds may be set for an autonomous driving algorithm that can tolerate a GNSS clock jump and an autonomous driving algorithm that cannot tolerate a GNSS clock jump. This is not limited to this embodiment of the present application.

[0190] In this embodiment of the present application, a clock mode is determined, and autonomous driving can be performed based on the first clock mode. This simplifies the clock synchronization logic, and reduces the complexity of clock synchronization while satisfying the autonomous driving application logic. This reduces the resource overhead used for clock synchronization.

[0191] S350: The vehicle performs autonomous driving based on the second clock mode.

[0192] It should be understood that in dual-clock mode, the management plane clock may use an external clock source as its clock source, and the data plane clock may use an internal clock source as its clock source. For example, the external clock source may be a GNSS clock or an NTP clock, and the second clock may be an RTC clock. Details will not be described again here.

[0193] Optionally, a GNSS clock or an NTP clock may be selected as the clock source of the control plane clock according to different scenarios. For example, when a vehicle is in a scenario with a good GPS signal, such as an urban highway scenario, a GNSS clock may be selected as the clock source of the control plane clock. In a scenario in a tunnel or under a bridge, an NTP clock may be used as the clock source of the control plane. In a scenario with an entrance / exit between a tunnel and a highway, a GNSS clock may be used as the clock source of the control plane. In an underground garage scenario, an NTP clock may be used as the clock source of the control plane clock. It should be understood that the above-mentioned selection of a GNSS clock or an NTP clock as the clock source of the control plane clock in different scenarios is merely an example, and is not limited in this embodiment of the present application.

[0194] It should be understood that before autonomous operation can be performed in the dual-clock manner, the data plane clock and the management plane clock need to be synchronized with their respective clock sources, and details will not be described again here.

[0195] In this embodiment of the present application, to avoid impacts on autonomous driving application logic caused by an inaccurate clock source of the management plane clock, a more accurate clock source for the management plane can be selected by selecting the clock source of the management plane clock.

[0196] In this embodiment of the present application, the clock mode is determined to be the second clock mode, so that the impact of time jumps on the autonomous driving application logic can be avoided.

[0197] S360: Determine dual-clock synchronization setting. If the data plane clock and the management plane clock are set to synchronous, it is determined that the second clock mode is dual-clock synchronization mode, and S370 is executed. Alternatively, if the data plane clock and the management plane clock are set to asynchronous, it is determined that the second clock mode is dual-clock asynchronous mode, and S380 is executed.

[0198] It should be understood that the second clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode based on the configuration of the second clock mode in a system configuration file set by an algorithm development user, for example, in the clock scheme configured in step S310. Alternatively, the second clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode based on whether the vehicle has a communication requirement with an external device. Alternatively, the second clock mode may be determined to be the dual-clock synchronous mode or the dual-clock asynchronous mode in another manner. It should be understood that the above-mentioned method for determining whether the second clock mode is the dual-clock synchronous mode or the dual-clock asynchronous mode is merely an example for explanation, and is not limited to this embodiment of the present application.

[0199] S370: The vehicle performs autonomous driving based on the dual-clock synchronization mode.

[0200] It should be understood that the dual clock synchronization mode means that the data plane clock is synchronized with the management plane clock, and the details will not be described again here.

[0201] For example, when a vehicle is traveling on a complex urban road with poor GNSS signal quality in some sections and external interaction is required, the autonomous driving may be performed in dual-clock synchronization mode. By using this method, the external interaction can be performed and the stable operation of the autonomous driving can be maintained. It should be understood that the above description is applicable to a scenario in which the autonomous driving is performed in dual-clock synchronization mode, and is merely an example for illustration purposes. This is not limited to this embodiment of the present application.

[0202] S380: The vehicle performs autonomous driving based on the dual-clock asynchronous mode.

[0203] It should be understood that the dual-clock asynchronous mode means that the data plane clock is not synchronized with the management plane clock, and the details will not be described again here.

[0204] For example, when a vehicle is traveling on a complex urban road with poor GNSS signal quality in some sections and does not require external interaction, autonomous driving may be performed in dual-clock asynchronous mode. In this way, stable operation of autonomous driving may be maintained. It should be understood that the above description is applicable to a scenario in which autonomous driving is performed in a manner in which the data plane clock and the management plane clock are not synchronized in dual-clock mode. This is merely an example for purposes of illustration and is not limiting in this embodiment of the present application.

[0205] According to the autonomous driving clock synchronization method of this embodiment of the present application, a clock mode can be determined. The clock mode can be determined to be a first clock mode or a second clock mode. If the clock mode is determined to be the second clock mode, the second clock mode can be determined to be a dual-clock synchronous mode or a dual-clock asynchronous mode. By determining the clock mode and whether the data plane clock and the management plane clock are synchronized, a user can flexibly configure different clock schemes for autonomous driving functions, such as the first clock mode, the dual-clock synchronous mode, and the dual-clock asynchronous mode, based on different autonomous driving scenarios. In this way, the hardware and software logic of the same domain controller can meet different user requirements for autonomous driving clock synchronization in different scenarios.

[0206] For example, Figures 6A, 6B, and 6C are exemplary flowcharts of a dual-clock synchronization mode method according to an embodiment of the present application. As shown in Figures 6A, 6B, and 6C, the method may include the following steps:

[0207] S410: Vehicle driving scenario information is acquired.

[0208] Specifically, the vehicle driving scenario information may be acquired from image data, GPS signals, V2X, and other information. It should be understood that the above-mentioned manner of acquiring the vehicle driving scenario information is merely an example, which is not limited to this embodiment of the present application.

[0209] S420: Determine the environment in which the vehicle is located.

[0210] Specifically, the vehicle driving scenario may be determined based on the acquired vehicle driving scenario information, that is, the environment in which the vehicle is located is determined. For example, the scenario management module may determine the vehicle driving scenario based on the acquired vehicle driving scenario information. For example, the scenario management module may determine that the vehicle driving scenario is a tunnel based on acquired image data indicating that the vehicle is located in a tunnel. It should be understood that the above-mentioned method of determining the vehicle driving scenario is merely an example for ease of explanation, and is not limited to this embodiment of the present application.

[0211] S430: Determine the clock source of the control plane clock based on the environment in which the vehicle is located.

[0212] For example, if the environment in which the vehicle is located is an urban highway, it may be determined that the external clock source, i.e., the clock source of the control plane clock, is the GNSS clock. If the vehicle driving scenario is a scenario in a tunnel or under a bridge, it may be determined that the clock source of the control plane clock is the NTP clock. If the vehicle driving scenario is a scenario of an entrance / exit between a tunnel and a highway, it may be determined that the control plane clock is the GNSS clock. If the vehicle driving scenario is an underground garage scenario, it may be determined that the clock source of the control plane clock is the NTP clock. If the vehicle is located in an indoor parking lot, it may be determined that the clock source of the control plane clock is the GNSS clock or the NTP clock based on the autonomous driving application logic. Details will not be described again here.

[0213] In this embodiment of the present application, the clock source of the control plane clock is determined, so that more accurate time can be provided for the control plane clock and impacts on autonomous driving application logic caused by an inappropriate clock source of the control plane clock can be avoided.

[0214] S440: Perform initialization synchronization for the data plane clock and the management plane clock.

[0215] For example, if the vehicle driving scenario is an urban highway scenario, initialization synchronization is performed on the control plane clock whose clock source is the GNSS clock and the data plane clock whose clock source is the RTC clock. If the vehicle driving scenario is a tunnel or under a bridge scenario, initialization synchronization is performed on the control plane clock whose clock source is the NTP clock and the data plane clock whose clock source is the RTC clock. For brevity, multiple examples will not be provided one by one here. It should be understood that the above-mentioned method of performing initialization synchronization on the data plane clock and the control plane clock based on the environment in which the vehicle is located is just an example, and is not limited to this embodiment of the present application.

[0216] It should be understood that in this embodiment of the present application, initialization synchronization is performed on the data plane clock and the management plane clock, so that the time difference between the data plane clock and the management plane clock can be eliminated when entering autonomous driving mode, thereby preventing additional accumulation of time difference between the data plane clock and the management plane clock after entering autonomous driving mode, thereby affecting autonomous driving applications.

[0217] S450: Determine that the autonomous driving conditions are met and enter autonomous driving mode.

[0218] For example, determining that an autonomous driving condition is met means determining whether synchronization between a data plane clock and a control plane clock is complete; determining that vehicle tire pressure is normal; or determining that a sensor, such as a radar or camera associated with autonomous driving, is normal or within an available operating condition range. It should be understood that the above-mentioned method of determining that an autonomous driving condition is met is merely an example, which is not limiting in this application. Multiple examples are not provided one by one in this specification.

[0219] Specifically, if the autonomous driving conditions are met, the autonomous driving mode is entered.

[0220] S460: Synchronize the data plane clock based on the management plane clock.

[0221] For example, in autonomous driving, the data plane clock may be synchronized based on the control plane clock. For example, when a vehicle is taken over, the data plane clock may be synchronized based on the control plane clock. In another example, when the vehicle speed of the vehicle is less than a third threshold, for example, 5 km / h, the data plane clock may be synchronized based on the control plane clock. In another example, when the time difference between the data plane clock and the control plane clock is greater than a second threshold time_gap and the vehicle status satisfies synchronization between the data plane and the management plane, for example, when the vehicle is in a takeover state or the vehicle speed is less than a third threshold, the data plane clock may be synchronized based on the control plane clock. For brevity, multiple examples will not be provided one by one. It should be understood that the above method of synchronizing the data plane clock based on the control plane clock is merely one example for ease of explanation. This is not limited to this embodiment of the present application.

[0222] For example, if the time difference between the data plane clock and the management plane clock is greater than the second threshold time_gap and the scenario of synchronization between the data plane and the management plane is satisfied, it may be determined whether the vehicle has exited the autonomous driving system based on the vehicle status. For example, when the vehicle is traveling at a high speed, if the time difference between the data plane clock and the management plane clock is greater than the second threshold time_gap and the vehicle has not been taken over, it is determined whether the vehicle has exited the autonomous driving mode to prompt the user to perform manual driving or to prompt that the autonomous driving conditions cannot be met and autonomous driving needs to be terminated.

[0223] It should be understood that the management plane clock can be used to synchronize the data plane clock based on the setting of the algorithm development user. Specifically, if the algorithm development user can obtain clock synchronization permission, the algorithm development user can implement execution and status switching between the vehicle and the domain controller by calling the interfaces of the execution management module and the status management module of the domain controller to implement synchronization of the data plane clock based on the management plane clock.

[0224] It should be understood that the above method of synchronizing the data plane clock based on the management plane clock is merely an example, which is not limited to this embodiment of the present application.

[0225] To facilitate understanding of the above-described method of synchronizing a data plane clock based on an algorithm development user's setting by using a management plane clock, for example, FIG. 7 is an exemplary flowchart of a method of synchronizing a management plane clock based on a data plane clock according to one embodiment of the present application. The vehicle may include a first device and a second device. The first device and the second device may include a data plane clock and a management plane clock. The first device may be the SoC shown in FIG. 3, and the second device may be the MCU shown in FIG. 3. It should be understood that the above-described first device and second device are merely examples for ease of explanation and are not limiting in the present application.

[0226]

[0033] Referring to Figure 7, the following describes a method for synchronizing a data plane clock based on a management plane clock by coordinating execution and status switching between a vehicle and a domain controller. As shown in Figure 7, the method may include some or all of the following steps:

[0227] S605: The first device may transmit data of the first device, and in response, the second device may obtain the data of the first device.

[0228] Specifically, the second device may acquire the data of the first device directly from the first device, or may acquire the data of the first device by using another device. For example, the second device may acquire the data of the first device from an integrated data management module. This is not limited in the present application. The data of the first device is data used by the first device to control the running of the vehicle.

[0229] S610: The second device backs up data of the first device.

[0230] It should be understood that by using steps S605 and S610, data from the first device may be backed up to the second device, and the second device may then control the vehicle's operation based on this data.

[0231] S615: The second device controls the running of the vehicle based on the backed-up data of the first device.

[0232] It should be understood that when the data of the first device is backed up and the second device controls the running of the vehicle, as a result, the device for controlling the running of the vehicle is switched from the first device to the second device, i.e., when the second device controls the running of the vehicle, the first device no longer controls the running of the vehicle.

[0233] S620: Synchronize a data plane clock of the first device based on a management plane clock of the first device.

[0234] For example, data from an SoC that controls vehicle operation may be backed up to an MCU, and the MCU controls the vehicle operation. After controlling the vehicle operation, the MCU synchronizes the data plane clock in the SoC based on the control plane clock in the SoC.

[0235] It should be understood that the clock source of the control plane clock of the first device may be determined based on the environment in which the vehicle is located. As described in step S430, the details will not be described again in this specification.

[0236] It should be understood that during the period of synchronizing the data plane clock based on the management plane clock, the autonomous driving algorithm may be adjusted to ignore the effects of time jumps. For example, during the period of synchronizing the data plane clock based on the management plane clock (e.g., the synchronization process takes one second), the algorithm may ignore the effect of the data timestamp on the algorithm logic during this period. For example, the algorithm may no longer determine the validity of the data timestamp to within one second, and the data timestamp may be used to verify the time at which the data is generated.

[0237] It should be understood that since the vehicle's running is controlled by the second device, fault reporting may be coordinated, and data plane time jumps generated due to synchronization of the data plane clock of the first device based on the management plane clock of the first device may be tolerated, and faults caused by this time jump may not be reported, so that autonomous driving may be performed stably.

[0238] In this embodiment of the present application, data of a first device for controlling the operation of a vehicle is backed up to a second device, and the second device controls the operation of the vehicle. In this way, if the data plane clock of the first device is synchronized based on the management plane clock of the first device, it is possible to avoid any impact on the autonomous driving application logic. This ensures stable operation of the autonomous driving.

[0239] Furthermore, the device for controlling the running of the vehicle can be switched back from the second device to the first device.

[0240] S625: The second device may transmit the data of the second device, and in response, the first device may obtain the data of the second device.

[0241] Specifically, the first device may acquire the data of the second device directly from the second device, or may acquire the data of the second device by using another device. For example, the first device may acquire the data of the second device from an integrated data management module. This is not limited in the present application. The data of the second device is data used by the second device to control the running of the vehicle.

[0242] S630: The first device backs up data of the second device.

[0243] It should be understood that by using steps S625 and S630, data from the second device may be backed up to the first device, and as a result, the first device may control the vehicle's operation based on this data.

[0244] S635: The first device may control the operation of the vehicle based on the backed-up data of the second device.

[0245] For example, data from an MCU that controls the running of a vehicle may be backed up to an SoC, which then controls the running of the vehicle.

[0246] It should be understood that after the data plane clock of the first device is synchronized based on the management plane clock of the first device, the data plane clock and the management plane clock of the first device are synchronized. The first device can back up data of the second device that controls the vehicle's driving, and then control the vehicle's driving again based on the backed up data. If the performance of the first device to perform autonomous driving is higher than that of the second device, the first device will control the vehicle's driving again, and as a result, autonomous driving will be performed more smoothly and efficiently.

[0247] Furthermore, after the first device has taken control of the vehicle's running again, clock synchronization may be performed between the data plane clock and the control plane clock of the second device.

[0248] S640: Synchronize the data plane clock of the second device based on the management plane clock of the second device.

[0249] For example, after the SoC regains control of the vehicle's operation, the SoC may synchronize the data plane clock in the MCU based on the control plane clock in the MCU.

[0250] It should be understood that the clock source of the second device's management plane clock can be determined based on the environment in which the vehicle is located. The autonomous driving algorithm can be adjusted to ignore time jumps caused by clock synchronization. Fault reporting caused by time jumps can be adjusted. For the sake of brevity, the details will not be described again here.

[0251] In this embodiment of the present application, the data plane clock of the second device is synchronized based on the management plane clock of the second device, so that when the second device subsequently needs to control the running of the vehicle, the impact on autonomous driving caused by asynchronization between the data plane clock and the management plane clock of the second device can be avoided.

[0252] 8 is an exemplary diagram of the structure of a time synchronization device according to an embodiment of the present application. The device 700 includes an acquisition module 710 and a processing module 720.

[0253] The acquisition module 710 is configured to acquire a first signal transmitted by an external clock source. The processing module 720 is configured to determine a signal quality of the first signal and to determine a clock mode based on the signal quality of the first signal, the clock mode including a first clock mode or a second clock mode, where when the vehicle operates in the first clock mode, the vehicle acquires the first clock information from the external clock source, or when the vehicle operates in the second clock mode, the vehicle acquires the first clock information and the second clock information from the external clock source and an internal clock source, respectively, where the internal clock source is located within the vehicle.

[0254] Optionally, the processing module 720 is specifically configured to determine that the clock mode is the first clock mode if the signal quality of the first signal is greater than or equal to a first threshold; or to determine that the clock mode is the second clock mode if the signal quality of the first signal is less than the first threshold.

[0255] Optionally, if the clock mode is the second clock mode, the processing module 720 is further configured to synchronize a management plane clock based on the first clock information and synchronize a data plane clock based on the second clock information.

[0256] Optionally, the processing module 720 is further configured to synchronize the data plane clock based on the management plane clock.

[0257] Optionally, the processing module 720 is further configured to determine that the vehicle needs to communicate with an external device before synchronizing the data plane clock based on the control plane clock.

[0258] Optionally, the processing module 720 is further configured to determine that the time difference between the data plane clock and the management plane clock is greater than or equal to a second threshold before synchronizing the data plane clock based on the management plane clock.

[0259] Optionally, the processing module 720 is further configured to determine that a vehicle speed of the vehicle is less than or equal to a third threshold before synchronizing the data plane clock based on the control plane clock.

[0260] Optionally, the processing module 720 is further configured to determine that a user takes over the vehicle before synchronizing the data plane clock based on the control plane clock.

[0261] Optionally, the processing module 720 is further configured to determine the external clock source based on the environment in which the vehicle is located.

[0262] For example, the processing module 720 is specifically configured to determine that the external clock source is a GNSS clock if the vehicle is located on a wide road or at an entrance / exit point between a tunnel and a highway, or to determine that the external clock source is a Network Time Protocol NTP clock if the vehicle is located in a tunnel, under a bridge, or in an underground garage.

[0263] Optionally, the processing module 720 may include a first device and a second device, both of which include a data plane clock and a management plane clock. The processing module 720 is specifically configured to synchronize the data plane clock of the first device based on the management plane clock of the first device. The processing module 720 is further configured to back up data of the first device to the second device; and to control vehicle operation based on the backed-up data of the first device by using the second device.

[0264] Optionally, the processing module 720 is further configured to control running of the vehicle by using the first device after synchronizing a data plane clock of the first device based on the control plane clock of the first device.

[0265] Optionally, the processing module 720 is further configured to synchronize a data plane clock of the second device based on a control plane clock of the second device after the travel of the vehicle is controlled by using the first device.

[0266] It should be understood that the time synchronization device shown in Figure 8 may be configured to implement the aforementioned time synchronization method 200, where the acquisition module may be configured to implement step S210, and the processing module may be configured to implement steps S215 and S220. The time synchronization device shown in Figure 8 may further be configured to implement the time synchronization methods in Figures 5 to 7. For specific steps, please refer to the above descriptions of Figures 5 to 7. For the sake of brevity, the details will not be described again here in this application.

[0267] It should be understood that the time synchronization device in this embodiment of the present application may be implemented by software, for example, by computer programs or instructions having the above-mentioned functions. These corresponding computer programs or instructions may be stored in a memory inside the terminal, and a processor reads these corresponding computer programs or instructions in the memory to implement the above-mentioned functions. Alternatively, the time synchronization device in this embodiment of the present application may be implemented by hardware. The processing module 720 is a processor (e.g., an NPU, a GPU, or a processor on a system chip), and the acquisition module 710 is a data interface. Alternatively, the time synchronization device in this embodiment of the present application may be implemented through a combination of a processor and a software module.

[0268] 9 is a schematic diagram of the structure of an apparatus 1300 according to an embodiment of the present application. The apparatus 1300 includes a processor 1302, a communication interface 1303, and a memory 1304. An example of the apparatus 1300 is a chip. Another example of the apparatus 1300 is a computing device.

[0269] The processor 1302, memory 1304, and communication interface 1303 may communicate with each other using a bus. The memory 1304 stores executable code, and the processor 1302 reads the executable code in the memory 1304 and executes the corresponding method. The memory 1304 may further include an operating system and other software modules required to execute processing. The operating system may be Linux (registered trademark), UNIX (registered trademark), Windows (registered trademark), or the like.

[0270] For example, the executable code in the memory 1304 is used to implement the methods shown in Figures 2 to 7, and the processor 1302 reads the executable code in the memory 1304 to execute the methods shown in Figures 2 to 7.

[0271] The processor 1302 may be a CPU. The memory 1304 may include volatile memory, such as random access memory (RAM), and may further include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state disk (SSD).

[0272] In some embodiments of the present application, the disclosed methods may be implemented as computer program instructions encoded in machine-readable form on a computer-readable storage medium or another non-transitory medium or product. FIG. 10 schematically illustrates a conceptual partial view of an exemplary computer program product arranged in accordance with at least some embodiments described herein, the exemplary computer program including a computer program for executing a computer process on a computing device. In one embodiment, the exemplary computer program product 1400 is provided using a signal-bearing medium 1401. The signal-bearing medium 1401 may include one or more program instructions 1402 that, when executed by one or more processors, may provide the functionality described above, or some of the functionality described in the method illustrated in FIG. 4. Thus, for example, with reference to the embodiment illustrated in FIG. 4, one or more functions of S210 through S220 may be carried by one or more instructions associated with the signal-bearing medium 1401.

[0273] In some examples, the signal-bearing medium 1401 may include a computer-readable medium 1403, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital video disc (DVD), digital tape, a memory, a ROM, or a RAM. In some implementations, the signal-bearing medium 1401 may include a computer-recordable medium 1404, such as, for example, a memory, a read / write (R / W) CD, or a R / W DVD. In some implementations, the signal-bearing medium 1401 may include a communication medium 1405, such as, but not limited to, a digital and / or analog communication medium (e.g., fiber optic cable, a wave guide, a wired communication link, or a wireless communication link). Thus, for example, the signal-bearing medium 1401 may be conveyed by a wireless communication medium 1405 (e.g., a wireless communication medium) conforming to the IEEE 802.11 standard or another transmission protocol. The one or more program instructions 1402 may be, for example, computer-executable instructions or logic-implementing instructions. In some examples, a computing device may be configured to provide various operations, functions, or actions in response to program instructions 1402 delivered to the computing device by using one or more of computer-readable medium 1403, computer-recordable medium 1404, and / or communication medium 1405. It should be understood that the configuration described herein is used by way of example only. Thus, those skilled in the art will understand that other configurations and other elements (e.g., machines, interfaces, functions, sequences, and arrays of functions) may be used to replace this configuration, and that some elements may be omitted altogether, depending on the desired results. Additionally, many of the described elements are functional entities that may be implemented as discrete or distributed components, or in combination with other components in any suitable location and in any suitable combination.

[0274] In the embodiments of the present application, the terms "first," "second," and various numbers are used merely to distinguish between different clock sources and media for ease of explanation, and are not intended to limit the scope of the embodiments of the present application.

[0275] It should be understood that the term "and / or" herein describes only a correspondence between related objects and represents three possible relationships. For example, A and / or B may represent three cases: when only A is present, when both A and B are present, and when only B is present. Additionally, the character " / " herein generally indicates that the related objects are in an "or" relationship.

[0276] It should be understood that the sequence numbers of the above processes do not mean the execution sequence in various embodiments of the present application, and the execution order of the processes should be determined according to the functions and internal logic of the processes, and should not be construed as any limitation on the implementation process of the embodiments of the present application.

[0277] In combination with the examples described in the embodiments disclosed herein, those skilled in the art can recognize that the units and algorithm steps can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and the design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered as going beyond the scope of this application.

[0278] For the purpose of simple and concise description, for the detailed operation processes of the above-mentioned systems, devices and units, please refer to the corresponding processes in the above-mentioned method embodiments, which can be clearly understood by those skilled in the art, and the details will not be described again here.

[0279] It should be understood that in some embodiments provided herein, the disclosed systems, devices, and methods may be implemented in other manners. For example, the described device embodiments are merely examples. For example, the division into multiple units is merely a logical division of function, and other divisions may be used in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some functions may be omitted or not performed. In addition, the shown or described mutual couplings or direct couplings or communication connections may be implemented using some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electronic, mechanical, or other forms.

[0280] The units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units, in other words, they may be located in one location or distributed over multiple network units, some or all of which may be selected based on the actual requirements for realizing the objectives of the solutions of the embodiments.

[0281] Additionally, the functional units in the embodiments of the present application may be integrated into one processing unit, each of which may exist physically alone, or two or more units may be integrated into one unit.

[0282] When functions are implemented in the form of software functional units and sold or used as independent products, these functions may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application may be essentially implemented in the form of a software product, or a portion that contributes to the prior art may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a RAM, a magnetic disk, or an optical disk.

[0283] The above description is merely a specific implementation of the present application and is not intended to limit the scope of protection of the present application. Any modifications or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application shall be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. [Other possible items] [Item 1] A clock synchronization method applied to a vehicle, comprising: acquiring a first signal, wherein the first signal includes clock information of an external clock source; determining a signal quality of the first signal; and determining a clock mode based on the signal quality of the first signal, wherein the clock mode includes a first clock mode or a second clock mode, and when the vehicle operates in the first clock mode, the vehicle obtains first clock information from the external clock source, or when the vehicle operates in the second clock mode, the vehicle obtains the first clock information and the second clock information from the external clock source and an internal clock source, respectively, wherein the internal clock source is located within the vehicle; A method comprising: [Item 2] determining a clock mode based on the signal quality of the first signal, determining that the clock mode is the first clock mode if the signal quality of the first signal is greater than or equal to a first threshold; or determining that the clock mode is the second clock mode if the signal quality of the first signal is less than the first threshold; having The method according to item 1. [Item 3] the clock mode is the second clock mode; and The method comprises: synchronizing a management plane clock based on the first clock information and synchronizing a data plane clock based on the second clock information; 3. The method of claim 1 or 2, further comprising: [Item 4] 4. The method of claim 3, further comprising synchronizing the data plane clock based on the management plane clock. [Item 5] before synchronizing the data plane clock based on the management plane clock, determining that the vehicle needs to communicate with an external device; Item 5. The method of item 4, further comprising: [Item 6] before synchronizing the data plane clock based on the management plane clock, 6. The method of claim 4 or 5, further comprising determining that the time difference between the data plane clock and the management plane clock is greater than or equal to a second threshold. [Item 7] before synchronizing the data plane clock based on the management plane clock, determining that a vehicle speed of the vehicle is less than or equal to a third threshold value; 7. The method of any one of items 4 to 6, further comprising: [Item 8] before synchronizing the data plane clock based on the management plane clock, determining that the vehicle is being taken over. 7. The method of any one of items 4 to 6, further comprising: [Item 9] 9. The method of any one of items 4 to 8, further comprising determining the external clock source based on an environment in which the vehicle is located. [Item 10] determining the external clock source based on an environment in which the vehicle is located, determining that the external clock source is a Global Navigation Satellite System (GNSS) clock when the vehicle is located on a wide road or at a gateway between a tunnel and a highway; or determining if the vehicle is in a tunnel, under a bridge, or in an underground garage that the external clock source is a Network Time Protocol NTP clock; having Item 9. The method according to item 9. [Item 11] the vehicle includes a first device and a second device, both of the first device and the second device including the data plane clock and the control plane clock; The step of synchronizing the data plane clock based on the management plane clock comprises: synchronizing the data plane clock of the first device based on the management plane clock of the first device having; and The method comprises: backing up data from the first device to the second device; and a step of controlling the running of the vehicle by the second device based on the data backed up by the first device; 11. The method of any one of items 4 to 10, further comprising: [Item 12] controlling the running of the vehicle by the first device after synchronization between the data plane clock of the first device and the control plane clock of the first device is completed. Item 12. The method of item 11, further comprising: [Item 13] After the step of controlling the travel of the vehicle by the first device, synchronizing the data plane clock of the second device based on the management plane clock of the second device Item 13. The method of item 12, further comprising: [Item 14] 1. A clock synchronizer for use in a vehicle, comprising: an acquisition module configured to acquire a first signal, wherein the first signal includes clock information of an external clock source; and a processing module configured to determine a signal quality of the first signal; Equipped with Here, the processing module is further configured to determine a clock mode based on the signal quality of the first signal, where the clock mode includes a first clock mode or a second clock mode, and when the vehicle operates in the first clock mode, the vehicle obtains first clock information from the external clock source, or when the vehicle operates in the second clock mode, the vehicle obtains the first clock information and the second clock information from the external clock source and an internal clock source, respectively, where the internal clock source is located within the vehicle. Device. [Item 15] Specifically, the processing module includes: determining that the clock mode is the first clock mode if the signal quality of the first signal is greater than or equal to a first threshold; or If the signal quality of the first signal is less than the first threshold, determining that the clock mode is the second clock mode. It is configured as follows: Item 15. The device according to item 14. [Item 16] When the clock mode is the second clock mode, the processing module further configured to synchronize a management plane clock based on the first clock information and synchronize a data plane clock based on the second clock information; 16. The device according to item 14 or 15. [Item 17] The processing module further comprises: configured to synchronize the data plane clock based on the management plane clock; Item 17. The device according to item 16. [Item 18] The processing module further comprises: and determining that the vehicle needs to communicate with an external device before synchronizing the data plane clock based on the control plane clock. Item 18. The device according to item 17. [Item 19] The processing module further comprises: configured to determine, before synchronizing the data plane clock based on the management plane clock, that a time difference between the data plane clock and the management plane clock is greater than or equal to a second threshold. 19. The device according to item 17 or 18. [Item 20] The processing module further comprises: configured to determine that a vehicle speed of the vehicle is less than or equal to a third threshold before synchronizing the data plane clock based on the control plane clock. 20. The device according to any one of items 17 to 19. [Item 21] The processing module further comprises: configured to determine that a user has taken over the vehicle before synchronizing the data plane clock based on the control plane clock. 20. The device according to any one of items 17 to 19. [Item 22] The processing module further comprises: configured to determine the external clock source based on an environment in which the vehicle is located. 22. The device according to any one of items 17 to 21. [Item 23] Specifically, the processing module includes: configured to determine that the external clock source is a GNSS clock when the vehicle is located on a wide road or at a gateway between a tunnel and a highway; or If the vehicle is located in a tunnel, under a bridge, or in an underground garage, the processing module is configured to determine that the external clock source is a Network Time Protocol (NTP) clock. Item 23. The device according to item 22. [Item 24] the processing module has a first device and a second device, both of the first device and the second device including the data plane clock and the management plane clock; The processing module is specifically configured to synchronize the data plane clock of the first device based on the management plane clock of the first device; and The processing module further comprises: backing up data from the first device to the second device; and By using the second device, the running of the vehicle is controlled based on the data backed up by the first device. It is configured as follows: 24. The device according to any one of items 17 to 23. [Item 25] The processing device further comprises: and controlling the running of the vehicle by using the first device after synchronization between the data plane clock of the first device and the control plane clock of the first device is completed. Item 25. The device according to item 24. [Item 26] The processing device further comprises: and after controlling the running of the vehicle by using the first device, synchronizing the data plane clock of the second device based on the control plane clock of the second device. Item 26. The device according to item 25. [Item 27] 14. A clock synchronization device for use in a vehicle, comprising a processor and a memory, the memory configured to store program instructions, the processor configured to call the program instructions to perform the time synchronization method according to any one of claims 1 to 13. [Item 28] 28. A vehicle comprising the time synchronization device according to any one of items 14 to 27. [Item 29] 14. A computer-readable storage medium having stored thereon program instructions, which, when executed by a processor, implement the time synchronization method according to any one of items 1 to 13. [Item 30] A chip comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute the time synchronization method described in any one of items 1 to 13.

Claims

1. A clock synchronization method applied to a vehicle, comprising: acquiring a first signal, wherein the first signal includes clock information of an external clock source; determining a signal quality of the first signal; determining a clock mode based on the signal quality of the first signal; wherein the clock mode includes a first clock mode or a second clock mode, and when the vehicle operates in the first clock mode, the vehicle obtains first clock information from the external clock source, and in the first clock mode, a data plane clock and a control plane clock use the same clock source, the data plane clock is a clock configured to provide time data for data processing in autonomous driving algorithm logic, and the control plane clock is a clock configured to maintain, measure, and manage an autonomous driving system; or When the vehicle operates in the second clock mode, the vehicle obtains the first clock information and the second clock information from the external clock source and an internal clock source, respectively, where the internal clock source is located within the vehicle; and if the clock mode is the second clock mode, synchronizing the management plane clock based on the first clock information and synchronizing the data plane clock based on the second clock information; Equipped with determining a clock mode based on the signal quality of the first signal; determining that the clock mode is the first clock mode if the signal quality of the first signal is greater than or equal to a first threshold; or determining that the clock mode is the second clock mode if the signal quality of the first signal is less than the first threshold; A method comprising:

2. The method of claim 1 , further comprising: synchronizing the data plane clock based on the management plane clock.

3. before synchronizing the data plane clock based on the management plane clock, determining that the vehicle needs to communicate with an external device; The method of claim 2 further comprising:

4. before synchronizing the data plane clock based on the management plane clock, 3. The method of claim 2, further comprising determining that the time difference between the data plane clock and the management plane clock is greater than or equal to a second threshold.

5. before synchronizing the data plane clock based on the management plane clock, determining that a vehicle speed of the vehicle is less than or equal to a third threshold value; The method of claim 4 further comprising:

6. before synchronizing the data plane clock based on the management plane clock, determining that the vehicle is being taken over. The method of claim 4 further comprising:

7. The method of claim 4 further comprising determining the external clock source based on an environment in which the vehicle is located.

8. determining the external clock source based on an environment in which the vehicle is located, determining that the external clock source is a Global Navigation Satellite System (GNSS) clock when the vehicle is located on a wide road or at a gateway between a tunnel and a highway; or determining if the vehicle is in a tunnel, under a bridge, or in an underground garage that the external clock source is a Network Time Protocol (NTP) clock; having The method of claim 7.

9. the vehicle includes a first device and a second device, both of the first device and the second device including the data plane clock and the control plane clock; The step of synchronizing the data plane clock based on the management plane clock comprises: synchronizing the data plane clock of the first device based on the management plane clock of the first device and The method comprises: backing up data from the first device to the second device; and controlling the running of the vehicle by the second device based on the data backed up by the first device; The method of claim 4 further comprising:

10. controlling the running of the vehicle by the first device after synchronization between the data plane clock of the first device and the control plane clock of the first device is completed. The method of claim 9 further comprising:

11. After the step of controlling the running of the vehicle by the first device, synchronizing the data plane clock of the second device based on the management plane clock of the second device The method of claim 10 further comprising:

12. 1. A clock synchronizer for use in a vehicle, comprising: an acquisition module configured to acquire a first signal, wherein the first signal includes clock information of an external clock source; and a processing module configured to determine a signal quality of the first signal; Equipped with wherein the processing module is further configured to determine a clock mode based on the signal quality of the first signal; wherein the clock mode includes a first clock mode or a second clock mode, and when the vehicle operates in the first clock mode, the vehicle obtains first clock information from the external clock source, and in the first clock mode, a data plane clock and a control plane clock use the same clock source, the data plane clock is a clock configured to provide time data for data processing in autonomous driving algorithm logic, and the control plane clock is a clock configured to maintain, measure, and manage an autonomous driving system; or When the vehicle operates in the second clock mode, the vehicle obtains the first clock information and the second clock information from the external clock source and an internal clock source, respectively, where the internal clock source is located within the vehicle; wherein, when the clock mode is the second clock mode, the processing module further configured to synchronize the management plane clock based on the first clock information and synchronize the data plane clock based on the second clock information; The processing module includes: determining that the clock mode is the first clock mode if the signal quality of the first signal is greater than or equal to a first threshold; or If the signal quality of the first signal is less than the first threshold, determining that the clock mode is the second clock mode. The apparatus is configured to:

13. The processing module further comprises: configured to synchronize the data plane clock based on the management plane clock; 13. The apparatus of claim 12.

14. The processing module further comprises: and determining that the vehicle needs to communicate with an external device before synchronizing the data plane clock based on the control plane clock.

14. The apparatus of claim 13.

15. The processing module further comprises: configured to determine, before synchronizing the data plane clock based on the management plane clock, that a time difference between the data plane clock and the management plane clock is greater than or equal to a second threshold.

14. The apparatus of claim 13.

16. The processing module further comprises: and determining that a vehicle speed of the vehicle is less than or equal to a third threshold before synchronizing the data plane clock based on the control plane clock.

16. The apparatus of claim 15.

17. The processing module further comprises: configured to determine the external clock source based on an environment in which the vehicle is located.

14. The apparatus of claim 13.

18. Specifically, the processing module includes: configured to determine that the external clock source is a GNSS clock when the vehicle is located on a wide road or at a gateway between a tunnel and a highway; or If the vehicle is located in a tunnel, under a bridge, or in an underground garage, the processing module is configured to determine that the external clock source is a Network Time Protocol (NTP) clock.

18. The apparatus of claim 17.

19. 10. A clock synchronization device for use in a vehicle, comprising: a processor and a memory, the memory configured to store program instructions, and the processor configured to call the program instructions to perform the clock synchronization method of claim 1.

20. A vehicle comprising the clock synchronizer according to claim 12.

21. A computer program product for causing a processor to execute the clock synchronization method according to claim 1.

22. A chip comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface to execute the clock synchronization method according to claim 1.

Citation Information

Patent Citations

  • Time synchronization method and system, storage medium and processor

    CN110830141A

  • A hardware centralized time synchronization hub for autonomous driving vehicle

    CN110857101A

  • A time source ranking system for an autonomous driving vehicle

    CN110858786A

  • Hardware centralized time synchronization hub for autonomous driving vehicle

    JP2020031420A

  • Time source ranking system for autonomous driving vehicle

    JP2020079073A