Time synchronization method and device, electronic equipment and computer readable storage medium

By generating and outputting simulated messages in the vehicle, the problem of low time synchronization reliability is solved, time synchronization is achieved in the case of abnormal GPRMC messages, the time synchronization reliability of vehicle equipment is improved, and driving safety is ensured.

CN119696719APending Publication Date: 2025-03-25HAOMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311234758.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In specific vehicle usage scenarios, the reliability of time synchronization is poor, resulting in abnormal fluctuations in the time of each device, affecting perception, positioning and other services, and even affecting driving safety.

Method used

By obtaining the power-up information when the vehicle is powered on and the time synchronization data output by the combined inertial navigation module, if there is an abnormality in the GPRMC message, an analog message is generated, the current time used by the electronic device is carried, and the analog message is output to each device connected to the combined inertial navigation module, so that it can synchronize time according to the current time in the simulated message.

Benefits of technology

In the case of abnormal GPRMC packets, time synchronization is achieved through simulated packets, abnormal fluctuations are avoided, the reliability of time synchronization is improved, and the normal operation and driving safety of the vehicle in key scenarios is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119696719A_ABST
    Figure CN119696719A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of computers, and provides a time synchronization method and device, electronic equipment and a computer readable storage medium. The time synchronization method comprises the steps that power-on information generated when a vehicle is powered on and time synchronization data output by a combined inertial navigation module of the vehicle are obtained, and the time synchronization data at least comprise a GPRMC message; if the GPRMC message is abnormal, a simulation message is generated according to the power-on information, and the simulation message carries the current time used by the electronic equipment; and outputting the simulation message to each device connected with the combined inertial navigation module, so that each device performs time synchronization according to the current time in the simulation message. According to the embodiment of the invention, the reliability of time synchronization can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a time synchronization method, device, electronic device and computer-readable storage medium. Background Art

[0002] At present, in order to meet the needs of autonomous driving, vehicles are usually equipped with controllers, lidars, millimeter-wave radars, cameras, combined inertial navigation modules and other devices. The time synchronization of these devices is usually achieved by receiving satellite time through the combined inertial navigation module, outputting pulse per second (PPS) signals and recommended positioning information (Global Positioning System Receiver Monitoring Control, GPRMC) messages, to achieve time synchronization of each device. In actual applications, it is found that in specific vehicle usage scenarios, the reliability of time synchronization is poor, and the time of each device will fluctuate abnormally, resulting in the unusable data collected by each device during this period, which in turn causes the upper layer to be unable to implement perception, positioning and other services during this period, which may seriously affect driving safety. Summary of the invention

[0003] The embodiments of the present application provide a time synchronization method, device, electronic device and computer-readable storage medium, which can solve the problem of low reliability of time synchronization in related technologies.

[0004] A first aspect of an embodiment of the present application provides a time synchronization method, which is applied to an electronic device. The time synchronization method includes: obtaining power-on information when a vehicle is powered on, and time synchronization data output by a combined inertial navigation module of the vehicle, the time synchronization data at least including a GPRMC message; if there is an abnormality in the GPRMC message, generating an analog message based on the power-on information, the analog message carrying the current time used by the electronic device; and outputting the analog message to each device connected to the combined inertial navigation module, so that each device performs time synchronization according to the current time in the analog message.

[0005] A time synchronization device provided in a second aspect of an embodiment of the present application is configured in an electronic device, and the time synchronization device includes: an acquisition unit, used to acquire power-on information when a vehicle is powered on, and time synchronization data output by a combined inertial navigation module of the vehicle, the time synchronization data at least including a GPRMC message; a generation unit, used to generate an analog message according to the power-on information if there is an abnormality in the GPRMC message, the analog message carrying the current time used by the electronic device; a time synchronization unit, used to output the analog message to each device connected to the combined inertial navigation module, so that each device performs time synchronization according to the current time in the analog message.

[0006] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned time synchronization method when executing the computer program.

[0007] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned time synchronization method are implemented.

[0008] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the time synchronization method described in the first aspect above.

[0009] In an embodiment of the present application, by obtaining power-on information when the vehicle is powered on, and time synchronization data output by the combined inertial navigation module of the vehicle, if there is an abnormality in the GPRMC message in the time synchronization data, a simulation message is generated according to the power-on information. Since the simulation message carries the current time used by the electronic device, when the simulation message is output to each device connected to the combined inertial navigation module, each device can perform time synchronization according to the current time in the simulation message. In scenarios where there is an abnormality in the GPRMC message of the combined inertial navigation module in basements, tunnels, etc., the electronic device can use the current time it uses to simulate the output of the GPRMC message, thereby avoiding the use of abnormal GPRMC messages for time synchronization by each device connected to the combined inertial navigation module, thereby improving the reliability of time synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0011] Figure 1 It is a schematic diagram of an implementation flow of a time synchronization method provided in an embodiment of the present application;

[0012] Figure 2 is a schematic diagram of the architecture of a vehicle provided in an embodiment of the present application;

[0013] Figure 3 It is a structural diagram of a time synchronization device provided in an embodiment of the present application;

[0014] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are protected by the present application.

[0016] Various devices equipped on vehicles usually receive satellite time through the combined inertial navigation module, and output PPS signals and GPRMC messages to achieve time synchronization. In actual applications, it is found that in scenes such as basements and tunnels, due to poor satellite signals, the combined inertial navigation module cannot output GPRMC messages. At this time, the time of each device will fluctuate abnormally, and the reliability of time synchronization is poor.

[0017] In view of this, the present application proposes a time synchronization method, which can simulate the GPRMC message when the GPRMC message is abnormal, so that each device on the vehicle can perform time synchronization based on the simulated message, which can avoid the occurrence of abnormal fluctuations to a certain extent and improve the reliability of time synchronization.

[0018] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.

[0019] Figure 1 A schematic diagram of an implementation flow of a time synchronization method provided in an embodiment of the present application is shown. The method can be applied to electronic devices and is suitable for situations where the reliability of time synchronization needs to be improved.

[0020] In some embodiments of the present application, the electronic device may be a computer, a mobile phone, a vehicle-mounted device or other intelligent device, which may synchronize the time of various devices on the vehicle. In other embodiments, the electronic device may also refer to a vehicle, which may be a new energy vehicle, a fuel vehicle or other types of vehicles. Specifically, the time synchronization method provided in the present application may be executed by a controller inside the vehicle, thereby synchronizing the time of various devices on the vehicle. The present application does not limit this.

[0021] Specifically, the above time synchronization method may include the following steps S101 to S103.

[0022] Step S101, obtaining power-on information when the vehicle is powered on, and time synchronization data output by the combined inertial navigation module of the vehicle.

[0023] The above-mentioned vehicle refers to the vehicle in which the electronic device is located or the car it controls.

[0024] In the implementation of the present application, the power-on information when the vehicle is powered on refers to the information collected when the vehicle is powered on, for example, the power-on position when powered on, the time synchronization data output by the combined inertial navigation module when powered on, and so on. The power-on position is the position of the vehicle when it is powered on, which can be located when the vehicle is powered on. The combined inertial navigation module of the vehicle is a functional module of the satellite inertial navigation combined positioning system carried in the vehicle, which includes a satellite positioning system and an inertial navigation system (INS), wherein the satellite positioning system includes but is not limited to the global positioning system (GPS), the Beidou Navigation Satellite System (BDS), and the global navigation satellite system (GNSS). In the implementation of the present application, the combined inertial navigation module can receive satellite signals in real time, and based on the satellite time carried by the satellite signal, output the time synchronization data carrying the satellite time to each device connected to itself (such as the camera, lidar, etc. on the vehicle).

[0025] In an embodiment of the present application, the electronic device may be connected to the combined inertial navigation module and, as a slave device of the combined inertial navigation module, receive the time synchronization data output by the combined inertial navigation module like other devices connected to the combined inertial navigation module.

[0026] Among them, time synchronization data is data used for time synchronization of other devices, including at least GPRMC messages. GPRMC messages usually refer to an international standard information returned by GPS, which carries information such as longitude and latitude, Euler angles, and the current Coordinated Universal Time (UTC). In some implementations, time synchronization data may also include PPS signals.

[0027] It should be understood that when each device connected to the combined inertial navigation module receives a GPRMC message, it can adjust its own time according to the satellite time carried in the GPRMC message, so that each device is calibrated to a unified time. At this time, the time used by each device is synchronized, and the vehicle can realize perception, positioning, automatic driving and other services based on the information collected by different devices at the same time.

[0028] Step S102: If there is an abnormality in the GPRMC message, a simulation message is generated according to the power-on information.

[0029] Among them, the abnormality of the GPRMC message may mean that the electronic device has not received the GPRMC message within a period of time, or the confidence of the satellite time carried by the received GPRMC message is lower than the confidence threshold. Specifically, the electronic device itself can record an initial time, which can be the time adjusted after the previous receipt of the GPRMC message, or the default configuration time. When the error between the satellite time carried by the GPRMC message and the initial time is greater than the allowable error threshold (for example, the error exceeds 1 day), it can be confirmed that the confidence of the satellite time is lower than the confidence threshold.

[0030] If the GPRMC message is abnormal, it means that the vehicle may be in a basement, tunnel, etc. At this time, the satellite time carried by the GPRMC message is unreliable information. When the satellite time carried by the GPRMC message is used for time synchronization, abnormal fluctuations in time are likely to occur in each device. In order to avoid abnormal fluctuations, in the implementation of the present application, when the GPRMC message is abnormal, a simulation message can be generated according to the power-on information.

[0031] Among them, the simulation message may carry the current time used by the electronic device and can be used for time synchronization of other devices. Specifically, in some implementations, the simulation message can be used to simulate the GPRMC message. It should be understood that the power-on information can characterize the situation when the vehicle is powered on, and then characterize the reliability of the current time used by the electronic device. According to the power-on information, the electronic device can adaptively adjust the current time used by itself to generate a simulation message carrying the current time.

[0032] Step S103, outputting a simulation message to each device connected to the combined inertial navigation module, so that each device performs time synchronization according to the current time in the simulation message.

[0033] Specifically, the electronic device can be connected to each device connected to the combined inertial navigation module respectively, and output analog messages to each device connected to the combined inertial navigation module, or it can be connected to the combined inertial navigation module, forward the analog message through the combined inertial navigation module, and then output the analog message to each device connected to the combined inertial navigation module. The above-mentioned "connection" can refer to a wired connection or a wireless connection. This application does not limit this.

[0034] In the implementation manner of the present application, the analog message can be understood as a GPRMC message with a higher priority. When each device connected to the combined inertial navigation module receives an analog message and a GPRMC message output by the combined inertial navigation module (i.e., an abnormal GPRMC message), or when each device connected to the combined inertial navigation module only receives an analog message, the device can discard the satellite time carried in the GPRMC message output by the combined inertial navigation module, and perform time synchronization according to the current time in the analog message.

[0035] The time synchronization may refer to adjusting the device time of the device itself so that the device time of each device is synchronized.

[0036] It should be noted that the number of devices connected to the above-mentioned combined inertial navigation module can be one or more, and these devices include but are not limited to sensors such as lidar and cameras, as well as intelligent devices such as vehicle-mounted display devices and vehicle-mounted audio.

[0037] For example, Figure 2 A structural schematic diagram of a vehicle provided in an embodiment of the present application is shown. Among them, the combined inertial navigation module can be connected to the controller through a universal asynchronous receiver / transmitter (URAT) bus and a PPS signal line, and the controller can refer to the electronic device of the present application. At the same time, the combined inertial navigation module and the controller are connected to the laser radar and the camera synchronization module. Among them, the camera synchronization module can be connected to multiple cameras to combine the image data collected by multiple cameras, and to control multiple cameras for time synchronization. The camera synchronization module and the laser radar can be connected through a transistor-transistor logic circuit (Transistor-Transistor Logic, TTL) for data fusion. When there is an abnormality in the GPRMC message output by the combined inertial navigation module, the controller can output an analog message to the laser radar and the camera synchronization module on its behalf, so that the laser radar and the camera synchronization module are synchronized according to the current time in the analog message.

[0038] It should be understood that the various devices connected to the above-mentioned combined inertial navigation module may also include devices indirectly connected to the combined inertial navigation module. Figure 2 For example, the controller can be connected to the switch, and the switch can be used to control other devices on the vehicle (such as laser radar, millimeter wave radar, controller, etc. that are not directly connected to the combined inertial navigation module). The controller can generate analog messages to achieve time synchronization between the switch and other devices controlled by the switch. At this time, the analog message can be used to simulate the Precision Timing Protocol (PTP) message or the Generalized Precision Time Protocol (GPTP) message.

[0039] In an embodiment of the present application, by obtaining power-on information when the vehicle is powered on, and time synchronization data output by the combined inertial navigation module of the vehicle, if there is an abnormality in the GPRMC message in the time synchronization data, a simulation message is generated according to the power-on information. Since the simulation message carries the current time used by the electronic device, when the simulation message is output to each device connected to the combined inertial navigation module, each device can perform time synchronization according to the current time in the simulation message. In scenarios where there is an abnormality in the GPRMC message of the combined inertial navigation module in basements, tunnels, etc., the electronic device can use the current time it uses to simulate the output of the GPRMC message, thereby avoiding the use of abnormal GPRMC messages for time synchronization by each device connected to the combined inertial navigation module, thereby improving the reliability of time synchronization.

[0040] Furthermore, during the time period when GPRMC messages are abnormal, the data output by each device can be fused and used to guide vehicle positioning, autonomous driving and other services.

[0041] The time synchronization method provided by the present application is described below with reference to a specific embodiment.

[0042] In some embodiments of the present application, the power-on information may be the power-on position when the vehicle is powered on. Accordingly, if there is an abnormality in the GPRMC message and the satellite signal strength at the power-on position is less than the strength threshold, the current time is obtained through the Network Time Protocol (NTP) and a simulation message carrying the current time is generated.

[0043] Specifically, the satellite signal strength can be determined based on the signal power of the satellite signal. If the satellite signal strength at the power-on position is less than the strength threshold, it means that the vehicle is started at a satellite-free position such as a basement. When the vehicle is powered on, the GPRMC message obtained by the combined inertial navigation module is abnormal, and the satellite time in the GPRMC message is unreliable. The time of the electronic device and each device connected to the combined inertial navigation module is chaotic and disordered, that is, the time used by the electronic device is also unreliable. Therefore, the electronic device can obtain the current time through the network time protocol and generate an analog message carrying the current time. The current time obtained through the network time protocol is not easily affected by the strength of the satellite signal. Therefore, the current time carried by the analog message is reliable, and then when other devices perform time synchronization based on the analog message, the time synchronization result is reliable, and it is not easy to produce obvious abnormal jumps due to the abnormality of the GPRMC message.

[0044] For example, Figure 2 As shown, the controller can be connected to a 4G network router to obtain the current time through the network time protocol.

[0045] Similarly, in some embodiments of the present application, the power-on information may be time synchronization data output by the combined inertial navigation module when powered on. Accordingly, if there is an abnormality in the GPRMC message, and there is also an abnormality in the GPRMC message output by the combined inertial navigation module when powered on, the current time is obtained through the network time protocol, and a simulation message carrying the current time is generated.

[0046] Correspondingly, at this time, the electronic device can output an analog message to the combined inertial navigation module, so that the combined inertial navigation module synchronizes the time to the target time.

[0047] The target time is the difference between the current time and the transmission delay time. The transmission delay time is the data transmission delay time between the combined inertial navigation module and the electronic device, which can be set according to the experience value.

[0048] In other implementations, if the satellite signal strength at the power-on position is greater than or equal to a strength threshold, then the duration of the abnormality in the GPRMC message is detected.

[0049] Specifically, since the combined inertial navigation module can output time synchronization data in real time, it is possible to determine whether there is an abnormality in each GPRMC message output according to the frequency of the combined inertial navigation module output, and then determine the duration of the GPRMC message.

[0050] If the duration is greater than the duration threshold, a simulation message carrying the current time is generated, wherein the current time is corrected by a historical GPRMC message, and the historical GPRMC message is a GPRMC message received by the combined inertial navigation module before the GPRMC message is abnormal.

[0051] Specifically, when the satellite signal strength at the power-on position is greater than or equal to the strength threshold, it means that there is no abnormality in the GPRMC message received when the vehicle is powered on. At this time, the time used by the electronic device is synchronized with the GPRMC message without abnormality, and synchronized in real time until the received GPRMC message is abnormal, which means that the vehicle is in the normal driving process and enters the basement, tunnel and other satellite-free locations. When there is an abnormality in the GPRMC message, each device will use its own device time, such as the device's own real-time clock (RTC). At the beginning, the time synchronization error between the devices is very small, and the error will become larger and larger as time goes by. Therefore, if the duration is less than or equal to the duration threshold, it means that the time synchronization error between the devices is small, and there is no need to output the analog message. The devices connected to the combined inertial navigation module can use their own device time. If the duration is greater than the duration threshold, it means that the time synchronization error between the devices is large. At this time, an analog message carrying the current time can be generated to synchronize the time of each device based on the same current time.

[0052] Similarly, the electronic device can output an analog message to the combined inertial navigation module so that the combined inertial navigation module synchronizes the time to the target time. The target time is the difference between the current time and the transmission delay time. The transmission delay time is the data transmission delay time between the combined inertial navigation module and the electronic device, which can be set according to the empirical value.

[0053] Considering that the aforementioned combined inertial navigation module can also output a PPS signal, in some embodiments, if there is an abnormality in the PPS signal in the time synchronization data, or the time synchronization data output by the combined inertial navigation module does not contain a PPS signal, the electronic device can also generate an analog PPS signal, and output the analog PPS signal to each device connected to the combined inertial navigation module, so that each device connected to the combined inertial navigation module can perform time synchronization according to the current time in the analog message and the analog PPS signal.

[0054] Among them, the abnormality of the PPS signal may refer to the abnormality of the output frequency of the PPS signal. If the PPS signal in the time synchronization data is abnormal, or the time synchronization data output by the combined inertial navigation module does not contain the PPS signal, it means that the various devices connected to the combined inertial navigation module cannot perform time synchronization based on the PPS signal. At this time, the electronic equipment needs to output the analog PPS signal and the analog message at the same time.

[0055] In some implementations, each device connected to the combined inertial navigation module can clear the internal millisecond and below time after receiving the analog PPS signal, and start calculating the millisecond time from then on. When receiving the analog message, the current time in the message can be extracted, and the time taken from receiving the PPS signal to parsing the current time can be added to the whole second time in the current time to obtain its own device time, thus completing a time synchronization.

[0056] Correspondingly, if there is no abnormality in the PPS signal in the time synchronization data, the electronic device can output an analog message so that each device connected to the combined inertial navigation module can perform time synchronization according to the current time in the analog message and the PPS signal without abnormality.

[0057] In some other embodiments of the present application, after outputting the analog message to each device connected to the combined inertial navigation module, the electronic device can also reacquire new time synchronization data output by the combined inertial navigation module of the vehicle. The new time synchronization data at least includes a new GPRMC message.

[0058] If there is no abnormality in the new GPRMC message, it means that the vehicle has driven out of the basement, tunnel, etc. In order to avoid message conflicts, the electronic equipment can stop outputting analog messages to the various devices connected to the combined inertial navigation module. At this time, the various devices connected to the combined inertial navigation module will synchronize the device time to the satellite time in the new GPRMC message, resulting in a small jump.

[0059] In order to reduce time jumps, when the electronic equipment stops outputting analog messages, each device connected to the combined inertial navigation module can update the time when the difference between the new target time and its own device time is greater than the preset difference.

[0060] The new target time is the difference between the data reception time and the data transmission time. The data reception time is the time when each device connected to the combined inertial navigation module receives a new GPRMC message. The data transmission time is the time required for data transmission between the combined inertial navigation module and the connected device, which can be set according to experience.

[0061] If the difference between the new target time and the time of the own device is less than or equal to the preset difference, it means that the error between the time of the own device and the satellite time is small, and no time update is required. If the difference between the new target time and the time of the own device is greater than the preset difference, it means that the error between the time of the own device and the satellite time is large, and a time update is required to achieve time synchronization with other devices.

[0062] Similarly, when the difference between the new target time and the time used by the electronic device is greater than the preset difference, the electronic device can update the time used by itself to the difference between the data reception time and the data transmission time, where the data transmission time is the time required for data transmission between the electronic device and the combined inertial navigation module, which can be set according to empirical values.

[0063] In the implementation of the present application, when there is an abnormality in the GPRMC message, the simulated message and the simulated PPS signal can be output in different scenarios to synchronize the time of all devices. During time synchronization, data transmission delay and data transmission time can be used to achieve time synchronization, which improves the reliability of time synchronization to a certain extent.

[0064] It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders.

[0065] like Figure 3 FIG. 3 is a schematic diagram of the structure of a time synchronization device 300 provided in an embodiment of the present application. The time synchronization device 300 is configured on an electronic device.

[0066] Specifically, the time synchronization device 300 may include:

[0067] An acquisition unit 301 is used to acquire power-on information when a vehicle is powered on, and time synchronization data output by a combined inertial navigation module of the vehicle, wherein the time synchronization data at least includes a GPRMC message;

[0068] A generating unit 302 is configured to generate a simulation message according to the power-on information if the GPRMC message is abnormal, wherein the simulation message carries the current time of use of the electronic device;

[0069] The time synchronization unit 303 is used to output the analog message to each device connected to the combined inertial navigation module, so that each device performs time synchronization according to the current time in the analog message.

[0070] In some embodiments of the present application, the power-on information is the power-on position when the vehicle is powered on; the time synchronization unit 303 can be specifically used for: if there is an abnormality in the GPRMC message and the satellite signal strength at the power-on position is less than the strength threshold, then obtaining the current time through the network time protocol; generating the analog message carrying the current time.

[0071] In some embodiments of the present application, the above-mentioned time synchronization unit 303 can be specifically used to: if the satellite signal strength at the power-on position is greater than or equal to the strength threshold, then detect the duration of the abnormality in the GPRMC message; if the duration is greater than the duration threshold, then generate the simulation message carrying the current time, wherein the current time is corrected by a historical GPRMC message, and the historical GPRMC message is a GPRMC message received by the combined inertial navigation module before the abnormality occurs in the GPRMC message.

[0072] In some embodiments of the present application, the above-mentioned generation unit 302 can also be specifically used to: generate an analog PPS signal if there is an abnormality in the PPS signal in the time synchronization data, or the time synchronization data output by the combined inertial navigation module does not contain the PPS signal; output the analog PPS signal to each device connected to the combined inertial navigation module, so that each device connected to the combined inertial navigation module performs time synchronization according to the current time in the analog message and the analog PPS signal.

[0073] In some embodiments of the present application, the above-mentioned time synchronization unit 303 can also be specifically used to: output the analog message to the combined inertial navigation module so that the combined inertial navigation module synchronizes the time to the target time, the target time is the difference between the current time and the transmission delay time, and the transmission delay time is the data transmission delay time between the combined inertial navigation module and the electronic device.

[0074] In some embodiments of the present application, the above-mentioned time synchronization unit 303 can also be specifically used to: re-acquire new time synchronization data output by the combined inertial navigation module of the vehicle, and the new time synchronization data at least includes a new GPRMC message; if there is no abnormality in the new GPRMC message, stop outputting the analog message to each device connected to the combined inertial navigation module.

[0075] In some embodiments of the present application, when the electronic device stops outputting analog messages, the devices connected to the above-mentioned combined inertial navigation module update the time when the difference between the new target time and the time of the own device is greater than the preset difference; wherein the new target time is the difference between the data reception time and the data transmission time, the data reception time is the time when the devices connected to the combined inertial navigation module receive the new GPRMC message, and the data transmission time is the time required for data transmission between the combined inertial navigation module and the connected devices.

[0076] It should be noted that, for the convenience and simplicity of description, the specific working process of the time synchronization device 300 can be referred to Figure 1 to Figure 2 The corresponding process of the method will not be repeated here.

[0077] like Figure 4 , which is a schematic diagram of an electronic device provided in an embodiment of the present application. Specifically, the electronic device 4 may include: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40, such as a time synchronization program. When the processor 40 executes the computer program 42, the steps in the above-mentioned various time synchronization method embodiments are implemented, such as Figure 1 Alternatively, when the processor 40 executes the computer program 42, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 3 The functions of the acquisition unit 301, the generation unit 302 and the time synchronization unit 303 are shown.

[0078] The computer program may be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0079] For example, the computer program can be divided into: an acquisition unit, a generation unit and a time synchronization unit. The specific functions of each unit are as follows: an acquisition unit, used to acquire power-on information when the vehicle is powered on, and time synchronization data output by the combined inertial navigation module of the vehicle, the time synchronization data at least including a GPRMC message; a generation unit, used to generate a simulation message according to the power-on information if there is an abnormality in the GPRMC message, the simulation message carries the current time used by the electronic device; a time synchronization unit, used to output the simulation message to each device connected to the combined inertial navigation module, so that each device performs time synchronization according to the current time in the simulation message.

[0080] The electronic device may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 These are merely examples of electronic devices and do not constitute a limitation of the electronic device. The electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0081] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0082] The memory 41 may be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device. The memory 41 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 41 may also include both an internal storage unit of the electronic device and an external storage device. The memory 41 is used to store the computer program and other programs and data required by the electronic device. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0083] It should be noted that, for the convenience and brevity of description, the structure of the above electronic device can also refer to the specific description of the structure in the method embodiment, which will not be repeated here.

[0084] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

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

[0086] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

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

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

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

[0090] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0091] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A time synchronization method, characterized in that: Applied to electronic equipment, the time synchronization method comprises: Acquire power-on information when the vehicle is powered on, and time synchronization data output by a combined inertial navigation module of the vehicle, wherein the time synchronization data at least includes a GPRMC message; If the GPRMC message is abnormal, a simulation message is generated according to the power-on information, wherein the simulation message carries the current time when the electronic device is used; The analog message is output to each device connected to the combined inertial navigation module, so that each device performs time synchronization according to the current time in the analog message.

2. The time synchronization method according to claim 1, characterized in that: The power-on information is the power-on position when the vehicle is powered on; If the GPRMC message is abnormal, generating a simulation message according to the power-on information includes: If the GPRMC message is abnormal and the satellite signal strength at the power-on position is less than a strength threshold, obtaining the current time through a network time protocol; Generate the simulation message carrying the current time.

3. The time synchronization method according to claim 2, characterized in that: If the GPRMC message is abnormal, generating a simulation message according to the power-on information, further comprising: If the satellite signal strength at the power-on position is greater than or equal to a strength threshold, detecting a duration of the abnormality in the GPRMC message; If the duration is greater than the duration threshold, the simulation message carrying the current time is generated, wherein the current time is corrected by a historical GPRMC message, and the historical GPRMC message is a GPRMC message received by the combined inertial navigation module before the GPRMC message has an abnormality.

4. The time synchronization method according to any one of claims 1 to 3, characterized in that: The time synchronization method further comprises: If there is an abnormality in the PPS signal in the time synchronization data, or the time synchronization data output by the combined inertial navigation module does not contain the PPS signal, generating a simulated PPS signal; The simulated PPS signal is output to each device connected to the combined inertial navigation module, so that each device connected to the combined inertial navigation module performs time synchronization according to the current time in the simulated message and the simulated PPS signal.

5. The time synchronization method according to any one of claims 1 to 3, characterized in that: After generating the simulation message according to the power-on information, the time synchronization method further includes: Output the analog message to the combined inertial navigation module so that the combined inertial navigation module synchronizes the time to the target time, where the target time is the difference between the current time and the transmission delay time, and the transmission delay time is the data transmission delay time between the combined inertial navigation module and the electronic device.

6. The time synchronization method according to any one of claims 1 to 3, characterized in that: After outputting the analog message to each device connected to the combined inertial navigation module, the time synchronization method further includes: Reacquiring new time synchronization data output by the combined inertial navigation module of the vehicle, wherein the new time synchronization data at least includes a new GPRMC message; If there is no abnormality in the new GPRMC message, the output of the simulation message to each device connected to the combined inertial navigation module is stopped.

7. The time synchronization method according to claim 6, characterized in that: When the electronic device stops outputting the analog message, each device connected to the combined inertial navigation module updates the time when the difference between the new target time and the time of the own device is greater than a preset difference; Among them, the new target time is the difference between the data reception time and the data transmission time, the data reception time is the time when each device connected to the combined inertial navigation module receives the new GPRMC message, and the data transmission time is the time required for data transmission between the combined inertial navigation module and the connected device.

8. A time synchronization device, characterized in that: Configured in an electronic device, the time synchronization device comprises: An acquisition unit, used to acquire power-on information when the vehicle is powered on, and time synchronization data output by a combined inertial navigation module of the vehicle, wherein the time synchronization data at least includes a GPRMC message; a generating unit, configured to generate a simulation message according to the power-on information if the GPRMC message is abnormal, wherein the simulation message carries the current time of use of the electronic device; The time synchronization unit is used to output the analog message to each device connected to the combined inertial navigation module, so that each device performs time synchronization according to the current time in the analog message.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the time synchronization method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the time synchronization method according to any one of claims 1 to 7 are implemented.