Method for detecting battery, electronic equipment and computer program product

By continuously collecting the battery voltage sequence after powering on a low-power device, determining the reference voltage, and dynamically adjusting the sampling interval with environmental data, the problem of low-power device poor adaptability in the initial calibration deviation and dynamic environment is solved, and high-precision and low-power battery detection is achieved, extending the device battery life.

CN120490854APending Publication Date: 2025-08-15SHENZHEN MINEW TECH CO LTD

Patent Information

Application Number
CN202510583331.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Low-power wireless devices have inflated power or sharp drops during initial calibration, and have large detection errors, high power consumption, and poor adaptability in dynamic environments.

Method used

By continuously collecting the battery voltage sequence after powering on the device, determining the reference voltage, dynamically adjusting the sampling interval based on environmental data, adaptively adjusting the sampling frequency to balance accuracy and power consumption, and dynamically calibrating the battery power.

Benefits of technology

It improves battery detection accuracy, reduces equipment power consumption, extends equipment battery life, and adapts to complex and changeable dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120490854A_ABST
    Figure CN120490854A_ABST
Patent Text Reader

Abstract

The invention provides a method for detecting a battery, electronic equipment and a computer program product. Relates to the technical field of battery detection. In view of the problems of initial calibration deviation and poor dynamic environment adaptability in the battery detection process, the battery detection method provided by the invention comprises the following steps: after electronic equipment is powered on, obtaining a first voltage sequence of battery voltage; determining the reference voltage of the battery based on the first voltage characteristic parameter of the first voltage sequence; based on the reference voltage, collecting battery voltage and environment data according to a preset first sampling interval; and updating the first sampling interval to a new sampling interval based on the magnitude relationship between the fluctuation parameter of the environmental data and a preset fluctuation threshold, and collecting the battery voltage based on the new sampling interval. Through the embodiment of the invention, the detection precision can be improved, the power consumption of the equipment is saved under the condition of ensuring the detection precision, and the endurance of the equipment is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of battery detection, and in particular to a method for detecting a battery, an electronic device, and a computer program product. Background Art

[0002] With the development of IoT technology, the application scenarios of low-power wireless devices are becoming increasingly extensive. Low-power wireless devices are usually battery-powered and extremely sensitive to battery energy consumption. Therefore, monitoring the battery level has become a core requirement to ensure stable operation and extend the service life of the device.

[0003] However, due to individual differences in batteries and the influence of their initial state, the initial calibration parameters of the battery power are prone to falsely high or sudden drops in power, which do not match the actual battery power, resulting in deviations in the initial calibration. In addition, low-power devices often work in complex and changeable working environments. The traditional method of relying on static models for power detection has large detection errors that fluctuate greatly with the environment, high power consumption, and poor adaptability to dynamic environments. Summary of the Invention

[0004] According to various embodiments of the present application, a method for detecting a battery, an electronic device, and a computer program product are provided; these methods can improve detection accuracy, save device power consumption, and extend device battery life while ensuring detection accuracy.

[0005] In a first aspect, the present application provides a method for detecting a battery, which is applied to an electronic device, the method comprising: obtaining a first voltage sequence of the battery voltage after the electronic device is powered on; determining a reference voltage of the battery based on a first voltage characteristic parameter of the first voltage sequence; based on the reference voltage, collecting the battery voltage and environmental data at a preset first sampling interval; updating the first sampling interval to a new sampling interval based on a relationship between a fluctuation parameter of the environmental data and a preset fluctuation threshold, and collecting the battery voltage based on the new sampling interval.

[0006] Through the above method, after the electronic device is powered on, the battery voltage is continuously collected multiple times to obtain a first voltage sequence. Based on the voltage characteristic parameters of the first voltage sequence, the value of the reference voltage is determined, which can effectively eliminate the initial deviation of the battery voltage, be compatible with different battery types, and improve the accuracy of battery detection; and in the subsequent process of collecting voltage for battery detection, the sampling interval is dynamically updated based on environmental data, and by increasing or decreasing the sampling frequency, the sampling accuracy and sampling power consumption requirements of the electronic device are balanced to adapt to different application environments; and while ensuring the sampling accuracy, the sampling power consumption can be appropriately reduced by reducing the sampling frequency to extend the battery life of the device; it has strong ease of use and practicality.

[0007] In a possible implementation of the first aspect, the first voltage characteristic parameter includes a first voltage standard deviation and a first voltage range difference; and determining the reference voltage of the battery based on the first voltage characteristic parameter of the first voltage sequence includes:

[0008] Calculating a first voltage standard deviation and the first voltage range difference of the first voltage sequence; and taking an arithmetic mean of the first voltage sequence as a reference voltage when the first voltage standard deviation is within a first standard deviation threshold and the first voltage range difference is within a first range difference threshold.

[0009] In a possible implementation of the first aspect, after calculating the first voltage standard deviation and the first voltage range difference of the first voltage sequence, the method further includes:

[0010] When the first voltage standard deviation is greater than the first standard deviation threshold or the first voltage range is greater than the first range threshold, determine whether the battery voltage of the first voltage sequence is greater than the preset nominal voltage; when the battery voltage of the first voltage sequence is greater than the nominal voltage, use the arithmetic mean as the reference voltage; when there is a battery voltage less than or equal to the nominal voltage in the first voltage sequence, calculate the voltage change slope of the first voltage sequence; when the voltage change slope is less than the slope threshold, use the minimum voltage in the first voltage sequence as the reference voltage; when the voltage change slope is greater than or equal to the slope threshold, use the median in the first voltage sequence as the reference voltage.

[0011] In a possible implementation of the first aspect, updating the first sampling interval to a new sampling interval based on a magnitude relationship between a fluctuation parameter of the environmental data and a preset fluctuation threshold includes:

[0012] When the fluctuation parameter of the environmental data is less than or equal to the fluctuation threshold, the first sampling interval is adjusted to the second sampling interval; when the fluctuation parameter of the environmental data is greater than the fluctuation threshold, the first sampling interval is adjusted to the third sampling interval; wherein the second sampling interval and the third sampling interval are new sampling intervals; the second sampling interval is greater than the first sampling interval; and the third sampling interval is less than the first sampling interval.

[0013] In a possible implementation of the first aspect, the fluctuation threshold includes a first fluctuation threshold and a second fluctuation threshold; and updating the first sampling interval to a new sampling interval based on a magnitude relationship between a fluctuation parameter of the environmental data and the preset fluctuation threshold includes:

[0014] When the fluctuation parameter of the environmental data is greater than the first fluctuation threshold, the first fluctuation threshold is adjusted to the second fluctuation threshold; when the fluctuation parameter is less than or equal to the second fluctuation threshold, the first sampling interval is adjusted to the second sampling interval; when the fluctuation parameter is greater than the second fluctuation threshold, the first sampling interval is adjusted to the third sampling interval; wherein, the environmental data includes temperature data, the fluctuation parameter includes the temperature standard deviation and the temperature range, and the second fluctuation threshold is greater than the first fluctuation threshold; the second sampling interval and the third sampling interval are the new sampling intervals, the second sampling interval is greater than the first sampling interval, and the third sampling interval is less than the first sampling interval.

[0015] In a possible implementation of the first aspect, after collecting the second voltage sequence of the battery voltage based on the first sampling interval or the new sampling interval, the method further includes:

[0016] Calculate a second voltage characteristic parameter of the second voltage sequence, where the second voltage characteristic parameter includes a second voltage standard deviation and a second voltage range difference; if the second voltage standard deviation is greater than a second standard deviation threshold and the second voltage range difference is greater than a second range difference threshold, and if a battery voltage less than a nominal voltage exists in the second voltage sequence, determine that an abnormality occurs once; if the number of abnormal conditions reaches a preset number threshold, determine that the battery of the electronic device is abnormal.

[0017] In a possible implementation manner of the first aspect, the method further includes: issuing a low voltage alarm when there are a preset number of battery voltages that are less than a preset low voltage threshold in the second voltage sequence.

[0018] In a possible implementation of the first aspect, after determining the reference voltage of the battery based on the first voltage characteristic parameter of the first voltage sequence, the method further includes:

[0019] Calculates the remaining battery capacity percentage based on the reference voltage and the battery's discharge curve.

[0020] In a second aspect, the present application provides a device for detecting a battery, the device comprising:

[0021] an acquisition unit, configured to acquire a first voltage sequence of a battery voltage after the electronic device is powered on;

[0022] a processing unit, configured to determine a reference voltage of the battery based on a first voltage characteristic parameter of the first voltage sequence;

[0023] The collecting unit is further configured to collect the battery voltage and environmental data based on the reference voltage at a preset first sampling interval;

[0024] a control unit, configured to update the first sampling interval to a new sampling interval based on a magnitude relationship between a fluctuation parameter of the environmental data and a preset fluctuation threshold;

[0025] The adopting unit is further configured to collect the battery voltage based on the new sampling interval.

[0026] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any one of the methods described in the first aspect when executing the computer program.

[0027] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

[0028] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute any of the methods described in the first aspect.

[0029] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0031] Figure 1 A schematic diagram of the implementation flow of the battery detection method provided in an embodiment of the present application;

[0032] Figure 2 A schematic diagram of an implementation flow for determining a reference voltage according to an embodiment of the present application;

[0033] Figure 3 A schematic diagram of the implementation process of adjusting the sampling interval provided in an embodiment of the present application;

[0034] Figure 4 A schematic diagram of a process for determining battery abnormality according to an embodiment of the present application;

[0035] Figure 5 A schematic diagram of the relationship between the battery discharge curve and voltage provided in an embodiment of the present application;

[0036] Figure 6A schematic diagram of the structure of a battery detection device provided in an embodiment of the present application;

[0037] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following embodiments of the technical solution of the present application will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application and are therefore only examples and are not intended to limit the scope of protection of the present application.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.

[0040] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.

[0041] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0042] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.

[0043] In response to the problems of initial calibration deviation, poor adaptability to dynamic environments, and long-term drift in the battery power monitoring process of low-power wireless devices, the embodiments of the present application propose a full-cycle power monitoring mechanism with dynamic calibration, adaptive sampling, and abnormal recovery, compared with the traditional static assumption and passive response mode, to realize the detection of the battery of low-power radio devices.

[0044] The specific implementation process of the battery detection method is described below through an embodiment.

[0045] See Figure 1 , Figure 1 This is a schematic diagram of the implementation process of the battery detection method provided in the embodiment of the present application. The execution subject of the method can be an electronic device, which can be a battery management system or a low-power wireless device integrated with a battery management system. Figure 1 As shown, the method may include the following steps:

[0046] S101 , after the electronic device is powered on, obtaining a first voltage sequence of a battery voltage.

[0047] In an embodiment of the present application, after the electronic device is powered on and the battery begins discharging, the processor of the electronic device continuously samples the battery voltage multiple times and caches it, generating a first voltage sequence. This first voltage sequence is used to analyze voltage stability and estimate trends, thereby initializing dynamic calibration and establishing a personalized reference voltage value to avoid systematic errors caused by differences in the initial battery state.

[0048] For example, Figure 2 As shown in the flowchart of the implementation process of determining the reference voltage, in S21, after the device is powered on, the battery voltage is continuously collected N times (such as N is 10), each time with an interval time △t (such as 10ms), to obtain a first voltage sequence, and the first voltage sequence is cached.

[0049] S102: Determine a reference voltage of the battery based on a first voltage characteristic parameter of a first voltage sequence.

[0050] In an embodiment of the present application, the first voltage characteristic parameter is a parameter determined based on the voltage stability and voltage change trend of the first voltage sequence. For example, the first voltage characteristic parameter may include a first voltage standard deviation and a first voltage range for indicating voltage stability, and a voltage slope for indicating voltage change trend.

[0051] Exemplarily, the stability of the first voltage sequence is determined based on the first voltage standard deviation and the first voltage range. If it is stable, the mean of the first voltage sequence is used as the reference voltage value; if it is unstable, the voltage change trend of the first voltage sequence is further analyzed. For the first voltage sequence with a continuously decreasing voltage change trend, the lowest battery voltage in the first voltage sequence is used as the reference voltage; if the voltage change trend is irregular fluctuation, the median in the first voltage sequence is used as the reference voltage, or the reference voltage is determined by querying a preset voltage value in an experience table, where the experience table is a voltage set based on the voltage change trend of the voltage sequence after power-on.

[0052] By analyzing the first voltage characteristic parameter of the first voltage sequence after power-on and determining the reference voltage, the initial deviation can be effectively eliminated and it can be applied to different battery types; and by sampling and analyzing the battery voltage after power-on, transient interference can be suppressed, providing a high-precision starting point for subsequent dynamic detection of the battery.

[0053] The following describes a process for determining a reference voltage based on the first voltage characteristic parameter of the first voltage sequence to eliminate the initial deviation.

[0054] In some embodiments, the reference voltage is determined by analyzing the stability of the first voltage sequence. The first voltage characteristic parameter includes a first voltage standard deviation and a first voltage range difference; Figure 2 As shown, the implementation process may include the following steps:

[0055] S22, calculating a first voltage standard deviation and a first voltage range difference of the first voltage sequence.

[0056] Exemplarily, the first voltage standard deviation of the battery voltages in the first voltage sequence is calculated based on a standard deviation calculation formula, and the first voltage range is calculated based on the maximum battery voltage and the minimum battery voltage in the first voltage sequence.

[0057] S23: If the first voltage standard deviation is less than or equal to the first standard deviation threshold and the first voltage range is less than or equal to the first range threshold, then execute S24; if not, execute S25.

[0058] S24 , when the battery power is sufficient, taking the arithmetic mean of the first voltage sequence as a reference voltage.

[0059] For example, if the first voltage standard deviation is within a first standard deviation threshold and the first voltage range is within a first range threshold, it is determined that the battery charge is sufficient or stable, and the arithmetic mean of the first voltage sequence is used as the reference voltage. For example, the first standard deviation threshold is set to 0.05V, and the first range threshold is set to 0.1V.

[0060] Among them, different types of batteries have different corresponding first standard deviation thresholds and first range thresholds. For example, the range threshold of a ternary lithium battery can be set to 0.08V, and the range threshold of a lithium iron phosphate battery can be set to 0.12V. The setting of the threshold in this application is only an example. The first standard deviation threshold and the first range threshold can be flexibly configured based on the actual application scenario without specific limitation.

[0061] S25: Are the voltages of all batteries in the first voltage sequence higher than the nominal voltage? If so, execute S24; if not, execute S26.

[0062] Exemplarily, when the first voltage standard deviation is greater than the first standard deviation threshold or the first voltage range is greater than the first range threshold, it is determined whether the battery voltage of the first voltage sequence is greater than the preset nominal voltage; when the battery voltage of the first voltage sequence is greater than the nominal voltage, it is determined that the battery charge is sufficient or stable, and the arithmetic mean of the first voltage sequence is used as the reference voltage.

[0063] The nominal voltage is the rated voltage of the battery under standard operating conditions. Different types of batteries have different nominal voltages. For example, the nominal voltage of a ternary lithium battery is 3.7V, and the nominal voltage of a lithium iron phosphate battery is 3.3V.

[0064] Accordingly, when there is a battery voltage lower than the nominal voltage in the first voltage sequence, it is determined that the battery power is insufficient or the battery is aged, and it is necessary to further analyze the voltage change trend in the first voltage sequence.

[0065] S26, calculating the voltage change slope K of the first voltage sequence.

[0066] Exemplarily, when there is a battery voltage less than or equal to the nominal voltage in the first voltage sequence, the voltage change slope of the first voltage sequence is calculated based on a linear regression algorithm, and the trend of the first voltage sequence changing over time is analyzed.

[0067] S27: Is the voltage change slope K less than the slope threshold? If so, execute S28; if not, execute S29.

[0068] S28: Use the minimum battery voltage in the first voltage sequence as a reference voltage.

[0069] For example, when the voltage change slope is less than the slope threshold, the voltage change trend of the first voltage sequence is a continuously decreasing trend, and the minimum voltage value in the first voltage sequence is used as the reference voltage. For example, the slope threshold can be set to 0.01 V / S.

[0070] S29: Use the median of the battery voltages in the first voltage sequence as a reference voltage.

[0071] Exemplarily, when the voltage change slope is greater than or equal to the slope threshold, the median of the first voltage sequence is used as the reference voltage to determine the reference voltage. The battery voltages in the first voltage sequence are sorted in order of magnitude. If the number of battery voltages in the first voltage sequence is odd, the median is the battery voltage in the middle of the sequence. If the number of battery voltages in the first voltage sequence is even, the median is the average of the two battery voltages in the middle of the sequence.

[0072] Alternatively, the reference voltage can be set by combining it with a preset experience table. The experience table is used to dynamically adjust the calculation basis of the reference voltage by mapping the median with historical data, battery characteristics, and environmental parameters when the voltage fluctuates irregularly after the device is powered on. The experience table can set mapping rules corresponding to historical data (historical reference voltage) for different parameters (such as battery type, load mode, battery internal resistance, self-discharge rate, number of cycles, and temperature range, etc.), so that in the scenario of irregular voltage fluctuations, the reference voltage can be determined by mapping the historical data domain with multiple parameters, thereby improving the robustness of the reference voltage calculation, avoiding the offset of the reference value due to transient interference or battery aging, and ensuring the accuracy of subsequent voltage detection and status assessment.

[0073] S210 , calculating the remaining battery power percentage based on the reference voltage and the battery discharge curve.

[0074] For example, after determining the reference voltage, the current discharge time of the battery is determined based on the position of the reference voltage in the discharge curve; and the remaining power percentage of the battery is calculated based on the current discharge time and the total discharge time of the battery. Figure 5 In the battery discharge curve shown, the total discharge time is 500 hours. When the reference voltage is determined to be 2.9V, the corresponding current discharge time is 100 hours. The calculated remaining battery capacity percentage is 80% = (500-100) / 500*100%. After determining the reference voltage, the remaining battery capacity percentage is calculated based on the reference voltage and the battery discharge curve. This allows for precise quantification of the battery's energy state, enabling accurate monitoring of battery performance, ensuring safe device operation, optimizing battery management strategies during use, and extending battery life.

[0075] S103 , based on the reference voltage, collecting battery voltage and environmental data at a preset first sampling interval.

[0076] In an embodiment of the present application, the first sampling interval can be an initial sampling time interval for collecting the battery voltage determined based on the reference voltage after the reference voltage is determined. After determining the reference voltage, the current working stage of the battery can be determined in combination with the discharge curve of the battery, and the voltage of the battery can be sampled using a preset first sampling interval for the current working stage. For example, when the determined reference voltage is 2.9V, the current working stage of the battery is in the middle of discharge (voltage plateau period), that is, the discharge voltage slowly decreases or is almost constant, then the first sampling interval can be set to be relatively large; for example, the first sampling interval can be set to 15 or 30 minutes, which can be specifically set based on the battery type and the actual application scenario.

[0077] For example, the battery voltage and the environment in which it is located are core indicators that reflect the battery's operating status, health, and safety. Different environmental data will affect the battery's performance and voltage indicators to varying degrees. Therefore, during the battery testing process, the battery voltage and environmental data are collected at the same time; among them, the environmental data may include temperature data of the battery's environment.

[0078] S104 : Based on the magnitude relationship between the fluctuation parameter of the environmental data and the preset fluctuation threshold, the first sampling interval is updated to a new sampling interval, and the battery voltage is collected based on the new sampling interval.

[0079] In an embodiment of the present application, the fluctuation parameters of the environmental data are parameters that reflect the stability of the environmental data, such as the standard deviation and range of the environmental data; based on the preset fluctuation threshold, the environmental data is analyzed and evaluated, and the sampling interval for collecting the battery voltage is dynamically adjusted.

[0080] Exemplarily, the second sampling interval is the time interval for collecting battery voltage, adaptively adjusted based on environmental data. If environmental data changes stably, the sampling interval is increased to reduce sampling power consumption and save device power without affecting the accuracy of collected battery voltage. If environmental data fluctuates significantly, the sampling interval is reduced to ensure the accuracy of battery voltage collection and detection of battery abnormalities, that is, the accuracy of capturing voltage anomalies.

[0081] An adaptive adjustment mechanism is implemented through environmental perception to balance the accuracy of battery voltage detection and sampling power consumption. While ensuring accuracy, the power consumption consumed by collecting battery voltage is saved, extending the battery life of the device.

[0082] The following further introduces the specific implementation process of adaptively and dynamically adjusting the sampling interval based on the fluctuation parameters of environmental data.

[0083] In some embodiments, updating the first sampling interval to a new sampling interval based on a magnitude relationship between a fluctuation parameter of the environmental data and a preset fluctuation threshold includes:

[0084] If the fluctuation parameter of the environmental data is less than or equal to the fluctuation threshold, the first sampling interval is adjusted to a second sampling interval; the second sampling interval is greater than the first sampling interval. Alternatively, if the fluctuation parameter of the environmental data is greater than the fluctuation threshold, the first sampling interval is adjusted to a third sampling interval; the second sampling interval is less than the first sampling interval.

[0085] Exemplarily, the second sampling interval and the third sampling interval are new sampling intervals. Based on the collected environmental data, the fluctuation parameters of the environmental data, such as the standard deviation and range of the environmental data, are calculated. When the fluctuation parameter of the environmental data is less than or equal to the fluctuation threshold, it is determined that the environment in which the battery is located is relatively stable and there are no major changes. The first sampling interval can be adjusted to a second sampling interval with a longer time interval. When the fluctuation parameter of the environmental data is greater than the fluctuation threshold, it is determined that the current environment may have undergone more obvious changes, such as a significant increase or decrease in the ambient temperature. To ensure the accuracy of battery detection, the first sampling interval can be adjusted to a third sampling interval with a shorter time interval; as shown in Table 1.

[0086]

[0087] Table 1

[0088] It should be noted that in the process of dynamically adjusting the sampling interval, the maximum and minimum values of the sampling interval can also be set. When the sampling interval needs to be increased, the adjusted sampling interval length does not exceed the maximum sampling interval length (such as 30 minutes in Table 1). When the sampling interval length needs to be reduced, the adjusted sampling interval length is not less than the minimum sampling interval length (such as 1 minute in Table 1). The sampling interval adjustment method shown in Table 1 is only an example of the direction of adjustment. The specific value of the sampling interval can be set for different battery types and actual application scenarios; the setting of the maximum and minimum sampling interval values can also be based on the actual application scenario and battery type, and is not specifically limited here.

[0089] During the battery testing process, the sampling interval is dynamically adjusted to ensure a balance between sampling accuracy and efficiency, as well as a balance between sampling accuracy and energy consumption. By adding constraints on the maximum and minimum sampling intervals, sampling efficiency, sampling accuracy, system reliability, data validity, and hardware security are ensured.

[0090] In some embodiments, in order to adapt to more complex application scenarios, the fluctuation threshold may also be adjusted during the process of dynamically adjusting the sampling interval to cope with different usage environments.

[0091] A plurality of different threshold ranges are set for the fluctuation threshold corresponding to the environmental data, such as a first fluctuation threshold and a second fluctuation threshold.

[0092] In the process of dynamically adjusting the sampling interval, when the fluctuation parameter of the environmental data is greater than the first fluctuation threshold, the first fluctuation threshold is adjusted to a second fluctuation threshold, and the second fluctuation threshold is greater than the first fluctuation threshold.

[0093] Exemplarily, by calculating the environmental data fluctuation parameter, when the fluctuation parameter of the current environmental data exceeds a first fluctuation threshold, the first fluctuation threshold is increased to a second fluctuation threshold, and then the fluctuation parameter is determined based on the second fluctuation threshold.

[0094] Accordingly, for the different working stages of the battery and the degree of influence of environmental data on battery performance (for example, when the battery is in different states of discharge, stillness, and aging, the degree of influence of the environment on battery performance is also different), when the fluctuation parameter of the current environmental data does not exceed the first fluctuation threshold, the battery is in a working stage or state where the degree of environmental influence is obvious, and the first fluctuation threshold can be reduced, that is, the range of the fluctuation threshold is narrowed to improve the accuracy of battery detection.

[0095] If the fluctuation parameter is less than or equal to the second fluctuation threshold, the first sampling interval is adjusted to the second sampling interval; the second sampling interval is greater than the first sampling interval. Alternatively, if the fluctuation parameter is greater than the second fluctuation threshold, the first sampling interval is adjusted to the third sampling interval; the third sampling interval is less than the first sampling interval. The environmental data includes temperature data, and the fluctuation parameter includes the temperature standard deviation and the temperature range.

[0096] Exemplarily, the implementation principle is the same as that of dynamically adjusting the sampling interval by comparing the fluctuation parameter with the first fluctuation threshold. The fluctuation parameter of the environmental data is further compared with the second fluctuation threshold with a larger range to dynamically adjust the sampling interval.

[0097] It should be noted that the above-mentioned fluctuation threshold can be set at multiple levels, that is, it is not limited to the first fluctuation threshold and the second fluctuation threshold in the above example. Combined with the reference voltage determined in the early stage, the working stage of the battery can be determined, and different levels of fluctuation thresholds corresponding to each working stage of the battery can be set, or multiple levels of fluctuation thresholds can be set for a certain working stage; in the process of battery detection, by switching different fluctuation thresholds and balancing sampling accuracy and system efficiency, the impact of temperature changes on the battery can be monitored more accurately, adapting to complex and changeable dynamic environments, and improving battery detection accuracy.

[0098] like Figure 3 The overall implementation process of adjusting the sampling interval is shown in the schematic diagram. The dynamic adjustment process may include the following steps:

[0099] S31 : Collect battery voltage and environmental data based on a first sampling interval.

[0100] S32, calculating the temperature standard deviation and temperature range of the temperature data in the environmental data.

[0101] For example, the collected battery voltage is used to detect battery anomalies, and the collected environmental data is used to dynamically adjust the sampling frequency. The environmental data may include temperature data. For the temperature data detected during the first sampling interval, the temperature standard deviation is calculated using a standard deviation calculation formula. The temperature range is determined by calculating the difference between the maximum and minimum values in the temperature data.

[0102] S33: Check whether the temperature standard deviation and temperature range exceed the first fluctuation threshold. If yes, execute S34; if no, execute S35.

[0103] Exemplarily, the first fluctuation threshold includes a first temperature standard deviation threshold and a first temperature extreme difference threshold, and it is determined whether the temperature standard deviation exceeds the first temperature standard deviation threshold and whether the temperature extreme difference exceeds the first temperature extreme difference threshold.

[0104] S34: Expand the first fluctuation threshold to a second fluctuation threshold.

[0105] For example, when the temperature standard deviation exceeds the first temperature standard deviation threshold and the temperature extreme difference exceeds the first temperature extreme difference threshold, the range of the current first fluctuation threshold may be smaller, and the first fluctuation threshold is adjusted to the second fluctuation threshold; wherein, the second fluctuation threshold may include the second temperature standard deviation threshold and the second temperature extreme difference threshold.

[0106] S35: Maintain the first fluctuation threshold.

[0107] When both the temperature standard deviation and the temperature range do not exceed the first fluctuation threshold, that is, the temperature standard deviation does not exceed the first temperature standard deviation threshold and the temperature range does not exceed the first temperature range threshold, the stability of the temperature data is continued to be evaluated within the range of the first fluctuation threshold.

[0108] S36: Check whether the temperature standard deviation and temperature range are within the fluctuation threshold. If yes, execute S37; if not, execute S38.

[0109] For example, if the temperature standard deviation and temperature range are within the fluctuation threshold, it means that the current ambient temperature changes slightly and has little impact on battery performance; if the temperature standard deviation or temperature range exceeds the fluctuation threshold, it means that the temperature changes significantly and may have a greater impact on battery performance.

[0110] S37: Increase the first sampling interval to a second sampling interval.

[0111] S38, reducing the first sampling interval to a third sampling interval.

[0112] S39, update the sampling interval and start the timer.

[0113] Exemplarily, the timing duration of the timer is set based on the updated sampling interval, and the battery voltage is collected based on the timing duration of the timer.

[0114] The following further describes the process of detecting whether there is an abnormality in the battery based on the battery voltage collected at the sampling interval.

[0115] As low-power wireless devices, electronic devices feature low average current and pulse discharge. When the battery is fully charged and the voltage is high, the internal resistance is low, and pulse discharge can cause significant voltage fluctuations, such as a voltage sag caused by a transient pulse discharge current. When the battery's remaining charge is 25% or higher and the voltage is low, pulse discharge does not significantly fluctuate the battery voltage due to the high remaining charge. However, when the remaining charge is less than 25%, the internal resistance surges, and pulse discharge does not significantly fluctuate the battery voltage. Pulse discharge exhibits different effects on battery voltage fluctuations, and combined with fluctuations in the battery voltage sequence, battery anomalies can be detected.

[0116] like Figure 4 As shown in FIG, a schematic diagram of a process for detecting battery abnormalities according to an embodiment of the present application is provided. The process may include the following steps:

[0117] S41 , collecting battery voltage based on a sampling interval to obtain a second voltage sequence.

[0118] Exemplarily, a second voltage sequence of the battery voltage is collected based on the first sampling interval or the new sampling interval.

[0119] S42, calculating a second voltage characteristic parameter of the second voltage sequence, where the second voltage characteristic parameter includes a second voltage standard deviation and a second voltage range difference.

[0120] S43: Is the second voltage standard deviation greater than the second standard deviation threshold, and is the second voltage range greater than the second range threshold? If yes, execute S44; if no, execute S45.

[0121] S44: All battery voltages in the second voltage sequence are higher than the nominal voltage of the battery. If yes, execute S45; if not, execute S46.

[0122] S45, there is no abnormality in the battery, and the number of abnormalities is reset to zero.

[0123] S46, the number of exceptions is increased by 1.

[0124] Exemplarily, if the second voltage standard deviation is greater than the second standard deviation threshold and the second voltage range is greater than the second range threshold, it indicates that there is a certain fluctuation in the battery voltage; and if there is a battery voltage less than the nominal voltage in the second voltage sequence, an abnormality is determined; if all battery voltages in the second voltage sequence are higher than the nominal voltage, it is determined that the current battery charge is sufficient and the voltage fluctuation can recover on its own, then it is determined that there is no abnormality in the battery, and the number of counted abnormalities is reset to zero.

[0125] S47, whether the number of abnormalities is greater than the number threshold. If yes, execute S48; if not, end.

[0126] S48, battery abnormality.

[0127] For example, to ensure the accuracy of battery abnormality detection, a threshold value corresponding to the number of consecutive abnormalities is set, for example, 3 times; when the number of abnormal situations reaches the preset threshold value, the battery of the electronic device is determined to be abnormal, and the abnormal result is reported wirelessly; thereby reducing the probability of misjudgment and omission of battery abnormalities, and improving the reliability and timeliness of battery abnormality detection.

[0128] It should be noted that the above-mentioned collection of battery voltage and environmental data can be a continuous collection process based on the sampling interval; the determination of the collected environmental data, the adjustment of the frequency of collecting battery voltage, and the judgment of whether the battery is abnormal based on the battery voltage data can be carried out simultaneously with the continuous collection process; for example, when the collected battery voltage reaches a first data amount, the battery is detected to be abnormal based on the battery voltage of the first data amount, and the continuous collection of the battery voltage of the next first data amount is continued; for another example, when the collected environmental data reaches a second data amount, its stability is evaluated based on the environmental data of the second data amount, and its fluctuation parameter is judged to be within the fluctuation threshold, and the subsequent collection frequency of the battery voltage and environmental data is adjusted.

[0129] In addition, the frequency of collecting battery voltage is determined by the sampling interval, and the period of collecting environmental data can be the same as the sampling interval based on collecting battery voltage, or can be set independently; that is, the battery voltage and environmental data are collected based on different sampling intervals.

[0130] In some embodiments, a low voltage alarm is issued when there are a preset number of battery voltages that are less than a preset low voltage threshold in the second voltage sequence.

[0131] For example, the battery has a cut-off voltage during the discharge process, and different types of batteries have different corresponding cut-off voltages; the low voltage threshold of the battery is set based on the cut-off voltage; for lithium batteries, when the operating voltage of the battery is lower than the cut-off voltage, it may cause irreversible attenuation of the battery capacity or lithium deposition risk. Therefore, when performing battery abnormality detection on the second voltage sequence, it is also necessary to determine whether the lowest operating voltage of the battery is lower than the low voltage threshold. The preset number can be set according to the battery type, application scenario, and the total number of battery voltages in the second voltage sequence. The low voltage threshold can be set to be slightly higher than or equal to the cut-off voltage after dynamic adjustment of the battery.

[0132] For example, for the second voltage sequence, a sliding window algorithm can be used to detect whether the battery voltage is continuously below a preset low voltage threshold, or to count whether the number or proportion of battery voltages below the low voltage threshold in the second voltage sequence reaches a set threshold; thereby avoiding interference from single noise. When determining battery low voltage, the corresponding warning stage can be determined based on the extent to which the number of battery voltages below the low voltage threshold in the second voltage sequence reaches this threshold. For example, if the proportion of battery voltages below the low voltage threshold in the second voltage sequence is 10%, a primary warning is triggered, and if the proportion reaches 20%, a severe alarm is triggered.

[0133] By performing low-voltage judgment on the battery voltage in the second voltage sequence and triggering a low-voltage alarm when the alarm conditions are met, it is possible to avoid unexpected shutdown of the device due to excessively low battery voltage, avoid permanent attenuation of the battery capacity due to deep discharge of the battery, ensure battery safety, extend device life, and reduce the frequency of battery replacement by users.

[0134] In the embodiment of the present application, a personalized reference value is determined through full-cycle calibration during power-on, thereby avoiding systematic errors caused by differences in the initial state of the battery and eliminating initial deviations. The sampling period and threshold are adjusted in real time in combination with parameters such as temperature to balance accuracy and power consumption requirements, thereby dynamically adapting to complex working conditions. When a battery abnormality is detected (such as multiple consecutive sampling values deviating from the reference), an alarm function is triggered. The reliability and safety of low-power devices are improved, and real-time battery detection with low power consumption, high precision, and high reliability is achieved.

[0135] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0136] Corresponding to the method for detecting the battery provided in the above embodiment, Figure 6 As shown, the device for detecting a battery provided in an embodiment of the present application only shows the parts related to the embodiment of the present application for the sake of convenience of explanation.

[0137] The battery detection device includes:

[0138] The acquisition unit 61 is configured to acquire a first voltage sequence of a battery voltage after the electronic device is powered on;

[0139] a processing unit 62, configured to determine a reference voltage of the battery based on a first voltage characteristic parameter of the first voltage sequence;

[0140] The collecting unit 61 is further configured to collect the battery voltage and environmental data based on the reference voltage at a preset first sampling interval;

[0141] A control unit 63 is configured to update the first sampling interval to a new sampling interval based on a magnitude relationship between the fluctuation parameter of the environmental data and a preset fluctuation threshold;

[0142] The adopting unit 61 is further configured to collect the battery voltage based on the second sampling interval.

[0143] In one possible implementation, the first voltage characteristic parameter includes a first voltage standard deviation and a first voltage range difference; the processing unit 62 is further used to calculate the first voltage standard deviation and the first voltage range difference of the first voltage sequence; when the first voltage standard deviation is within a first standard deviation threshold and the first voltage range difference is within a first range difference threshold, the arithmetic mean of the first voltage sequence is used as the reference voltage.

[0144] In one possible implementation, the processing unit 62 is further configured to, when the first voltage standard deviation is greater than the first standard deviation threshold or the first voltage range is greater than the first range threshold, determine whether the battery voltage of the first voltage sequence is greater than a preset nominal voltage; when the battery voltage of the first voltage sequence is greater than the nominal voltage, use the arithmetic mean as the reference voltage; when there is a battery voltage less than or equal to the nominal voltage in the first voltage sequence, calculate the voltage change slope of the first voltage sequence; when the voltage change slope is less than a slope threshold, use the minimum voltage in the first voltage sequence as the reference voltage; and when the voltage change slope is greater than or equal to the slope threshold, use the median in the first voltage sequence as the reference voltage.

[0145] In one possible implementation, the control unit 63 is also used to adjust the first sampling interval to the second sampling interval when the fluctuation parameter of the environmental data is less than or equal to the fluctuation threshold; and to adjust the first sampling interval to the third sampling interval when the fluctuation parameter of the environmental data is greater than the fluctuation threshold; wherein the second sampling interval and the third sampling interval are the new sampling intervals; the second sampling interval is greater than the first sampling interval; and the third sampling interval is less than the first sampling interval.

[0146] In one possible implementation, the fluctuation threshold includes a first fluctuation threshold and a second fluctuation threshold; the control unit 63 is further used to adjust the first fluctuation threshold to the second fluctuation threshold when the fluctuation parameter of the environmental data is greater than the first fluctuation threshold; adjust the first sampling interval to the second sampling interval when the fluctuation parameter is less than or equal to the second fluctuation threshold; and adjust the first sampling interval to the third sampling interval when the fluctuation parameter is greater than the second fluctuation threshold; wherein, the environmental data includes temperature data, the fluctuation parameters include temperature standard deviation and temperature range, and the second fluctuation threshold is greater than the first fluctuation threshold; the second sampling interval and the third sampling interval are the new sampling intervals, the second sampling interval is greater than the first sampling interval, and the third sampling interval is less than the first sampling interval.

[0147] In one possible implementation, the processing unit 62 is further configured to calculate a second voltage characteristic parameter of the second voltage sequence, where the second voltage characteristic parameter includes a second voltage standard deviation and a second voltage range difference; when the second voltage standard deviation is greater than a second standard deviation threshold and the second voltage range difference is greater than a second range difference threshold, and there is a battery voltage less than the nominal voltage in the second voltage sequence, an abnormal condition is determined; when the number of abnormal conditions reaches a preset number threshold, it is determined that the battery of the electronic device is abnormal.

[0148] In a possible implementation, the processing unit 62 is further configured to issue a low voltage alarm when a preset number of battery voltages smaller than a preset low voltage threshold exist in the second voltage sequence.

[0149] In a possible implementation, the processing unit 62 is further configured to calculate the remaining power percentage of the battery based on the reference voltage and a discharge curve of the battery.

[0150] Figure 7 A schematic diagram of the hardware structure of the electronic device 70 is shown.

[0151] like Figure 7 As shown, the electronic device 70 of this embodiment includes: at least one processor 701 ( Figure 7 Only one is shown), a memory 702, wherein the memory 702 stores a computer program 703 that can be run on the processor 701. When the processor 701 executes the computer program 703, the steps in the above method embodiment are implemented, for example Figure 1Alternatively, when the processor 701 executes the computer program 703, the functions of the modules / units in the above-mentioned device embodiments are realized. The electronic device may be a low-power wireless device, for example, an electronic tag device, a wearable and medical device, a smart home device (such as a smart door lock), or other device that uses low-power wireless technology.

[0152] It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 70. In other embodiments of the present application, the electronic device 70 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0153] The electronic device 70 may include, but is not limited to, a processor 701 and a memory 702. Those skilled in the art will appreciate that Figure 7 It is only an example of the electronic device 70 and does not constitute a limitation of the electronic device 70. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the server may also include an input sending device, a network access device, a bus, etc.

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

[0155] Processor 701 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 701 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 701. If processor 701 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of processor 701, and thus improves system efficiency.

[0156] In some embodiments, the memory 702 may be an internal storage unit of the electronic device 70, such as a hard disk or memory of the electronic device 70. The memory 702 may also be an external storage device of the electronic device 70, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 70. Furthermore, the memory 702 may include both an internal storage unit of the electronic device 70 and an external storage device. The memory 702 is used to store an operating system, application programs, a boot loader, data, and other programs, such as program code of a computer program. The memory 702 may also be used to temporarily store data that has been sent or is about to be sent.

[0157] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0158] It should be noted that the structure of the above-mentioned electronic device is only illustrative, and based on different application scenarios, it may also include other physical structures, and the physical structure of the electronic device is not limited here.

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

[0160] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the steps in the above-mentioned various method embodiments.

[0161] An embodiment of the present application provides a computer program product. When the computer program product runs on a server, the server can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0162] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. Computer-readable media may include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0163] The electronic device, computer storage medium, and computer program product provided in the above-mentioned embodiments of the present application are all used to execute the methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects corresponding to the methods provided above, and will not be repeated here.

[0164] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, 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.

[0165] It should be understood that the above is only to help those skilled in the art better understand the embodiments of the present application, and is not intended to limit the scope of the embodiments of the present application. Based on the above examples given, those skilled in the art can obviously make various equivalent modifications or changes. For example, certain steps in each embodiment of the above detection method may be unnecessary, or certain new steps may be added. Or a combination of any two or any multiple embodiments described above. Such modifications, changes, or combined solutions also fall within the scope of the embodiments of the present application.

[0166] It should also be understood that the division of the modes, situations, categories and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features of various modes, categories, situations and embodiments can be combined without contradiction.

[0167] It should also be understood that in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.

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

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

[0170] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0171] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

[0172] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for detecting a battery, characterized in that: Applied to electronic equipment, the method includes: After the electronic device is powered on, obtaining a first voltage sequence of a battery voltage; determining a reference voltage of the battery based on a first voltage characteristic parameter of the first voltage sequence; Based on the reference voltage, collecting the battery voltage and environmental data at a preset first sampling interval; Based on a magnitude relationship between a fluctuation parameter of the environmental data and a preset fluctuation threshold, the first sampling interval is updated to a new sampling interval, and the battery voltage is collected based on the new sampling interval.

2. The method according to claim 1, characterized in that The first voltage characteristic parameter includes a first voltage standard deviation and a first voltage range difference; Determining a reference voltage of the battery based on a first voltage characteristic parameter of the first voltage sequence includes: calculating the first voltage standard deviation and the first voltage range difference of the first voltage sequence; When the first voltage standard deviation is within a first standard deviation threshold and the first voltage range difference is within a first range difference threshold, an arithmetic mean of the first voltage sequence is used as the reference voltage.

3. The method according to claim 2, characterized in that After calculating the first voltage standard deviation and the first voltage range difference of the first voltage sequence, the method further includes: When the first voltage standard deviation is greater than the first standard deviation threshold or the first voltage range difference is greater than the first range difference threshold, determining whether the battery voltage of the first voltage sequence is greater than a preset nominal voltage; When the battery voltage of the first voltage sequence is greater than the nominal voltage, taking the arithmetic mean as the reference voltage; When the first voltage sequence includes a battery voltage that is less than or equal to the nominal voltage, calculating a voltage change slope of the first voltage sequence; When the voltage change slope is less than a slope threshold, taking the minimum voltage value in the first voltage sequence as the reference voltage; When the voltage change slope is greater than or equal to the slope threshold, the median of the first voltage sequence is used as the reference voltage.

4. The method according to claim 1, wherein The updating of the first sampling interval to a new sampling interval based on a magnitude relationship between the fluctuation parameter of the environmental data and a preset fluctuation threshold comprises: When the fluctuation parameter of the environmental data is less than or equal to the fluctuation threshold, adjusting the first sampling interval to a second sampling interval; When the fluctuation parameter of the environmental data is greater than the fluctuation threshold, adjusting the first sampling interval to a third sampling interval; The second sampling interval and the third sampling interval are the new sampling intervals; the second sampling interval is greater than the first sampling interval; and the third sampling interval is less than the first sampling interval.

5. The method according to claim 1, wherein The fluctuation threshold includes a first fluctuation threshold and a second fluctuation threshold; and updating the first sampling interval to a new sampling interval based on a magnitude relationship between the fluctuation parameter of the environmental data and the preset fluctuation threshold includes: When the fluctuation parameter of the environmental data is greater than the first fluctuation threshold, adjusting the first fluctuation threshold to the second fluctuation threshold; When the fluctuation parameter is less than or equal to the second fluctuation threshold, adjusting the first sampling interval to a second sampling interval; When the fluctuation parameter is greater than the second fluctuation threshold, adjusting the first sampling interval to a third sampling interval; In which, the environmental data includes temperature data, the fluctuation parameters include temperature standard deviation and temperature range, the second fluctuation threshold is greater than the first fluctuation threshold; the second sampling interval and the third sampling interval are the new sampling intervals, the second sampling interval is greater than the first sampling interval, and the third sampling interval is less than the first sampling interval.

6. The method according to any one of claims 1 to 5, characterized in that After collecting the second voltage sequence of the battery voltage based on the first sampling interval or the new sampling interval, the method further includes: Calculating a second voltage characteristic parameter of the second voltage sequence, where the second voltage characteristic parameter includes a second voltage standard deviation and a second voltage range difference; When the second voltage standard deviation is greater than a second standard deviation threshold and the second voltage range difference is greater than a second range difference threshold, and there is a battery voltage less than a nominal voltage in the second voltage sequence, determining a primary abnormality; When the number of abnormal situations reaches a preset number threshold, it is determined that the battery of the electronic device is abnormal.

7. The method according to claim 6, characterized in that The method further comprises: When there are a preset number of battery voltages smaller than a preset low voltage threshold in the second voltage sequence, a low voltage alarm is issued.

8. The method according to any one of claims 1 to 5, characterized in that After determining the reference voltage of the battery based on the first voltage characteristic parameter of the first voltage sequence, the method further includes: The remaining power percentage of the battery is calculated based on the reference voltage and a discharge curve of the battery.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

10. A computer program product, characterized in that When the computer program product is run on a device, the device is caused to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for measuring and calculating system battery electricity quantity

    CN103792490A

  • Method and apparatus for evaluating operation state of battery pack string

    CN105866689A

  • Environmental parameter collecting method and device, and sensor

    CN109141525A

  • Lithium battery network management optimization method and system

    CN116365669A

  • Battery life cycle management system

    CN117674365A

Cited By

  • Self-adaptive control method, system and equipment for electrostatic suspension experiment of space station

    CN121276991A