Real-time clock calibration method and apparatus, device, and medium

By using a real-time clock calibration method to obtain clock calibration parameters and calculate compensation errors, and calibrating the wake-up timestamp, the problem of battery depletion in vehicle hibernation mode is solved, ensuring normal vehicle startup.

WO2026137976A1PCT designated stage Publication Date: 2026-07-02E-QUALITY INTELLIGENT TECHNOLOGY WUXI CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
E-QUALITY INTELLIGENT TECHNOLOGY WUXI CO LTD
Filing Date
2025-09-08
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

The problem of a vehicle becoming unusable when its battery is depleted while the vehicle is in sleep mode.

Method used

The clock calibration parameters are obtained through a real-time clock calibration method, the compensation error is calculated, and the wake-up timestamp is calibrated when a sleep command is received, so as to wake up the vehicle controller to charge the battery.

Benefits of technology

This ensures that the battery voltage does not fall below the critical voltage when the vehicle is in sleep mode, enabling the vehicle to start and run normally and avoiding usage problems caused by the battery running out.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025119603_02072026_PF_FP_ABST
    Figure CN2025119603_02072026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of charging time calibration for electric vehicles, and discloses a real-time clock calibration method and apparatus, a device, and a medium. The method comprises: acquiring clock calibration parameters on the basis of a preset time interval; executing a compensation error calculation process on the basis of the clock calibration parameters to obtain a compensation error; and upon receiving a sleep instruction and determining that a vehicle is not in a sleep state, calibrating a wake-up timestamp by using the compensation error, to obtain a target wake-up timestamp. The present application is used for solving the problem in the prior art that, when a vehicle is in a sleep state, the depletion of battery power due to long-term parking or a prolonged sleep state of the vehicle results in the vehicle being unable to function properly; thus, when a sleep instruction is received, a target wake-up timestamp can be determined, in order to wake up a sleep vehicle control unit at the target wake-up timestamp, so that the vehicle control unit controls a high-voltage system to charge the battery, thereby solving the problem of the vehicle being unable to function properly due to the battery voltage falling below a critical voltage.
Need to check novelty before this filing date? Find Prior Art

Description

Real-time clock calibration methods, devices, equipment and media Technical Field

[0001] This application relates to the field of electric vehicle charging time calibration technology, and in particular to a real-time clock calibration method, apparatus, device and medium. Background Technology

[0002] As electric vehicles become more complex and intelligent, the number of electronic control units inside the vehicles increases, leading to a rise in quiescent current. This makes the small battery more prone to depletion during prolonged periods of parking or dormancy, thus affecting the normal operation of the vehicle. For example, when the small battery voltage falls below a certain threshold, the vehicle may fail to start.

[0003] Electric vehicles typically have two electrical systems: a high-voltage system and a low-voltage system. The high-voltage system is charged by a high-voltage battery, while the low-voltage system is charged by a smaller battery. The high-voltage system drives the electric motor and high-power subsystems, while the low-voltage system supplies power for low-power electrical functions such as door unlocking, vehicle starting, and headlights. During normal vehicle operation, the vehicle controller monitors the battery's charge level in real time and uses a DC-DC converter to convert the high-voltage battery's energy into energy suitable for charging the smaller battery, ensuring timely charging of the smaller battery.

[0004] However, when the vehicle is stationary (or in a dormant state), the charge of the small battery cannot be directly detected, causing the small battery to run out of power during long periods of parking or dormancy, affecting the normal use of the vehicle. Technical issues

[0005] In existing technologies, when a vehicle is in a dormant state, the battery may be depleted due to prolonged parking or dormancy, causing the vehicle to become unusable. Technical solutions

[0006] In response to the aforementioned problems and technical requirements, the applicant has proposed a real-time clock calibration method, device, equipment, and medium to solve the problem in the prior art where the vehicle cannot be used normally due to prolonged parking or battery depletion during sleep mode. The proposed method determines the target wake-up timestamp upon receiving a sleep command, and wakes the dormant vehicle controller at the target wake-up timestamp. This allows the vehicle controller to control the high-voltage system to charge the battery, thus solving the problem of the vehicle being unable to function normally due to battery voltage falling below a critical voltage.

[0007] This application provides a method for calibrating a real-time clock, the method comprising:

[0008] When it is determined that the vehicle is in operation, clock calibration parameters are obtained based on a preset time interval. The clock calibration parameters include: a first timestamp, a second timestamp, the controller temperature of the vehicle's whole controller, and the ambient temperature of the environment in which the vehicle is located. The first timestamp is obtained by timing through a real-time clock, and the second timestamp is obtained by timing through the vehicle's charging system. The real-time clock and the charging system are timed synchronously.

[0009] While the vehicle is in the operating state, a compensation error calculation process is performed based on the clock calibration parameters to obtain the compensation error, until the vehicle is in a sleep state;

[0010] The compensation error calculation process includes:

[0011] The target time error is calculated based on the first timestamp and the second timestamp, and the target temperature error is calculated based on the controller temperature, the ambient temperature and the preset temperature error mapping table. The target time error and the target temperature error are summed to obtain the compensation error.

[0012] Upon receiving a hibernation command and determining that the vehicle is not in the hibernation state, a wake-up timestamp for waking up the vehicle controller is obtained, and the wake-up timestamp is calibrated using the compensation error to obtain a target wake-up timestamp. The target wake-up timestamp is the timestamp when the voltage of the vehicle's battery reaches a critical voltage, which is used to instruct the vehicle to wake up the vehicle controller so that the vehicle controller controls the high-voltage system to charge the battery.

[0013] A real-time clock calibration method according to an embodiment of this application calculates a target time error based on a first timestamp and a second timestamp, including:

[0014] After obtaining the first and second timestamps each time, calculate the time error between the current first and second timestamps and the previous first and second timestamps, and obtain and store the current time error.

[0015] The stored multiple time errors are filtered to obtain and store the target time error.

[0016] According to a real-time clock calibration method of one embodiment of this application, multiple stored time errors are filtered to obtain the target time error, including:

[0017] The time error is input into a preset time error calculation formula to obtain the target time error output by the time error calculation formula;

[0018] The time error calculation formula includes:

[0019] ;

[0020] in, Indicates the target time error. This indicates the number of time errors in the total time error. Indicating the time error of the first One time error, This represents the maximum time error within the time error range. This represents the minimum time error in the time error range.

[0021] According to an embodiment of the real-time clock calibration method of this application, before storing the target time error, the method further includes:

[0022] Based on the preset evaluation strategy, evaluate whether the current time error is acceptable;

[0023] If the current time error is deemed acceptable, record the number of evaluations corresponding to the current evaluation, and execute the steps of storing the number of evaluations and storing the target time error.

[0024] A real-time clock calibration method according to an embodiment of this application calculates a target temperature error based on the controller temperature, the ambient temperature, and a preset temperature error mapping table, including:

[0025] Input the controller temperature and the ambient temperature into a preset temperature gradient difference calculation formula to obtain the temperature gradient difference output by the temperature gradient difference calculation formula.

[0026] The formula for calculating the temperature gradient difference includes:

[0027] )) / (M-2);

[0028] in, This represents the temperature gradient difference, where M represents the total number of controller temperatures or the total number of ambient temperatures. Indicates the first Each controller temperature, This represents the maximum controller temperature among multiple controller temperatures. This represents the minimum controller temperature among multiple controller temperatures. Indicates the first An ambient temperature, This represents the maximum ambient temperature among multiple ambient temperatures. This represents the minimum ambient temperature among multiple ambient temperatures.

[0029] The target temperature error corresponding to the temperature gradient difference is obtained by querying the temperature error mapping table.

[0030] According to an embodiment of the real-time clock calibration method of this application, the wake-up timestamp is calibrated using the compensation error to obtain a target wake-up timestamp, including:

[0031] The compensation error and the wake-up timestamp are input into a preset error calibration formula to obtain the target wake-up timestamp output by the error calibration formula;

[0032] The error calibration formula includes:

[0033] ;

[0034] in, Indicates the target wake-up timestamp. Indicates the wake-up timestamp. This indicates compensation error.

[0035] According to an embodiment of the real-time clock calibration method of this application, after obtaining a first timestamp and a second timestamp each time, the time error between the current first timestamp and the second timestamp and the previous first timestamp and the second timestamp is calculated, and the current time error is obtained and stored, including:

[0036] After obtaining the first and second timestamps for the first time, the time error between the first and second timestamps and the first and second preset timestamps is calculated, and the first time error is obtained and stored.

[0037] This application also provides a real-time clock calibration device, comprising:

[0038] The acquisition module is used to acquire clock calibration parameters based on a preset time interval when it is determined that the vehicle is in operation. The clock calibration parameters include: a first timestamp, a second timestamp, the controller temperature of the vehicle's whole controller, and the ambient temperature of the environment in which the vehicle is located. The first timestamp is obtained by timing through a real-time clock, and the second timestamp is obtained by timing through the vehicle's charging system. The real-time clock and the charging system are timed synchronously.

[0039] The calculation module is used to perform a compensation error calculation process based on the clock calibration parameters when the vehicle is in the operating state, to obtain the compensation error, until the vehicle is in a sleep state;

[0040] The compensation error calculation process includes:

[0041] The target time error is calculated based on the first timestamp and the second timestamp, and the target temperature error is calculated based on the controller temperature, the ambient temperature and the preset temperature error mapping table. The target time error and the target temperature error are summed to obtain the compensation error.

[0042] The calibration module is used to obtain a wake-up timestamp for waking up the vehicle controller when a sleep command is received and it is determined that the vehicle is not in the sleep state, and to calibrate the wake-up timestamp using the compensation error to obtain a target wake-up timestamp, wherein the target wake-up timestamp is the timestamp when the voltage of the vehicle's battery reaches a critical voltage, and is used to instruct the vehicle to wake up the vehicle controller so that the vehicle controller controls the high-voltage system to charge the battery.

[0043] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the real-time clock calibration method as described in any of the preceding claims.

[0044] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the real-time clock calibration method as described in any of the preceding claims. Beneficial effects

[0045] The real-time clock calibration method, apparatus, device, and medium provided in this application embodiment acquire clock calibration parameters based on a preset time interval when the vehicle is determined to be in operation. These clock calibration parameters include a first timestamp, a second timestamp, the controller temperature of the vehicle's overall controller, and the ambient temperature of the vehicle's environment. The first timestamp is obtained through a real-time clock, and the second timestamp is obtained through the vehicle's charging system. The real-time clock and the charging system are synchronized. This application ensures that the start time of timestamp acquisition is consistent by synchronously acquiring the timestamps from the real-time clock and the charging system, providing a valid data foundation for subsequent compensation voltage calculation. While the vehicle is in operation, a compensation error calculation process is performed based on the clock calibration parameters to obtain the compensation error until the vehicle enters a sleep state. The compensation error calculation process includes: based on the first timestamp... The target time error is calculated using the second timestamp, and the target temperature error is calculated based on the controller temperature, ambient temperature, and a preset temperature error mapping table. The target time error and target temperature error are summed to obtain the compensation error. Since the vehicle's operation causes temperature and time errors, this application continuously monitors the vehicle before it enters a sleep state to obtain the compensation error caused by the vehicle's operation. Upon receiving a sleep command and confirming that the vehicle is not in a sleep state, the wake-up timestamp used to wake up the vehicle controller is obtained, and the wake-up timestamp is calibrated using the compensation error to obtain the target wake-up timestamp. This enables the determination of the target wake-up timestamp when the vehicle receives a sleep command, so that the sleep-bound vehicle controller can be woken up at the target wake-up timestamp. This allows the vehicle controller to control the high-voltage system to charge the battery, solving the problem that the vehicle cannot be used normally when the battery voltage is below the critical voltage. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 is a schematic flowchart of one of the real-time clock calibration methods provided in the embodiments of this application;

[0048] Figure 2 is a second schematic flowchart of the real-time clock calibration method provided in the embodiments of this application;

[0049] Figure 3 is a schematic diagram of the structure of the real-time clock calibration device provided in an embodiment of this application;

[0050] Figure 4 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. Embodiments of the present invention

[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0052] To further illustrate the problems of the prior art in this application:

[0053] To address the problem of vehicles becoming unusable due to low battery power, intelligent charging systems have been developed. These systems set a wake-up time before the vehicle goes into sleep mode. Upon wake-up, the intelligent charging system monitors the voltage of the small battery and automatically wakes the vehicle controller (VDC) to charge the small battery when the voltage drops below a set value, ensuring the vehicle can start and operate normally. The intelligent charging system needs to be able to accurately wake the VDC at the set time, allowing the VDC to control the high-voltage system to charge the small battery.

[0054] Timed wake-up tasks are typically implemented using a real-time clock (RTC), which can be either integrated or standalone. An integrated RTC chip integrates all RTC functions into a single chip; the RTC is merely a sub-function of the chip. A standalone RTC chip is a dedicated chip for timing. Generally, integrated RTC chips have lower accuracy, while standalone RTC chips have higher accuracy but higher hardware costs.

[0055] Existing technology uses a high-precision RTC chip and an onboard communication module (TBOX) for timed wake-up of the vehicle controller. Because of the TBOX, high-quality network signals are crucial. In areas with poor network signal quality, such as underground parking garages, the timed wake-up function risks failure, potentially leading to insufficient battery replenishment and severe battery drain, preventing the vehicle from starting.

[0056] In addition, since TBOX wakes up the vehicle controller via the CAN network, the vehicle controller needs to support the CAN wake-up function, which requires redesigning the vehicle controller hardware and increases time costs.

[0057] To address the aforementioned problems, this application provides a real-time clock calibration method. This method can be applied to power supply systems. Other descriptions in the embodiments of this application are illustrative and not intended to limit the scope of protection of this application, and will not be described in detail thereafter. The specific implementation of this method is shown in Figure 1:

[0058] Step 101: If it is determined that the vehicle is in operation, obtain clock calibration parameters based on a preset time interval.

[0059] The clock calibration parameters include: a first timestamp, a second timestamp, the controller temperature of the vehicle's whole controller, and the ambient temperature of the vehicle's environment. The first timestamp is obtained by timing with a real-time clock, and the second timestamp is obtained by timing with the vehicle's charging system. The real-time clock and the charging system are timed synchronously.

[0060] Step 102: While the vehicle is in operation, perform a compensation error calculation process based on the clock calibration parameters to obtain the compensation error until the vehicle is in a sleep state.

[0061] The compensation error calculation process includes: calculating the target time error based on the first and second timestamps, and calculating the target temperature error based on the controller temperature, ambient temperature and a preset temperature error mapping table, and summing the target time error and target temperature error to obtain the compensation error.

[0062] Step 103: Upon receiving a hibernation command and determining that the vehicle is not in hibernation mode, obtain the wake-up timestamp used to wake up the vehicle controller, and calibrate the wake-up timestamp using compensation error to obtain the target wake-up timestamp.

[0063] The target wake-up timestamp is the timestamp when the vehicle's battery voltage reaches the critical voltage. It is used to instruct the vehicle to wake up the vehicle controller, so that the vehicle controller can control the high-voltage system to charge the battery.

[0064] The real-time clock calibration method provided in this application, when the vehicle is in operation, acquires clock calibration parameters based on a preset time interval. These parameters include a first timestamp, a second timestamp, the controller temperature of the vehicle's controller, and the ambient temperature of the vehicle's environment. The first timestamp is obtained through a real-time clock, and the second timestamp is obtained through the vehicle's charging system. The real-time clock and the charging system are synchronized. This application ensures that the start time of timestamp acquisition is consistent by synchronously acquiring the timestamps from the real-time clock and the charging system, providing a valid data foundation for subsequent compensation voltage calculation. While the vehicle is in operation, a compensation error calculation process is performed based on the clock calibration parameters to obtain the compensation error, until the vehicle enters a sleep state. The compensation error calculation process includes: based on the first timestamp and the second timestamp... The system calculates the target time error using timestamps and the target temperature error based on the controller temperature, ambient temperature, and a preset temperature error mapping table. The target time error and target temperature error are summed to obtain a compensation error. Since vehicle operation causes temperature and time errors, this application continuously monitors the vehicle before it enters a sleep state to obtain the compensation error caused by vehicle operation. Upon receiving a sleep command and confirming that the vehicle is not in a sleep state, the system obtains a wake-up timestamp for waking up the vehicle controller and calibrates the wake-up timestamp using the compensation error to obtain the target wake-up timestamp. This enables the determination of the target wake-up timestamp upon receiving a sleep command, waking up the sleep-bound vehicle controller at the target wake-up timestamp. This allows the vehicle controller to control the high-voltage system to charge the battery, solving the problem of the vehicle being unable to function properly due to the battery voltage being below the critical voltage.

[0065] Specifically, analysis reveals three main sources of RTC error: first, the inherent bias of the RTC clock source, i.e., the crystal oscillator used; second, the bias caused by changes in ambient temperature; and third, the bias caused by unstable power supply. Since the vehicle controller's internal power supply is regulated by a low-dropout regulator (LDO), this application does not consider biases caused by the power supply.

[0066] The inherent bias of the crystal is the primary source of error, while temperature-related bias is relatively minor. Since the inherent bias generated by the crystal oscillator varies across each control unit, all control units cannot use the same error compensation value. By using a self-learning error compensation calculation process, the accuracy of the RTC in the vehicle controller can be improved, enabling precise timing wake-up functionality without altering the current vehicle controller design.

[0067] Specifically, by compensating for crystal error (corresponding to time error) and temperature error, the timing when the vehicle is powered off is obtained to obtain the final timing, so that the vehicle controller is woken up at the final timing.

[0068] This application improves the timing accuracy of the RTC without adding any auxiliary circuits, ensuring that the vehicle controller is accurately woken up. It is simple to implement and effectively saves development costs.

[0069] In one specific embodiment, the specific implementation of calculating the target time error based on the first timestamp and the second timestamp includes:

[0070] After obtaining the first and second timestamps each time, calculate the time error between the current first and second timestamps and the previous first and second timestamps, obtain and store the current time error; filter the stored time errors to obtain and store the target time error.

[0071] In one specific embodiment, after obtaining the first timestamp and the second timestamp for the first time, the time error between the first timestamp and the second timestamp and the first preset timestamp and the second preset timestamp is calculated, and the first time error is obtained and stored.

[0072] Specifically, the time error can be disregarded after the first and second timestamps are obtained for the first time, and then calculated starting from the second time the first and second timestamps are obtained. The following example illustrates this scenario in detail.

[0073] Specifically, Figure 2 illustrates the scenario of each power-on operation of any electronic control unit of the vehicle controller:

[0074] Step 201: With the electronic control unit powered on and running, acquire the clock calibration parameters.

[0075] Specifically, the RTC performs an initialization operation and starts timing after the initialization is complete. The power supply system also starts timing at the same time the RTC starts timing and records the initial timestamp, i.e., the first and second timestamps. At the same time, the controller temperature and ambient temperature at the start of power-on are recorded.

[0076] Step 202: After a preset time interval, record the first and second timestamps for the second time, as well as the controller temperature and ambient temperature for the second time.

[0077] Step 203: Using the error calculation formula, obtain the second time error corresponding to the first and second timestamps.

[0078] The formula for calculating this error is shown in formula (1):

[0079] …………….(1)

[0080] in, This indicates the time error obtained the first time. This indicates the first timestamp obtained the second time. This indicates the first timestamp obtained. This indicates the second timestamp obtained the second time. This indicates the second timestamp obtained the first time.

[0081] Step 204: After obtaining the first time error, increment the preset number of successful learning attempts by 1, and store the first time error, the second controller temperature, and the ambient temperature in an array.

[0082] One option is to set the initial number of successful learning attempts to zero.

[0083] Step 205: Determine if the ECU is about to enter a sleep state. If yes, return to step 206; otherwise, proceed to step 202.

[0084] Specifically, upon receiving a hibernation command, the vehicle will not immediately enter hibernation mode. It will perform some necessary power-off operations before officially entering hibernation mode. This period before officially entering hibernation mode is the time between receiving the hibernation command and officially entering hibernation mode.

[0085] Step 206: Evaluate whether the current time error is acceptable. If yes, proceed to step 207; otherwise, proceed to step 210.

[0086] Step 207: Filter the stored multiple time errors to obtain the target time error, and calculate the target temperature error based on the controller temperature, ambient temperature and a preset temperature error mapping table.

[0087] Step 208: Store the compensation error in non-volatile memory.

[0088] Step 209: Input the compensation error and wake-up timestamp into the preset error calibration formula to obtain the target wake-up timestamp output by the error calibration formula.

[0089] Step 210: Determine whether the non-volatile memory stores the previous time error. If yes, proceed to step 209; otherwise, proceed to step 211.

[0090] Step 211: Obtain the preset inherent error value, and input the inherent error value and wake-up timestamp into the preset error calibration formula to obtain the target wake-up timestamp output by the error calibration formula.

[0091] The inherent error value is obtained through extensive experimentation and is not very accurate, but it can still improve the timing accuracy of the RTC to some extent.

[0092] In one specific embodiment, the filtering process for multiple stored time errors to obtain the target time error includes the following specific implementation:

[0093] Input the time error into the preset time error calculation formula to obtain the target time error output by the time error calculation formula.

[0094] The formula for calculating the time error is shown in formula (2):

[0095] ……………………………….(2)

[0096] in, Indicates the target time error. This indicates the number of time errors in the total time error. Indicating the time error of the first One time error, This represents the maximum time error within the time error range. This represents the minimum time error in the time error range.

[0097] In one specific embodiment, based on a preset evaluation strategy, the current time error is evaluated to determine whether it is acceptable; if the current time error is determined to be acceptable, the number of evaluations corresponding to the current evaluation is recorded, and the steps of storing the number of evaluations and storing the target time error are executed.

[0098] Specifically, the evaluation strategy includes: whether the number of successful learning attempts in the current iteration is greater than the number of successful learning attempts in the previous iteration, and whether the controller temperature in the current iteration is different from the control temperature in the previous iteration.

[0099] Specifically, if the number of successful learning attempts for the current time is greater than the number of successful learning attempts for the previous time, and the controller temperature for the current time is different from the control temperature for the previous time, the time error for the current time is determined to be acceptable; if any one or more of the above conditions are not met, the time error for the current time is determined to be unacceptable.

[0100] The number of assessments is equivalent to the number of successful learning sessions.

[0101] In one specific embodiment, the specific implementation of calculating the target temperature error based on the controller temperature, ambient temperature, and a preset temperature error mapping table includes:

[0102] Input the controller temperature and ambient temperature into the preset temperature gradient difference calculation formula to obtain the temperature gradient difference output by the temperature gradient difference calculation formula; query the temperature error mapping table to obtain the target temperature error corresponding to the temperature gradient difference.

[0103] The formula for calculating the temperature gradient difference is shown in formula (3):

[0104] ……………………………………………..(3)

[0105] in, This represents the temperature gradient difference, where M represents the total number of controller temperatures or the total number of ambient temperatures. Indicates the first Each controller temperature, This represents the maximum controller temperature among multiple controller temperatures. This represents the minimum controller temperature among multiple controller temperatures. Indicates the first An ambient temperature, This represents the maximum ambient temperature among multiple ambient temperatures. This represents the minimum ambient temperature among multiple ambient temperatures.

[0106] Specifically, the temperature error mapping table is used to characterize the correspondence between the temperature gradient difference and the target temperature error.

[0107] Specifically, the temperature error mapping table is obtained through the mapping table calculation formula, where the mapping table calculation formula is shown in formula (4):

[0108] …………………….(4)

[0109] in, This indicates the frequency deviation (corresponding to the temperature gradient difference). Indicates the fundamental frequency. This represents the curvature coefficient, which is a constant. This indicates the temperature value within the preset temperature range (corresponding to the target temperature error). This represents the reference temperature, which is a constant. This represents the preset frequency, which is a constant.

[0110] In one specific embodiment, the specific implementation of calibrating the wake-up timestamp using compensation error to obtain the target wake-up timestamp includes:

[0111] Input the compensation error and wake-up timestamp into the preset error calibration formula to obtain the target wake-up timestamp output by the error calibration formula.

[0112] The error calibration formula is shown in formula (5):

[0113] ………………………………(5)

[0114] in, Indicates the target wake-up timestamp. Indicates the wake-up timestamp. This indicates compensation error.

[0115] This application compares the timing results of the power supply system and the RTC by setting a preset time interval to obtain the target time error; it then determines whether the learning was successful and stores the data corresponding to successful learning into the NVM for use in case of unsuccessful learning in the future. Furthermore, it obtains the target temperature error by using the controller temperature, ambient temperature, and a pre-obtained temperature error mapping table. Based on the target time error and target temperature error, it obtains a compensation error and uses this compensation error to compensate for the wake-up timestamp, thus obtaining the target wake-up timestamp.

[0116] This application can effectively improve the timing accuracy of the built-in RTC of the vehicle controller. When the vehicle has a timed wake-up function, it can achieve the purpose of high-precision timing without adding hardware components or changing the controller design.

[0117] This application embodiment also provides a real-time clock calibration device. The specific implementation of this device can be found in the description of the real-time clock calibration method; details that are repeated will not be repeated. As shown in Figure 3, the device includes:

[0118] The acquisition module 301 is used to acquire clock calibration parameters based on a preset time interval when it is determined that the vehicle is in operation. The clock calibration parameters include: a first timestamp, a second timestamp, the controller temperature of the vehicle's whole controller, and the ambient temperature of the environment where the vehicle is located. The first timestamp is obtained by timing through a real-time clock, and the second timestamp is obtained by timing through the vehicle's charging system. The real-time clock and the charging system are timed synchronously.

[0119] The calculation module 302 is used to perform a compensation error calculation process based on clock calibration parameters when the vehicle is in operation, and obtain the compensation error until the vehicle is in a sleep state.

[0120] The error compensation calculation process includes:

[0121] The target time error is calculated based on the first and second timestamps, and the target temperature error is calculated based on the controller temperature, ambient temperature and a preset temperature error mapping table. The target time error and the target temperature error are summed to obtain the compensation error.

[0122] The calibration module 303 is used to obtain the wake-up timestamp for waking up the vehicle controller when it receives a sleep command and determines that the vehicle is not in a sleep state, and to calibrate the wake-up timestamp using compensation error to obtain the target wake-up timestamp. The target wake-up timestamp is the timestamp when the voltage of the vehicle battery reaches the critical voltage, which is used to instruct the vehicle to wake up the vehicle controller so that the vehicle controller controls the high voltage system to charge the battery.

[0123] In one specific embodiment, the calculation module 302 is used to calculate the time error between the current first and second timestamps and the previous first and second timestamps after each first timestamp and second timestamp are obtained, obtain and store the current time error; and perform filtering processing on the stored multiple time errors to obtain and store the target time error.

[0124] In one specific embodiment, the calculation module 302 is used to input the time error into a preset time error calculation formula to obtain the target time error output by the time error calculation formula.

[0125] The formula for calculating time error includes:

[0126] ;

[0127] in, Indicates the target time error. This indicates the number of time errors in the total time error. Indicating the time error of the first One time error, This represents the maximum time error within the time error range. This represents the minimum time error in the time error range.

[0128] In one specific embodiment, the calculation module 302 is used to evaluate whether the current time error is acceptable based on a preset evaluation strategy; if the current time error is acceptable, the module records the number of evaluations corresponding to the current evaluation and performs the steps of storing the number of evaluations and storing the target time error.

[0129] In one specific embodiment, the calculation module 302 is used to input the controller temperature and the ambient temperature into a preset temperature gradient difference calculation formula to obtain the temperature gradient difference output by the temperature gradient difference calculation formula.

[0130] The formula for calculating the temperature gradient difference includes:

[0131] ;

[0132] in, This represents the temperature gradient difference, where M represents the total number of controller temperatures or the total number of ambient temperatures. Indicates the first Each controller temperature, This represents the maximum controller temperature among multiple controller temperatures. This represents the minimum controller temperature among multiple controller temperatures. Indicates the first An ambient temperature, This represents the maximum ambient temperature among multiple ambient temperatures. This represents the minimum ambient temperature among multiple ambient temperatures.

[0133] By consulting the temperature error mapping table, the target temperature error corresponding to the temperature gradient difference can be obtained.

[0134] In one specific embodiment, the calibration module 303 is used to input the compensation error and the wake-up timestamp into a preset error calibration formula to obtain the target wake-up timestamp output by the error calibration formula.

[0135] The error calibration formula includes:

[0136] ;

[0137] in, Indicates the target wake-up timestamp. Indicates the wake-up timestamp. This indicates compensation error.

[0138] In one specific embodiment, the calculation module 302 is used to calculate the time error between the first and second timestamps and the first preset timestamp and the second preset timestamp after the first timestamp and the second timestamp are obtained for the first time, and to obtain and store the first time error.

[0139] Figure 4 illustrates a schematic diagram of the physical structure of an electronic device. As shown in Figure 4, the electronic device may include: a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, communication interface 402, and memory 403 communicate with each other via the communication bus 404. The processor 401 can call logical instructions in the memory 403 to execute a real-time clock calibration method.

[0140] Furthermore, the logical instructions in the aforementioned memory 403 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0141] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to execute the real-time clock calibration method provided by the above methods.

[0142] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the real-time clock calibration method provided in the above embodiments.

[0143] The device embodiments described above are illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0145] Finally, it should be noted that the above descriptions are merely preferred embodiments of this application, and this application is not limited to the above embodiments. Other improvements and variations that can be directly derived or conceived by those skilled in the art without departing from the spirit and concept of this application should be considered to be included within the protection scope of this application.

Claims

1. A method for calibrating a real-time clock, characterized in that, The method includes: When it is determined that the vehicle is in operation, clock calibration parameters are obtained based on a preset time interval. The clock calibration parameters include: a first timestamp, a second timestamp, the controller temperature of the vehicle's whole controller, and the ambient temperature of the environment in which the vehicle is located. The first timestamp is obtained by timing through a real-time clock, and the second timestamp is obtained by timing through the vehicle's charging system. The real-time clock and the charging system are timed synchronously. While the vehicle is in the operating state, a compensation error calculation process is performed based on the clock calibration parameters to obtain the compensation error, until the vehicle is in a sleep state; The compensation error calculation process includes: The target time error is calculated based on the first timestamp and the second timestamp, and the target temperature error is calculated based on the controller temperature, the ambient temperature and the preset temperature error mapping table. The target time error and the target temperature error are summed to obtain the compensation error. Upon receiving a hibernation command and determining that the vehicle is not in the hibernation state, a wake-up timestamp for waking up the vehicle controller is obtained, and the wake-up timestamp is calibrated using the compensation error to obtain a target wake-up timestamp. The target wake-up timestamp is the timestamp when the voltage of the vehicle's battery reaches a critical voltage, which is used to instruct the vehicle to wake up the vehicle controller so that the vehicle controller controls the high-voltage system to charge the battery.

2. The real-time clock calibration method according to claim 1, characterized in that, Calculating the target time error based on the first timestamp and the second timestamp includes: After obtaining the first and second timestamps each time, calculate the time error between the current first and second timestamps and the previous first and second timestamps, and obtain and store the current time error. The stored multiple time errors are filtered to obtain and store the target time error.

3. The real-time clock calibration method according to claim 2, characterized in that, The target time error is obtained by filtering multiple stored time errors, including: The time error is input into a preset time error calculation formula to obtain the target time error output by the time error calculation formula; The time error calculation formula includes: ; in, Indicates the target time error. This indicates the number of time errors in the total time error. Indicating the time error of the first One time error, This represents the maximum time error within the time error range. This represents the minimum time error in the time error range.

4. The real-time clock calibration method according to claim 2, characterized in that, Before storing the target time error, the method further includes: Based on the preset evaluation strategy, evaluate whether the current time error is acceptable; If the current time error is deemed acceptable, record the number of evaluations corresponding to the current evaluation, and execute the steps of storing the number of evaluations and storing the target time error.

5. The real-time clock calibration method according to any one of claims 1-4, characterized in that, The target temperature error is calculated based on the controller temperature, the ambient temperature, and a preset temperature error mapping table, including: Input the controller temperature and the ambient temperature into a preset temperature gradient difference calculation formula to obtain the temperature gradient difference output by the temperature gradient difference calculation formula. The formula for calculating the temperature gradient difference includes: )) / (M-2); in, This represents the temperature gradient difference, where M represents the total number of controller temperatures or the total number of ambient temperatures. Indicates the first Each controller temperature, This represents the maximum controller temperature among multiple controller temperatures. This represents the minimum controller temperature among multiple controller temperatures. Indicates the first An ambient temperature, This represents the maximum ambient temperature among multiple ambient temperatures. This represents the minimum ambient temperature among multiple ambient temperatures. The target temperature error corresponding to the temperature gradient difference is obtained by querying the temperature error mapping table.

6. The real-time clock calibration method according to any one of claims 1-4, characterized in that, The wake-up timestamp is calibrated using the compensation error to obtain the target wake-up timestamp, including: The compensation error and the wake-up timestamp are input into a preset error calibration formula to obtain the target wake-up timestamp output by the error calibration formula; The error calibration formula includes: ; in, Indicates the target wake-up timestamp. Indicates the wake-up timestamp. This indicates compensation error.

7. The real-time clock calibration method according to claim 2, characterized in that, After obtaining the first and second timestamps each time, calculate the time error between the current first and second timestamps and the previous first and second timestamps, obtain and store the current time error, including: After obtaining the first and second timestamps for the first time, the time error between the first and second timestamps and the first and second preset timestamps is calculated, and the first time error is obtained and stored.

8. A calibration device for a real-time clock, characterized in that, The device includes: The acquisition module is used to acquire clock calibration parameters based on a preset time interval when it is determined that the vehicle is in operation. The clock calibration parameters include: a first timestamp, a second timestamp, the controller temperature of the vehicle's whole controller, and the ambient temperature of the environment in which the vehicle is located. The first timestamp is obtained by timing through a real-time clock, and the second timestamp is obtained by timing through the vehicle's charging system. The real-time clock and the charging system are timed synchronously. The calculation module is used to perform a compensation error calculation process based on the clock calibration parameters when the vehicle is in the operating state, to obtain the compensation error, until the vehicle is in a sleep state; The compensation error calculation process includes: The target time error is calculated based on the first timestamp and the second timestamp, and the target temperature error is calculated based on the controller temperature, the ambient temperature and the preset temperature error mapping table. The target time error and the target temperature error are summed to obtain the compensation error. The calibration module is used to obtain a wake-up timestamp for waking up the vehicle controller when a sleep command is received and it is determined that the vehicle is not in the sleep state, and to calibrate the wake-up timestamp using the compensation error to obtain a target wake-up timestamp, wherein the target wake-up timestamp is the timestamp when the voltage of the vehicle's battery reaches a critical voltage, and is used to instruct the vehicle to wake up the vehicle controller so that the vehicle controller controls the high-voltage system to charge the battery.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the real-time clock calibration method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the real-time clock calibration method as described in any one of claims 1 to 7.