CN108366353B - Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium - Google Patents

Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium Download PDF

Info

Publication number
CN108366353B
CN108366353B CN201810015130.0A CN201810015130A CN108366353B CN 108366353 B CN108366353 B CN 108366353B CN 201810015130 A CN201810015130 A CN 201810015130A CN 108366353 B CN108366353 B CN 108366353B
Authority
CN
China
Prior art keywords
vehicle
mounted terminal
current time
mcu
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810015130.0A
Other languages
Chinese (zh)
Other versions
CN108366353A (en
Inventor
郑周国
罗德祥
熊泉
马伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mobilecarlink Technology Co ltd
Original Assignee
Shenzhen Mobilecarlink Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mobilecarlink Technology Co ltd filed Critical Shenzhen Mobilecarlink Technology Co ltd
Priority to CN201810015130.0A priority Critical patent/CN108366353B/en
Publication of CN108366353A publication Critical patent/CN108366353A/en
Application granted granted Critical
Publication of CN108366353B publication Critical patent/CN108366353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/002Mutual synchronization

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electric Clocks (AREA)

Abstract

The invention discloses a time synchronization method of a vehicle-mounted terminal, the vehicle-mounted terminal and a storage medium, wherein the time synchronization method of the vehicle-mounted terminal comprises the following steps: when the starting of the automobile is detected, the vehicle-mounted terminal reads the current time of the automobile MCU and compares the current time with the current time of the vehicle-mounted terminal; when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value, the vehicle-mounted terminal modifies the current time into the current time of the automobile MCU; when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal sends the current time to the automobile MCU; the time of the vehicle-mounted terminal is recorded through the MCU, when the time difference between the vehicle-mounted terminal and the MCU exceeds a preset value, the time of the MCU is read to modify the time of the MCU, and when the time of the MCU has errors, the time of the MCU is sent to the MCU for calibration, so that the time between the vehicle-mounted terminal and the MCU is synchronized.

Description

Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium
Technical Field
The invention relates to the technical field of vehicle-mounted terminals, in particular to a time synchronization method of a vehicle-mounted terminal, the vehicle-mounted terminal and a storage medium.
Background
The vehicle-mounted terminal is a winCE, Android and QNX intelligent operation terminal running on ARM, X86, MIPS and PowerPC platforms, and along with the popularization of automobiles, the vehicle-mounted terminal is also diversified slowly.
However, after the automobile is flamed out, the vehicle-mounted terminal must enter a sleep state to meet the requirement of power saving, so that the problem that the automobile cannot be started normally due to the fact that the electric quantity is consumed too fast is avoided; in order to avoid such a situation, after the automobile is shut down, if the sleep of the vehicle-mounted terminal fails, the automobile MCU will turn off the power supply to the terminal; when the terminal is powered off, the time of the terminal can return to the initial value, and when the automobile is started again under the condition of no network, the time of the terminal is always wrong; furthermore, after the vehicle is started, the time needs to be calibrated manually.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a time synchronization method for a vehicle-mounted terminal, a vehicle-mounted terminal and a storage medium, aiming at recording the time of the vehicle-mounted terminal through a vehicle MCU, reading the time of the vehicle MCU to modify the time of the vehicle MCU when the difference between the time of the vehicle-mounted terminal and the time of the vehicle MCU exceeds a predetermined value, and transmitting the time of the vehicle MCU to the vehicle MCU for calibration when the time of the vehicle MCU has an error, so as to synchronize the time between the vehicle-mounted terminal and the vehicle MCU.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a time synchronization method of a vehicle-mounted terminal comprises the following steps:
when the starting of the automobile is detected, the vehicle-mounted terminal reads the current time of the automobile MCU and compares the current time with the current time of the vehicle-mounted terminal;
when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value, the vehicle-mounted terminal modifies the current time into the current time of the automobile MCU;
and when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal sends the current time to the automobile MCU for calibrating the current time of the automobile MCU.
Further, the time synchronization method of the vehicle-mounted terminal, wherein when the vehicle is detected to be started, the vehicle-mounted terminal reads the current time of the vehicle MCU and compares the current time with the current time of the vehicle-mounted terminal, and before the vehicle-mounted terminal reads the current time of the vehicle MCU and compares the current time with the current time of the vehicle-mounted terminal, the method further includes the following steps:
the method comprises the steps that an initial time is set by a vehicle-mounted terminal and is sent to an automobile MCU, the automobile MCU sets a default recording time according to the initial time, and the default recording time is the same as the initial time sent by the vehicle-mounted terminal;
and when detecting that the time of the vehicle-mounted terminal is changed, the vehicle-mounted terminal sends the current time to the vehicle MCU, and the vehicle MCU modifies the current time into the current time sent by the vehicle-mounted terminal.
Further, the time synchronization method of the vehicle-mounted terminal, wherein the mode of changing the time of the vehicle-mounted terminal is network synchronization or manual setting.
Further, the time synchronization method of the vehicle-mounted terminal, wherein when the vehicle is detected to be started, the vehicle-mounted terminal reads the current time of the vehicle MCU and compares the current time with the current time of the vehicle-mounted terminal, and before the vehicle-mounted terminal reads the current time of the vehicle MCU and compares the current time with the current time of the vehicle-mounted terminal, the method further includes the following steps:
when the automobile is detected to be flameout, judging whether the vehicle-mounted terminal enters a sleep mode or not;
and when the vehicle-mounted terminal does not enter the sleep mode, the vehicle MCU disconnects the power supply to the vehicle-mounted terminal.
Further, the time synchronization method of the vehicle-mounted terminal, wherein when the vehicle-mounted terminal does not enter the sleep mode, the method further comprises the following steps after the vehicle MCU disconnects power supply to the vehicle-mounted terminal:
and the automobile MCU enters a low-power-consumption timing mode and starts a real-time clock to time.
Further, the time synchronization method of the vehicle-mounted terminal, wherein when the vehicle is detected to be started, the vehicle-mounted terminal reads the current time of the vehicle MCU and compares the current time with the current time of the vehicle-mounted terminal, specifically includes the following steps:
when the automobile is detected to be started, the vehicle-mounted terminal is electrified again, and the current time of the vehicle-mounted terminal returns to the initial value;
and after reading the current time of the automobile MCU, the vehicle-mounted terminal judges whether the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value.
Further, the time synchronization method of the vehicle-mounted terminal, wherein when it is determined that the difference between the current time of the vehicle MCU and the current time of the vehicle-mounted terminal exceeds a preset value, the step of modifying the current time to the current time of the vehicle MCU by the vehicle-mounted terminal specifically includes the following steps:
when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value, detecting whether the vehicle-mounted terminal enters a dormant state or not;
and when the vehicle-mounted terminal is detected to enter the dormant state, modifying the current time into the current time of the automobile MCU.
Further, the time synchronization method of the vehicle-mounted terminal, wherein when it is determined that the difference between the current time of the vehicle MCU and the current time of the vehicle-mounted terminal does not exceed a preset value, the vehicle-mounted terminal sends the current time to the vehicle MCU, and the step of calibrating the current time of the vehicle MCU specifically includes the following steps:
when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal reads the current time of the vehicle-mounted terminal and sends the current time to the automobile MCU;
and the vehicle MCU receives the current time sent by the vehicle-mounted terminal and calibrates the current time of the vehicle MCU according to the current time sent by the vehicle-mounted terminal.
The vehicle-mounted terminal comprises a processor and a memory connected with the processor, wherein the memory stores a time synchronization program of the vehicle-mounted terminal, and the time synchronization program of the vehicle-mounted terminal is used for realizing a time synchronization method of the vehicle-mounted terminal when being executed by the processor.
A storage medium storing a time synchronization program of a vehicle-mounted terminal, the time synchronization program of the vehicle-mounted terminal being executed by a processor for implementing a time synchronization method of the vehicle-mounted terminal.
The invention provides a time synchronization method of a vehicle-mounted terminal, the vehicle-mounted terminal and a storage medium, wherein the time synchronization method of the vehicle-mounted terminal comprises the following steps: when the starting of the automobile is detected, the vehicle-mounted terminal reads the current time of the automobile MCU and compares the current time with the current time of the vehicle-mounted terminal; when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value, the vehicle-mounted terminal modifies the current time into the current time of the automobile MCU; when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal sends the current time to the automobile MCU; the time of the vehicle-mounted terminal is recorded through the MCU, when the time difference between the vehicle-mounted terminal and the MCU exceeds a preset value, the time of the MCU is read to modify the time of the MCU, and when the time of the MCU has errors, the time of the MCU is sent to the MCU for calibration, so that the time between the vehicle-mounted terminal and the MCU is synchronized.
Drawings
Fig. 1 is a flowchart of a time synchronization method of a vehicle-mounted terminal according to a first preferred embodiment of the present invention.
Fig. 2 is a functional block diagram of a preferred embodiment of the vehicle-mounted terminal of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
Referring to fig. 1, fig. 1 is a flowchart illustrating a time synchronization method of a vehicle-mounted terminal according to a first preferred embodiment of the present invention. As shown in fig. 1, a time synchronization method for a vehicle-mounted terminal includes the following steps:
and S100, when the automobile is detected to be started, the vehicle-mounted terminal reads the current time of the automobile MCU and compares the current time with the current time of the vehicle-mounted terminal.
In the embodiment of the invention, each time the automobile is powered on, the MCU (micro Controller unit) of the automobile central control system initializes the time of the MCU (micro Controller unit) to ensure that the time of the MCU is the same as that of the vehicle-mounted terminal, and the timing of the MCU (micro Controller unit) in the normal mode is started from the time.
When the vehicle-mounted terminal is started for the first time, the vehicle-mounted terminal can set initial time and sends the initial time to the vehicle MCU, the vehicle MCU can set default recording time according to the initial time, the default recording time is the same as the initial time sent by the vehicle-mounted terminal, and normal mode timing is started from the initial time.
Further, when it is detected that the time of the vehicle-mounted terminal changes, the current time of the vehicle-mounted terminal needs to be modified through a network or manual setting, after the modification, the vehicle-mounted terminal sends the current time to the vehicle MCU, and the vehicle MCU modifies the current time into the current time sent by the vehicle-mounted terminal.
Further, when the automobile is detected to be flameout, the automobile MCU judges whether the vehicle-mounted terminal enters a sleep mode or not; when the vehicle-mounted terminal does not enter the sleep mode, in order to reduce the power consumption of the vehicle-mounted terminal to the vehicle storage battery, the vehicle MCU disconnects the power supply to the vehicle-mounted terminal; at the moment, the automobile MCU enters a low-power-consumption timing mode and starts a real-time clock to start timing.
Further, when the automobile is detected to be started, the vehicle-mounted terminal is electrified again, and the current time of the vehicle-mounted terminal returns to the initial value; at this time, the vehicle-mounted terminal reads the current time of the vehicle MCU and judges whether the difference between the current time of the vehicle MCU and the current time of the vehicle-mounted terminal exceeds a preset value (the preset value is one year).
Further, the automobile MCU is in a normal timing mode, and the timing mode is as follows:
the timer is adopted for timing, the time record adopts a structure body variable, the members are respectively year, month, day, time, minute and second, the year accounts for two bytes, the high order and the low order are respectively represented, the timing function 1S is called once, and the timing function is placed in the interrupt processing function in order to respond in time when the next timing time is reached.
Further, the automobile MCU is in a low power consumption timing mode, and the timing mode is as follows:
after the automobile is flamed out, in order to reduce power consumption, the MCU needs to work in a low power consumption mode, a timer clock is closed in the low power consumption mode, in order to be capable of timing in the low power consumption mode, the RTC (real time clock) of the MCU needs to be configured to wake up, after sleeping, the MCU wakes up once every 1 second, when the MCU wakes up, the member seconds of a time structure variable are added once by itself, so that the MCU can continue to time in the sleeping mode, and when the MCU runs in a normal mode, the timing is realized through the timer.
Further, in order to make the timing accuracy of the normal timing mode and the low power consumption timing mode of the vehicle MCU, the timing mode of the vehicle MCU needs to be calibrated, and the timing calibration mode of the vehicle MCU is as follows:
when the clock of the automobile MCU adopts the HSI RC oscillator, if the timer and the RTC parameters are configured according to the conventional parameters, an error occurs; therefore, for the accuracy of time, a theoretical parameter value needs to be calculated first, and then whether the actual timing of the parameter value is accurate is verified; during verification, the recording starting Time of the automobile MCU is recorded as Time1, the recording ending Time is recorded as Time2, the fact that the recording Time of the automobile MCU is faster or slower is obtained through comparing the Time2-Time1 with the actual used standby Time, then the timer and RTC parameters are modified, and standby verification is continued until the recording Time of the automobile MCU is close to the actual Time; during verification, the low-power consumption timing mode and the normal timing mode of the automobile MCU are verified separately, and the verification time of each mode is 24 hours; the RTC configuration parameters are used for verifying a low-power-consumption timing mode, the timer configuration parameters are used for verifying a normal timing mode, and final parameters are obtained after verification.
Specifically, step S100 includes the following steps:
s001, setting initial time by the vehicle-mounted terminal, and sending the initial time to the automobile MCU, wherein the automobile MCU sets default recording time according to the initial time, and the default recording time is the same as the initial time sent by the vehicle-mounted terminal;
s002, when the time of the vehicle-mounted terminal is detected to be changed, the vehicle-mounted terminal sends the current time to the automobile MCU, and the automobile MCU modifies the current time into the current time sent by the vehicle-mounted terminal;
s003, when the automobile is detected to be flameout, judging whether the vehicle-mounted terminal enters a sleep mode or not;
s004, when the vehicle-mounted terminal does not enter the sleep mode, the vehicle MCU disconnects power supply to the vehicle-mounted terminal;
and S005, the automobile MCU enters a low-power-consumption timing mode and starts a real-time clock to time.
Specifically, step S100 specifically includes the following steps:
s101, when the automobile is detected to be started, the vehicle-mounted terminal is electrified again, and the current time of the vehicle-mounted terminal returns to an initial value;
and S102, after reading the current time of the automobile MCU by the vehicle-mounted terminal, judging whether the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value or not.
And S200, when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged to exceed a preset value, the vehicle-mounted terminal modifies the current time into the current time of the automobile MCU.
In the embodiment of the invention, when the automobile is ignited each time, the vehicle-mounted terminal reads the time of the automobile MCU, compares the read time of the automobile MCU with the time of the vehicle-mounted terminal, and judges whether the difference between the time of the automobile MCU and the time of the vehicle-mounted terminal exceeds a preset value (the preset value is one year); when the difference between the time of the automobile MCU and the time of the automobile MCU exceeds one year, the fact that the power of the vehicle-mounted terminal is cut off when the automobile is flamed out last time is indicated, the time returns to an initial value, and the time of the automobile MCU needs to be read to modify the time of the automobile MCU; otherwise, sending the time of the automobile MCU to the automobile MCU for calibrating the time of the automobile MCU; when the automobile MCU records time, the time variable is automatically added once in one second through software, so that certain errors exist in comparison with the time of the vehicle-mounted terminal; except for the condition that the vehicle-mounted terminal is powered off, the time of the vehicle MCU is calibrated by the time transmitted by the vehicle-mounted terminal.
Specifically, step S200 specifically includes the following steps:
s201, when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged to exceed a preset value, whether the vehicle-mounted terminal enters a dormant state is detected;
s202, when the fact that the vehicle-mounted terminal enters the sleep state is detected, the current time is modified into the current time of the automobile MCU.
And step S300, when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal sends the current time to the automobile MCU for calibrating the current time of the automobile MCU.
In the embodiment of the invention, when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged to be less than one year, the vehicle-mounted terminal is not powered off when the automobile is flamed out last time, and the time does not return to the initial value; at the moment, the time of the vehicle-mounted terminal is accurate, so that the vehicle-mounted terminal can read the current time of the vehicle-mounted terminal and send the current time to the automobile MCU; and the vehicle MCU receives the current time sent by the vehicle-mounted terminal and calibrates the current time of the vehicle MCU according to the current time sent by the vehicle-mounted terminal.
After the time setting of the vehicle-mounted terminal, the time value of the vehicle-mounted terminal returns to the initial value only under the condition that the power of the vehicle-mounted terminal is cut off; at the moment, the time of the automobile MCU needs to be read, the time can be judged to return to the initial value by comparing the time of the automobile MCU with the time of the automobile MCU, and then the time of the automobile MCU is modified by reading the time of the automobile MCU, so that the function of automatically recovering the time before the network synchronization time or the manual time setting is not available is realized.
The time between the automobile MCU and the vehicle-mounted terminal is calibrated, when the vehicle-mounted terminal is powered off, the time value returns to the initial value, and the time value of the automobile MCU is used for calibrating the time value of the vehicle-mounted terminal; when the time of the automobile MCU has errors, the time value of the vehicle-mounted terminal is used for calibrating the time value of the automobile MCU; meanwhile, when the vehicle-mounted terminal carries out network synchronization time or manually sets time, the vehicle-mounted terminal also sends the time to the automobile MCU, so that the time of the automobile MCU is synchronized and kept consistent with the time of the vehicle-mounted terminal.
That is, specifically, step S300 includes the steps of:
s301, when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal reads the current time of the vehicle-mounted terminal and sends the current time to the automobile MCU;
and S302, the vehicle MCU receives the current time sent by the vehicle-mounted terminal and calibrates the current time of the vehicle MCU according to the current time sent by the vehicle-mounted terminal.
Of course, it can be understood by those skilled in the art that all or part of the processes in the method of the above embodiments may be implemented by instructing relevant hardware (such as a processor, a controller, etc.) through a time synchronization program of the vehicle-mounted terminal, where the program may be stored in a computer-readable storage medium, and the program may include the processes of the above method embodiments when executed. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
Example two
An embodiment of the present invention further provides a vehicle-mounted terminal, as shown in fig. 2, where the vehicle-mounted terminal of this embodiment includes a processor 10, and a memory 20 connected to the processor 10;
the memory 20 stores a time synchronization program of the in-vehicle terminal for implementing a time synchronization method of the in-vehicle terminal when the time synchronization program of the in-vehicle terminal is executed by the processor 10; as described above.
EXAMPLE III
A storage medium storing a time synchronization program of a vehicle-mounted terminal, which is executed by a processor 10 to implement a time synchronization method of the vehicle-mounted terminal; as described above.
In summary, a time synchronization method of a vehicle-mounted terminal, the vehicle-mounted terminal and a storage medium are provided, where the time synchronization method of the vehicle-mounted terminal includes: when the starting of the automobile is detected, the vehicle-mounted terminal reads the current time of the automobile MCU and compares the current time with the current time of the vehicle-mounted terminal; when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value, the vehicle-mounted terminal modifies the current time into the current time of the automobile MCU; when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal sends the current time to the automobile MCU; the time of the vehicle-mounted terminal is recorded through the MCU, when the time difference between the vehicle-mounted terminal and the MCU exceeds a preset value, the time of the MCU is read to modify the time of the MCU, and when the time of the MCU has errors, the time of the MCU is sent to the MCU for calibration, so that the time between the vehicle-mounted terminal and the MCU is synchronized.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (9)

1. A time synchronization method of a vehicle-mounted terminal is characterized by comprising the following steps:
the method comprises the steps that an initial time is set by a vehicle-mounted terminal and is sent to an automobile MCU, the automobile MCU sets a default recording time according to the initial time, and the default recording time is the same as the initial time sent by the vehicle-mounted terminal;
when the change of the time of the vehicle-mounted terminal is detected, the vehicle-mounted terminal sends the current time to the vehicle MCU, and the vehicle MCU modifies the current time into the current time sent by the vehicle-mounted terminal;
when the starting of the automobile is detected, the vehicle-mounted terminal reads the current time of the automobile MCU and compares the current time with the current time of the vehicle-mounted terminal;
when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value, the vehicle-mounted terminal modifies the current time into the current time of the automobile MCU;
and when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal sends the current time to the automobile MCU for calibrating the current time of the automobile MCU.
2. The time synchronization method of the vehicle-mounted terminal according to claim 1, wherein the mode of the vehicle-mounted terminal time change is network synchronization or manual setting.
3. The time synchronization method of vehicle-mounted terminal according to claim 1, wherein when the vehicle is detected to start, the vehicle-mounted terminal further comprises the following steps before reading the current time of the vehicle MCU and comparing with the current time of the vehicle-mounted terminal:
when the automobile is detected to be flameout, judging whether the vehicle-mounted terminal enters a sleep mode or not;
and when the vehicle-mounted terminal does not enter the sleep mode, the vehicle MCU disconnects the power supply to the vehicle-mounted terminal.
4. The time synchronization method for the vehicle-mounted terminal according to claim 3, wherein when the vehicle-mounted terminal does not enter the sleep mode, the method further comprises the following steps after the vehicle MCU disconnects the power supply to the vehicle-mounted terminal:
and the automobile MCU enters a low-power-consumption timing mode and starts a real-time clock to time.
5. The time synchronization method of the vehicle-mounted terminal according to claim 3, wherein when the vehicle is detected to be started, the step of reading the current time of the vehicle MCU and comparing the current time with the current time of the vehicle-mounted terminal by the vehicle-mounted terminal specifically comprises the following steps:
when the automobile is detected to be started, the vehicle-mounted terminal is electrified again, and the current time of the vehicle-mounted terminal returns to the initial value;
and after reading the current time of the automobile MCU, the vehicle-mounted terminal judges whether the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value.
6. The time synchronization method of the vehicle-mounted terminal according to claim 5, wherein when it is determined that the difference between the current time of the vehicle MCU and the current time of the vehicle-mounted terminal exceeds a preset value, the step of modifying the current time to the current time of the vehicle MCU by the vehicle-mounted terminal specifically comprises the following steps:
when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal exceeds a preset value, detecting whether the vehicle-mounted terminal enters a dormant state or not;
and when the vehicle-mounted terminal is detected to enter the dormant state, modifying the current time into the current time of the automobile MCU.
7. The time synchronization method of the vehicle-mounted terminal according to claim 5, wherein when it is determined that the difference between the current time of the vehicle MCU and the current time of the vehicle-mounted terminal does not exceed a preset value, the vehicle-mounted terminal sends the current time to the vehicle MCU, and the step of calibrating the current time of the vehicle MCU specifically comprises the following steps:
when the difference between the current time of the automobile MCU and the current time of the vehicle-mounted terminal is judged not to exceed a preset value, the vehicle-mounted terminal reads the current time of the vehicle-mounted terminal and sends the current time to the automobile MCU;
and the vehicle MCU receives the current time sent by the vehicle-mounted terminal and calibrates the current time of the vehicle MCU according to the current time sent by the vehicle-mounted terminal.
8. An in-vehicle terminal, characterized by comprising a processor, and a memory connected with the processor, wherein the memory stores a time synchronization program of the in-vehicle terminal, and the time synchronization program of the in-vehicle terminal is used for realizing the time synchronization method of the in-vehicle terminal according to any one of claims 1-7 when executed by the processor.
9. A storage medium storing a time synchronization program of a vehicle-mounted terminal, the time synchronization program of the vehicle-mounted terminal being executed by a processor to implement the time synchronization method of the vehicle-mounted terminal according to any one of claims 1 to 7.
CN201810015130.0A 2018-01-08 2018-01-08 Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium Active CN108366353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810015130.0A CN108366353B (en) 2018-01-08 2018-01-08 Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810015130.0A CN108366353B (en) 2018-01-08 2018-01-08 Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium

Publications (2)

Publication Number Publication Date
CN108366353A CN108366353A (en) 2018-08-03
CN108366353B true CN108366353B (en) 2021-07-06

Family

ID=63011060

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810015130.0A Active CN108366353B (en) 2018-01-08 2018-01-08 Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium

Country Status (1)

Country Link
CN (1) CN108366353B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101077A (en) * 2018-08-10 2018-12-28 深圳市智微智能科技开发有限公司 The synchronization error correction method and Related product of RTC disorder
CN109212365B (en) * 2018-10-31 2020-05-05 安徽江淮汽车集团股份有限公司 Method and system for calculating power-off time of new energy automobile
CN109343327B (en) * 2018-11-20 2021-01-29 安徽安凯汽车股份有限公司 Electronic clock for passenger car
CN114553353B (en) * 2020-11-25 2023-09-19 成都鼎桥通信技术有限公司 Timing method and device and vehicle-mounted wireless communication box
CN113271169B (en) * 2021-04-27 2023-03-24 东风汽车集团股份有限公司 Vehicle time service method and system based on wireless communication terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103236896A (en) * 2013-04-07 2013-08-07 北京全路通信信号研究设计院有限公司 Clock adjusting method and clock adjusting system for vehicular control equipment
CN103399484A (en) * 2013-07-23 2013-11-20 深圳市元征科技股份有限公司 Local clock calibrating method and vehicle-mounted equipment
CN104808479A (en) * 2014-01-23 2015-07-29 大陆汽车车身电子系统(芜湖)有限公司 Device and method for updating vehicle-mounted clock
CN105577308A (en) * 2014-11-03 2016-05-11 现代自动车株式会社 Method and apparatus for providing in-vehicle network time synchronization using redundant grandmaster
CN105700337A (en) * 2014-11-28 2016-06-22 奇点新源国际技术开发(北京)有限公司 Clock synchronization method and device applied to vehicle-borne terminal
EP3214508A1 (en) * 2016-03-01 2017-09-06 Visteon Global Technologies, Inc. Synchronizing a vehicular clock with a secondary device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103236896A (en) * 2013-04-07 2013-08-07 北京全路通信信号研究设计院有限公司 Clock adjusting method and clock adjusting system for vehicular control equipment
CN103399484A (en) * 2013-07-23 2013-11-20 深圳市元征科技股份有限公司 Local clock calibrating method and vehicle-mounted equipment
CN104808479A (en) * 2014-01-23 2015-07-29 大陆汽车车身电子系统(芜湖)有限公司 Device and method for updating vehicle-mounted clock
CN105577308A (en) * 2014-11-03 2016-05-11 现代自动车株式会社 Method and apparatus for providing in-vehicle network time synchronization using redundant grandmaster
CN105700337A (en) * 2014-11-28 2016-06-22 奇点新源国际技术开发(北京)有限公司 Clock synchronization method and device applied to vehicle-borne terminal
EP3214508A1 (en) * 2016-03-01 2017-09-06 Visteon Global Technologies, Inc. Synchronizing a vehicular clock with a secondary device

Also Published As

Publication number Publication date
CN108366353A (en) 2018-08-03

Similar Documents

Publication Publication Date Title
CN108366353B (en) Time synchronization method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium
CN108136981B (en) Method for setting configuration data set in control unit of motor vehicle
CN109435761B (en) Storage battery voltage monitoring method and vehicle control unit
US8583323B2 (en) Vehicle-use electronic control device
US11433718B2 (en) Upgrading method and apparatus for tire pressure monitoring module and tire pressure sensor
US20210360977A1 (en) Electronic cigarette, atomizing core, atomizer and method of controlling electronic cigarette
US4506338A (en) Method and apparatus for judging the state of operation of an intake passage pressure detecting device for an engine
CN112208470A (en) Method for realizing low power consumption of equipment and vehicle-mounted terminal
CN112486528B (en) Vehicle over-the-air OTA (over-the-air technology) upgrading method
WO2014154044A1 (en) Intelligent charging method and device for electronic apparatus
CN113965483A (en) Device and method for testing time from auto TOSAR network management pre-dormancy to dormancy
CN115139937B (en) Power-on and power-off time sequence control method of vehicle-mounted controller and vehicle-mounted controller
CN106101406B (en) Shutdown alarm triggering processing method based on mobile terminal and mobile terminal
CN113393595A (en) Vehicle monitoring method, vehicle-mounted terminal and computer-readable storage medium
CN110308916B (en) OTA upgrading method, device, equipment, system and storage medium based on lorawan protocol
KR101832278B1 (en) Method for diagnosing engine off timer
CN110096230A (en) A kind of updated driving data record system and method for controller
CN113263939A (en) Automobile charging pile power supply method and charging pile
CN112433746A (en) Remote variable rate upgrading gas meter system and method and gas meter system and method
CN110109342B (en) Crystal oscillator frequency time keeping method and time keeping equipment
CN113650498B (en) Power-on method and device of electric vehicle, electric vehicle and storage medium
JP2001182608A (en) Correction data processing device for on-vehicle apparatus
CN118018172B (en) Domain controller time synchronization system
CN115235048B (en) Air conditioner control method and device and air conditioner
CN116054987B (en) Timing method of vehicle-mounted equipment and storage medium

Legal Events

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