Time synchronization method and device of automobile data recorder, vehicle and storage medium

By obtaining and comparing the first time on the controller's local area network bus and the second time on the memory, and updating the local time of the driving recorder, the problem of time deviation after the battery is powered off is solved, and the accuracy of video file recording time is improved.

CN119904932AActive Publication Date: 2025-04-29GREAT WALL MOTOR CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510017883.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-04-29
Estimated Expiration
2045-01-06

AI Technical Summary

Technical Problem

After the vehicle's battery is powered off for a long time, the local time of the driving recorder will become the factory time, resulting in a deviation in the recording time of the video file and bringing bad experience to the user.

Method used

By obtaining the first time on the controller's LAN bus and later in the second time on the memory, the local time of the dash recorder is updated to make the recording time of the video file closer to the real time.

Benefits of technology

It effectively solves the problem of time deviation of dash recorder, improves the user experience, and makes the recording time of video files more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904932A_ABST
    Figure CN119904932A_ABST
Patent Text Reader

Abstract

The invention provides a time synchronization method and device of an automobile data recorder, a vehicle and a storage medium, the method is applied to the field of vehicles, and the method comprises the steps that under the condition that the automobile data recorder is powered on, first time on a controller area network bus is acquired; comparing the first time with second time on a memory of the automobile data recorder, wherein the second time is the last update time of the memory; and sending the later time in the first time and the second time to a system-on-chip of the automobile data recorder, so that the system-on-chip updates the local time of the automobile data recorder. According to the method, under the condition that the local time of the automobile data recorder is far earlier than the video file generation time of the automobile data recorder, the local time of the automobile data recorder can be updated based on the later time of the first time on the controller local area network bus and the second time on the memory, so that better experience is brought to a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicles, and more specifically, to a time synchronization method, device, vehicle and storage medium of a driving recorder in the field of vehicles. Background Art

[0002] The vehicle-mounted driving recorder is an important component in the vehicle that records the video images and sounds of the vehicle's driving process. When an unexpected traffic accident occurs, evidence can be immediately produced based on the recorded data of the driving recorder to protect the rights and interests of users. Therefore, the accuracy of the video or photo information stored in the driving recorder is particularly important.

[0003] In the related art, if the vehicle's battery is powered off for a long time, the capacitor in the dashcam will be exhausted. If the dashcam's system-level chip cannot directly obtain the time information on the vehicle, the dashcam will use the factory time to record the video, resulting in a deviation in the video recording time. In this case, the factory time of the dashcam will be much earlier than the recording time of the video file, and the recording time of the video file will be much earlier than the time when the user purchased the vehicle, resulting in a poor user experience. Summary of the invention

[0004] The present application provides a time synchronization method for a driving recorder. The method can update the local time of the driving recorder based on the later time of a first time on a controller local area network bus and a second time on a memory when the local time of the driving recorder is much earlier than the time when the driving recorder generates a video file, so as to provide a better experience for the user.

[0005] In a first aspect, a time synchronization method for a driving recorder is provided, the method comprising:

[0006] When the driving recorder is powered on, obtaining the first time on the controller area network bus;

[0007] Comparing the first time with a second time in a memory of the driving recorder, where the second time is the time when the memory was last updated;

[0008] The later time between the first time and the second time is sent to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

[0009] Through the above technical solution, the method can obtain the first time on the controller LAN bus when the driving recorder is powered on. In the case of a timeout in the data transmission of the controller LAN bus, if the local time of the driving recorder is updated directly based on the first time, the time of recording the video file will be much earlier than the time when the video file is generated. Therefore, the first time is compared with the second time on the memory of the driving recorder, the second time is the time when the memory was last updated, and the later time between the first time and the second time is sent to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder, thereby making the time of recording the video file closer to the time when the video file is generated.

[0010] In conjunction with the first aspect, in some possible implementations, after sending the first time to the system-level chip of the driving recorder, the method includes:

[0011] When the driving recorder is powered off, obtaining the power-off time on the controller area network bus again;

[0012] comparing the power-off time with the second time;

[0013] The later time between the power-off time and the second time is updated in the memory.

[0014] Through the above technical solution, when the driving recorder is powered off, the power-off time on the controller LAN bus is obtained again, and the power-off time and the later time of the second time are updated to the memory, so that the time stored in the memory is always the latest time before the driving recorder is powered off, so that the local time of the driving recorder is closer to the real time.

[0015] In conjunction with the first aspect, in some possible implementations, obtaining a first time on a controller area network bus includes:

[0016] Obtaining the local time of the driving recorder;

[0017] When the local time is the default time of the vehicle, the first time on the controller area network bus starts to be acquired.

[0018] Through the above technical solution, the local time of the driving recorder is obtained. When the local time is the default time of the vehicle, it means that the time on the driving recorder is far from the real time. Therefore, the first time on the controller LAN bus is obtained to update the time of the driving recorder based on the first time.

[0019] In a second aspect, a time synchronization method for a driving recorder is provided, which is applied to a system-level chip of the driving recorder, and the method includes:

[0020] When the driving recorder is powered on and there is at least one video file in the driving recorder, obtaining the local time of the driving recorder, where the local time is the latest time in the system-level chip;

[0021] Comparing the received first time on the controller area network bus with the local time, the first time being the time received at a preset frequency during power-on of the driving recorder;

[0022] When the first time is later than the local time, the local time of the driving recorder is updated based on the first time.

[0023] Through the above technical solution, when the driving recorder is powered on and there is at least one video file in the driving recorder, the local time of the driving recorder is obtained, and the local time is the latest time in the system-level chip, and the first time received on the controller local area network bus is compared with the local time. When the first time is later than the local time, the local time of the driving recorder is updated based on the first time, so that the local time of the driving recorder is closer to the real time. That is, the time of recording the video file is closer to the time when the event in the video file occurs.

[0024] In conjunction with the second aspect, in some possible implementations, when there is at least one video file in the driving recorder, obtaining the local time of the driving recorder includes:

[0025] When there is at least one video file in the driving recorder, obtaining the generation time of each video file;

[0026] Comparing the latest generation time among the generation times of the video files with a second time stored in the memory of the driving recorder, where the second time is the time updated in the memory when the driving recorder is powered off;

[0027] The later time between the latest generation time and the second time is determined as the local time of the driving recorder.

[0028] Through the above technical solution, since there are multiple video files on the driving recorder, each video file corresponds to a different generation time, the local time of the driving recorder can be determined based on the generation time of each video file and the second time, so that the local time of the driving recorder is closer to the real time.

[0029] In conjunction with the second aspect, in some possible implementations, the method further includes:

[0030] When there is no video file in the driving recorder, the time stored in the memory of the driving recorder is determined as the local time.

[0031] Through the above technical solution, since there is no video file in the driving recorder, determining the time stored in the memory of the driving recorder as the local time can make the local time of the driving recorder closer to the real time.

[0032] In a third aspect, a time synchronization device for a driving recorder is provided, the device being applied to a micro control unit, and characterized in that the device comprises:

[0033] A first time acquisition module, used for acquiring a first time on a controller area network bus when the driving recorder is powered on;

[0034] A comparison module, used for comparing the first time with a second time in the memory of the driving recorder, where the second time is the time when the memory was last updated;

[0035] The sending module is used to send the later time between the first time and the second time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

[0036] In a fourth aspect, a time synchronization device for a driving recorder is provided, the device is applied to a system-level chip, and is characterized in that the device comprises:

[0037] A local time acquisition module is used to acquire the local time of the driving recorder when the driving recorder is powered on and there is at least one video file in the driving recorder, wherein the local time is the later time between the generation time of the latest generated video file in the at least one video file and the time stored in the memory of the driving recorder;

[0038] A comparison module, used for comparing the received first time on the controller area network bus with the local time;

[0039] An updating module is used to update the local time of the driving recorder based on the first time when the first time is later than the local time.

[0040] In a fifth aspect, a vehicle is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the method of time synchronization of the driving recorder is executed.

[0041] In a sixth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method executed by the above-mentioned method for synchronizing the time of a driving recorder.

[0042] In a seventh aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method executed by the time synchronization method of the above-mentioned driving recorder. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a schematic flow chart of a time synchronization method for a driving recorder provided in an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of an implementation environment of a time synchronization method for a driving recorder provided in an embodiment of the present application;

[0045] Figure 3 is a schematic flow chart of another time synchronization method for a driving recorder provided in an embodiment of the present application;

[0046] Figure 4 is a schematic flow chart of another time synchronization method for a driving recorder provided in an embodiment of the present application;

[0047] Figure 5 It is a structural schematic diagram of a time synchronization device for a driving recorder provided in an embodiment of the present application;

[0048] Figure 6 It is a structural schematic diagram of another time synchronization device for a driving recorder provided in an embodiment of the present application;

[0049] Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0051] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0052] At present, in the vehicle industry, in order to protect the rights and interests of users, all vehicles are equipped with driving recorders. Driving recorders can record video images and sounds of the vehicle's driving process. In the event of a vehicle accident, the driving recorder can provide users with evidence of the accident. However, if the vehicle's battery is powered off for a long time, the capacitor power of the driving recorder will be exhausted. In this case, the time on the driving recorder will become the factory time of the vehicle, and the time when the driving recorder records the video image of the vehicle's driving process will be much earlier than the time when the video image is generated, which will bring a bad experience to users.

[0053] In related technologies, such as Figure 1 As shown, after the dash cam is powered on, the microcontroller unit of the dash cam obtains the time through the controller area network (CAN) bus and sends the time to the system-level chip of the dash cam, and the system-level chip updates the time of the dash cam based on the time. However, if the data transmission of the controller area network bus times out, it will cause the delay timeout of sending the time based on the controller area network bus to the microcontroller unit, and the time received by the microcontroller unit will be much earlier than the recording time of the video file. In this case, if the time on the dash cam is updated based on the time sent by the controller area network bus, the time of the dash cam will be much earlier than the recording time of the video file.

[0054] Figure 2 It is a schematic diagram of an implementation environment of a time synchronization method for a driving recorder provided in an embodiment of the present application.

[0055] For example, Figure 2 As shown, the implementation environment includes a microcontroller unit (MCU) 210 , a system on chip (SoC) 220 , and a controller area network bus 230 .

[0056] The microcontroller unit 210 is an important control unit on the driving recorder, which can obtain relevant data of the driving recorder and control the driving recorder to perform corresponding operations based on the relevant data. For example, the microcontroller unit 210 can obtain the time of the controller local area network bus 230 and update the time of the driving recorder based on the time.

[0057] The system-on-chip 220 is a chip that integrates multiple processor cores, memory, and processing units. The system-on-chip is generally used in an in-vehicle infotainment system. In some embodiments, the system-on-chip can store and encode video.

[0058] The controller area network bus 230 is an interface for the driving recorder to read vehicle information. In some embodiments, the vehicle computer time and other information can be obtained through the controller area network bus 230. For example, the vehicle computer time can be sent to the micro control unit 210 of the driving recorder through the controller area network bus 230.

[0059] Figure 3 It is a schematic flowchart of a time synchronization method for a driving recorder provided in an embodiment of the present application.

[0060] For example, Figure 3 As shown, taking the execution subject as a micro control unit as an example, the method 300 includes steps 301 to 303.

[0061] Step 301, when the driving recorder is powered on, obtain the first time on the controller area network bus.

[0062] It should be understood that if the vehicle's battery is powered off for a long time, the capacitor power of the driving recorder will be exhausted. In this case, after the driving recorder is powered on again, the internal setting time of the driving recorder will become the default time of the vehicle, but the default time of the vehicle is generally the factory time of the vehicle. The internal setting time of the driving recorder is used to record the time sequence of various events that occur during the driving of the vehicle. If the internal setting time of the driving recorder becomes the default time of the vehicle, the time of the events occurring in the vehicle based on the default time will be much earlier than the time when various events occurred, which will bring a bad experience to the user. In this case, the first time on the controller LAN bus is obtained.

[0063] The CAN bus is a communication interface for the microcontroller to read the first time, which is the time displayed on the vehicle's central control screen or the clock time inside the telematics box (T-BOX).

[0064] Step 302, comparing the first time with the second time in the memory of the driving recorder, where the second time is the time when the memory was last updated.

[0065] The memory of the driving recorder is used to store video files, audio and various information data of the vehicle during the driving process. In some embodiments, the memory of the driving recorder is an electrically erasable programmable read-only memory (EEPROM).

[0066] The second time is the time when the memory was last updated. Since EEPROM is a storage chip that does not lose data after power failure, the second time stored in the EEPROM will not be lost even if the capacitor of the driving recorder is exhausted.

[0067] It should be understood that after the vehicle is powered on, various controllers of the vehicle are obtaining vehicle information through the Controller Area Network bus. Therefore, the network load of the Controller Area Network bus is heavy, and the data transmission of the Controller Area Network bus will time out. For example, the vehicle controller obtains the vehicle speed or fuel level through the Controller Area Network bus. In this case, if the internal setting time of the driving recorder is updated based on the first time of the Controller Area Network bus, the time of the video file recording the vehicle driving process will be much earlier than the actual time when the event occurred in the video file. To avoid the above situation, the second time on the memory of the driving recorder is compared.

[0068] For example, if the first time is March 1, 2021, and the second time on the memory is May 3, 2022, then directly updating the internal setting time of the driving recorder based on the first time will cause the video file to be recorded much earlier than 2022. Therefore, it is necessary to compare the first time with the second time.

[0069] Step 303: Send the later time between the first time and the second time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

[0070] Among them, the system-level chip of the driving recorder is used to generate video files during the vehicle's driving process and update the local time of the driving recorder.

[0071] The local time of the driving recorder is the time set internally in the driving recorder. That is, the local time of the driving recorder is the time when the video file is generated during the driving process of the vehicle.

[0072] It should be understood that since the second time is the time when the memory was last updated and the first time is the time of the controller LAN bus, in order to avoid the time of recording the video file being much earlier than the actual time when the event in the video file was generated after the local time of the driving recorder is updated, the later time between the first time and the second time is sent to the system-level chip of the driving recorder.

[0073] For example, if the first time is March 1, 2022, and the second time on the memory is May 3, 2021, the later of the first time and the second time is sent to the system-level chip of the driving recorder.

[0074] The embodiment of the present application provides a time synchronization method for a driving recorder, which can obtain the first time on the controller local area network bus when the driving recorder is powered on. In the case of a timeout in the data transmission of the controller local area network bus, if the local time of the driving recorder is updated directly based on the first time, the time of recording the video file will be much earlier than the time when the video file is generated. Therefore, the first time is compared with the second time on the memory of the driving recorder, and the second time is the time when the memory was last updated. The later time of the first time and the second time is sent to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder, so that the time of recording the video file is closer to the time when the video file is generated.

[0075] Figure 4 It is a schematic flowchart of another time synchronization method for a driving recorder provided in an embodiment of the present application.

[0076] It should be noted that the above steps 301-303 are a simple description of a time synchronization method for a driving recorder provided in an embodiment of the present application. The following will provide a more detailed description of a time synchronization method for a driving recorder provided in an embodiment of the present application with reference to some examples.

[0077] See also Figure 4 The execution subject includes a micro control unit and a system-level chip, and the method includes the following steps 401-407.

[0078] Step 401: When the driving recorder is powered on and there is at least one video file in the driving recorder, the system-level chip of the driving recorder obtains the local time of the driving recorder.

[0079] When the vehicle's battery is powered off for a long time, the supercapacitor in the dashcam will be exhausted. After the dashcam is powered on, the local time of the dashcam may stagnate. However, the local time of the dashcam is important evidence of the recording sequence of the video files. Therefore, it is necessary to obtain the local time of the dashcam in order to determine whether the local time of the dashcam needs to be updated later.

[0080] The video files of the driving recorder are used to record the video data of the events that occur in the vehicle during the driving process. Since the vehicle may have multiple emergency situations during the driving process, and multiple emergency situations correspond to multiple video files, the driving recorder may store multiple video files.

[0081] The dashcam's system-level chip is used to encode, decode, and compress video images to ensure the clarity and smoothness of the video. The dashcam's local time is used to record the time when the emergency occurred. The dashcam's local time is the latest time in the system-level chip.

[0082] For example, if a vehicle collides and the video file is generated at 19:57 on October 8, 2021, the local time of the dashcam is 19:57 on October 8, 2021. Based on this local time, the traffic police can determine the responsibility for the accident.

[0083] It should be understood that since there are multiple video files in the driving recorder, the multiple video files correspond to multiple video times. Therefore, in order to accurately obtain the local time of the driving recorder, the latest time in the system and the chip is determined.

[0084] The following describes how to obtain the local time of the driving recorder when there is at least one video file in the driving recorder.

[0085] In a possible implementation, when there is at least one video file in a driving recorder, the generation time of each video file is obtained; the latest generation time among the generation times of each video file is compared with a second time stored in a memory of the driving recorder; and the later time between the latest generation time and the second time is determined as the local time of the driving recorder.

[0086] The second time is the time updated in the memory when the driving recorder is powered off.

[0087] In this possible implementation, since there are multiple video file generation times in the driving recorder, the latest generation time among the generation times of the video files is compared with the second time stored in the memory of the driving recorder, and the later time between the latest generation time and the second time is determined as the local time of the driving recorder. That is, the latest local time in the driving recorder is determined so that when the video file is recorded later, the generation time of the video file is closer to the real time when the event occurs.

[0088] In order to explain the above implementation in more detail, the above implementation is explained in several parts below.

[0089] The first part describes the content of obtaining the generation time of each video file when there is at least one video file in the driving recorder.

[0090] In some embodiments, the naming time of the video file of the driving recorder is the generation time of the video file, so as to protect the rights and interests of the user based on the video file in the future.

[0091] For example, if the naming time of a video file is 19:57 on October 8, 2021, it means that the generation time of the video file is 19:57 on October 8, 2021.

[0092] In some embodiments, the video image of the vehicle during driving is collected based on an image sensor, for example, the video image of the vehicle during driving is collected based on a camera.

[0093] In some embodiments, since the generation time of a video file is the naming time of the video file, the generation time of each video file can be obtained by reading the naming time of each video file.

[0094] The second part describes the content of comparing the latest generation time among the generation times of the video files with the second time stored in the memory of the driving recorder.

[0095] It should be understood that the multiple video files in the driving recorder correspond to multiple generation times. In order to calibrate the local time of the driving recorder to the latest time, it is necessary to determine the latest generation time among the generation times of the various video files.

[0096] For example, the generation time of video file 1 is 19:57 on October 8, 2021, the generation time of video file 2 is 14:34 on November 18, 2021, and the generation time of video file 3 is 12:32 on January 5, 2022, then the generation time of video file 3 is determined to be the latest generation time.

[0097] It should be understood that since the second time is the time updated in the memory when the driving recorder is powered off, the second time can also calibrate the local time of the driving recorder. In this case, in order to calibrate the local time of the driving recorder to the latest time, the latest generation time among the generation times of each video file is compared with the second time stored in the memory of the driving recorder.

[0098] In some embodiments, when the driving recorder is powered off, the system-level chip can obtain the power-off time on the controller area network bus, and the power-off time is closer to the real time when the event occurs, and update the power-off time to the memory.

[0099] The power-off time is the second time updated in the memory when the driving recorder is powered off.

[0100] In some embodiments, the latest generation time among the generation times of the video files is compared with the power-off time stored in the memory of the driving recorder.

[0101] For example, the generation time of video file 3 is 12:32 on January 5, 2022, and the power-off time stored in the memory of the driving recorder is 14:50 on March 6, 2023. The power-off time stored in the memory of the driving recorder is later, that is, the power-off time is closer to the real time.

[0102] In the third part, the latest generation time and the later time of the second time are determined as the local time of the driving recorder.

[0103] In some embodiments, when the latest generation time is later than the second time, the latest generation time of the video file is determined as the local time of the driving recorder.

[0104] For example, the generation time of video file 3 is 15:00 on March 6, 2022 and the generation time of video file 3 is the latest generation time, and the second time stored in the memory of the driving recorder is 14:50 on March 6, 2022, then the generation time of video file 3 is determined as the local time of the driving recorder.

[0105] In some embodiments, when the second time is later than the latest generated time, the second time is determined as the local time of the driving recorder.

[0106] For example, the generation time of video file 3 is 12:32 on January 5, 2022 and the generation time of video file 3 is the latest generation time, and the second time stored in the memory of the driving recorder is 14:50 on March 6, 2023, then the second time is determined as the local time of the driving recorder.

[0107] Optionally, the following steps may also be performed.

[0108] In a possible implementation, when there is no video file in the driving recorder, the time stored in the memory of the driving recorder is determined as the local time.

[0109] It should be understood that when there is no video file in the driving recorder, there is no generation time corresponding to the video file in the driving recorder. Therefore, the local time of the driving recorder can be obtained based on the time stored in the memory of the driving recorder.

[0110] In this embodiment, when there is no video file in the driving recorder, since the time stored in the driving recorder's memory is the power-off time of the driving recorder, the power-off time is more accurate than the vehicle's default time. Therefore, the time stored in the driving recorder's memory is determined as the local time, making the local time closer to the time when the video file is recorded.

[0111] Step 402: When the driving recorder is powered on, the microcontroller unit of the driving recorder obtains the first time on the controller area network bus.

[0112] It should be understood that after the driving recorder loses power, the local time of the driving recorder will stagnate, so after the driving recorder is powered on, the local time of the driving recorder needs to be updated.

[0113] Since the system-on-chip of the driving recorder is used to update the local time of the driving recorder, and the system-on-chip has no interface for communicating with the controller area network bus, it is necessary to obtain the first time on the controller area network bus based on the microcontroller unit of the driving recorder.

[0114] The microcontroller unit is used to obtain the first time on the controller area network bus. The controller area network bus is used to receive information such as the vehicle computer time. The first time is the vehicle computer time or T-BOX time obtained based on the controller area network.

[0115] In some embodiments, the microcontroller collects the vehicle time or the T-BOX time based on the controller area network. That is, the first time on the controller area network is the vehicle time or the T-BOX time.

[0116] In some embodiments, the vehicle-mounted T-BOX system may have a built-in global positioning system (GPS) module to obtain accurate time information by receiving GPS signals. GPS time is based on the time of the satellite system.

[0117] In some embodiments, the vehicle-mounted T-BOX system is connected to a remote server via a wireless communication module to obtain network time.

[0118] In some embodiments, the time is set internally in the vehicle system for displaying and recording the time.

[0119] In some embodiments, the micro control unit collects the vehicle computer time or the T-BOX time based on the controller area network.

[0120] Optionally, before executing the above step 402, the following steps may also be executed.

[0121] In a possible implementation, the local time of the driving recorder is obtained, and when the local time is the default time of the vehicle, the first time on the controller area network bus is obtained.

[0122] It should be understood that if the driving recorder is powered on again, it can be determined whether it is necessary to obtain the first time on the controller area network bus based on the local time on the driving recorder.

[0123] In some embodiments, the local time of the driving recorder is obtained from the display screen of the driving recorder.

[0124] In this implementation, the local time of the driving recorder is obtained, and when the local time is the default time of the vehicle, it is determined to start obtaining the first time on the controller area network bus. That is, the first time is obtained in time so that the local time of the driving recorder can be calibrated as soon as possible based on the first time.

[0125] In step 403, the micro control unit compares the first time with the second time in the memory of the driving recorder, where the second time is the time when the memory was last updated.

[0126] It should be understood that the controller area network needs to process the data during data transmission. For example, decoding or verification and other processing. In the process of processing the data on the controller area network, if the amount of data is large and cannot be processed in time, it will cause a delay in the controller area network transmission. In this case, if the first time is delayed during the transmission process, it will cause the first time to be much earlier than the real time. If the local time on the driving recorder is updated based on the first time, it will cause the time of the recorded video file to be much earlier than the real time of the time in the video file. To avoid the above process, the micro control unit compares the first time with the second time on the memory of the driving recorder.

[0127] The second time is the time when the memory was last updated. When the driving recorder is powered off, the microcontroller unit determines the later time between the power-off time of the driving recorder and the time on the memory as the second time, so that the time on the memory is closer to the real time.

[0128] In some embodiments, the micro control unit converts the timestamp of the first time and the timestamp of the second time into the same format based on an automated script to compare the time difference between the first time and the second time.

[0129] For example, the timestamp of the first time is a Unix timestamp (in seconds), and the timestamp of the second time is a Python datetime object, so convert the timestamp of the first time from a Unix timestamp to a datetime object, or convert the timestamp of the second time from a datetime object to Unix time.

[0130] In step 404, the micro control unit sends the later time between the first time and the second time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

[0131] It should be understood that since the second time is the time when the memory was last updated and the first time is the time of the controller LAN bus, in order to avoid the time of recording the video file being much earlier than the time when the event occurred in the video file after the local time of the driving recorder is updated, the later time between the first time and the second time is sent to the system-level chip of the driving recorder.

[0132] In some embodiments, when the first time is later, the micro control unit sends the first time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

[0133] For example, the first time is 15:00 on March 6, 2022, and the second time stored in the memory of the driving recorder is 14:50 on March 6, 2022, then the first time is sent to the system-level chip of the driving recorder.

[0134] In some embodiments, when the second time is later, the micro control unit sends the second time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

[0135] For example, the first time is 15:00 on March 6, 2022, and the second time stored in the memory of the driving recorder is 14:50 on May 6, 2022, then the second time is sent to the system-level chip of the driving recorder.

[0136] It should be understood that the communication between the microcontroller unit and the system-on-chip is usually used to process more complex tasks. Therefore, in order to ensure that the communication link between the microcontroller unit and the system-on-chip is stable and reliable, a "heartbeat packet" mechanism can be established.

[0137] Optionally, before the micro control unit sends the later time between the first time and the second time to the system-level chip of the driving recorder, the following steps may also be performed.

[0138] In a possible implementation, a heartbeat packet between the micro control unit and the system-on-chip is determined based on a universal asynchronous receiver-transmitter.

[0139] Among them, the heartbeat packet is a small data packet sent periodically to confirm the connection status and responsiveness of the communicating parties.

[0140] The heartbeat packet includes an identifier, a sequence number, a timestamp, and a checksum. The identifier is used to identify the heartbeat packet. The sequence number is used to detect packet loss or duplication. The timestamp is used to calculate delays. The checksum is used to verify data integrity.

[0141] In some embodiments, the microcontroller unit and the system-level chip initialize the asynchronous transceiver transmitter. A timer is configured in the microcontroller unit to trigger a heartbeat packet sending function every preset time. The microcontroller unit periodically sends a heartbeat packet to the system-level chip, and the system-level chip receives the heartbeat packet and verifies it based on the checksum.

[0142] The preset time is automatically determined by the microcontroller unit, or is set by a technician according to actual conditions, and the present application embodiment does not limit this. For example, the preset time can be 500 milliseconds (ms)-1000ms.

[0143] In step 405, the system-level chip compares the received first time on the controller area network bus with the local time, where the first time is the time received at a preset frequency during the power-on period of the driving recorder.

[0144] The local time is the latest time in the system-level chip.

[0145] In some embodiments, the system-level chip parses the first time message received on the controller area network cable and extracts the timestamp of the first time.

[0146] In some embodiments, the system-on-chip reads the timestamp of the local time through the RTC register.

[0147] In some embodiments, the SoC compares the timestamp of the first time received on the CAN bus with the timestamp of the local time to obtain a difference between the two timestamps.

[0148] For example, the first time is 15:00 on August 6, 2022, and the local time stored in the memory of the driving recorder is 14:50 on May 6, 2022, then it is determined that there is a difference between the first time and the local time.

[0149] It is understandable that after the dash cam is powered on, the dash cam can obtain the first time on the controller area network. However, there may be a delay in the controller area network, so the first time will be much earlier than the real time during the vehicle's driving process. Therefore, if the local time of the dash cam is calibrated once based on the first time, the local time of the dash cam will also be earlier than the real time during the vehicle's driving process. In order to make the local time on the dash cam closer to the real time during the vehicle's driving process, the first time can be received at a preset frequency during the power-on period of the dash cam, so that the local time of the dash cam can be calibrated multiple times through multiple first times.

[0150] In some embodiments, when the driving recorder is powered on, the first time on the controller area network bus is received at a preset frequency.

[0151] The preset frequency is automatically determined by the microcontroller unit, or is set by a technician according to actual conditions, and the present application embodiment does not limit this. For example, the preset frequency may be 5 times.

[0152] Step 406: When the first time is later than the local time, the system-level chip updates the local time of the driving recorder based on the first time.

[0153] It should be understood that updating the local time of the driving recorder based on the first time means that each functional module in the driving recorder uses the first time as the local time of the functional module.

[0154] In some embodiments, when the first time is later than the local time, the system-level chip deletes the local time in the memory and stores the first time in the memory.

[0155] In some embodiments, when the first time is later than the local time, the system-level chip synchronizes the first time to each functional module of the driving recorder.

[0156] Among them, the functional modules include a video encoding module, an image sensor module, an audio module and a display screen module.

[0157] The video encoding module is used to compress and encode the original video signal captured by the camera, reducing storage space and improving transmission efficiency. The image sensor module is used to capture video images, usually including one or more cameras. The audio module is used to collect and process audio signals and record sound synchronously. The display module is used to display real-time video images, setting menus, status information, etc.

[0158] For example, when the first time is later than the local time, the system-level chip synchronizes the first time to the video encoding module, so that the video encoding module starts encoding at the first time.

[0159] It should be understood that since it takes time for the system-level chip to receive the first time and compare the first time with the local time, after the driving recorder is powered on for a period of time, it is determined to update the local time of the driving recorder based on the first time.

[0160] For example, 1800 ms after the driving recorder is powered on, it is determined to update the local time of the driving recorder based on the first time.

[0161] Step 407: When the driving recorder is powered off, the micro control unit updates the second time in the memory based on the power-off time on the controller area network bus.

[0162] It should be understood that after the driving recorder is powered on, the time is passing while the vehicle is driving, but the first time of the controller area network is stagnant. If the first time on the controller area network bus is directly stored in the memory, there will be an error between the first time and the real time during the vehicle driving. In order to prevent the second time in the memory from being closer to the real time, the micro control unit updates the second time in the memory based on the power-off time on the controller area network bus.

[0163] In a possible implementation, the micro control unit obtains the power-off time on the controller area network bus again; compares the power-off time with the second time; and updates the later time between the power-off time and the second time to the memory.

[0164] When the driving recorder is powered off, the power-off time on the controller local area network bus is obtained, and the power-off time is closest to the real time.

[0165] It can be understood that the specific implementation of comparing the power-off time with the second time can refer to the relevant description of comparing the first time with the second time in the aforementioned step 403, and will not be repeated here.

[0166] In some embodiments, when the power-off time is later, the power-off time is updated in the memory.

[0167] For example, the power-off time is 15:00 on March 6, 2022, and the second time stored in the memory of the driving recorder is 14:50 on March 6, 2022, then the power-off time is updated to the memory.

[0168] In some embodiments, if the second time is later, the time in the memory is maintained at the second time.

[0169] For example, the power-off time is 14:50 on March 6, 2022, and the second time stored in the memory of the driving recorder is 15:00 on March 6, 2022, and the time in the memory is maintained at the second time.

[0170] Under this implementation, when the driving recorder is powered off, the power-off time on the controller LAN bus is obtained again, and the power-off time and the later time of the second time are updated to the memory, so that the time stored in the memory is always the latest time before the driving recorder is powered off, so that the local time of the driving recorder is closer to the real time.

[0171] The embodiment of the present application provides a time synchronization method for a driving recorder, which can enable the system-level chip of the driving recorder to obtain the local time of the driving recorder when the driving recorder is powered on and there is at least one video file in the driving recorder. If the driving recorder is powered off for a long time, the local time of the driving recorder will be much earlier than the real time, so the microcontroller unit of the driving recorder obtains the first time on the controller local area network bus. In the case of a timeout in the data transmission of the controller local area network bus, if the local time of the driving recorder is updated directly based on the first time, the time of recording the video file will be much earlier than the time when the video file is generated, so the microcontroller unit compares the first time with the second time on the memory of the driving recorder, and the second time is the time when the memory was last updated. The microcontroller unit sends the later time of the first time and the second time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder. The system-level chip compares the received first time on the controller local area network bus with the local time, and the first time is the time received at a preset frequency during the power-on period of the driving recorder. When the first time is later than the local time, the system-level chip updates the local time of the driving recorder based on the first time, so that the time of recording the video file is closer to the time when the video file is generated. When the driving recorder is powered off, the microcontroller unit updates the second time in the memory based on the power-off time on the controller local area network bus to reduce the error between the second time in the memory and the real time, so that the local time of the driving recorder is closer to the real time.

[0172] Figure 5It is a structural schematic diagram of a time synchronization device for a driving recorder provided in an embodiment of the present application.

[0173] For example, Figure 5 As shown, the device 500 includes:

[0174] The first time acquisition module 501 is used to acquire the first time on the controller area network bus when the driving recorder is powered on;

[0175] A comparison module 502, used to compare the first time with a second time in the memory of the driving recorder, where the second time is the time when the memory was last updated;

[0176] The sending module 503 is used to send the later time between the first time and the second time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

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

[0178] The first time acquisition module 501 is used to obtain the power-off time on the controller local area network bus again when the driving recorder is powered off;

[0179] A comparison module 502, used to compare the power-off time with the second time;

[0180] The updating module is used to update the later time between the power-off time and the second time into the memory.

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

[0182] Get local time module, used to get the local time of the driving recorder;

[0183] The first time acquisition module 501 is used to start acquiring the first time on the controller area network bus when the local time is the default time of the vehicle.

[0184] Figure 6 It is a structural schematic diagram of another time synchronization device for a driving recorder provided in an embodiment of the present application.

[0185] For example, Figure 6 As shown, the device 600 includes:

[0186] The local time acquisition module 601 is used to acquire the local time of the driving recorder when the driving recorder is powered on and there is at least one video file in the driving recorder, where the local time is the latest time in the system-level chip;

[0187] A comparison module 602, for comparing the received first time on the controller area network bus with the local time, the first time being the time received at a preset frequency during the power-on period of the driving recorder;

[0188] The updating module 603 is used to update the local time of the driving recorder based on the first time when the first time is later than the local time.

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

[0190] The local time acquisition module 601 is used to acquire the generation time of each video file when there is at least one video file in the driving recorder;

[0191] A comparison module 602, used to compare the latest generation time of each video file with a second time stored in the memory of the driving recorder, where the second time is the time updated in the memory when the driving recorder is powered off;

[0192] The determination module is used to determine the later time between the latest generation time and the second time as the local time of the driving recorder.

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

[0194] The determination module is used to determine the time stored in the memory of the driving recorder as the local time when there is no video file in the driving recorder.

[0195] Figure 7 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.

[0196] For example, Figure 7 As shown, the vehicle 700 includes: a memory 701 and a processor 702, wherein the memory 701 stores an executable program code 703, and the processor 702 is used to call and execute the executable program code 703 to perform a time synchronization method for a driving recorder.

[0197] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute a time synchronization method for a driving recorder provided in an embodiment of the present application.

[0198] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0199] In the case of dividing each functional module according to each function, the device may further include an updating module and a determining module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0200] It should be understood that the device provided in this embodiment is used to execute the above-mentioned time synchronization method of a driving recorder, and thus can achieve the same effect as the above-mentioned implementation method.

[0201] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing related program codes, etc.

[0202] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0203] In addition, the device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a time synchronization method for a driving recorder provided in the above-mentioned embodiment.

[0204] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a time synchronization method for a driving recorder provided in the above embodiment.

[0205] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement a time synchronization method for a driving recorder provided in the above embodiment.

[0206] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0207] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0208] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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.

[0209] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A time synchronization method for a driving recorder, characterized in that: The method applied to the microcontroller unit of the driving recorder comprises: When the driving recorder is powered on, obtaining the first time on the controller area network bus; Comparing the first time with a second time in a memory of the driving recorder, where the second time is the time when the memory was last updated; The later time between the first time and the second time is sent to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

2. The method according to claim 1, characterized in that After sending the first time to the system-level chip of the driving recorder, the method includes: When the driving recorder is powered off, obtaining the power-off time on the controller area network bus again; comparing the power-off time with the second time; The later time between the power-off time and the second time is updated in the memory.

3. The method according to claim 1, characterized in that Before obtaining the first time on the controller area network bus, the method includes: Obtaining the local time of the driving recorder; When the local time is the default time of the vehicle, the first time on the controller area network bus starts to be acquired.

4. A time synchronization method for a driving recorder, characterized in that: The system-level chip applied to the driving recorder comprises: When the driving recorder is powered on and there is at least one video file in the driving recorder, obtaining the local time of the driving recorder, where the local time is the latest time in the system-level chip; Comparing the received first time on the controller area network bus with the local time, the first time being the time received at a preset frequency during power-on of the driving recorder; When the first time is later than the local time, the local time of the driving recorder is updated based on the first time.

5. The method according to claim 4, characterized in that When at least one video file exists in the driving recorder, obtaining the local time of the driving recorder includes: When there is at least one video file in the driving recorder, obtaining the generation time of each video file; Comparing the latest generation time among the generation times of the video files with a second time stored in the memory of the driving recorder, where the second time is the time updated in the memory when the driving recorder is powered off; The later time between the latest generation time and the second time is determined as the local time of the driving recorder.

6. The method according to claim 4, characterized in that The method further comprises: When there is no video file in the driving recorder, the time stored in the memory of the driving recorder is determined as the local time.

7. A time synchronization device for a driving recorder, characterized in that: The device comprises: A first time acquisition module, used for acquiring a first time on a controller area network bus when the driving recorder is powered on; A comparison module, used for comparing the first time with a second time in the memory of the driving recorder, where the second time is the time when the memory was last updated; The sending module is used to send the later time between the first time and the second time to the system-level chip of the driving recorder, so that the system-level chip updates the local time of the driving recorder.

8. A time synchronization device for a driving recorder, characterized in that: The device comprises: A local time acquisition module, used for acquiring the local time of the driving recorder when there is at least one video file in the driving recorder, wherein the local time is the later time between the generation time of the latest generated video file among the at least one video file and the time stored in the memory of the driving recorder; A comparison module, used for comparing the received first time on the controller area network bus with the local time; An updating module is used to update the local time of the driving recorder based on the first time when the first time is later than the local time.

9. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Vehicle time synchronization method and device, equipment and storage medium

    CN111669245A

  • Chip system time service method and device, electronic equipment and storage medium

    CN115765907A

  • Time calibration method and device, storage medium and electronic equipment

    CN117254870A

  • Vehicle data processing system, data processing method and vehicle

    CN118004199A

  • Video recording apparatus for vehicle and on-board system

    JP2011257849A