Battery state detection method, battery management system, and storage medium

By averaging and calculating the dual probabilities of multiple sampled currents of the battery, the problem of inaccurate battery charging and discharging status judgment caused by insufficient current sampling accuracy and stability in the existing technology is solved, achieving higher judgment accuracy and user experience.

CN121559339BActive Publication Date: 2026-05-01SHENZHEN POWEROAK NEWENER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN POWEROAK NEWENER CO LTD
Filing Date
2026-01-26
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies rely on the accuracy and stability of current sampling, which makes it impossible to accurately determine the battery charging and discharging status under certain operating conditions, resulting in low accuracy and a poor user experience.

Method used

By calculating the average value of multiple sampled currents within a preset sampling time and performing dual probability calculations, a first probability result and a second probability result are obtained. After fusion, the maximum value is selected as the target state of the battery, thereby achieving accurate judgment of the charging and discharging state.

Benefits of technology

It can accurately determine the battery charging and discharging status without the need for high-precision and stable current sampling, reducing status judgment errors and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121559339B_ABST
    Figure CN121559339B_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to the technical field of battery management, in particular to a battery state detection method, a battery management system and a storage medium. The embodiment of the present application calculates the average value of a plurality of sampling currents in a preset sampling time, carries out double probability calculation on the current average value and the plurality of sampling currents, obtains a first probability result and a second probability result, does not need to sample to obtain high-precision and stable battery current, only needs to obtain accurate probability results through double probability calculation, then fuses the first probability result and the second probability result to obtain accurate target probability results, finally selects the reference state represented by the maximum value of a plurality of target probabilities of the target probability results as the final target state of the battery, so that the charging and discharging state of the battery can be accurately determined, the accuracy of the charging and discharging state determination is improved, and the use experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Battery status detection methods, battery management systems and storage media Technical Field

[0001] This invention relates to the field of battery management technology, and in particular to a battery state detection method, a battery management system, and a storage medium. Background Technology

[0002] Currently, in most cases, the direction of the battery current is used as a direct basis for determining the battery's charge / discharge state. This method determines the battery's charge / discharge state directly whenever the detected battery current falls within a defined range of charging and discharging currents, based on the magnitude and direction of the battery current. While this method is simple to implement and has low technical requirements, it relies heavily on the accuracy and stability of current sampling. In some operating conditions, the inability to obtain high-precision and stable battery current samples may lead to inaccurate determination of the battery's charge / discharge state, resulting in low accuracy and a poor user experience. Summary of the Invention

[0003] In view of this, one objective of the present invention is to provide a battery state detection method, a battery management system, and a storage medium to improve the situation in the related art where the inability to accurately determine the battery charge and discharge state is due to the inability to sample and obtain high-precision and stable battery current.

[0004] To address the aforementioned technical problems, the embodiments of the present invention provide the following technical solutions:

[0005] In a first aspect, embodiments of the present invention provide a battery state detection method, comprising:

[0006] Acquire target data, which includes multiple sampled currents obtained by sampling the battery current within a preset sampling time.

[0007] Calculate the average value of multiple sampled currents to obtain the current mean;

[0008] Based on the average current, a first probability result is obtained, which includes multiple candidate probabilities used to characterize the battery in a charging state, an idle state, and a discharging state, respectively.

[0009] Based on the target data, a second probability result is obtained, which includes multiple reference probabilities used to characterize the battery in a charging state, an idle state, and a discharging state, respectively.

[0010] The first probability result and the second probability result are fused to obtain the target probability result, which includes multiple target probabilities used to characterize the battery in the charging state, the idle state and the discharging state respectively.

[0011] The reference state characterized by the reference probability is determined as the target state of the battery. The reference probability is the maximum value among multiple target probabilities, and the reference state is one of the charging state, idle state, and discharging state.

[0012] In some embodiments, the first probability result includes a first candidate probability, a second candidate probability, and a third candidate probability. The first probability result is obtained based on the average current, including:

[0013] Obtain the first candidate current threshold and the second candidate current threshold;

[0014] If the average response current is greater than or equal to the first candidate current threshold, the first preset value is determined to be the first candidate probability, and the second preset value is determined to be the second candidate probability and the third candidate probability.

[0015] If the average response current is less than the first candidate current threshold and greater than the second candidate current threshold, the third preset value is determined as the first candidate probability, the second candidate probability, and the third candidate probability.

[0016] If the average response current is less than or equal to the second candidate current threshold, the second preset value is determined as the first candidate probability and the second candidate probability, and the first preset value is determined as the third candidate probability.

[0017] The first candidate probability, the second candidate probability, and the third candidate probability are used to characterize the probability that the battery is in a charging state, an idle state, and a discharging state, respectively.

[0018] In some embodiments, the second probability result includes a first reference probability, a second reference probability, and a third reference probability. Obtaining the second probability result based on the target data includes:

[0019] The first number of the first target current, the second number of the second target current, and the third number of the third target current are counted. The first target current is the sampling current that meets the first preset condition, the second target current is the sampling current that meets the second preset condition, and the third target current is the sampling current that meets the third preset condition.

[0020] Multiply the first ratio by the preset target ratio to obtain the first reference probability. The first ratio is the ratio of the first quantity to the target quantity, and the target quantity is the number of sampling currents.

[0021] Multiply the second ratio by the preset target ratio to obtain the second reference probability. The second ratio is the ratio of the second quantity to the target quantity.

[0022] Multiply the third ratio by the preset target ratio to obtain the third reference probability. The third ratio is the ratio of the third quantity to the target quantity.

[0023] The first reference probability, the second reference probability, and the third reference probability are used to characterize the probability that the battery is in a charging state, an idle state, and a discharging state, respectively.

[0024] In some embodiments, counting the first quantity of the first target current, the second quantity of the second target current, and the third quantity of the third target current includes:

[0025] Obtain a standard current threshold. The first preset condition is that the current is greater than the standard current threshold, the second preset condition is that the current is equal to the standard current threshold, and the third preset condition is that the current is less than the standard current threshold.

[0026] If the sampled current meets the first preset condition, the sampled current is determined to be the first target current.

[0027] If the sampled current meets the second preset condition, the sampled current is determined to be the second target current.

[0028] If the sampled current meets the third preset condition, the sampled current is determined to be the third target current.

[0029] The number of the first target currents is counted to obtain the first quantity;

[0030] The number of the second target current is counted to obtain the second quantity;

[0031] The number of the third target currents is statistically analyzed to obtain the third quantity.

[0032] In some embodiments, counting the first quantity of the first target current, the second quantity of the second target current, and the third quantity of the third target current includes:

[0033] Obtain a first reference current threshold and a second reference current threshold, wherein the first preset condition is greater than the first reference current threshold, the second preset condition is less than or equal to the first reference current threshold and greater than or equal to the second reference current threshold, and the third preset condition is less than the second reference current threshold;

[0034] If the sampled current meets the first preset condition, the sampled current is determined to be the first target current.

[0035] If the sampled current meets the second preset condition, the sampled current is determined to be the second target current.

[0036] If the sampled current meets the third preset condition, the sampled current is determined to be the third target current.

[0037] The number of the first target currents is counted to obtain the first quantity;

[0038] The number of the second target current is counted to obtain the second quantity;

[0039] The number of the third target currents is statistically analyzed to obtain the third quantity.

[0040] In some embodiments, the target probability result includes a first target probability, a second target probability, and a third target probability. The first probability result and the second probability result are fused to obtain the target probability result, including:

[0041] The candidate probability representing the battery being in a charging state in the first probability result is multiplied by the reference probability representing the battery being in a charging state in the second probability result to obtain the first product.

[0042] Divide the first product by the target preset value to obtain the first target probability;

[0043] The candidate probability representing the battery being in an idle state in the first probability result is multiplied by the reference probability representing the battery being in an idle state in the second probability result to obtain the second product.

[0044] Divide the second product by the target preset value to obtain the second target probability;

[0045] The third product is obtained by multiplying the candidate probability representing the battery being in a discharged state in the first probability result with the reference probability representing the battery being in a discharged state in the second probability result.

[0046] Divide the third product by the target preset value to obtain the third target probability;

[0047] The first target probability, the second target probability, and the third target probability are used to characterize the probability that the battery is in a charging state, an idle state, and a discharging state, respectively.

[0048] In some embodiments, determining the baseline state characterized by the baseline probability as the target state of the battery includes:

[0049] Compare the probabilities of multiple targets and determine the maximum value among them as the baseline probability;

[0050] The baseline state represented by the baseline probability is determined as the target state in which the battery is located.

[0051] In some embodiments, the method further includes:

[0052] Obtain the candidate state of the battery at the previous detection time. The candidate state is one of the charging state, idle state, and discharging state.

[0053] In response to the fact that multiple candidate probabilities representing the battery being in a charging state, an idle state, and a discharging state are the same in the first probability result, and multiple reference probabilities representing the battery being in a charging state, an idle state, and a discharging state are the same in the second probability result, the candidate state is determined as the target state of the battery.

[0054] In a second aspect, embodiments of the present invention provide a battery management system, including:

[0055] A processor and a memory communicatively connected to the processor;

[0056] The memory stores computer program instructions executable by the processor, which, when executed by the processor, cause the battery management system to perform any of the battery state detection methods proposed in the first aspect.

[0057] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing processor-executable computer program instructions, which, when executed by a processor, cause the computer to perform any of the battery state detection methods proposed in the first aspect.

[0058] The embodiments of the present invention have the following beneficial effects: Unlike related technologies, the embodiments of the present invention calculate the average value of multiple sampled currents within a preset sampling time, and perform dual probability calculations on the average current and multiple sampled currents to obtain a first probability result and a second probability result. In this way, there is no need to sample to obtain a high-precision and stable battery current. It is only necessary to obtain an accurate probability result through dual probability calculation. The first probability result and the second probability result are fused to obtain an accurate target probability result. Finally, the reference state represented by the maximum value among multiple target probabilities of the target probability result is selected as the final target state of the battery. In this way, the charging and discharging state of the battery can be accurately determined, improving the accuracy of the charging and discharging state determination and improving the user experience. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the accompanying drawings used in the description of the related technologies or embodiments will be briefly introduced below. Obviously, the drawings described below only show some embodiments of the present invention and should not be considered as limiting the scope of protection. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 is a schematic diagram of the application scenarios of the battery state detection method in some embodiments of the present invention;

[0061] Figure 2 is a schematic diagram of the battery management system provided in some embodiments of the present invention;

[0062] Figure 3 is a schematic flowchart of a battery state detection method provided in some embodiments of the present invention;

[0063] Figure 4 is a schematic diagram of a sub-process of step S33 in the battery state detection method shown in the embodiment of Figure 3;

[0064] Figure 5 is a schematic diagram of a sub-process of step S34 in the battery state detection method shown in the embodiment of Figure 3;

[0065] Figure 6 is a schematic diagram of a sub-process of step S35 in the battery state detection method shown in the embodiment of Figure 3. Detailed Implementation

[0066] To make the objectives and advantages of the embodiments of the present invention more readily understood, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The detailed description of the embodiments of the present invention in the accompanying drawings is not intended to limit the scope of protection claimed by the present invention, but only to illustrate selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0067] It should be noted that, unless there is a conflict, the various technical features involved in the embodiments of the present invention described below can be combined with each other, and all are within the protection scope of the present invention. Furthermore, although functional modules are divided in the device or structural schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," "third," and other similar expressions used herein do not limit the data or execution order, but are only for illustrative purposes and to distinguish identical or similar items with substantially the same function and effect, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features.

[0068] Unless otherwise defined, the technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. It should be understood that the term "and / or" as used herein includes any and all combinations of one or more of the listed items.

[0069] Currently, in most cases, the direction of the battery current is used as a direct basis for determining the battery's charge / discharge state. This method determines the battery's charge / discharge state directly whenever the detected battery current falls within a defined range of charging and discharging currents, based on the magnitude and direction of the battery current. While this method is simple to implement and has low technical requirements, it relies heavily on the accuracy and stability of current sampling. In some operating conditions, the inability to obtain high-precision and stable battery current samples may lead to inaccurate determination of the battery's charge / discharge state, resulting in low accuracy and a poor user experience.

[0070] The inventors discovered that when using the above method, to prevent frequent switching between charging and discharging states, a relatively wide range of charging and discharging currents needs to be defined. This results in a fuzzy range (i.e., the critical segment of charging and discharging current) where the battery's charging and discharging state cannot be accurately determined. Related technologies directly classify this as a no-charge, no-discharge state within this fuzzy range. Consequently, using this method will produce abnormal status display results. When the current is in the critical segment, the actual charging and discharging state of the battery should be inconsistent with the state determined by this method, leading to excessive state judgment errors. If the defined range is narrowed, the problem of frequent switching between charging and discharging states will occur, all of which will be inconsistent with the actual charging and discharging state of the battery.

[0071] Currently, the above methods can only satisfy the need to determine the charging and discharging state of the battery in the non-critical segment of the defined range. The critical segment lacks a judgment logic algorithm and cannot meet the needs of determining the charging and discharging state of the battery.

[0072] In view of this, embodiments of the present invention provide a battery state detection method. By calculating the average value of multiple sampled currents within a preset sampling time, and performing dual probability calculations on the average current and multiple sampled currents, a first probability result and a second probability result are obtained. In this way, there is no need to sample to obtain a high-precision and stable battery current. Only an accurate probability result needs to be obtained through dual probability calculation. Then, the first probability result and the second probability result are fused to obtain an accurate target probability result. Finally, the reference state represented by the maximum value among multiple target probabilities of the target probability result is selected as the final target state of the battery. In this way, there is no need to distinguish between the critical and non-critical segments of the charging current and discharging current ranges. The charging and discharging state of the battery can be accurately determined, reducing the state judgment error, improving the accuracy of charging and discharging state judgment, and improving the user experience.

[0073] Please refer to Figure 1, which schematically illustrates an application scenario of the battery state detection method provided by some embodiments of the present invention.

[0074] As shown in Figure 1, this application scenario includes a battery management system 100 and a battery 200, wherein the battery management system 100 is electrically connected to the battery 200. It is understood that Figure 1 only schematically illustrates one battery 200; in practical applications, there can be multiple batteries 200. It is readily understood that the battery 200 includes a rechargeable battery, a lithium battery, a nickel-metal hydride battery, or any other suitable battery.

[0075] In this embodiment of the invention, the battery management system 100 is equipped with a current detection circuit. The battery management system 100 uses its current detection circuit to sample and obtain the current of the battery 200 within a preset sampling time (i.e., to sample the current of the battery 200) to obtain multiple sampled currents. The multiple sampled currents obtained by the battery management system 100 in sampling the current of the battery 200 within the preset sampling time are the target data.

[0076] For example, the average value of multiple sampled currents is calculated to obtain the current mean. Then, a first probability result is obtained based on the current mean. The first probability result includes multiple candidate probabilities, which are used to characterize the probability that the battery 200 is in a charging state, an idle state, and a discharging state, respectively. A second probability result is obtained based on the target data. The second probability result includes multiple reference probabilities, which are used to characterize the probability that the battery 200 is in a charging state, an idle state, and a discharging state, respectively.

[0077] In some embodiments, the first probability result and the second probability result are fused to obtain a target probability result. The target probability result includes multiple target probabilities, which are used to characterize the probability that the battery 200 is in a charging state, an idle state, and a discharging state, respectively. Finally, the maximum value among the multiple target probabilities is selected as the baseline probability, and the baseline state characterized by the baseline probability is determined as the target state of the battery. The baseline state is one of the charging state, the idle state, and the discharging state. That is, when the baseline probability is the target probability used to characterize the battery 200 being in a charging state, the baseline state characterized by the baseline probability is the charging state; when the baseline probability is the target probability used to characterize the battery 200 being in an idle state, the baseline state characterized by the baseline probability is the idle state; and when the baseline probability is the target probability used to characterize the battery 200 being in a discharging state, the baseline state characterized by the baseline probability is the discharging state.

[0078] It should be understood that the application scenario shown in Figure 1 is merely an illustrative representation of one instance of using the battery management system 100 to detect the charge / discharge state of the battery 200 in some embodiments of the present invention, and does not impose any limitations on the structure, type, or quantity of the battery management system 100 and the battery 200 in other application scenarios or embodiments. For example, in some other application scenarios or embodiments, the battery management system 100 can simultaneously detect multiple batteries 200 to determine the charge / discharge state of multiple batteries 200.

[0079] To facilitate understanding of the battery state detection method provided in the embodiments of the present invention, the battery management system provided in the embodiments of the present invention will first be described in detail.

[0080] Please refer to Figure 2, which schematically illustrates the structure of a battery management system provided in some embodiments of the present invention.

[0081] Referring to Figure 2, the battery management system 100 includes at least one processor 110 and a memory 120 connected in communication. Figure 2 uses a bus system 130 and a single processor 110 as an example. The various components in the battery management system 100 are coupled together via the bus system 130, which is used to enable communication between the components. It is easy to understand that the bus system 130 may include not only a data bus but also a power bus, a control bus, and a status signal bus. However, for clarity and brevity, all buses are labeled as bus system 130 in Figure 2. It is understood that the structure shown in Figure 2 is merely illustrative and does not limit the structure of the battery management system described above. For example, the battery management system may include more or fewer components than the structure shown in Figure 2, or have a different configuration.

[0082] Specifically, processor 110 is configured to provide computational and control capabilities to support the battery management system 100 in executing corresponding business logic and functions. For example, it supports the battery management system 100 in executing any of the battery state detection methods provided in the embodiments of the present invention, or in executing the steps of any possible implementation of any of the battery state detection methods provided in the embodiments of the present invention. Those skilled in the art will understand that processor 110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0083] The memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, instructions, and modules, such as the program, instructions, and modules corresponding to the battery state detection method in the embodiments of the present invention. In some embodiments, the memory 120 may include a program storage area and a data storage area. The program storage area may store an operating system, an application program required for at least one function, and the data storage area may store data created according to the use of the processor 110. The processor 110 executes various functional applications and data processing of the battery management system 100 by running the non-transitory software programs, instructions, and modules stored in the memory 120, so as to implement any of the battery state detection methods provided in the embodiments of the present invention, or execute the steps in any possible implementation of any of the battery state detection methods provided in the embodiments of the present invention. In some embodiments, the memory 120 may include high-speed random access memory and may also include non-transitory memory. For example, at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 120 may also include memory remotely located relative to the processor 110, and these remotely located memories may be connected to the processor 110 through a communication network. Understandably, examples of the aforementioned communication networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0084] As can be understood from the above, the implementing entity of any battery state detection method provided in the embodiments of the present invention can be any suitable type of battery management system with certain computing and control capabilities, such as the battery management system 100 described above. In some feasible implementations, any battery state detection method provided in the embodiments of the present invention can be implemented by a processor executing computer program instructions stored in memory.

[0085] The battery state detection method provided by the present invention will be described in detail below with reference to exemplary applications and implementations of the battery management system provided in the embodiments of the present invention.

[0086] Please refer to Figure 3, which schematically illustrates a flowchart of a battery state detection method provided in some embodiments of the present invention.

[0087] Understandably, the battery state detection method provided in this embodiment of the invention can be applied to the aforementioned battery management system (e.g., battery management system 100). Specifically, the execution entity of the battery state detection method is one or at least two processors of the battery management system.

[0088] As shown in Figure 3, the battery state detection method includes, but is not limited to, the following steps S31-S36:

[0089] S31: Obtain target data.

[0090] The target data includes multiple sampled currents obtained by sampling the battery current within a preset sampling time. The preset sampling time refers to the duration for which the battery current data is sampled and acquired.

[0091] For example, in this embodiment of the invention, the battery current is continuously sampled within a preset sampling time according to a preset unit time, resulting in multiple sampled currents. Here, the unit time is the interval between sampling the battery current; therefore, the ratio of the preset sampling time to the unit time is the number of samplings (i.e., the number of sampled currents obtained).

[0092] In some embodiments, the preset sampling time is Unit time is The number of sampling times (i.e., the number of sampling currents) can be calculated as follows: This means that 500 sampling currents were obtained in the final sampling.

[0093] S32: Calculate the average value of multiple sampled currents to obtain the average current value.

[0094] In some embodiments of the present invention, the average value of multiple sampled currents is calculated using an average value calculation formula to obtain the average current value.

[0095] For example, the formula for calculating the average value is as follows: , In the above formula, Preset sampling time The sum of multiple sampled currents within, Indicates the number of samplings (i.e., the number of sampling currents). For the first One sampled current, This is the average current.

[0096] It is understood that the sampled current is a signed current. The sign of the sampled current (including positive + and negative -) indicates the direction of the current, and the value of the sampled current indicates the magnitude of the current. Engineers can set the current direction represented by the sign of the sampled current according to actual needs. For example, positive + indicates the first direction of the current, and negative - indicates the second direction of the current, with the first direction being opposite to the second direction. When calculating the average value of multiple sampled currents, the signed sampled currents are used to calculate the average current.

[0097] S33: Obtain the first probability result based on the average current.

[0098] In this step, the first probability result includes multiple candidate probabilities that characterize the battery in a charging state, an idle state, and a discharging state, respectively. That is, the first probability result includes multiple candidate probabilities, which are used to characterize the probability of the battery in a charging state, an idle state, and a discharging state, respectively.

[0099] For example, in an embodiment of the present invention, a first state description result is constructed, which includes three initial probability parameters, such as the first state description result. , , and This is the initial probability parameter. The mean current is compared with a preset current threshold range. Based on the comparison result, the following parameters are determined: , and The specific probability value, such as , and The specific probability values ​​are 100%, 0%, and 0%, respectively. , and The specific probability value is the candidate probability, which determines the initial probability parameter. , and The first state description result after the specific probability value is the first probability result. The three candidate probabilities are used to characterize the probability of the battery being in a charging state, an idle state, and a discharging state, respectively. The specific probability value is used to characterize the probability that the battery is in a charging state. The specific probability value is used to characterize the probability that the battery is in an idle state. The specific probability value is used to characterize the probability that the battery is in a discharged state.

[0100] In some embodiments, the current threshold range includes , as well as When the mean current is in the interval At that time, determine , and The specific probability values ​​are 0%, 0%, and 100%, respectively, when the mean current is within the interval At that time, determine , and The specific probability values ​​are 33.3%, 33.3%, and 33.3%, respectively, when the mean current is within the interval... At that time, determine , and The specific probability values ​​are 100%, 0%, and 0%, respectively.

[0101] S34: Based on the target data, obtain the second probability result.

[0102] In this step, the second probability result includes multiple reference probabilities that characterize the battery in a charging state, an idle state, and a discharging state, respectively. That is, the second probability result includes multiple reference probabilities, which are used to characterize the probability of the battery being in a charging state, an idle state, and a discharging state, respectively.

[0103] For example, an embodiment of the present invention constructs a second state description result, which includes three original probability parameters, such as the second state description result. , , and These are the original probability parameters. Each sampled current is compared to a preset first current threshold. Based on the comparison results of all sampled currents with the first current threshold, the following parameters are determined: , and The specific probability value, such as , and The specific probability values ​​are 52%, 25%, and 23%, respectively. , and The specific probability value is the reference probability, which determines the original probability parameters. , and The second state description result following the specific probability value is the second probability result. The three reference probabilities are used to characterize the probability of the battery being in a charging state, an idle state, and a discharging state, respectively. The specific probability value is used to characterize the probability that the battery is in a charging state. The specific probability value is used to characterize the probability that the battery is in an idle state. The specific probability value is used to characterize the probability that the battery is in a discharged state.

[0104] In some embodiments, the determination is based on the comparison results of all sampled currents with a first current threshold. , and The specific probability values ​​include: separately counting the number of first candidate currents greater than the first current threshold, the number of second candidate currents equal to the first current threshold, and the number of third candidate currents less than the first current threshold; and using the ratio of the number of first candidate currents to the number of sampled currents as the original probability parameter. The specific probability value is obtained by using the ratio of the number of second candidates to the number of sampled currents as the original probability parameter. The specific probability value is obtained by using the ratio of the number of third candidates to the number of sampled currents as the original probability parameter. The specific probability value. In some embodiments, the first current threshold is 0mA.

[0105] It is understandable that the first probability result obtained based on the average current is the actual (non-ideal) current range judgment mode. The actual state of the battery (i.e., charging state, idle state, or discharging state) is determined by combining the average current with the current threshold range. The second probability result obtained based on the target data is the ideal current range judgment mode. The actual state of the battery (i.e., charging state, idle state, or discharging state) is determined by combining the comparison result of each sampled current with the first current threshold.

[0106] S35: Combine the first probability result and the second probability result to obtain the target probability result.

[0107] In this step, the target probability result includes multiple target probabilities that characterize the battery in a charging state, an idle state, and a discharging state, respectively. That is, the target probability result includes multiple target probabilities, which are used to characterize the probability of the battery being in a charging state, an idle state, and a discharging state, respectively.

[0108] For example, the candidate probabilities representing the battery being in a charging state from the first probability result are weighted and added to the reference probabilities representing the battery being in a charging state from the second probability result to obtain the target probability representing the battery being in a charging state. Similarly, the candidate probabilities representing the battery being in an idle state from the first probability result are weighted and added to the reference probabilities representing the battery being in an idle state from the second probability result to obtain the target probability representing the battery being in an idle state. Finally, the candidate probabilities representing the battery being in a discharging state from the first probability result are weighted and added to the reference probabilities representing the battery being in a discharging state from the second probability result to obtain the target probability representing the battery being in a discharging state, thus obtaining the final target probability result.

[0109] S36: Determine the baseline state represented by the baseline probability as the target state of the battery.

[0110] The baseline probability is the maximum value among multiple target probabilities. The baseline state is one of the following: charging state, idle state, and discharging state.

[0111] For example, the maximum value among multiple target probabilities is selected as the baseline probability. The baseline state represented by the baseline probability is determined as the target state of the battery. That is, when the baseline probability is the target probability used to represent the battery being in a charging state (i.e., the target probability used to represent the battery being in a charging state is the maximum value among multiple target probabilities), the baseline state represented by the baseline probability is the charging state, and the target state of the battery is determined to be the charging state. When the baseline probability is the target probability used to represent the battery being in an idle state (i.e., the target probability used to represent the battery being in an idle state is the maximum value among multiple target probabilities), the baseline state represented by the baseline probability is the idle state, and the target state of the battery is determined to be the idle state. When the baseline probability is the target probability used to represent the battery being in a discharging state (i.e., the target probability used to represent the battery being in a discharging state is the maximum value among multiple target probabilities), the baseline state represented by the baseline probability is the discharging state, and the target state of the battery is determined to be the discharging state.

[0112] This invention calculates the average value of multiple sampled currents within a preset sampling time period, and performs dual probability calculations on the average current and multiple sampled currents to obtain a first probability result and a second probability result. In this way, there is no need to sample to obtain a high-precision and stable battery current. Only an accurate probability result needs to be obtained through dual probability calculation. Then, the first probability result and the second probability result are fused to obtain an accurate target probability result. Finally, the reference state represented by the maximum value among multiple target probabilities of the target probability result is selected as the final target state of the battery. In this way, the charging and discharging state of the battery can be accurately determined, improving the accuracy of charging and discharging state determination and enhancing the user experience.

[0113] Please refer to Figure 4, which schematically illustrates a sub-process diagram of step S33 in the battery state detection method provided in some embodiments of the present invention.

[0114] As shown in Figure 4, in some embodiments, a first probability result is obtained based on the average current, specifically including but not limited to the following steps S331-S334:

[0115] S331: Obtain the first candidate current threshold and the second candidate current threshold.

[0116] For example, engineers preset a first candidate current threshold and a second candidate current threshold based on engineering experience and experimental data, and store the first candidate current threshold and the second candidate current threshold in the local storage of the battery management system. In this embodiment of the invention, the first candidate current threshold and the second candidate current threshold are obtained from the local storage. In some embodiments, the first candidate current threshold is 50mA and the second candidate current threshold is -50mA.

[0117] S332: If the average response current is greater than or equal to the first candidate current threshold, determine the first preset value as the first candidate probability, and determine the second preset value as the second candidate probability and the third candidate probability.

[0118] In this embodiment of the invention, the first probability result includes a first candidate probability, a second candidate probability, and a third candidate probability, wherein the first candidate probability is used to characterize the probability that the battery is in a charging state, the second candidate probability is used to characterize the probability that the battery is in an idle state, and the third candidate probability is used to characterize the probability that the battery is in a discharging state.

[0119] In this embodiment, the first preset value is 100% and the second preset value is 0%. When the average current is greater than or equal to the first candidate current threshold, the first preset value of 100% is determined as the first candidate probability, and the second preset value of 0% is determined as the second candidate probability and the third candidate probability. At this time, the first candidate probability, the second candidate probability and the third candidate probability are 100%, 0% and 0%, respectively.

[0120] S333: If the average response current is less than the first candidate current threshold and greater than the second candidate current threshold, the third preset value is determined as the first candidate probability, the second candidate probability and the third candidate probability.

[0121] In this embodiment, the third preset value is 33.3%. When the average current is less than the first candidate current threshold and greater than the second candidate current threshold, the third preset value of 33.3% is determined as the first candidate probability, the second candidate probability and the third candidate probability. At this time, the first candidate probability, the second candidate probability and the third candidate probability are 33.3%, 33.3% and 33.3% respectively.

[0122] S334: If the average response current is less than or equal to the second candidate current threshold, the second preset value is determined as the first candidate probability and the second candidate probability, and the first preset value is determined as the third candidate probability.

[0123] In this embodiment, when the average current is less than or equal to the second candidate current threshold, the second preset value of 0% is determined as the first candidate probability and the second candidate probability, and the first preset value of 100% is determined as the third candidate probability. At this time, the first candidate probability, the second candidate probability and the third candidate probability are 0%, 0% and 100%, respectively.

[0124] Please refer to Figure 5, which schematically illustrates a sub-process diagram of step S34 in the battery state detection method provided in some embodiments of the present invention.

[0125] As shown in Figure 5, in some embodiments, a second probability result is obtained based on the target data, specifically including but not limited to the following steps S341-S344:

[0126] S341: Count the first quantity of the first target current, the second quantity of the second target current, and the third quantity of the third target current.

[0127] In this embodiment, the first target current is a sampling current that meets the first preset condition, the second target current is a sampling current that meets the second preset condition, and the third target current is a sampling current that meets the third preset condition.

[0128] In some embodiments, the first preset condition, the second preset condition, and the third preset condition refer to interrelated and different current conditions determined based on a preset current threshold. For example, the first preset condition is greater than the preset current threshold, the second preset condition is equal to the preset current threshold, and the third preset condition is less than the preset current threshold. For instance, each sampled current is compared with the first, second, and third preset conditions respectively. The sampled current that meets the first preset condition is determined as the first target current, the sampled current that meets the second preset condition is determined as the second target current, and the sampled current that meets the third preset condition is determined as the third target current. After comparing all sampled currents, the number of the first target current, the second target current, and the third target current is counted to obtain the first number of the first target current, the second number of the second target current, and the third number of the third target current.

[0129] In some embodiments, the first quantity of the first target current, the second quantity of the second target current, and the third quantity of the third target current are counted, specifically including but not limited to the following steps S3411-S3417:

[0130] S3411: Obtain the standard current threshold.

[0131] In this step, the first preset condition is that the current is greater than the standard current threshold, the second preset condition is that the current is equal to the standard current threshold, and the third preset condition is that the current is less than the standard current threshold.

[0132] For example, engineers preset a standard current threshold based on engineering experience and experimental data, and store the standard current threshold in the local storage of the battery management system. This embodiment of the invention retrieves the standard current threshold from the local storage. For example, the standard current threshold is 0mA. In this case, the first preset condition is that the current is greater than the standard current threshold of 0mA, the second preset condition is that the current is equal to the standard current threshold of 0mA, and the third preset condition is that the current is less than the standard current threshold of 0mA. When the standard current threshold is 0mA, this embodiment of the invention determines the actual state of the battery based on an absolutely ideal current range.

[0133] S3412: If the sampled current meets the first preset condition, the sampled current is determined to be the first target current.

[0134] S3413: If the sampled current meets the second preset condition, the sampled current is determined to be the second target current.

[0135] S3414: If the sampled current meets the third preset condition, the sampled current is determined to be the third target current.

[0136] For example, for each sampled current, the sampled current is compared with a standard current threshold of 0mA. If the sampled current is greater than the standard current threshold of 0mA, it means that the sampled current meets the first preset condition and is determined as the first target current. If the sampled current is equal to the standard current threshold of 0mA, it means that the sampled current meets the second preset condition and is determined as the second target current. If the sampled current is less than the standard current threshold of 0mA, it means that the sampled current meets the third preset condition and is determined as the third target current.

[0137] S3415: Count the number of the first target current to obtain the first quantity.

[0138] S3416: Count the number of the second target current to obtain the second quantity.

[0139] S3417: Count the number of the third target current to obtain the third quantity.

[0140] For example, after determining that all sampled currents are the first target current, the second target current, or the third target current, the number of the first target current, the second target current, and the third target current is counted to obtain the first number, the second number, and the third number.

[0141] In some embodiments, the first quantity of the first target current, the second quantity of the second target current, and the third quantity of the third target current are counted, specifically including but not limited to the following steps S341A-S341G:

[0142] S341A: Obtain the first reference current threshold and the second reference current threshold.

[0143] In this step, the first preset condition is that the current is greater than the first reference current threshold, the second preset condition is that the current is less than or equal to the first reference current threshold and greater than or equal to the second reference current threshold, and the third preset condition is that the current is less than the second reference current threshold.

[0144] For example, engineers preset a first reference current threshold and a second reference current threshold based on engineering experience and experimental data, and store the first reference current threshold and the second reference current threshold in the local storage of the battery management system. In this embodiment of the invention, the first reference current threshold and the second reference current threshold are obtained from the local storage. In some embodiments, the first reference current threshold is 5mA, and the second reference current threshold is -5mA. In this case, the first preset condition is greater than the first reference current threshold of 5mA, the second preset condition is less than or equal to the first reference current threshold of 5mA and greater than or equal to the second reference current threshold of -5mA, and the third preset condition is less than the second reference current threshold of -5mA. When the first reference current threshold is 5mA and the second reference current threshold is -5mA, this embodiment of the invention uses a relatively ideal current range to determine the actual state of the battery, thereby expanding the current range describing the idle state.

[0145] S341B: If the sampled current meets the first preset condition, the sampled current is determined to be the first target current.

[0146] S341C: If the sampled current meets the second preset condition, the sampled current is determined to be the second target current.

[0147] S341D: If the sampled current meets the third preset condition, the sampled current is determined to be the third target current.

[0148] For example, for each sampled current, the sampled current is compared with a first reference current threshold of 5mA and a second reference current threshold of -5mA. If the sampled current is greater than the first reference current threshold of 5mA, it means that the sampled current meets the first preset condition, and the sampled current is determined to be the first target current. If the sampled current is less than or equal to the first reference current threshold of 5mA and greater than or equal to the second reference current threshold of -5mA, it means that the sampled current meets the second preset condition, and the sampled current is determined to be the second target current. If the sampled current is less than the second reference current threshold of -5mA, it means that the sampled current meets the third preset condition, and the sampled current is determined to be the third target current.

[0149] S341E: Count the number of the first target current to obtain the first quantity.

[0150] S341F: Count the number of the second target current to obtain the second quantity.

[0151] S341G: Statistically count the number of the third target current to obtain the third quantity.

[0152] For example, after determining that all sampled currents are the first target current, the second target current, or the third target current, the number of the first target current, the second target current, and the third target current is counted to obtain the first number, the second number, and the third number.

[0153] S342: Multiply the first ratio by the preset target ratio to obtain the first reference probability.

[0154] S343: Multiply the second ratio by the preset target ratio to obtain the second reference probability.

[0155] S344: Multiply the third ratio by the preset target ratio to obtain the third reference probability.

[0156] In this embodiment of the invention, the second probability result includes a first reference probability, a second reference probability, and a third reference probability, wherein the first reference probability is used to characterize the probability that the battery is in a charging state, the second reference probability is used to characterize the probability that the battery is in an idle state, and the third reference probability is used to characterize the probability that the battery is in a discharging state.

[0157] In this step, the target quantity is the number of sampled currents, and the preset target ratio is 100%. The first ratio is the ratio of the first quantity to the target quantity. The second ratio is the ratio of the second quantity to the target quantity. The third ratio is the ratio of the third quantity to the target quantity.

[0158] For example, the ratio obtained by dividing the first quantity by the target quantity is used as the first ratio, and the first ratio is multiplied by the preset target ratio of 100% to obtain the first reference probability. Similarly, the ratio obtained by dividing the second quantity by the target quantity is used as the second ratio, and the second ratio is multiplied by the preset target ratio of 100% to obtain the second reference probability. Finally, the ratio obtained by dividing the third quantity by the target quantity is used as the third ratio, and the third ratio is multiplied by the preset target ratio of 100% to obtain the third reference probability.

[0159] For example, calculate according to the following formula: , , Calculate the first reference probability, the second reference probability, and the third reference probability using the aforementioned formula. , , These are the first reference probability, the second reference probability, and the third reference probability, respectively. , and These are the first quantity, the second quantity, and the third quantity, respectively. The target number / the number of sampling currents, The target ratio is preset.

[0160] Please refer to Figure 6, which schematically illustrates a sub-process diagram of step S35 in the battery state detection method provided in some embodiments of the present invention.

[0161] As shown in Figure 6, in some embodiments, the first probability result and the second probability result are fused to obtain the target probability result, specifically including but not limited to the following steps S351-S356:

[0162] S351: Multiply the candidate probability representing the battery being in a charging state in the first probability result with the reference probability representing the battery being in a charging state in the second probability result to obtain the first product.

[0163] S352: Divide the first product by the target preset value to obtain the first target probability.

[0164] S353: Multiply the candidate probability representing the battery being in an idle state in the first probability result with the reference probability representing the battery being in an idle state in the second probability result to obtain the second product.

[0165] S354: Divide the second product by the target preset value to obtain the second target probability.

[0166] S355: Multiply the candidate probability representing the battery being in a discharged state in the first probability result with the reference probability representing the battery being in a discharged state in the second probability result to obtain the third product.

[0167] S356: Divide the third product by the target preset value to obtain the third target probability.

[0168] In this embodiment of the invention, the target probability result includes a first target probability, a second target probability, and a third target probability. The first target probability characterizes the probability that the battery is in a charging state, the second target probability characterizes the probability that the battery is in an idle state, and the third target probability characterizes the probability that the battery is in a discharging state. The preset target value is 100.

[0169] Among them, the candidate probability representing the battery being in a charging state in the first probability result is the first candidate probability, the candidate probability representing the battery being in an idle state in the first probability result is the second candidate probability, and the candidate probability representing the battery being in a discharging state in the first probability result is the third candidate probability.

[0170] In the second probability result, the candidate probability representing the battery being in a charging state is the first reference probability, the candidate probability representing the battery being in an idle state is the second reference probability, and the candidate probability representing the battery being in a discharging state is the third reference probability.

[0171] For example, the first candidate probability is multiplied by the first reference probability to obtain a first product, and the first product is divided by a target preset value of 100 to obtain a first target probability. The second candidate probability is multiplied by the second reference probability to obtain a second product, and the second product is divided by the target preset value of 100 to obtain a second target probability. The third candidate probability is multiplied by the third reference probability to obtain a third product, and the third product is divided by the target preset value of 100 to obtain a third target probability.

[0172] For example, calculate according to the following formula: , , Calculate the probabilities of the first target, the second target, and the third target using the aforementioned formula. , , These are the probabilities of the first candidate, the second candidate, and the third candidate, respectively. , , These are the first reference probability, the second reference probability, and the third reference probability, respectively. , , These are the probabilities of the first target, the second target, and the third target, respectively. Set the target preset value.

[0173] For example, in some embodiments, the baseline state characterized by the baseline probability is determined as the target state of the battery, specifically including but not limited to the following steps S361-S362:

[0174] S361: Compare the probabilities of multiple targets and determine the maximum value among the multiple target probabilities as the baseline probability.

[0175] S362: Determine the baseline state represented by the baseline probability as the target state in which the battery is located.

[0176] For example, in this embodiment of the invention, the maximum value formula is as follows: By comparing the probabilities of multiple targets, a baseline probability is determined. In the formula, For example, a function to find the maximum value. It means to take and The maximum value among multiple target probabilities is determined using the maximum value formula.

[0177] For example, multiple target probabilities are designated as a first target probability, a second target probability, and a third target probability. After selecting the maximum value among these three probabilities as the baseline probability, the baseline state represented by the baseline probability is determined as the target state of the battery. Specifically, when the baseline probability is the first target probability representing the battery being in a charging state (i.e., the first target probability is the maximum value among the multiple target probabilities), the baseline state represented by the baseline probability is the charging state, and the target state of the battery is determined to be the charging state. When the baseline probability is the second target probability representing the battery being in an idle state (i.e., the second target probability is the maximum value among the multiple target probabilities), the baseline state represented by the baseline probability is the idle state, and the target state of the battery is determined to be the idle state. When the baseline probability is the third target probability representing the battery being in a discharging state (i.e., the third target probability is the maximum value among the multiple target probabilities), the baseline state represented by the baseline probability is the discharging state, and the target state of the battery is determined to be the discharging state.

[0178] In some embodiments, the battery state detection method further includes, but is not limited to, the following steps S37-S38:

[0179] S37: Obtain the candidate state of the battery at the previous detection time.

[0180] In this step, the candidate state is one of the charging state, idle state, and discharging state. That is, the candidate state of the battery at the previous detection time is the charging state, idle state, or discharging state.

[0181] For example, after determining the candidate state of the battery at the previous detection time, the candidate state of the battery at the previous detection time is stored in the local storage of the battery management system. In this embodiment of the invention, the candidate state of the battery at the previous detection time is obtained from the local storage, for example, the candidate state is the charging state.

[0182] S38: In response to the fact that multiple candidate probabilities representing the battery being in a charging state, an idle state, and a discharging state are the same in the first probability result, and multiple reference probabilities representing the battery being in a charging state, an idle state, and a discharging state are the same in the second probability result, the candidate state is determined as the target state of the battery.

[0183] It is understandable that the preset sampling time corresponds to the current detection time, and the target state of the battery determined by the multiple sampling currents obtained within the preset sampling time is the current state of the battery at the current detection time.

[0184] In the first probability result, the multiple candidate probabilities used to characterize the battery being in a charging state, an idle state, and a discharging state are respectively the first candidate probability, the second candidate probability, and the third candidate probability. Similarly, in the second probability result, the multiple reference probabilities used to characterize the battery being in a charging state, an idle state, and a discharging state are respectively the first reference probability, the second reference probability, and the third reference probability. When multiple candidate probabilities are the same (i.e., the first, second, and third candidate probabilities are all the same, i.e., all 33.3%), and multiple reference probabilities are also the same (i.e., the first, second, and third reference probabilities are all the same, i.e., all 33.3%), this embodiment of the invention determines the candidate state as the target state of the battery. That is, it maintains the target state of the battery unchanged from the candidate state at the previous detection time, and the current state of the battery at the current detection time is the candidate state (e.g., charging state). This eliminates state fluctuations that occur when the current changes to a critical process, ensuring the correctness of the state judgment result.

[0185] In this embodiment, if the number of samplings (i.e., the number of sampled currents) is a multiple of the number of battery states (3), then the second probability result obtained based on the target data may result in the first reference probability, the second reference probability, and the third reference probability being the same (i.e., the first reference probability, the second reference probability, and the third reference probability are all 33.3%). In the case of multiple candidate probabilities being the same and multiple reference probabilities being the same, this embodiment of the invention determines that the battery state has not changed, that is, the current state of the battery at the current detection time (i.e., the target state) is the same as the candidate state of the battery at the previous detection time. It can be understood that the number of battery states (3) means that the battery states include three types: charging state, idle state, and discharging state.

[0186] It should be understood that the effectiveness of the battery state detection method provided in this embodiment of the invention is affected by factors such as sampling accuracy and boundary settings. Therefore, it is necessary to continuously conduct experimental training and optimization. Based on multiple experimental data, the preset sampling time, unit time, number of samplings, and current thresholds (including the first candidate current threshold, the second candidate current threshold, the first reference current threshold, and the second reference current threshold) should be further adjusted to improve the accuracy and reliability of battery state detection and judgment.

[0187] In summary, this embodiment of the invention calculates the average value of multiple sampled currents within a preset sampling time, and performs dual probability calculations on the average current and multiple sampled currents to obtain a first probability result and a second probability result. It eliminates the need for sampling to obtain a high-precision, stable battery current; instead, it obtains an accurate probability result through dual probability calculations. The first and second probability results are then fused to obtain an accurate target probability result. Finally, the baseline state represented by the maximum value among the multiple target probabilities is selected as the final target state of the battery. Thus, it eliminates the need to distinguish between critical and non-critical segments of the charging and discharging current ranges, accurately determining the battery's charging and discharging state, reducing state judgment errors, improving the accuracy of charging and discharging state judgment, and ultimately displaying the correct battery charging and discharging state result, thereby enhancing the user experience.

[0188] This invention provides a computer-readable storage medium storing processor-executable computer program instructions. When executed by a processor, the computer program instructions cause the computer to perform any of the battery state detection methods provided in this invention, or to perform the steps in any possible implementation of any of the battery state detection methods provided in this invention.

[0189] Those skilled in the art will understand that the embodiments provided by this invention are merely illustrative. The order in which the steps in the methods of the embodiments are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged, and deleted according to actual needs. Modules or sub-modules, units or sub-units in the apparatus or system of the embodiments can be merged, divided, and deleted according to actual needs. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0190] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, and of course, it can also be implemented using hardware. 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. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. It should be understood that the storage medium can be flash memory, hard disk, optical disk, register, magnetic surface memory, removable disk, CD-ROM, random access memory (RAM), read-only memory (ROM), electrically programmable ROM, and electrically erasable programmable ROM, etc.

[0191] It should be noted that the above embodiments are for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. Those skilled in the art can understand that all or part of the processes of the above embodiments can be implemented by modifying the technical solutions described in the embodiments of the present invention, or by making equivalent substitutions for some of the technical features. It is understood that these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and should be considered as equivalent changes and modifications made based on the embodiments of the present invention, all of which should fall within the scope of the claims of the present invention.

Claims

1. A battery state detection method, characterized in that, include: Acquire target data, which includes multiple sampled currents obtained by sampling the current of the battery within a preset sampling time; Calculate the average value of the multiple sampled currents to obtain the current mean; Based on the comparison between the average current and a preset current threshold range, a first probability result is determined. The first probability result includes a first candidate probability, a second candidate probability, and a third candidate probability, which are used to characterize the probability that the battery is in a charging state, an idle state, and a discharging state, respectively. Based on the comparison between multiple sampled currents and a preset first current threshold, a second probability result is determined according to the comparison results. The second probability result includes a first reference probability, a second reference probability, and a third reference probability, which are used to characterize the probability that the battery is in a charging state, an idle state, and a discharging state, respectively. The first candidate probability, the second candidate probability, and the third candidate probability of the first probability result are fused with the first reference probability, the second reference probability, and the third reference probability of the second probability result, respectively, to obtain a target probability result. The target probability result includes a first target probability, a second target probability, and a third target probability, which are used to characterize the probability that the battery is in a charging state, an idle state, and a discharging state, respectively. The benchmark state characterized by the benchmark probability is determined as the target state of the battery. The benchmark probability is the maximum value among multiple target probabilities, and the benchmark state is one of the charging state, the idle state, and the discharging state.

2. The battery state detection method according to claim 1, characterized in that, The step of determining a first probability result based on the comparison between the average current and a preset current threshold range includes: obtaining a first candidate current threshold and a second candidate current threshold; in response to the average current being greater than or equal to the first candidate current threshold, determining a first preset value as the first candidate probability, and determining a second preset value as the second candidate probability and the third candidate probability; in response to the average current being less than the first candidate current threshold and greater than the second candidate current threshold, determining a third preset value as the first candidate probability, the second candidate probability, and the third candidate probability; in response to the average current being less than or equal to the second candidate current threshold, determining the second preset value as the first candidate probability and the second candidate probability, and determining the first preset value as the third candidate probability.

3. The battery state detection method according to claim 1, characterized in that, The step of comparing multiple sampled currents with a preset first current threshold and determining a second probability result based on the comparison results includes: counting a first number of first target currents, a second number of second target currents, and a third number of third target currents, wherein the first target current is a sampled current that meets a first preset condition, the second target current is a sampled current that meets a second preset condition, and the third target current is a sampled current that meets a third preset condition; multiplying a first ratio by a preset target ratio to obtain a first reference probability, wherein the first ratio is the ratio of the first number to the target number, and the target number is the number of sampled currents; multiplying a second ratio by a preset target ratio to obtain a second reference probability, wherein the second ratio is the ratio of the second number to the target number; and multiplying a third ratio by a preset target ratio to obtain a third reference probability, wherein the third ratio is the ratio of the third number to the target number.

4. The battery state detection method according to claim 3, characterized in that, The step of statistically analyzing the first quantity of the first target current, the second quantity of the second target current, and the third quantity of the third target current includes: obtaining a standard current threshold, wherein the first preset condition is that the sampled current is greater than the standard current threshold, the second preset condition is that the sampled current is equal to the standard current threshold, and the third preset condition is that the sampled current is less than the standard current threshold; determining the sampled current as the first target current in response to the sampled current meeting the first preset condition; determining the sampled current as the second target current in response to the sampled current meeting the second preset condition; determining the sampled current as the third target current in response to the sampled current meeting the third preset condition; statistically analyzing the quantity of the first target current to obtain the first quantity; statistically analyzing the quantity of the second target current to obtain the second quantity; and statistically analyzing the quantity of the third target current to obtain the third quantity.

5. The battery state detection method according to claim 3, characterized in that, The step of statistically analyzing the first quantity of the first target current, the second quantity of the second target current, and the third quantity of the third target current includes: obtaining a first reference current threshold and a second reference current threshold, wherein the first preset condition is greater than the first reference current threshold, the second preset condition is less than or equal to the first reference current threshold and greater than or equal to the second reference current threshold, and the third preset condition is less than the second reference current threshold; determining the sampled current as the first target current in response to the sampled current meeting the first preset condition; determining the sampled current as the second target current in response to the sampled current meeting the second preset condition; determining the sampled current as the third target current in response to the sampled current meeting the third preset condition; statistically analyzing the quantity of the first target current to obtain the first quantity; statistically analyzing the quantity of the second target current to obtain the second quantity; and statistically analyzing the quantity of the third target current to obtain the third quantity.

6. The battery state detection method according to claim 1, characterized in that, The step of fusing the first candidate probability, second candidate probability, and third candidate probability of the first probability result with the first reference probability, second reference probability, and third reference probability of the second probability result to obtain the target probability result includes: multiplying the candidate probability in the first probability result representing that the battery is in a charging state with the reference probability in the second probability result representing that the battery is in a charging state to obtain a first product; dividing the first product by a target preset value to obtain a first target probability; multiplying the candidate probability in the first probability result representing that the battery is in an idle state with the reference probability in the second probability result representing that the battery is in an idle state to obtain a second product; dividing the second product by the target preset value to obtain a second target probability; multiplying the candidate probability in the first probability result representing that the battery is in a discharging state with the reference probability in the second probability result representing that the battery is in a discharging state to obtain a third product; and dividing the third product by the target preset value to obtain the third target probability.

7. The battery state detection method according to any one of claims 1-6, characterized in that, The step of determining the benchmark state represented by the benchmark probability as the target state of the battery includes: comparing multiple target probabilities and determining the maximum value among the multiple target probabilities as the benchmark probability; and determining the benchmark state represented by the benchmark probability as the target state in which the battery is located.

8. The battery state detection method according to any one of claims 1-6, characterized in that, The method further includes: obtaining a candidate state of the battery at the previous detection time, wherein the candidate state is one of the charging state, the idle state, and the discharging state; and determining the candidate state as the target state of the battery in response to the fact that multiple candidate probabilities in the first probability result representing the battery being in the charging state, the idle state, and the discharging state are the same, and multiple reference probabilities in the second probability result representing the battery being in the charging state, the idle state, and the discharging state are the same.

9. A battery management system, characterized in that, include: A processor and a memory communicatively connected to the processor; The memory stores computer program instructions executable by the processor, which, when executed by the processor, cause the battery management system to perform the battery state detection method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores processor-executable computer program instructions, which, when executed by the processor, cause the computer to perform the battery state detection method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Method and device for detecting states of batteries and battery pack

    CN105891729A

  • Battery state determination method and device, vehicle and storage medium

    CN115144779A