Time synchronization method and system, electronic device, storage medium and vehicle
The global time management module calibrates and synchronizes the time data of the ECU system in the car, which solves the problem of time deviation between different ECU systems, realizes the unity and accuracy of time, and reduces the delay risk during the time synchronization process.
Patent Information
- Application Number
- PCT/CN2024/111079
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-11
- Filing Date
- 2024-08-09
- Publication Date
- 2025-06-19
AI Technical Summary
In the prior art, due to independent clock timing modules, the ECU system in automobiles may have a deviation in the time between different ECU systems, which affects the normal progress of communication services and the accuracy of the billing system.
A time synchronization method is adopted to calibrate the acquired time data by defining the global time management module, generate global time data, and synchronize the global time data to each module to be synchronized through the time synchronization protocol to achieve the unity of system time.
There is no need for frequent cross-process communication between systems, which avoids the delay in sending time data across systems communication, improves time accuracy, and reduces the risk of incorrect time display.
Smart Images

Figure CN2024111079_19062025_PF_FP_ABST
Abstract
Description
Time synchronization method, system, electronic device, storage medium and vehicle Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a time synchronization method, system, electronic equipment, storage medium and vehicle. Background Art
[0002] Today's vehicles contain numerous ECUs, each with its own independent clock module. For example, when the CSC (Controller System) itself is not connected to the internet and lacks an RTC circuit, it can only use the software build time as its time source. The instrument cluster system has its own RTC chip for independent timekeeping and display. Other ECUs, such as the Intelligent Connected Controller (ICC) and the Vehicle Data Center (VDC), don't need to display the time, but they do require accurate timestamps for data services. Existing technologies within the vehicle system use built-in hardware clocks to keep these ECUs separate, resulting in time discrepancies between different ECU systems. However, communication between these ECUs is essential, and discrepancies in timestamps can lead to service failures or unsatisfactory performance. With the advancement of intelligent technology, unified clock display is essential across the entire vehicle. Autonomous driving, real-time high-precision map display on large screens, real-time driver fatigue detection, real-time streaming rearview mirror displays, and real-time information exchange between vehicles and road test RSUs all require precise time synchronization across the entire architecture. Accurate time is also crucial for networks. For example, network management requires time as a reference when analyzing log information collected from various network devices. Inconsistent system times on different devices can hinder fault location due to issues like sequencing. Billing systems are particularly time-sensitive and require consistent time across all devices. Failure to do so can lead to inaccurate billing, which can lead to inquiries and complaints from vehicle owners. Collaborative processing: Multiple systems collaborate on the same complex event. To ensure the correct execution sequence, these systems must reference the same clock. System time: Certain applications or services require accurate time to mark user logins, transactions, and other operational information to ensure traceability. Therefore, having a unified standard time is crucial for the network.
[0003] In existing technology, the intelligent vehicle computer obtains real-time GPS time through a TBOX, sends the vehicle computer system time to the instrument system, compares the difference between the instrument system time and the vehicle computer system time, and sets the instrument system time to the vehicle computer system time if the difference exceeds a set time threshold. This solution requires a certain amount of time to transmit time data between the instrument system and the vehicle computer system, resulting in a delay in the instrument system obtaining the vehicle computer system time. Calibration of the instrument system time based on the delayed vehicle computer system time will affect the instrument system time accuracy. Furthermore, if the vehicle computer system cannot automatically synchronize with GPS time due to its own reasons, the instrument system will also be unable to automatically synchronize with the system time.
[0004] Therefore, the present application provides a time synchronization method to solve the above technical problems.
[0005] Summary of the Invention
[0006] The object of the present invention is to provide a time synchronization method, system, electronic device, storage medium and vehicle, which can solve at least one of the technical problems mentioned above.
[0007] In order to solve the above technical problems, the present invention provides a time synchronization method, comprising:
[0008] Based on the defined global time management module, the acquired time data are calibrated to generate global time data;
[0009] Based on the defined time synchronization protocol, carry the global time data to each time synchronization module;
[0010] Parsing the defined time synchronization protocol to obtain the parsed global time data;
[0011] In response to the time synchronization signal, based on the modules to be synchronized, the system time contained in the modules to be synchronized is synchronized using the parsed global time data;
[0012] The global time management module is a time synchronization master node, the time modules to be synchronized are time synchronization slave nodes, and the master node and the slave nodes communicate with each other via Ethernet.
[0013] In some specific embodiments, based on a defined global time management module, each acquired time data is calibrated to generate global time data, specifically including:
[0014] defining an ICC controller, wherein the ICC controller includes the global time management module;
[0015] Obtaining absolute time data and time calibration data from various sources through the global time management module;
[0016] calibrating the absolute time data from the different sources based on the time calibration data to generate the global time data;
[0017] The time calibration data includes network UTC, GPS and built-in high-precision RTC time data.
[0018] In some specific embodiments, based on a defined time synchronization protocol, carrying the global time data to each time synchronization module specifically includes:
[0019] The global time management module and each time synchronization module are configured with an AutoSar CP tsync module component;
[0020] Based on the AutoSar CP tsync module component, the global time management module broadcasts the global time data according to the GPTP protocol, and the AutoSar CP tsync module component in each time synchronization module receives the global time data;
[0021] The modules to be synchronized include CSC and QNX system modules.
[0022] In some specific embodiments, the CSC system module and the QNX system module are both time-synchronized slave nodes, and communicate with the global time management module as the master node via Ethernet.
[0023] The time management module sends the global time data to the CSC system module and the QNX system module via the Ethernet;
[0024] The time zones in the CSC system module and the QNX system module are used as the slave nodes.
[0025] In some specific embodiments, parsing the defined time synchronization protocol to obtain the parsed global time data specifically includes:
[0026] The CSC system module and the QNX system module are both time-synchronized slave nodes, and communicate with the global time management module as the master node via Ethernet.
[0027] Based on the GPTP protocol, the global time data is parsed to obtain high-precision time data;
[0028] The high-precision time data includes propagation delay and correction rate.
[0029] In some specific embodiments, in response to a time synchronization signal, based on each time-to-be-synchronized module, synchronizing the system time contained in each time-to-be-synchronized module using the parsed global time data specifically includes:
[0030] A HAL service is created at the bottom layer of the CSC system module. The HAL service is used to:
[0031] Calling the AutoSar CP tsync module component to obtain the high-precision time data;
[0032] In response to a time synchronization request from an upper-layer application, the high-precision time data is sent to the upper-layer application via AIDL;
[0033] The upper layer application periodically receives the high-precision time data and synchronizes the CSC system module time according to the high-precision time data;
[0034] The QNX system module synchronizes the QNX system module time by acquiring the high-precision time data by calling the AutoSar CP tsync module component.
[0035] Based on the same concept, the present invention also provides a time synchronization system, comprising:
[0036] A global time data generation module is configured to calibrate each acquired time data based on the defined global time management module to generate global time data;
[0037] A global time data sending module is configured to carry the global time data to each time synchronization module based on a defined time synchronization protocol;
[0038] A global time data parsing module is configured to parse the defined time synchronization protocol and obtain the parsed global time data;
[0039] a time synchronization control module configured to synchronize the system time contained in each of the modules to be synchronized based on the modules to be synchronized and using the parsed global time data in response to the time synchronization signal;
[0040] The global time management module is a time synchronization master node, the time modules to be synchronized are time synchronization slave nodes, and the master node and the slave nodes communicate with each other via Ethernet.
[0041] Based on the same concept, the present invention also provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the time synchronization method.
[0042] Based on the same concept, the present invention also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the time synchronization method.
[0043] Based on the same concept, the present invention also provides a vehicle, which is provided with the time synchronization system as described above.
[0044] Compared with the prior art, the beneficial effects are:
[0045] The present invention discloses a time synchronization method, system, electronic device, storage medium and vehicle, which eliminate the need for frequent cross-process communication between systems, avoid the delay in sending time data in cross-system communication between systems, improve time accuracy and reduce the risk of incorrect time display. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a schematic flow chart of a time synchronization method according to some specific embodiments of the present invention;
[0047] FIG2 is a schematic diagram of the overall architecture of a time synchronization method of the present invention in some applications;
[0048] FIG3 is a schematic diagram of an automatic time synchronization architecture of a CSC and QNX system in some applications of a time synchronization method of the present invention;
[0049] FIG4 is a schematic diagram of a time synchronization process in some applications of a time synchronization method of the present invention;
[0050] FIG5 is a schematic structural diagram of a time synchronization system in some specific embodiments of the present invention;
[0051] FIG6 is a schematic structural diagram of an electronic device according to some specific embodiments of the present invention. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions, and advantages of this application more clear, this application will be further described in detail below with reference to the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0053] The terms used in the examples of this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a," "the," and "the" used in the examples of this application and the appended claims are also intended to include plural forms, and unless the context clearly indicates otherwise, "a plurality" generally includes at least two.
[0054] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0055] It should be understood that although the terms first, second, third, etc. may be used to describe in the embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0056] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0057] It should also be noted that the terms "include," "comprises," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a product or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such product or device. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the product or device comprising the element.
[0058] It should be noted in particular that any symbols and / or numbers in the specification that are not marked in the accompanying drawings are not drawing marks.
[0059] Referring to FIG1 , a time synchronization method includes:
[0060] S101 calibrates each acquired time data based on a defined global time management module to generate global time data;
[0061] Specifically, in this step, a global time management module is predefined, and the acquisition and calibration of various time data are performed according to the module to generate global time data;
[0062] It can be understood that global time data can be understood as Global Time, which is the key data for subsequent time synchronization;
[0063] In some of these applications, in order to generate high-precision global time data, various acquired time data are calibrated based on a defined global time management module to generate the global time data, including defining an ICC controller, which includes the global time management module; obtaining absolute time data and time calibration data from various sources through the global time management module; calibrating the absolute time data from various sources based on the time calibration data to generate the global time data; the time calibration data includes network UTC, GPS, and built-in high-precision RTC time data;
[0064] It can be understood that in this application, an ICC controller (intelligent connection controller) is defined, and a global time management module is set in the ICC controller. Through this global time management module, absolute time data from various sources is obtained, and the obtained absolute time data is calibrated through network UTC, GPS and built-in high-precision RTC time data to generate global time data.
[0065] S102 carries the global time data to each time synchronization module based on the defined time synchronization protocol;
[0066] Specifically, in this step, a time synchronization protocol is predefined, and the calibrated global time data is carried to each time synchronization module according to the protocol;
[0067] In some applications, in order to ensure that global time data reaches each module accurately, the time management module and each time-to-be-synchronized module are equipped with an AutoSar CP tsync module component based on a defined time synchronization protocol to carry the global time data to each time-to-be-synchronized module. Based on the AutoSar CP tsync module component, the global time management module broadcasts the global time data according to the GPTP protocol, and the AutoSar CP tsync module component in each time-to-be-synchronized module receives the data. Each time-to-be-synchronized module includes a CSC and a QNX system module.
[0068] It can be understood that in this application, the time synchronization module includes CSC and QNX system modules, and both of them and the global time management module are provided with AutoSar CP tsync module components for sending and receiving global time data. The global time management module broadcasts the global time data through the AutoSar CP tsync module component according to the GPTP protocol, and is received by the respective AutoSar CP tsync module components in the CSC and QNX system modules.
[0069] Furthermore, in this application, to reduce inter-process communication, the CSC system module and the QNX system module are both time-synchronized slave nodes, each communicating with the global time management module as the master node via Ethernet; the time management module sends global time data to the CSC system module and the QNX system module via Ethernet; the time zones in the CSC system module and the QNX system module serve as the slave nodes;
[0070] It can be understood that in this application, the time areas in the CSC system module and the QNX system module are used as slave nodes of the overall architecture, and the global time management module is used as the master node of the overall architecture. Communication between the master node and the slave nodes is carried out through Ethernet.
[0071] S103 parses the defined time synchronization protocol to obtain the parsed global time data;
[0072] Specifically, in this step, each time synchronization module parses the event synchronization protocol to obtain the parsed global time data;
[0073] In some applications, to better utilize the parsed global time data, the CSC system module and the QNX system module are both time synchronization slave nodes, communicating with the global time management module as the master node via Ethernet. Based on the GPTP protocol, they parse the global time data to obtain high-precision time data; this high-precision time data includes propagation delay and correction rate.
[0074] It can be understood that, in this application, by parsing the GPTP protocol, the global time data contained in the GPTP protocol is obtained, and the data includes the propagation delay and the correction rate.
[0075] S104, in response to the time synchronization signal, based on the modules to be synchronized, synchronizes the system time contained in the modules to be synchronized using the parsed global time data;
[0076] The global time management module is a time synchronization master node, the time modules to be synchronized are time synchronization slave nodes, and the master node and the slave nodes communicate with each other via Ethernet.
[0077] Specifically, in this step, the time synchronization process is completed according to the parsed global time data;
[0078] In some applications, to ensure accurate time synchronization, a HAL service is created at the bottom layer of the CSC system module. The HAL service is used to call the AutoSar CP tsync module component to obtain high-precision time data. In response to time synchronization requests from upper-layer applications, the high-precision time data is sent to the upper-layer application via AIDL. The upper-layer application periodically receives the high-precision time data and synchronizes the CSC system module time based on the high-precision time data. The QNX system module synchronizes the QNX system module time by calling the AutoSar CP tsync module component to obtain the high-precision time data.
[0079] It is understandable that in this application, in order to meet the time synchronization requirements of CSC and QNX system modules, a HAL service is created at the bottom layer of the CSC system module, and then corresponding time synchronization is performed according to the time synchronization requirements of the upper-layer application. The upper-layer application periodically receives high-precision time data according to the requirements, and then synchronizes the CSC system time to ensure the accuracy of time synchronization. Similarly, QNX also synchronizes the QNX system module time by calling the AutoSar CP tsync module component to obtain high-precision time data, thereby eliminating the need for frequent cross-process communication between systems, avoiding the delay in sending time data between systems in cross-system communication, improving time accuracy, and reducing the risk of incorrect time display.
[0080] The following describes an embodiment of a time synchronization method of the present invention in some applications with reference to FIG2 to FIG4:
[0081] This embodiment uses the ICC as the GTM global time manager (as the master node TG). Global time, generated using GPS / UTC / RTC time calibration, is sent to each ECU (as a slave node TS) via the Ethernet Layer 2 protocol GPTP. The CSC and QNX instrument system parse the protocol messages, obtain time data, and correct the system time based on the global time. This solution synchronizes the clocks of each system. Frequent cross-process communication between the CSC and QNX instrument system is eliminated; instead, the CSC and QNX instrument system only need to communicate with the ICC separately. Current technology requires the CSC system to communicate with the QNX system in addition to the network to transmit clock data to the QNX instrument system. Therefore, this invention reduces the memory usage of the CSC system. Furthermore, the QNX instrument system directly obtains clock data from the GPTP protocol, eliminating the delay in sending time data between the CSC and QNX instrument systems and improving the time accuracy of the QNX instrument system. If a problem occurs in either the CSC or QNX system, causing time synchronization failure, it will not affect the automatic time synchronization of the other system, reducing the risk of incorrect time display.
[0082] As shown in Figure 2,
[0083] 1. With ICC as the Ethernet master, the ICC MCU CP side uses GPS / UTC / RTC time calibration to generate Global Time.
[0084] 2. GTM, as the global time manager, sends the Global Time to each Ethernet slave node TS.
[0085] 3. The VDC\CSC\QNX instrument time acts as an Ethernet slave, receives Global Time, and calibrates its own system time according to the correction algorithm.
[0086] As shown in Figures 3 and 4,
[0087] 1. ICC serves as the master, with a built-in time management module. It obtains absolute time from different sources, such as network UTC, GPS, and built-in high-precision RTC, as the time base to calibrate the absolute time and maintain high fidelity of the absolute time base.
[0088] 2. ICC acts as the master and configures the AutoSar CP tsync module. This module distributes high-precision synchronized time to other slave nodes on the same network segment. The master broadcasts high-precision time information based on the Ethernet high-precision time synchronization protocol IEEE 802.1AS (GPTP).
[0089] 3. The CSC and QNX instrument systems act as slaves and deploy the AutoSar AP tsync module component to receive GPTP protocol broadcast messages sent by the master and parse the messages to obtain high-precision time-related information (such as propagation delay, correction rate, etc.).
[0090] 4. Create a HAL service in the CSC Android underlying layer. This module is used as the time management module in the Android system and is set to start automatically at boot. The functions implemented include:
[0091] (1) Call the AutoSar AP tsync module API to obtain high-precision time;
[0092] (2) The obtained high-precision time is provided to the upper-layer application in the form of AIDL; the upper-layer application can determine whether it needs high-precision time according to its own needs;
[0093] (3) This module receives time synchronization information every 500ms and periodically calibrates the system time based on this time. Every 500ms, the received synchronization time is compared with the Android system time. If the difference is greater than or equal to 1s, the system time is updated according to the synchronization time; this completes the synchronization of the Android system time;
[0094] (4) During the incomplete cold start phase, cross-system communication with QNX is completed. Since QNX boots faster than the Android system, the Android system receives the MCU RTC time through QNX.
[0095] 5. After updating the system time in the HAL service, the vehicle computer can obtain the system time for display, and ordinary applications (which do not require high clock precision) can obtain the system time.
[0096] 6. The QNX system time_service module has similar functions to the Android system's HAL service. It calls the AutoSar AP tsync module API to obtain high-precision time to update the QNX system time. The instrument screen can directly display the QNX system time.
[0097] 7. To prevent the vehicle computer from failing to obtain the high-precision ICC time during a cold start, the QNX system's time_service module can retrieve the MCU's built-in RTC time and send it to the Android system via inter-process communication. The Android HAL service receives the RTC time, compares it with the Android system time, and uses the latest time as the system time. This ensures proper synchronization of the vehicle computer time during a cold start.
[0098] For the method steps disclosed in the above embodiments, for the purpose of simple description, the method steps are expressed as a series of action combinations. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0099] As shown in FIG5 , the present invention further provides a time synchronization system, comprising:
[0100] The global time data generating module 201 is configured to calibrate each acquired time data based on the defined global time management module to generate global time data;
[0101] The global time data sending module 202 is configured to carry the global time data to each time synchronization module based on a defined time synchronization protocol;
[0102] The global time data parsing module 203 is configured to parse the defined time synchronization protocol for each time synchronization module to obtain the parsed global time data;
[0103] The time synchronization control module 204 is configured to synchronize the system time contained in each of the modules to be synchronized based on the parsed global time data in response to the time synchronization signal;
[0104] The global time management module is a time synchronization master node, the time modules to be synchronized are time synchronization slave nodes, and the master node and the slave nodes communicate with each other via Ethernet.
[0105] It is worth noting that although only some basic functional modules are disclosed in the embodiment of the present invention, it does not mean that the composition of the present system is limited to the above basic functional modules. On the contrary, what this embodiment wants to express is that on the basis of the above basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the existing technology to form an infinite number of embodiments or technical solutions. In other words, this system is open rather than closed. Just because this embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above devices are described in terms of functions, which are divided into various units and modules. Of course, when implementing the present invention, the functions of each unit and module can be implemented in the same or one or more software and / or hardware.
[0106] As shown in Figure 6, the present invention also provides an electronic device, including: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the time synchronization method.
[0107] Figure 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. As shown in Figure 6, the electronic device provided by an embodiment of the present invention includes: one or more processors 710 and a storage device 720. The electronic device may have one or more processors 710, with Figure 6 using one processor 710 as an example. The storage device 720 is used to store one or more programs. These one or more programs are executed by the one or more processors 710, enabling the one or more processors 710 to implement the time synchronization method described in any of the embodiments of the present invention.
[0108] The electronic device may further include an input device 730 and an output device 740 .
[0109] The processor 710 , storage device 720 , input device 730 and output device 740 in the electronic device may be connected via a bus or other means. FIG6 takes the bus connection as an example.
[0110] The storage device 720 in the electronic device serves as a computer-readable storage medium and can be used to store one or more programs. These programs can be software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the time synchronization method provided in the embodiments of the present invention. The processor 710 executes the software programs, instructions, and modules stored in the storage device 720 to execute various functional applications and data processing of the electronic device, thereby implementing the time synchronization method in the above-mentioned method embodiment.
[0111] The storage device 720 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the storage device 720 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 720 may further include a memory remotely located relative to the processor 710, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0112] The input device 730 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 740 may include a display device such as a display screen.
[0113] The present invention also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the time synchronization method.
[0114] Specifically, the computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in combination with an instruction execution system, device or device.
[0115] The present invention also provides a vehicle, characterized in that the vehicle is provided with the time synchronization system as described above.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A time synchronization method, characterized in that: include: Based on the defined global time management module, the acquired time data are calibrated to generate global time data; Based on the defined time synchronization protocol, carry the global time data to each time module to be synchronized; Parsing the defined time synchronization protocol to obtain the parsed global time data; In response to the time synchronization signal, based on the modules to be synchronized, the system time contained in the modules to be synchronized is synchronized by using the parsed global time data; The global time management module is a time synchronization master node, the time modules to be synchronized are time synchronization slave nodes, and the master node and the slave nodes communicate with each other via Ethernet.
2. The time synchronization method according to claim 1, characterized in that: Based on the defined global time management module, the acquired time data are calibrated to generate global time data, including: defining an ICC controller, wherein the ICC controller includes the global time management module; Obtaining absolute time data and time calibration data from various sources through the global time management module; Calibrate the absolute time data from the different sources based on the time calibration data to generate the global time data; The time calibration data includes network UTC, GPS and built-in high-precision RTC time data.
3. The time synchronization method according to claim 1, characterized in that: Based on the defined time synchronization protocol, the global time data is carried to each time synchronization module, specifically including: The global time management module and each time-to-be-synchronized module are configured with an AutoSar CP tsync module component; Based on the AutoSar CP tsync module component, the global time management module broadcasts the global time data according to the GPTP protocol, and the AutoSar CP tsync module component in each time synchronization module receives the global time data; Wherein, the various time modules to be synchronized include CSC and QNX system modules.
4. The time synchronization method according to claim 3, characterized in that: The CSC system module and the QNX system module are both time-synchronized slave nodes, and communicate with the global time management module as the master node via Ethernet respectively; The time management module sends the global time data to the CSC system module and the QNX system module via the Ethernet; Wherein, the time areas in the CSC system module and the QNX system module are used as the slave nodes.
5. The time synchronization method according to claim 3, characterized in that: The respective time synchronization modules parse the defined time synchronization protocol to obtain the parsed global time data, specifically including: The CSC system module and the QNX system module are both time-synchronized slave nodes, and communicate with the global time management module as the master node via Ethernet; Based on the GPTP protocol, the global time data is parsed to obtain high-precision time data; The high-precision time data includes propagation delay and correction rate.
6. The time synchronization method according to claim 5, characterized in that: In response to the time synchronization signal, based on the modules to be synchronized, the system time contained in the modules to be synchronized is synchronized by the parsed global time data, specifically including: A HAL service is created at the bottom layer of the CSC system module, and the HAL service is used to: Calling the AutoSar CP tsync module component to obtain the high-precision time data; In response to a time synchronization request from an upper-layer application, sending the high-precision time data to the upper-layer application via AIDL; The upper layer application periodically receives the high-precision time data, and synchronizes the CSC system module time according to the high-precision time data; The QNX system module synchronizes the time of the QNX system module by acquiring the high-precision time data by calling the AutoSar CP tsync module component.
7. A time synchronization system, characterized in that: include: A global time data generation module is configured to calibrate each acquired time data based on the defined global time management module to generate global time data; A global time data sending module, configured to carry the global time data to each time synchronization module based on a defined time synchronization protocol; A global time data parsing module, configured to parse the defined time synchronization protocol for each time synchronization module to obtain the parsed global time data; A time synchronization control module, configured to synchronize the system time contained in each of the time-to-be-synchronized modules based on the respective time-to-be-synchronized modules through the parsed global time data in response to the time synchronization signal; The global time management module is a time synchronization master node, the time modules to be synchronized are time synchronization slave nodes, and the master node and the slave nodes communicate with each other via Ethernet.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: It stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the method described in any one of claims 1 to 6.
10. A vehicle, characterized in that: The vehicle is provided with the time synchronization system as claimed in claim 7.
Citation Information
Patent Citations
Work power supply space-time synchronization system for railway detection train
CN116620352A
Time synchronization method and system, electronic equipment, storage medium and vehicle
CN117938290A
CAN-to-Ethernet equipment with time synchronization function
CN217935627U
Synchronous message transmission device, time synchronization system, and synchronous message transmission method
JP2016184808A
Reference time determination method and apparatus
WO2020063535A1
Cited By
Multi-domain time synchronization system based on AUTOSAR AP, medium and vehicle
CN121664345A