CN117040676A - Time synchronization method, device, equipment and storage medium - Google Patents

Time synchronization method, device, equipment and storage medium Download PDF

Info

Publication number
CN117040676A
CN117040676A CN202311122617.6A CN202311122617A CN117040676A CN 117040676 A CN117040676 A CN 117040676A CN 202311122617 A CN202311122617 A CN 202311122617A CN 117040676 A CN117040676 A CN 117040676A
Authority
CN
China
Prior art keywords
time
communication protocol
local time
domain controller
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311122617.6A
Other languages
Chinese (zh)
Inventor
周晓飞
许剑斌
胡斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Avatr Technology Chongqing Co Ltd
Original Assignee
Avatr Technology Chongqing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Avatr Technology Chongqing Co Ltd filed Critical Avatr Technology Chongqing Co Ltd
Priority to CN202311122617.6A priority Critical patent/CN117040676A/en
Publication of CN117040676A publication Critical patent/CN117040676A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The application discloses a time synchronization method, a time synchronization device and a storage medium; the method comprises the following steps: acquiring, by the gateway, a first local time from a second time module of the TBOX based on the first communication protocol; acquiring, by the gateway, a second local time from the second time module based on a second communication protocol for implementing time synchronization of the domain controller and the TBOX in the network, the second communication protocol for providing service-oriented communication over the network, if the first local time cannot be acquired; the second local time is synchronized into each subsystem of the domain controller.

Description

Time synchronization method, device, equipment and storage medium
Technical Field
The present application relates to the field of automotive electronics, and in particular, to a time synchronization method, apparatus, device, and storage medium.
Background
Along with the continuous development of the internet of vehicles technology, vehicles and various automobile electronic components in cabins of the vehicles are increasingly used, and each node in the vehicle-mounted system needs to transmit time information through a communication protocol, so that the time synchronization and correctness of each node are ensured, and the global time calibration of the vehicle-mounted system is realized.
However, during use of the vehicle, it may occur that some nodes do not support the communication protocol, so that the transmission link is not enabled, and the time of each node cannot be synchronized.
Disclosure of Invention
Based on the above problems, the embodiments of the present application provide a time synchronization method, apparatus, device, and storage medium.
The technical scheme provided by the embodiment of the application is as follows:
the embodiment of the application firstly provides a time synchronization method, which comprises the following steps: acquiring, by the gateway, a first local time from a second time module of the TBOX based on the first communication protocol; acquiring, by the gateway, a second local time from the second time module based on a second communication protocol for implementing time synchronization of the domain controller and the TBOX in the network, the second communication protocol for providing service-oriented communication over the network, if the first local time cannot be acquired; the second local time is synchronized into each subsystem of the domain controller.
The embodiment of the application also provides a time synchronization device, which comprises: the first acquisition module is used for acquiring the first local time from the second time module of the TBOX through the gateway based on the first communication protocol; a second obtaining module, configured to obtain, when the first local time cannot be obtained, a second local time from the second time module through the gateway based on a second communication protocol, where the first communication protocol is used to implement time synchronization of the domain controller and the TBOX in the network, and the second communication protocol is used to provide service-oriented communication through the network; and the first synchronization module is used for synchronizing the second local time to each subsystem of the domain controller.
The embodiment of the application also provides an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program capable of running on the processor, and the processor realizes the steps in the time synchronization method according to the embodiment of the application when executing the program.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the time synchronization method according to the embodiment of the application.
In the embodiment of the application, the first time module of each domain controller acquires the time in the same way, so that the time of a plurality of domain controllers can be synchronized; because each domain controller synchronizes the time to the subsystem of the corresponding domain controller, the time of the subsystems of each domain controller, and thus the time of the subsystems of the domain controllers, can be synchronized.
Drawings
FIG. 1 is a schematic flow chart of a time synchronization method according to an embodiment of the application;
FIG. 2 is a flowchart of another time synchronization method according to an embodiment of the present application;
FIG. 3 is a flowchart of another time synchronization method according to an embodiment of the present application;
FIG. 4 is a flowchart of another time synchronization method according to an embodiment of the present application;
FIG. 5 is a flowchart of a time synchronization method according to an embodiment of the present application;
FIG. 6 is a flowchart of a time synchronization method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a time synchronization apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
Fig. 1 is a flow chart of a time synchronization method according to an embodiment of the application, as shown in fig. 1, the method includes the following steps:
step 102: a first time module of a domain controller of the vehicle obtains a first local time from a second time module of the TBOX through the gateway based on a first communication protocol;
the electronic control system of the vehicle can be divided into five domains, namely a power domain, a chassis domain, a cabin domain, an intelligent driving domain and a vehicle body domain, each domain can correspond to one domain controller, and the domain controller of the vehicle comprises any one of the power domain controller, the chassis domain controller, the cabin domain controller, the intelligent driving domain controller and the vehicle body domain controller; the first time module of the domain controller and the second time module of the TBOX are used for time management.
TBOX (telematics box) is a remote/vehicle-mounted communication module, which is an intelligent terminal device integrating the functions of vehicle body network and wireless communication, and after the TBOX is installed on the vehicle, a user can realize real-time monitoring and control of the vehicle through an application program on the electronic device, for example, inquiring the vehicle state, remotely controlling an air conditioner, locking a door, opening an engine limit, remotely starting the vehicle, adjusting a seat to a proper position, and the like.
After the vehicle is started and the network is stable, a first time module of a domain controller of the vehicle can establish a communication connection with a second time module of the TBOX through a gateway based on a first communication protocol to obtain a first local time from the TBOX.
Step 104: the first time module obtains a second local time from the second time module through the gateway based on a second communication protocol under the condition that the first local time cannot be obtained, wherein the first communication protocol is used for realizing time synchronization of the domain controller and the TBOX in a network, and the second communication protocol is used for providing service-oriented communication through the network;
wherein the time synchronization accuracy of the first communication protocol may be better than the second communication protocol; the time synchronization accuracy of the communication protocol can be measured by performance indexes such as error rate, signal to noise ratio, throughput and the like.
Step 106: the first time module synchronizes the second local time into each subsystem of the domain controller.
Therein, a cabin domain controller may be taken as an example, and a subsystem of the cabin domain controller may include a micro control unit (Micro Controller Unit, MCU) and a dual-chip operating system, and the operating system may include a QNX system and/or an Android system.
In the embodiment of the application, the first time module of each domain controller acquires the time in the mode, so that the time of a plurality of domain controllers can be synchronized; because each domain controller synchronizes the time to the subsystem of the corresponding domain controller, the time of the subsystems of each domain controller, and thus the time of the subsystems of the domain controllers, can be synchronized.
In some embodiments, the method further comprises:
and synchronizing the first local time to each subsystem of the domain controller under the condition that the first local time is acquired.
In the embodiment of the application, under the condition that the first local time is acquired through the first communication protocol, the first local time can be directly synchronized to each subsystem of the domain controllers, and the time synchronization of a plurality of domain controllers can be realized.
In some embodiments, as shown in fig. 2, the method further comprises:
step 108: the first time module obtains network time from a cloud end through the gateway based on a third communication protocol under the condition that the second local time cannot be obtained, wherein the third communication protocol is used for realizing time synchronization of the domain controller and the TBOX in the network, and the time synchronization precision of the first communication protocol is higher than that of the third communication protocol;
wherein the time synchronization accuracy of the second communication protocol is also higher than that of the third communication protocol.
Step 110: the first time module synchronizes the network time into each of the subsystems of the domain controller.
In the embodiment of the application, when the time cannot be acquired based on the second communication protocol, the network time can be acquired from the cloud through the gateway based on the third communication protocol, so that the network time can be acquired and synchronized to each subsystem of the domain controllers under the condition that the local time cannot be acquired, thereby realizing time synchronization among a plurality of domain controllers; in addition, the communication protocol with higher time synchronization precision is preferentially used for acquiring the time, so that the accuracy of the acquired time can be improved.
In some embodiments, as shown in fig. 3, step 102 "the first time module of the domain controller of the vehicle obtains the first local time from the second time module of the TBOX through the gateway based on the first communication protocol" may be implemented by:
the method comprises the steps that a first time module of a domain controller of a vehicle obtains first local time from a second time module of a TBOX through a gateway based on a general precision time protocol GPTP;
the goal of GPTP (General Precise Time Protoco, universal precision time protocol) is to ensure that the time of all devices in the local area network is consistent, a clock of one device can be selected as a master clock, namely a time reference, for example, a second time module of TBOX can be selected as the master clock, the master clock periodically issues synchronization information, other devices correct their own local clocks according to the synchronization information, and other devices can be first time modules of each domain controller; GPTP can carry and transmit different information through different kinds of network messages, and other time perception systems finish synchronization with a master clock through the information. Messages related to clock synchronization can be divided into two categories: the method comprises the steps of an event type message and a general type message, wherein the event type message comprises Sync, pdelay_Req and Pdelay_Resp, the receiving and sending of the event type message triggers a MAC (Media Access Control ) layer to sample a local clock, and the general type message comprises Follow_UP and Pdelay_Resp_Follow_UP which are only used for carrying information. Sync and Follow_UP are a group of messages, the main clock information is transmitted through the group of messages to the whole spanning tree, the Sync messages are sent regularly to trigger the local clock to be recorded, and the Follow_UP is responsible for sending the recorded time to a network; the Pdelay_Req, the Pdelay_Resp and the Pdelay_Resp_Follow_UP are a group of messages, and are periodically sent to measure the time delay generated by the transmission of the messages along the path and realize frequency synchronization.
The GPTP domain comprises a master clock node (a second time module of TBOX) for transmitting information and a slave clock node (a first time module of a domain controller) for receiving information, wherein the master clock node is a time reference of the whole GPTP domain, time information for timing is transmitted regularly, the slave clock node corrects a local clock according to the received time information and keeps synchronous with the master clock node, the synchronous of the local clock comprises absolute time synchronization (similar to watch timing), and frequency synchronization (similar to watch timing precision).
Step 104 "the first time module obtains, based on a second communication protocol, a second local time from the second time module through the gateway when the first local time cannot be obtained" may be implemented by:
under the condition that the first local time cannot be acquired, acquiring a second local time from the second time module through a gateway based on a SOMEIP protocol;
SOMEIP (Scalable service-Oriented Middleware over IP, an IP-based extensible service-oriented middleware) provides service-oriented communications over a network, among other things. When the first time module of the domain controller needs time information, the second time module of the TBOX sends the second local time to the first time module, so that the influence of invalid information on the bus can be avoided.
Step 108 "the first time module obtains, from the cloud, the network time through the gateway based on the third communication protocol when the second local time cannot be obtained" may be implemented by:
and under the condition that the first time module does not acquire the second local time, acquiring the network time from the cloud through the gateway based on a Network Time Protocol (NTP).
Among these, NTP (Network Time Protocol ) is a protocol used to synchronize computer time, which allows a computer to synchronize its server or clock source. The client of the domain controller (i.e. the first time module) firstly sends an NTP packet to the cloud server, wherein the NTP packet includes a timestamp T1 of the NTP packet leaving the client, when the cloud server receives the NTP packet, the timestamp T2 of the NTP packet arriving and the timestamp T3 of the NTP packet leaving are sequentially filled, then the NTP packet is immediately returned to the client, when the client receives the response packet, the timestamp T4 of the NTP packet returning is recorded, and the client can calculate 2 key parameters by using the four timestamps: the round trip delay d of the NTP packet, the clock bias t between the client and the cloud server, and the client can adjust the local clock by using the clock bias t so as to make the time of the local clock consistent with the time of the cloud server.
In the embodiment of the application, the acquisition time can be tried according to the sequence of the GPTP protocol, the SOMEIP protocol and the NTP protocol, and the communication accuracy of the GPTP protocol, the SOMEIP protocol and the NTP protocol is reduced in sequence, so that the accuracy of the acquired time can be improved by preferentially using the communication protocol with higher communication accuracy to acquire the time, and the time can be synchronized by adopting the mode to acquire the time by the first time module of each domain controller; because each domain controller synchronizes the time to the subsystem of the corresponding domain controller, the time of the subsystems of each domain controller, and thus the time of the subsystems of the domain controllers, can be synchronized.
In some embodiments, as shown in fig. 4, the method further comprises:
step 103a: the first time module determines that the first local time cannot be acquired under the condition that at least one of the domain controller, the gateway and the TBOX does not support the first communication protocol;
the reason why the first local time cannot be acquired based on the first communication protocol may be that the transmission link is not enabled, for example, the transmission link is not enabled due to at least one of a domain controller, a gateway, and a TBOX in the transmission link not supporting the first communication protocol.
Step 107a: the first time module determines that the second local time cannot be acquired if at least one of the domain controller, the gateway, and the TBOX does not support the second communication protocol.
Similarly, the reason why the second local time cannot be obtained based on the second communication protocol may be that the transmission link is not enabled, for example, the transmission link is not enabled due to at least one of the domain controller, the gateway, and the TBOX in the transmission link not supporting the second communication protocol.
In the embodiment of the application, when the reason that the time cannot be acquired is determined to be that the domain controller, the gateway or the TBOX in the transmission link does not support the corresponding communication protocol, the time can be acquired by replacing the communication protocol, so that the flexibility, the accuracy and the efficiency of time acquisition can be improved.
In some embodiments, as shown in fig. 5, the method further comprises:
step 103b: the first time module obtains the fault code of the TBOX; determining that the first local time cannot be acquired under the condition that the fault code characterizes the second time module to be abnormal;
step 107b: the first time module obtains the fault code of the TBOX; and under the condition that the fault code characterizes the second time module to be abnormal, determining that the second local time cannot be acquired.
The reason why the first local time cannot be acquired based on the first communication protocol or the second local time cannot be acquired based on the second communication protocol may be that the second time module is abnormal, the fault code of the TBOX may be acquired, whether the second time module is abnormal is determined according to the fault code, and if the fault type corresponding to the acquired fault code is that the second time module is abnormal, the second time module is determined to be abnormal.
In the embodiment of the application, under the condition that the second time module of the TBOX is abnormal, the local time cannot be acquired is determined, and further the network time is attempted to be acquired from the cloud, so that the flexibility of time acquisition can be improved.
In some embodiments, as shown in fig. 6, the method further comprises:
step 1051: the first time module obtains a third local time from the second time module through the gateway based on a second communication protocol under the condition that the first local time is obtained;
step 1052: the first time module determines the second local time based on the first local time and the third local time.
Under the condition that the first local time is acquired based on the first communication protocol and the third local time is acquired based on the second communication protocol, the accuracy of the acquired first local time and third local time can be judged through a preset time accuracy measurement algorithm, the time with higher accuracy is determined to be the second local time, and the second local time is synchronized to each subsystem of the domain controller.
In the embodiment of the application, the accuracy of the acquired time can be further improved by judging the accuracy of the acquired first local time and third local time and determining the time with higher accuracy as the second local time.
In the embodiment of the application, under the condition that the network is stable after the vehicle is started, the first time modules of the domain controllers (including the cabin domain controller, the intelligent driving domain controller and the vehicle body domain controller) of the whole vehicle can acquire the time based on the following steps, and as the mode of acquiring the time of each domain controller is the same, the time synchronization effect of the domain controllers can be achieved:
step S201: the first time module obtains time from the second time module of the TBOX based on the GPTP protocol, and executes step S202 on the premise that the time cannot be obtained, where the reason why the time cannot be obtained based on the GPTP protocol may be that the transmission link is not enabled (e.g., a domain controller, a gateway on the transmission link, and the TBOX does not support GPTP);
step S202: the first time module obtains time from the second time module of the TBOX based on the sometip protocol, and performs step S203 on the premise that the time is not obtained, where the reason why the time cannot be obtained based on the sometip protocol may be that the transmission link is not through (e.g., a domain controller, a gateway on the transmission link, the TBOX does not support sometip);
step S203: network time is obtained from the cloud based on the NTP protocol.
The first time module synchronizes the acquired time to each subsystem in the domain controller (for example, a micro control unit of a cabin, a QNX operating system of a dual chip, or an Android operating system).
It should be noted that, in the embodiment of the present application, if the above-mentioned time synchronization method is implemented in the form of a software functional module, and sold or used as a separate product, the time synchronization method may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium, including several instructions for causing an electronic device (which may be a mobile phone, a tablet computer, a desktop computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensing device, etc.) to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
Fig. 7 is a schematic structural diagram of a time synchronization device according to an embodiment of the present application, as shown in fig. 7, the device 700 includes: a first acquisition module 701, a second acquisition module 702, and a first synchronization module 703, wherein:
a first obtaining module 701, configured to obtain, based on a first communication protocol, a first local time from a second time module of the TBOX through the gateway;
a second obtaining module 702, configured to obtain, if the first local time cannot be obtained, a second local time from the second time module through the gateway based on a second communication protocol, where the first communication protocol is used to implement time synchronization of the domain controller and the TBOX in the network, and the second communication protocol is used to provide service-oriented communication through the network;
a first synchronization module 703, configured to synchronize the second local time to each subsystem of the domain controller.
In some embodiments, the apparatus further comprises: the third obtaining module is configured to obtain, when the second local time cannot be obtained, a network time from the cloud through the gateway based on a third communication protocol, where the third communication protocol is used to achieve time synchronization between the domain controller and the TBOX in the network, and the time synchronization precision of the first communication protocol is higher than that of the third communication protocol; and a second synchronization module for synchronizing the network time to each subsystem of the domain controller.
In some embodiments, the first obtaining module 701 is configured to obtain, through a gateway, a first local time from the second time module of the TBOX based on the GPTP; the second obtaining module 702 is configured to obtain, based on a sometip protocol, a second local time from the second time module through a gateway if the first local time cannot be obtained; the third obtaining module is configured to obtain, based on a network time protocol NTP, a network time from the cloud through the gateway when the second local time is not obtained.
In some embodiments, the apparatus further comprises: a first determining module, configured to determine that the first local time cannot be acquired if at least one of the domain controller, the gateway, and the TBOX does not support the first communication protocol; and a second determining module, configured to determine that the second local time cannot be acquired if at least one of the domain controller, the gateway, and the TBOX does not support the second communication protocol.
In some embodiments, the apparatus further comprises: a fourth obtaining module, configured to obtain a fault code of the TBOX; and the third determining module is used for determining that the first local time or the second local time cannot be acquired under the condition that the fault code characterizes the second time module to be abnormal.
In some embodiments, the domain controller comprises at least one of a power domain controller, a chassis domain controller, a cabin domain controller, an intelligent driving domain controller, and a body domain controller; the subsystem of the cabin domain controller comprises a micro control unit MCU and a dual-chip operating system.
In some embodiments, the apparatus further comprises: a fifth obtaining module, configured to obtain, when the first local time is obtained, a third local time from the second time module through the gateway based on a second communication protocol; and a fourth determining module, configured to determine the second local time based on the first local time and the third local time.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, please refer to the description of the embodiments of the method of the present application.
Based on the foregoing embodiments, the embodiment of the present application further provides an electronic device, and fig. 8 is a schematic structural diagram of an electronic device according to the embodiment of the present application, as shown in fig. 8, a hardware entity of the device 800 includes: a memory 801 and a processor 802, the memory 801 storing a computer program executable on the processor 802, the processor 802 implementing the steps in the time synchronization method of the above embodiments when executing the program.
The memory 801 is configured to store instructions and applications executable by the processor 802, and may also cache data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or processed by various modules in the processor 802 and the device 800, which may be implemented by a FLASH memory (FLASH) or a random access memory (Random Access Memory, RAM).
Based on the foregoing embodiments, the embodiments of the present application further provide a computer readable storage medium having a computer program stored therein, which when executed by a processor of an electronic device, is capable of implementing the time synchronization method provided in any of the foregoing embodiments.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
The methods disclosed in the method embodiments provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new method embodiment.
The features disclosed in the embodiments of the products provided by the application can be combined arbitrarily under the condition of no conflict to obtain new embodiments of the products.
The features disclosed in the embodiments of the method or the device provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new embodiment of the method or the device.
The computer readable storage medium may be a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable programmable Read Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic random access Memory (Ferromagnetic Random Access Memory, FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a compact disk Read Only Memory (Compact Disc Read-Only Memory, CD-ROM), or the like; but may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus necessary general hardware nodes, or of course by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A method of time synchronization, characterized by a first time module applied to a domain controller of a vehicle, the method comprising:
acquiring, by the gateway, a first local time from a second time module of the TBOX based on the first communication protocol;
acquiring, by the gateway, a second local time from the second time module based on a second communication protocol for implementing time synchronization of the domain controller and the TBOX in the network, the second communication protocol for providing service-oriented communication over the network, if the first local time cannot be acquired;
the second local time is synchronized into each subsystem of the domain controller.
2. The method according to claim 1, wherein the method further comprises:
under the condition that the second local time cannot be acquired, acquiring network time from a cloud through the gateway based on a third communication protocol, wherein the third communication protocol is used for realizing time synchronization of the domain controller and the TBOX in a network, and the time synchronization precision of the first communication protocol is higher than that of the third communication protocol;
synchronizing the network time into each of the subsystems of the domain controller.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the obtaining, by the gateway, the first local time from the second time module of the TBOX based on the first communication protocol includes: based on a general precision time protocol GPTP, acquiring a first local time from a second time module of a TBOX through a gateway;
the obtaining, by the gateway, a second local time from the second time module based on a second communication protocol, where the first local time cannot be obtained, includes: under the condition that the first local time cannot be acquired, acquiring a second local time from the second time module through a gateway based on a SOMEIP protocol;
under the condition that the second local time cannot be acquired, acquiring the network time from the cloud through the gateway based on a third communication protocol, including: and under the condition that the second local time is not acquired, acquiring the network time from the cloud through the gateway based on a Network Time Protocol (NTP).
4. The method according to claim 1, wherein the method further comprises:
determining that the first local time cannot be acquired in the case that at least one of the domain controller, the gateway and the TBOX does not support the first communication protocol;
determining that the second local time cannot be acquired in the case that at least one of the domain controller, the gateway and the TBOX does not support the second communication protocol.
5. The method according to claim 1, wherein the method further comprises:
acquiring a fault code of the TBOX;
and under the condition that the fault code characterizes the second time module to be abnormal, determining that the first local time or the second local time cannot be acquired.
6. The method of any one of claims 1 to 5, wherein the domain controller comprises at least one of a power domain controller, a chassis domain controller, a cabin domain controller, an intelligent driving domain controller, and a body domain controller;
the subsystem of the cabin domain controller comprises a micro control unit MCU and a dual-chip operating system.
7. The method according to any one of claims 1 to 5, further comprising:
acquiring a third local time from the second time module through the gateway based on a second communication protocol under the condition that the first local time is acquired;
the second local time is determined based on the first local time and the third local time.
8. A time synchronization device, the device comprising:
the first acquisition module is used for acquiring the first local time from the second time module of the TBOX through the gateway based on the first communication protocol;
a second obtaining module, configured to obtain, when the first local time cannot be obtained, a second local time from the second time module through the gateway based on a second communication protocol, where the first communication protocol is used to implement time synchronization of the domain controller and the TBOX in the network, and the second communication protocol is used to provide service-oriented communication through the network;
and the first synchronization module is used for synchronizing the second local time to each subsystem of the domain controller.
9. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that the processor implements the steps of the time synchronization method of any of claims 1 to 7 when the program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the time synchronization method according to any one of claims 1 to 7.
CN202311122617.6A 2023-08-31 2023-08-31 Time synchronization method, device, equipment and storage medium Pending CN117040676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311122617.6A CN117040676A (en) 2023-08-31 2023-08-31 Time synchronization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311122617.6A CN117040676A (en) 2023-08-31 2023-08-31 Time synchronization method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117040676A true CN117040676A (en) 2023-11-10

Family

ID=88628244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311122617.6A Pending CN117040676A (en) 2023-08-31 2023-08-31 Time synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117040676A (en)

Similar Documents

Publication Publication Date Title
CN107710753B (en) Decentralized synchronous multisensor system
CN110120846B (en) Clock synchronization method and system
KR101565093B1 (en) Time synchronous method for avb in vehicle and system thereof
CN105700337A (en) Clock synchronization method and device applied to vehicle-borne terminal
US20170176953A1 (en) Time synchronization device, time synchronization system, and time synchronization method
JP2020501407A (en) System and method for synchronizing processor operation over a communication network
CN112821974A (en) High-precision time synchronization method and device for vehicle-mounted ECU
CN111829515A (en) Time synchronization method, device, vehicle and storage medium
CN117639991A (en) Time synchronization method and device for vehicle
US20090184871A1 (en) GPS with time integrated call initiation
CN117040676A (en) Time synchronization method, device, equipment and storage medium
KR100952281B1 (en) Method of deciding a delay for network synchronization in network system
CN111443685B (en) Method for providing universal time in control device and control device
JP2023506907A (en) A Method for Validating Sensor Data Validity in Ethernet Onboard Networks
US20200244558A1 (en) Method system and computer program for communication between electronic control units
CN113839734B (en) Time synchronization method and device, electronic equipment, storage medium and vehicle
WO2022030404A1 (en) On-vehicle device, time synchronization method, and time synchronization program
CN116131984A (en) Reference time determining method and device, electronic equipment and storage medium
CN110138487B (en) Time noise transfer characteristic measurement method and network node
KR101498561B1 (en) System and method for can communication based tdma digital technology for global synchronization
CN116633475A (en) Whole vehicle time synchronization method, equipment and computer readable storage medium
WO2023044802A1 (en) Time synchronization method and related apparatus
CN116032413B (en) Communication method, device, vehicle and storage medium
CN117527123B (en) Time synchronization method, device, vehicle and storage medium
US11866058B2 (en) Apparatus and method for time synchronization in V2X networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination