A method, system, storage medium and energy storage device for calculating a remaining time

By using an adaptive threshold switching mechanism, the threshold is dynamically adjusted to adapt to the user tolerance characteristics of different remaining time intervals, which solves the problem of smoothness and responsiveness of battery remaining time display, achieves a stable display effect over a long period of time and a sensitive display effect over a short period of time, and improves the accuracy of battery remaining time calculation and user experience.

CN122632085APending Publication Date: 2026-08-25SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610930335.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing technologies cannot balance display smoothness and data responsiveness when calculating remaining battery life, resulting in frequent fluctuations in displayed values ​​during long-battery-life scenarios and lag in response during short-battery-life scenarios, affecting user judgment.

Method used

An adaptive threshold jumping mechanism is adopted, which is positively correlated with the historical smoothing duration. The threshold is dynamically adjusted to adapt to the user tolerance characteristics of different remaining time intervals. The adaptive smoothing algorithm filters out small deviations in the long term and improves response sensitivity in the short term.

Benefits of technology

It achieves stable and consistent battery remaining time display over long periods and sensitive display over short periods, improving display accuracy and user experience, simplifying parameter configuration, and reducing hardware resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122632085A_ABST
    Figure CN122632085A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of battery discharge, and particularly relates to a method and system for calculating remaining time, a storage medium and an energy storage device. The method for calculating remaining time comprises the following steps: obtaining a current remaining capacity and a current filtered current of a current period, and obtaining a current reference duration based on the current remaining capacity and the current filtered current; obtaining a historical smooth duration of a previous period, obtaining a jump threshold duration according to the historical smooth duration, and the jump threshold duration is positively correlated with the historical smooth duration; judging whether a difference between the current reference duration and the historical smooth duration exceeds the jump threshold duration; if yes, taking the current reference duration as a current smooth duration of the current period, and displaying the current smooth duration. The present application can achieve the effect of long-term stability and short-term sensitivity, and greatly improve the accuracy of battery remaining time display and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery discharge technology, and in particular to a method, system, storage medium, and energy storage device for calculating remaining time. Background Technology

[0002] Currently, the industry generally calculates the remaining driving time based on the ratio of the remaining battery capacity to the filtered load current. However, due to factors such as battery state of charge updates, instantaneous load fluctuations, and current sampling quantization errors, the calculated target remaining time is still prone to numerical jumps.

[0003] Existing technologies mostly employ moving averages and first-order lag filtering to achieve smooth display of remaining time. However, these solutions use fixed filtering parameters and fixed judgment thresholds, lacking adaptive adjustment capabilities and exhibiting inherent technical defects, failing to balance display smoothness and data responsiveness. In long-battery-life scenarios with large remaining time values, minute current fluctuations are easily misinterpreted as valid changes, causing frequent oscillations and jumps in the displayed value. Conversely, in critical short-battery-life scenarios with small remaining time values, the algorithm's response is lagging and its sensitivity is insufficient, failing to quickly follow changes in actual operating conditions. This results in significant deviations in the displayed value and untimely updates, severely impacting user judgment. Summary of the Invention

[0004] This invention provides a method, system, storage medium, and energy storage device for calculating remaining time, in order to solve the problem of not being able to simultaneously achieve display smoothness and data responsiveness.

[0005] This invention discloses a method for calculating remaining time, comprising: Obtain the current remaining capacity and current filter current for the current cycle, and obtain the current reference duration based on the current remaining capacity and current filter current; Obtain the historical smoothing duration of the previous period, and obtain the jump threshold duration based on the historical smoothing duration. The jump threshold duration is positively correlated with the historical smoothing duration. Determine whether the difference between the current baseline duration and the historical smooth duration exceeds the jump threshold duration; If so, the current reference duration is used as the current smoothing duration of the current cycle, and the current smoothing duration is displayed.

[0006] Optionally, the step of determining whether the difference between the current reference duration and the historical smoothing duration exceeds the jump threshold duration includes: If not, the current smoothing duration is obtained based on the cycle duration and the historical smoothing duration.

[0007] Optionally, the step of obtaining the current smoothing duration based on the difference and the historical smoothing duration includes: The current smoothing duration is obtained using the following formula:

[0008]

[0009] in, The current smoothing duration, The historical smoothing duration, For smoothing coefficients, The current reference duration, The duration of the cycle.

[0010] Optionally, the step of obtaining the jump threshold duration based on the historical smoothing duration includes: The transition threshold duration is obtained using the following formula:

[0011] in, The historical smoothing duration, The duration of the transition threshold.

[0012] Optionally, the step of determining whether the difference between the current reference duration and the historical smoothing duration exceeds the jump threshold duration includes: Determine whether the current baseline duration and the historical smoothing duration are within a preset duration range; If so, determine whether the difference exceeds the minimum transition threshold duration.

[0013] Optionally, the step of obtaining the current reference duration based on the current remaining capacity and the current filter current includes: Divide the current remaining capacity by the current filter current to obtain the current original duration, and round up the current original duration to obtain the current reference duration.

[0014] Optionally, the step of rounding up the current initial duration to obtain the current reference duration includes: The current baseline duration is calculated using the following formula:

[0015] in, The current reference duration, The current filter current, This refers to the current remaining capacity.

[0016] The present invention also discloses a system for calculating the remaining charging time, comprising: The acquisition module is used to acquire the current remaining capacity and current filter current of the current cycle, and to acquire the current reference duration based on the current remaining capacity and current filter current; The duration module is used to obtain the historical smoothing duration of the previous period and to obtain the jump threshold duration based on the historical smoothing duration. The judgment module is used to determine whether the difference between the current baseline duration and the historical smooth duration exceeds the jump threshold duration; The display module is used to display the current smoothing duration as the current reference duration of the current cycle when the difference exceeds the jump threshold duration.

[0017] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0018] The present invention also discloses an energy storage device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0019] The beneficial effects of the method, system, storage medium, and energy storage device for calculating remaining time provided in the embodiments of the present invention are as follows: An adaptive threshold jumping mechanism, positively correlated with the historical smoothing duration, is applied to the smooth display of remaining battery time. On one hand, when the remaining time value is large, a larger threshold is automatically matched to filter out small data deviations caused by current fluctuations, effectively preventing frequent display oscillations. On the other hand, when the remaining time value is small, a smaller threshold is applied to improve data response sensitivity and ensure timely and accurate display under short-term operating conditions. It adapts to users' tolerance for errors in different time intervals, while the algorithm logic is simple, parameter configuration is easy, and hardware portability is strong, requiring no complex calibration calculations. Compared to traditional filtering methods, it balances display smoothness and data real-time performance, maintaining a smooth transition during normal fluctuations and quickly updating values ​​during sudden changes in operating conditions, ultimately achieving long-term stability and short-term sensitivity, significantly improving the accuracy of remaining battery time display and user experience. Attached Figure Description

[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart illustrating an embodiment of the battery remaining time calculation method provided by the present invention; Figure 2 This is a schematic diagram illustrating an application scenario of the battery remaining time calculation method provided by the present invention; Figure 3This is a flowchart illustrating another embodiment of the method for calculating remaining time provided by the present invention; Figure 4 This is a schematic diagram of an embodiment of the charging remaining time calculation system provided by the present invention; Figure 5 This is a schematic diagram of another embodiment of the energy storage device provided by the present invention; Figure 6 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention.

[0021] The labels for the attached figures are as follows: 11. Energy storage equipment; 12. Load; 20. Battery Remaining Time Calculation System; 21. Acquisition Module; 22. Duration Module; 23. Judgment Module; 24. Display Module; 30. Energy storage device; 31. Processor; 32. Memory; 40. Computer-readable storage medium; 41. Computer program. Detailed Implementation

[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0023] Please refer to the following: Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the battery remaining time calculation method provided by the present invention. Figure 2 This is a schematic diagram illustrating an application scenario of the battery remaining time calculation method provided by this invention. The energy storage device 11 is equipped with a standardized external power supply interface, which can establish a power supply path with one or more external electrical loads 12 through physical connection, providing continuous and stable DC power supply services to various connected loads 12. The energy storage device 11 has a built-in large-capacity energy storage cell, which can store electrical energy in advance. It supports independent power supply for a single load and parallel synchronous power supply for multiple loads 12, and is compatible with different levels of power consumption conditions such as low-power standby, regular charging, and high-power fast charging. The energy storage device 11 adopts a battery remaining time smoothing control method, smoothing the calculated remaining time before displaying it to avoid numerical jumps and ensure a stable and smooth display effect.

[0024] The method for calculating remaining time provided by this invention includes the following steps: S101: Obtain the current remaining capacity and current filter current for the current cycle, and obtain the current reference duration based on the current remaining capacity and current filter current.

[0025] In a specific implementation scenario, a fixed time sampling interval is pre-configured and stored, and this time interval is set as the sampling period. The battery remaining time detection and calculation process is periodically triggered according to this sampling period. Within each sampling period, the operating status parameters of the energy storage cells are collected in real time to accurately obtain the current remaining battery capacity corresponding to the current period. At the same time, the real-time current of the device's external power supply is collected, and the real-time current is processed by a built-in filtering algorithm to reduce noise and filter (including hardware filtering and software filtering) to obtain a stable and reliable current filtered current.

[0026] Based on the real-time acquisition of the current remaining capacity and the current filtered current after filtering calibration, combined with the battery remaining time benchmark calculation logic, the cell energy storage characteristics and DC power supply conditions of the energy storage device are matched to perform precise quantitative calculations, and the remaining time for the battery to continuously supply power in the current cycle is solved in real time. This original remaining time, which is not smoothed and can truly reflect the current power supply status, is defined as the current benchmark time.

[0027] In one implementation scenario, directly displaying physical time with decimal points (e.g., "2.37 hours") does not conform to the conventional screen display format (usually "2 hours 22 minutes"). Furthermore, to avoid sudden reductions in displayed time due to physical calculation errors (e.g., jumping from 2 hours to 1 hour 59 minutes), this implementation scenario employs a rounding-up baseline correction mechanism. The current remaining capacity is divided by the current filter current to obtain the uncorrected original duration. To avoid display jumps and duration deviations caused by decimal precision errors, and to unify the calculation baseline and align with actual power supply duration statistics, the calculated original duration is rounded up, and non-integer durations are normalized, ultimately yielding a normalized and uniformly accurate current baseline duration.

[0028] For example, the current base duration is calculated using the following formula:

[0029] in, As the current base duration, This is the current filter current. This represents the current remaining capacity.

[0030] This represents the theoretical total duration of continuous discharge at the current constant current, i.e., the current original duration. It is an integer value in minutes. Adding 59 to the minutes and then dividing by 60 utilizes the truncation property of integer division, automatically rounding up the remainder (minutes less than a whole hour). This achieves rounding up from minutes to hours. The resulting current reference duration is actually greater than or equal to the actual current original duration. This avoids calculating the current smoothed duration based on the current reference duration, preventing premature display of "0 hours remaining" due to calculation errors and the resulting panic of running out of battery. Furthermore, when the actual remaining time fluctuates between 59 and 60 minutes, the displayed value will stabilize at "1 hour" instead of frequently jumping between "59 minutes" and "1 hour".

[0031] S102: Obtain the historical smoothing duration of the previous period, and obtain the jump threshold duration based on the historical smoothing duration.

[0032] In a specific implementation scenario, the historical smoothing duration, which was the final output of the previous cycle and stored, is retrieved. This historical smoothing duration represents the remaining battery time displayed after the previous round of transition detection and adaptive smoothing calculation. Then, using this historical smoothing duration as input, a preset threshold calculation rule is invoked. Based on the correspondence between the historical smoothing duration and the transition threshold duration, the transition threshold duration used to detect numerical transitions in the current cycle is calculated in real time. This threshold is not a fixed constant but dynamically changes with the historical smoothing duration to match the user's visual tolerance range for numerical fluctuations under different remaining durations.

[0033] Specifically, the jump threshold duration is positively correlated with the historical smoothing duration; that is, the jump threshold duration increases as the historical smoothing duration increases and decreases synchronously as the historical smoothing duration decreases. When the remaining battery power supply time is long, users have a higher tolerance for small deviations in the value, so a larger judgment threshold is set; when the remaining power supply time is short, the value change is easily noticed by users, so a smaller judgment threshold is matched to achieve dynamic adaptive adjustment of the threshold.

[0034] In one implementation scenario, the relationship between historical smoothing duration and transition threshold duration can be obtained based on empirical statistical data fitting or other methods. For example, the empirical statistical data is shown in Table 1:

[0035] Table 1 Based on Table 1, it can be analyzed that when the historical smoothing duration is large, the absolute time difference that users can tolerate is also greater; when the historical smoothing duration is small, users are more sensitive to time differences. For example, when the historical smoothing duration is 1 hour, even if the difference is only 1 hour, users need to jump (because the total value is small, the proportion is large); when the historical smoothing duration is 226 hours, the maximum allowed time difference is 40 hours (because the total value is large, the relative proportion is small).

[0036] The formula for calculating the jump threshold duration is obtained by fitting the above data:

[0037] in, To smooth out the duration of history, The duration of the transition threshold.

[0038] In this implementation scenario, instead of simply setting a fixed threshold duration, the threshold duration is dynamically adjusted based on the current historical smoothing duration. A longer historical smoothing duration allows for a larger absolute error, but the relative proportion is adaptive. This avoids excessive delays in small value ranges and frequent jumps in large value ranges with a fixed threshold. It can be efficiently implemented in embedded systems using a first-order or second-order polynomial, without the need for table lookups or complex searches.

[0039] In other implementation scenarios, based on the global dynamic threshold duration mechanism, a dedicated hard threshold transition logic for the short to medium duration range of 5 to 9 hours is added as a local reinforcement and fallback mechanism for the global algorithm. This is used to specifically optimize the remaining time display effect in the highly sensitive duration range and solve the problems of insufficient adaptation accuracy and lag in response of the global fitting algorithm in this range.

[0040] The system determines whether the current baseline duration and the historical smoothed duration are within a preset duration range (5-9 hours). If either value exceeds this range, this rule does not apply, and the global dynamic jump threshold duration is used instead. If both the current baseline duration and the historical smoothed duration are within the preset duration range, and the difference is greater than the minimum jump threshold duration (2 hours), it is determined that there has been a substantial and perceptible change in the remaining battery life. A jump operation is then performed directly, and the current smoothed duration is assigned to the current baseline duration, achieving real-time updates to the displayed value. If the difference ΔT is less than or equal to 2 hours, it is determined to be a normal small data fluctuation, and the adaptive smoothing algorithm continues to be used to make the current smoothed duration gradually approach the baseline duration, ensuring display stability.

[0041] For example, if the current baseline duration is 7.2 hours and the historical smoothed duration is 5.0 hours, both values ​​fall within the 5-9 hour range, and the difference between them is 2.2 hours, which is greater than the 2-hour threshold, an immediate transition is executed, updating the displayed current smoothed duration to 7.2 hours. If the current baseline duration is 7.2 hours and the historical smoothed duration is 6.0 hours, the range condition is met, but the difference between them is 1.2 hours, which does not exceed the threshold, so no transition is triggered, and the smoothing approximation logic is maintained.

[0042] The formula for calculating the jump threshold duration has an inherent adaptation flaw in the short sensitive range. Substituting a 2-hour difference into the formula reveals that the jump threshold duration is approximately 5.17 hours, which is too high. This means that within the user's high-sensitivity range of 5-9 hours, even if the duration deviation reaches 2 hours, which is sufficient for the user to clearly perceive, the formula may still determine that no jump is needed, continuing to perform a smooth approximation, resulting in a severe lag in the displayed values ​​and causing display issues such as "stuttering" and "inaccuracy."

[0043] The 5-9 hour range is one of the ranges where users are most sensitive to the accuracy of remaining time and response sensitivity. Compared to a very large time range, users have a very low tolerance for numerical deviations in this range, and even a slight display lag can significantly reduce the user experience.

[0044] For critical situations where the difference within a preset time range just exceeds 2 hours, it can forcibly trigger a reasonable jump without being restricted by the calculation formula of the jump threshold time, accurately correct the judgment deviation, and make up for the defects of insufficient adaptability and delayed response in local intervals.

[0045] S103: Determine whether the difference between the current baseline duration and the historical smoothing duration exceeds the jump threshold duration; if so, proceed to step S104.

[0046] In a specific implementation scenario, the current baseline duration is subtracted from the historical smoothed duration of the previous cycle, and the difference between the two is calculated to characterize the degree of deviation between the two sets of duration data. This difference is then compared with the jump threshold duration dynamically calculated based on the historical smoothed duration. The comparison result distinguishes whether the remaining battery duration is experiencing small, normal fluctuations or substantial changes due to load switching, current surges, or other reasons.

[0047] Specifically, when the difference exceeds the transition threshold duration, it indicates a significant deviation between the current reference duration and the historical smooth duration of the previous cycle. This change is not an invalid fluctuation caused by sampling interference or minor current jitter, but rather a change in effective duration due to actual changes in operating conditions such as sudden load changes or power consumption switching. In this case, smoothing transition processing is no longer performed. The current reference duration calculated in real time is directly assigned as the current smooth duration for this cycle, and this current smooth duration is used as the final remaining battery power supply duration for external display, ensuring the timeliness and accuracy of data updates.

[0048] When the absolute value mentioned above is less than or equal to the dynamic jump threshold duration, the deviation between the two durations is determined to be within a reasonable fluctuation range. This is considered normal data jitter caused by sampling errors and minor current fluctuations, and does not represent a substantial change in battery power supply conditions. To avoid frequent fluctuations in displayed values ​​and improve the visual experience, the system does not directly use the current reference duration. Instead, it calls a preset adaptive smoothing approximation algorithm, combining the time interval parameter of the current sampling period with the historical smoothing duration retained from the previous period for iterative calculation, gradually converging to solve for the current smoothing duration corresponding to the current period. Finally, the calculated current smoothing duration is used as the final display data for output, achieving a smooth and gentle approximation of the duration value to the true reference value.

[0049] S104: Use the current base duration as the current smoothing duration of the current cycle and display the current smoothing duration.

[0050] In a specific implementation scenario, if the difference exceeds the transition threshold for a certain duration, the current baseline duration is directly determined as the current smoothing duration effective for this cycle, and no further smoothing iteration calculations are performed. Subsequently, this current smoothing duration is transmitted to the device display module, driving the display interface to refresh and display the latest remaining battery power duration, thereby ensuring that the displayed data can be updated synchronously and in real time when the operating conditions change significantly.

[0051] As described above, this embodiment employs an adaptive threshold jumping mechanism that is positively correlated with the historical smoothing duration to smoothly display the remaining battery time. On one hand, when the remaining time value is large, a larger threshold is automatically matched to filter out small data deviations caused by current fluctuations, effectively preventing frequent display oscillations. On the other hand, when the remaining time value is small, a smaller threshold is applied to improve data response sensitivity and ensure timely and accurate display under short-term operating conditions. This adapts to the user's tolerance for errors in different time intervals, while also featuring simple algorithm logic, easy parameter configuration, and strong hardware portability, requiring no complex calibration calculations. Compared to traditional filtering methods, it balances display smoothness and data real-time performance, maintaining a stable numerical transition during normal fluctuations and quickly updating values ​​during sudden changes in operating conditions, ultimately achieving long-term stability and short-term sensitivity, significantly improving the accuracy of the remaining battery time display and the user experience.

[0052] Please refer to the following: Figure 3 , Figure 3 This is a flowchart illustrating another embodiment of the method for calculating remaining time provided by the present invention. The method for calculating remaining time provided by the present invention specifically includes the following steps: S201: Obtain the current remaining capacity and current filter current for the current cycle, and obtain the current reference duration based on the current remaining capacity and current filter current.

[0053] S202: Obtain the historical smoothing duration of the previous period, and obtain the jump threshold duration based on the historical smoothing duration.

[0054] S203: Determine whether the difference between the current baseline duration and the historical smoothing duration exceeds the jump threshold duration; if not, proceed to step S204.

[0055] In a specific implementation scenario, steps S201-S203 are basically the same as steps S101-S103 in one embodiment of the method for calculating the remaining time provided by the present invention, and will not be described again here.

[0056] S204: Obtain the current smoothing duration based on the cycle duration and historical smoothing duration.

[0057] In a specific implementation scenario, the current cycle duration is retrieved, and the historical smoothed duration of the previous cycle is read. Iterative calculations are then performed using a pre-defined adaptive smoothing approximation algorithm. For example, a time coefficient is dynamically generated based on the ratio of the historical smoothed duration to the current baseline duration. This coefficient is then gradually adjusted based on the sampling cycle interval to finally calculate the current smoothed duration for the current cycle. This calculation method allows the displayed value to gradually approach the true baseline duration in a smooth and gentle manner, completely avoiding display jumps caused by small fluctuations and ensuring a continuous and stable visual effect.

[0058] In one implementation scenario, the current smoothing duration is obtained according to the following formula:

[0059]

[0060] in, For the current smoothing duration, To smooth out the duration of history, For smoothing coefficients, As the current base duration, The duration of the cycle.

[0061] When there is a deviation between the historical smoothing duration and the current reference duration, the displayed value (current smoothing duration) gradually approaches the current reference duration according to a dynamic adjustment rate. Since the smoothing coefficient is generated in real time by the ratio of the historical smoothing duration to the reference duration, the larger the deviation, the larger the correction amplitude of a single iteration, making the numerical transition rhythm natural and smooth, without any abrupt jumps. At the same time, combined with a fixed sampling period as the calculation step size, it ensures that the timing of each round of data updates is uniform, continuously suppressing display jitter caused by small fluctuations in current and capacity, and maintaining the stability and continuity of the remaining duration display under normal operating conditions without triggering jumps.

[0062] As described above, in this embodiment, if the current reference duration undergoes a significant change due to load switching, charging / discharging status changes, or other factors, a jump update is immediately triggered. This ensures that the displayed current smoothed duration quickly follows the actual operating conditions, achieving stable operation under normal circumstances and accurate response to sudden changes in operating conditions. A progressive approximation smoothing algorithm is used, allowing the displayed value to change continuously and slowly, effectively avoiding frequent micro-jumps caused by small deviations. The smoothing algorithm has a simple computational logic, significantly reducing the computational load and power consumption of the embedded main control chip compared to complex algorithms such as Kalman filtering. Furthermore, the filter coefficient can be flexibly adjusted, allowing for changes in smoothing intensity and data tracking speed as needed, ultimately providing users with a high-quality user experience characterized by stable operation under normal conditions and accurate response in critical moments.

[0063] Please see Figure 4 , Figure 4 This is a schematic diagram of an embodiment of the charging remaining time calculation system provided by the present invention. The charging remaining time calculation system 20 includes an acquisition module 21, a duration module 22, a judgment module 23, and a display module 24.

[0064] The acquisition module 21 is used to acquire the current remaining capacity and current filter current of the current cycle, and acquire the current reference duration based on the current remaining capacity and current filter current; the duration module 22 is used to acquire the historical smoothing duration of the previous cycle, and acquire the jump threshold duration based on the historical smoothing duration; the judgment module 23 is used to judge whether the difference between the current reference duration and the historical smoothing duration exceeds the jump threshold duration; the display module 24 is used to use the current reference duration as the current smoothing duration of the current cycle and display the current smoothing duration when the difference exceeds the jump threshold duration.

[0065] The display module 24 is used to obtain the current smoothing duration based on the period duration and the historical smoothing duration when the difference does not exceed the jump threshold duration.

[0066] Display module 24 is used to obtain the current smoothing duration according to the following formula:

[0067]

[0068] in, For the current smoothing duration, To smooth out the duration of history, For smoothing coefficients, As the current base duration, The duration of the cycle.

[0069] The duration module 22 is used to obtain the transition threshold duration according to the following formula:

[0070] in, To smooth out the duration of history, The duration of the transition threshold.

[0071] The judgment module 23 is used to determine whether the current baseline duration and the historical smoothing duration are within the preset duration range; if so, it determines whether the difference exceeds the minimum jump threshold duration.

[0072] The acquisition module 21 is used to divide the current remaining capacity by the current filter current to obtain the current original duration, and then round up the current original duration to obtain the current reference duration.

[0073] The acquisition module 21 is used to calculate the current baseline duration according to the following formula:

[0074] in, As the current base duration, This is the current filter current. This represents the current remaining capacity.

[0075] As described above, in this embodiment, when the difference exceeds the jump threshold duration, the jump mode is entered, and the displayed current smoothing duration is immediately synchronized with the latest calculation result. This effectively avoids the problem of inflated or inflated durations caused by algorithm lag, ensuring data accuracy in critical scenarios such as when the battery is nearing depletion. When the difference does not exceed the jump threshold duration, the smoothing mode is run, allowing the displayed current smoothing duration to gradually approach the true duration, completely suppressing digital jitter and flicker caused by small current fluctuations, creating a stable and comfortable visual experience. This approach overcomes the limitations of fixed-coefficient filtering, single thresholds, or complex high-order filtering algorithms, achieving a comprehensive improvement in display accuracy, visual experience, and response speed. Furthermore, it features simple operational logic, requires no extensive calibration work, consumes low embedded main control hardware resources, and has strong hardware portability. Ultimately, it achieves a stable and non-jumping display of remaining battery time over long periods and a sensitive and non-laggy display over short periods. It is a high-quality technical solution that balances user experience, data accuracy, operational safety, and engineering implementation costs.

[0076] Please see Figure 5 , Figure 5 This is a schematic diagram of another embodiment of the energy storage device provided by the present invention. The energy storage device 30 includes a processor 31 and a memory 32. The processor 31 is coupled to the memory 32. The memory 32 stores a computer program, which the processor 31 executes during operation to implement the method described above. Detailed steps can be found above and will not be repeated here.

[0077] Please see Figure 6 , Figure 6 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. The computer-readable storage medium 40 stores at least one computer program 41, which is executed by a processor to implement the method described above. Detailed steps can be found above and will not be repeated here. In one embodiment, the computer-readable storage medium can be a storage chip in a terminal, a hard disk, a portable hard disk, a USB flash drive, an optical disc, or other readable and writable storage tools, or even a server, etc.

[0078] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0079] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0080] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some of the technical features; and all such modifications and substitutions should fall within the protection scope of the appended claims of the present invention.

Claims

1. A method for calculating remaining time, characterized in that, include: Obtain the current remaining capacity and current filter current for the current cycle, and obtain the current reference duration based on the current remaining capacity and current filter current; Obtain the historical smoothing duration of the previous period, and obtain the jump threshold duration based on the historical smoothing duration. The jump threshold duration is positively correlated with the historical smoothing duration. Determine whether the difference between the current baseline duration and the historical smooth duration exceeds the jump threshold duration; If so, the current reference duration is used as the current smoothing duration of the current cycle, and the current smoothing duration is displayed.

2. The method for calculating remaining time according to claim 1, characterized in that, The step of determining whether the difference between the current baseline duration and the historical smoothing duration exceeds the jump threshold duration includes: If not, the current smoothing duration is obtained based on the cycle duration and the historical smoothing duration.

3. The method for calculating remaining time according to claim 2, characterized in that, The step of obtaining the current smoothing duration based on the difference and the historical smoothing duration includes: The current smoothing duration is obtained using the following formula: in, The current smoothing duration, The historical smoothing duration, For smoothing coefficients, The current reference duration, The duration of the cycle.

4. The method for calculating remaining time according to claim 1, characterized in that, The step of obtaining the jump threshold duration based on the historical smoothing duration includes: The transition threshold duration is obtained using the following formula: in, The historical smoothing duration, The duration of the transition threshold.

5. The method for calculating remaining time according to claim 1, characterized in that, The step of determining whether the difference between the current baseline duration and the historical smoothing duration exceeds the jump threshold duration includes: Determine whether the current baseline duration and the historical smoothing duration are within a preset duration range; If so, determine whether the difference exceeds the minimum transition threshold duration.

6. The method for calculating remaining time according to claim 1, characterized in that, The step of obtaining the current reference duration based on the current remaining capacity and the current filter current includes: Divide the current remaining capacity by the current filter current to obtain the current original duration, and round up the current original duration to obtain the current reference duration.

7. The method for calculating remaining time according to claim 6, characterized in that, The step of rounding up the current initial duration to obtain the current reference duration includes: The current baseline duration is calculated using the following formula: in, The current reference duration, The current filter current, This refers to the current remaining capacity.

8. A system for calculating remaining charging time, characterized in that, include: The acquisition module is used to acquire the current remaining capacity and current filter current of the current cycle, and to acquire the current reference duration based on the current remaining capacity and current filter current; The duration module is used to obtain the historical smoothing duration of the previous period and to obtain the jump threshold duration based on the historical smoothing duration. The judgment module is used to determine whether the difference between the current baseline duration and the historical smooth duration exceeds the jump threshold duration; The display module is used to display the current smoothing duration as the current reference duration of the current cycle when the difference exceeds the jump threshold duration.

9. A computer-readable storage medium, characterized in that, The device stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 7.

10. An energy storage device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 7.