Battery anomaly detection method and device and computer storage medium
By combining the unsupervised detection framework of the autoencoder and the generative adversarial network discriminator, the false positive and missed negative problems of lithium battery anomaly detection in traditional methods are solved, and the early stage anomalies of lithium battery thermal runaway are accurately identified, thereby improving the reliability and accuracy of battery safety management.
Patent Information
- Application Number
- CN202510908025.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-09-23
AI Technical Summary
Existing technologies are difficult to effectively identify abnormal battery conditions. Traditional methods are easily affected by environmental factors, resulting in false alarms or missed alarms, and are unable to capture subtle anomalies under complex usage conditions.
An unsupervised anomaly detection framework that combines an autoencoder with a generative adversarial network discriminator enhances the ability to characterize normal data distribution through standardized resampled data and a dual discriminator mechanism of latent space and reconstruction space, significantly improving the sensitivity and accuracy of anomaly detection.
It has achieved effective identification of abnormal trends in the early stages of thermal runaway of lithium batteries, improved the reliability and accuracy of battery safety management, and reduced the false alarm rate and risk of missed reports.
Smart Images

Figure CN120686103A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of battery abnormality detection, and in particular relates to a battery abnormality detection method, device and computer storage medium. Background Art
[0002] Lithium-ion batteries are widely used in electric vehicles, energy storage systems, and portable electronic devices. However, thermal runaway, a self-reinforcing reaction caused by excessively high internal battery temperatures, can cause the battery to swell, catch fire, or even explode, posing a serious threat to both equipment and personal safety.
[0003] Traditional methods mainly rely on threshold-based monitoring of physical quantities (voltage, current, temperature, etc.), which are easily affected by environmental factors and lead to false alarms or missed alarms. It is also difficult to capture subtle anomalies under complex usage conditions, resulting in the inability to effectively detect abnormal battery conditions. Summary of the Invention
[0004] The embodiments of the present application provide a battery abnormality detection method, apparatus, terminal device, and storage medium, which can improve the accuracy of detecting abnormal battery conditions.
[0005] In a first aspect, an embodiment of the present application provides a battery abnormality detection method, comprising:
[0006] Acquiring first data, where the first data is collected operating condition data of the battery to be tested during the charging and discharging process;
[0007] Obtain a preset model, which includes at least two detection models, and different detection models have different anomaly detection logic;
[0008] Detecting the first data according to a preset model to obtain detection results corresponding to at least two detection models;
[0009] The abnormal state of the battery is determined according to the detection results corresponding to the at least two detection models.
[0010] In an embodiment of the present application, the operating condition data (such as voltage, current, internal resistance, etc.) of the battery to be tested during the charging and discharging process are collected, and the operating condition data are sent to a preset model for abnormality detection. Since the preset model includes two detection models, each detection model performs abnormality detection on the input operating condition data respectively, and obtains two detection results. The abnormal state of the battery to be tested is determined by combining the detection results of the two detection models. Among them, since the dual-model detection architecture adopted can cope with complex operating condition changes, the dual detection models work together to cover the blind spots of a single detection model, and can capture subtle abnormal information of the battery from different angles, providing multi-angle evidence for health status assessment, and can more accurately detect abnormal battery states.
[0011] In a possible implementation of the first aspect, detecting the first data according to a preset model to obtain detection results corresponding to at least two detection models includes:
[0012] Performing feature learning and reconstruction on the first data according to the first detection model to obtain a reconstruction error;
[0013] An abnormal state of the battery is detected according to the reconstruction error to obtain a first detection result.
[0014] In the embodiments of this application, the feature reconstruction error of the autoencoder is used to achieve refined anomaly identification of battery data. This can accurately capture subtle deviations in characteristic features such as voltage curve distortion and charging time anomalies, providing a highly sensitive quantitative indicator for early warning of thermal runaway. As an intuitive anomaly metric with clear physical meaning and threshold boundaries, the reconstruction error can be directly associated with changes in the battery's internal physical state, significantly improving the reliability and interpretability of anomaly detection, effectively reducing the false alarm rate and the risk of missed reports, and providing more accurate and timely decision-making basis for battery safety management.
[0015] In a possible implementation of the first aspect, detecting the first data according to a preset model to obtain detection results corresponding to at least two detection models includes:
[0016] Performing feature learning on the first data according to the second detection model to obtain a first probability; wherein the first probability is a probability that the first data is true data;
[0017] An abnormal state of the battery is detected according to the first probability to obtain a second detection result.
[0018] In an embodiment of the present application, the first data is subjected to feature learning with the aid of a second detection model and a first probability is output, so as to deeply explore the abnormal state of the battery from the data distribution level. By judging the probability that the first data belongs to real normal data, it is possible to keenly capture the data distribution deviation caused by battery aging, internal minor faults, etc. This probability-based detection mechanism can effectively identify hidden anomalies that are difficult to detect with traditional methods. Compared with a single detection dimension, the judgment basis based on probability can not only quantify the degree of battery abnormality, but also enhance the robustness of the model to complex working conditions and noise interference, and achieve high-precision and dynamic monitoring of battery abnormal states, providing more comprehensive and reliable technical support for battery health management and reducing potential safety risks.
[0019] In a possible implementation of the first aspect, obtaining a preset model includes:
[0020] Acquire a plurality of second data, where the second data is historical operating condition data collected for a similar battery during a charging and discharging process;
[0021] The two detection models are trained according to the second data to obtain a preset model.
[0022] In an embodiment of the present application, by collecting historical charging and discharging operating condition data of similar batteries to train a dual detection model, an accurate battery normal status model can be constructed based on massive real operating data, so that the preset model has a highly generalized detection capability for similar battery anomalies, providing data-driven reliable technical support for battery safety management throughout its life cycle.
[0023] In a possible implementation of the first aspect, training two detection models according to the second data to obtain a preset model includes:
[0024] calculating a mean and a standard deviation of a plurality of second data;
[0025] Standardize each second data according to the mean and the standard deviation to obtain a plurality of standardized third data;
[0026] resampling and noise reduction processing are performed on each standardized third data to obtain a plurality of fourth data;
[0027] The two detection models are trained according to the fourth data to obtain a preset model.
[0028] In an embodiment of the present application, by performing a full-process pre-processing of mean and standard deviation calculation, standardization, resampling and noise reduction on historical operating condition data of similar batteries and then training a dual detection model, data dimension differences and noise interference can be eliminated, and a high-quality training set with consistent time series can be constructed, so that the preset model can more accurately capture battery abnormal characteristics and significantly improve detection robustness and generalization capabilities.
[0029] In a possible implementation of the first aspect, the step of training two detection models according to the fourth data to obtain a preset model includes:
[0030] Inputting the fourth data into the first detection model, performing feature learning and data reconstruction on the fourth data according to the first detection model, and obtaining a first loss between the fourth data and the reconstructed data;
[0031] Inputting the reconstructed variables corresponding to the reconstructed data into the second detection model to obtain pseudo data;
[0032] Inputting the fourth data into the second detection model, learning the features of the fourth data according to the second detection model, and obtaining a second loss between the fourth data and the pseudo data;
[0033] When the first loss and the second loss have not reached their respective convergence conditions, continue to iteratively train the parameters corresponding to the first detection model and the second detection model according to multiple fourth data until the first loss and the second loss reach their respective convergence conditions, output the first detection model and the second detection model with converged parameters, and obtain the preset model.
[0034] In an embodiment of the present application, the fourth data is input into the dual detection model for feature learning and reconstruction, and a dual loss function is constructed in combination with pseudo data generation. After iterative training until the loss converges, the preset model has the dual-dimensional detection capabilities of feature reconstruction and distribution discrimination, which can accurately capture the explicit characteristics and implicit distribution deviations of battery abnormalities, and significantly improve the detection accuracy and robustness.
[0035] In a possible implementation of the first aspect, determining an abnormal state of the battery according to detection results corresponding to at least two detection models includes:
[0036] If at least one of the detection results corresponding to the at least two detection models is outside a preset range, the battery state is determined to be abnormal.
[0037] In an embodiment of the present application, by integrating the results of at least two detection models and determining that the battery is abnormal if any detection result exceeds a preset range, cross-validation of multi-dimensional abnormal features can be achieved, effectively covering abnormal patterns that may be missed by a single model, significantly improving the comprehensiveness and reliability of battery abnormality detection, and reducing the risk of missed reports.
[0038] In a second aspect, an embodiment of the present application provides an anomaly detection device, comprising:
[0039] A data acquisition module is used to acquire first data, where the first data is collected operating condition data of the battery to be tested during the charging and discharging process;
[0040] A model acquisition module is used to acquire a preset model, which includes at least two detection models, and different detection models have different abnormality judgment logic;
[0041] a state detection module, configured to detect the first data according to a preset model and obtain detection results corresponding to at least two detection models;
[0042] The state determination module is used to determine the abnormal state of the battery according to the detection results corresponding to at least two detection models.
[0043] In a third aspect, an embodiment of the present application provides a terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a battery abnormality detection method as described in any one of the first aspects above is implemented.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the battery abnormality detection method as described in any one of the first aspects above.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the battery abnormality detection method of any one of the above-mentioned first aspects.
[0046] 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
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions 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 any creative work.
[0048] Figure 1 1 is a flow chart of a battery abnormality detection method provided in an embodiment of the present application;
[0049] Figure 2 This is a schematic diagram of the process of obtaining a preset model provided in an embodiment of the present application;
[0050] Figure 3 This is a flowchart of data initialization provided by an embodiment of the present application;
[0051] Figure 4 This is a flow chart of the training process of the preset model provided in the embodiment of the present application;
[0052] Figure 5 This is a schematic diagram of the process of obtaining the test results provided in the embodiment of the present application Figure 1 ;
[0053] Figure 6 This is a schematic diagram of the process of obtaining the test results provided in the embodiment of the present application Figure 2 ;
[0054] Figure 7 This is a general framework diagram of battery abnormality detection provided by an embodiment of the present application;
[0055] Figure 8 2. This is a schematic diagram comparing the lithium battery before and after thermal runaway provided by an embodiment of the present application;
[0056] Figure 9is a schematic diagram of a change curve of the collected operating condition data provided in an embodiment of the present application;
[0057] Figure 10 This is a schematic diagram of voltage distribution under different cycles provided by the present application;
[0058] Figure 11 This is a diagram of training error and loss analysis provided by the implementation of this application;
[0059] Figure 12 This is a schematic diagram of the abnormal cycle comparison provided by the implementation of this application;
[0060] Figure 13 This is a schematic diagram of battery thermal runaway provided by the implementation of this application;
[0061] Figure 14 is a structural diagram of an abnormality detection device provided in an embodiment of the present application;
[0062] Figure 15 This is a structural diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0064] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0065] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0066] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0067] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0068] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.
[0069] Lithium-ion batteries are widely used in electric vehicles, energy storage systems, and portable electronic devices. However, thermal runaway, a self-reinforcing reaction caused by excessively high internal battery temperatures, can cause the battery to swell, catch fire, or even explode, posing a serious threat to both equipment and personal safety.
[0070] Traditional methods mainly rely on threshold-based monitoring of physical quantities (voltage, current, temperature, etc.), which are easily affected by environmental factors and lead to false alarms or missed alarms. It is also difficult to capture subtle anomalies under complex usage conditions, resulting in the inability to effectively detect abnormal battery conditions.
[0071] To address the aforementioned issues in related technologies, an embodiment of the present application provides a battery anomaly detection method. This method utilizes an unsupervised anomaly detection framework that combines an autoencoder with a generative adversarial network discriminator. This framework utilizes standardized resampled data and a dual discriminator mechanism in latent and reconstructed spaces to enhance the ability to characterize normal data distributions and significantly improve the sensitivity and accuracy of anomaly detection. This method can effectively identify abnormal trends in the early stages of thermal runaway, providing a data-driven solution for the safe management of lithium batteries in electric vehicles and energy storage systems, thereby improving battery reliability and safety.
[0072] See also Figure 1 , is a flowchart of a battery abnormality detection method provided in an embodiment of the present application. As an example and not a limitation, the method may include the following steps:
[0073] S101, obtaining first data, where the first data is collected operating condition data of a battery to be tested during a charging and discharging process.
[0074] In the embodiments of this application, the battery to be tested is a lithium-ion battery whose health status or abnormal risk (thermal runaway) needs to be assessed. Application scenarios include electric vehicle power batteries, energy storage power station battery packs, portable device batteries, etc. Operating condition data refers to the electrical parameters generated in real time by the lithium-ion battery during the charge and discharge process, including voltage (V), current (A), internal resistance (mΩ), and charge and discharge capacity (Ah).
[0075] Specifically, voltage, current and other sensors can be used to collect operating condition data of lithium-ion batteries at a certain frequency. During the collection process, it is necessary to focus on monitoring the late stage of constant current charging (voltage close to the cutoff value) and the constant voltage charging stage (current continues to decay), because the risk of thermal runaway is higher in this stage. During the discharge process, it is necessary to pay special attention to large current discharge (such as when electric vehicles accelerate) and deep discharge (voltage close to the cutoff value), which can easily expose internal defects of the battery.
[0076] S102, obtaining a preset model, where the preset model includes at least two detection models, and different detection models have different abnormality judgment logics.
[0077] In an embodiment of the present application, the preset model refers to a set of models that are pre-trained and deployed for thermal runaway detection of lithium-ion batteries. It is usually trained based on historical operating condition data (such as normal charge and discharge curves) and can be directly used for real-time detection.
[0078] Among them, the model set contains no less than two independent detection models, each model has a unique anomaly judgment logic to form a multi-dimensional detection system. The model set used in this application is a model based on the combination of an autoencoder and a generative adversarial network (GAN) discriminator. The autoencoder judges the anomaly of the input data through "encoding-decoding-reconstruction error" and belongs to the reconstruction error model, while the GAN discriminator judges the anomaly through "distribution probability matching" and belongs to the distribution probability model. The unsupervised anomaly detection framework that combines the autoencoder and the GAN discriminator aims to achieve accurate identification and real-time warning of minor anomalies in the charging process.
[0079] In one embodiment, see Figure 2 , is a schematic diagram of the process of obtaining a preset model provided in an embodiment of the present application, such as Figure 2 As shown, step S102 includes:
[0080] S201, obtaining a plurality of second data, where the second data is historical operating condition data collected from the same type of battery during the charging and discharging process.
[0081] In an embodiment of the present application, the second data is historical operating condition data of the same type of lithium-ion batteries in different states collected in batches, such as voltage, current, and internal resistance, which are used for model training or statistical analysis.
[0082] S202: Train two detection models according to the second data to obtain a preset model.
[0083] In an embodiment of the present application, the autoencoder and the GAN discriminator are trained using the historical operating condition data to learn the characteristic distribution and reconstruction rules of the data. The training process is detailed in steps S301-S304.
[0084] In the above method, by collecting historical charging and discharging operating condition data of similar batteries to train the dual detection model, an accurate battery normal status model can be constructed based on massive real operating data, so that the preset model has a highly generalized detection capability for similar battery anomalies, providing data-driven reliable technical support for battery safety management throughout its life cycle.
[0085] In one embodiment, see Figure 3 , is a flow chart of data initialization provided by an embodiment of the present application, such as Figure 3 As shown, step S102 includes:
[0086] S301, calculating the mean and standard deviation of a plurality of second data.
[0087] In an embodiment of the present application, before using historical operating condition data to train the model, the data must first be preprocessed, such as by performing normalization to eliminate dimensional differences.
[0088] Specifically, assume that the collected data is X={x1,x2,...,x N}where each sample x i Contains battery voltage and current information.
[0089] Calculate the mean and standard deviation of multiple second data, specifically:
[0090]
[0091] Wherein, μ is the mean of the sample data (second data), n is the number of data samples (the number of second data), x i is the i-th data point (second data).
[0092]
[0093] Where σ is the standard deviation of the sample data. The larger the standard deviation, the more drastic the data fluctuation. By describing the central tendency and dispersion of normal data, it provides a mathematical basis for data standardization.
[0094] S302 : performing standardization processing on each second data according to the mean and the standard deviation to obtain a plurality of standardized third data.
[0095] In the embodiment of the present application, the standardization process for each second data is to map the original data into a standard normal distribution with a mean of 0 and a standard deviation of 1, and the formula is:
[0096]
[0097] The data after normalization is labeled as third data. The purpose of normalization is to eliminate the dimensional differences of different data and make subsequent model training and analysis more reliable.
[0098] S303: resampling and noise reduction processing are performed on each standardized third data to obtain a plurality of fourth data.
[0099] In an embodiment of the present application, after the collected historical operating condition data is standardized, in order to improve the quality and robustness of the data, the standardized data may also be resampled and denoised.
[0100] Resampling is the process of converting non-equally spaced sampling data into a fixed time interval sequence. The purpose is to unify the data time series granularity to facilitate model processing. For example, the voltage data with an original sampling interval of 50-100ms corresponding to each third data is resampled into a sequence with a fixed interval of 100ms, and filtering technology is applied to remove noise at the same time. The data after resampling and noise reduction processing of each third data is marked as the fourth data.
[0101] S304: Train two detection models according to the fourth data to obtain a preset model.
[0102] In an embodiment of the present application, the fourth data refers to the lithium battery operating condition data after standardization, resampling and noise reduction processing, which has unified timing, low noise and dimensionless characteristics. This data is used to train the autoencoder and GAN discriminator. The model set formed after training with the fourth data is the preset model, which has the ability to identify anomalies of new data and can be directly deployed in the battery management system for real-time detection.
[0103] In the above method, the dual detection model is trained after the full-process pre-processing of mean and standard deviation calculation, standardization, resampling and noise reduction of historical operating condition data of similar batteries. This can eliminate data dimension differences and noise interference, construct a high-quality training set with consistent time series, and enable the preset model to more accurately capture battery abnormal characteristics, significantly improving detection robustness and generalization capabilities.
[0104] In one embodiment, see Figure 4 , is a flow chart of the training process of the preset model provided in the embodiment of the present application, such as Figure 4 As shown, step S304 includes:
[0105] S401: Input the fourth data into the first detection model, perform feature learning and data reconstruction on the fourth data according to the first detection model, and obtain a first loss between the fourth data and the reconstructed data.
[0106] In this embodiment of the present application, the first detection model is the aforementioned autoencoder. An autoencoder is an unsupervised learning model consisting of an encoder and a decoder. The encoder maps input data x to a latent space z, while the decoder maps the latent space z back to the original data space. Its goal is to minimize the reconstruction error between the input data and the reconstructed data.
[0107] Specifically, for the autoencoder of battery data, assuming that the input data is x (ie, the fourth data), the mathematical representations of its encoder and decoder are respectively,
[0108] z=f θ (x) (1)
[0109]
[0110] Among them, f θ (x) is the encoder function, g φ (z) is the decoder function, is the reconstructed data, z is the latent variable. The training goal of the model is to minimize the mean square error (first loss) between the input data and the reconstructed data:
[0111]
[0112] During the training process, the autoencoder (the first detection model) continuously optimizes the parameters of the encoder and decoder to minimize the reconstruction error, thereby obtaining the best fit for the normal battery charging process.
[0113] S402: Input the reconstructed variables corresponding to the reconstructed data into the second detection model to obtain pseudo data.
[0114] In this embodiment of the present application, the reconstructed variable refers to the latent space feature z output by the encoder in the autoencoder. It is a low-dimensional feature vector output by the autoencoder and contains the core features of the data, such as the shape characteristics and decay rate of the voltage curve. The second detection model is the GAN discriminator described above. The GAN also includes a generator for simulating samples of a normal data distribution. In this context, pseudo data is generated by the second detection model in combination with the reconstructed variable for adversarial training or anomaly assessment.
[0115] When the reconstructed variable z is input into the second detection model, the generator generates simulated samples, i.e., pseudo data, according to the characteristic distribution of the reconstructed variable. The generator may adjust the generation strategy based on the distribution characteristics of z to make the pseudo data closer to the normal data distribution.
[0116] S403: Input the fourth data into the second detection model, learn the features of the fourth data according to the second detection model, and obtain a second loss between the fourth data and the pseudo data.
[0117] In this embodiment of the present application, the GAN discriminator determines whether the input data is real data or generated data (pseudo data). Therefore, after the fourth data is input into the second detection model, the GAN discriminator receives the fourth data and outputs a probability value P(D=1|x) between 0 and 1, indicating the credibility of the data as "real normal data." D(x)≈1: The input data highly matches the normal distribution and is judged as "real data." D(x)≈0: The input data significantly deviates from the normal distribution and is judged as "abnormal data" or "pseudo data."
[0118] In order to enhance the model's ability to discriminate abnormal data, the following loss function is used for optimization:
[0119] L GAN =-E x logD(x)-E z log(1-D(G(z)))
[0120] Here, D(x) is the discriminator's output for real data, G(z) is the fake data generated by the generator, and a fourth data is output. The above loss function yields the second loss between the fourth data and the fake data. The discriminator continuously optimizes its discrimination capabilities by evaluating the input data, thereby improving its ability to identify subtle anomalies during the battery charging process.
[0121] S404, when the first loss and the second loss have not reached their respective corresponding convergence conditions, continue to iteratively train the parameters corresponding to the first detection model and the second detection model according to multiple fourth data until the first loss and the second loss reach their respective corresponding convergence conditions, output the first detection model and the second detection model with converged parameters, and obtain the preset model.
[0122] In an embodiment of the present application, the convergence condition corresponding to the first loss is that the reconstruction error of the autoencoder (first detection model), such as the root mean square error, tends to be stable during the training process, the fluctuation range is reduced, and the mean value reaches below the preset threshold. The convergence condition of the second loss is that the loss of the GAN discriminator for distinguishing real data from pseudo data tends to be stable and no longer decreases significantly, indicating that the distribution modeling ability of the discriminator has reached saturation.
[0123] Through multiple rounds of parameter updates, the first detection model (autoencoder) accurately learns the feature reconstruction pattern of normal data, and the second detection model (GAN discriminator) accurately captures the distribution boundary of normal data, so that the respective losses of the two detection models meet the acceptance conditions, and finally achieves highly sensitive detection of abnormal data.
[0124] Specifically, in 100 consecutive rounds of training, if the mean is ≤ the preset threshold, the average probability of the GAN discriminator for real data is greater than 0.95, and the average probability for fake data is less than 0.1, then the losses of the two detection models have reached the convergence condition, and the training ends. At this time, the trained autoencoder model and GAN model are called the preset model.
[0125] In the above method, the fourth data is input into the dual detection model for feature learning and reconstruction, and a dual loss function is constructed in combination with pseudo data generation. After iterative training until the loss converges, the preset model has the dual-dimensional detection capabilities of feature reconstruction and distribution discrimination, which can accurately capture the explicit characteristics and implicit distribution deviations of battery abnormalities, and significantly improve the detection accuracy and robustness.
[0126] S103: Detect the first data according to a preset model to obtain detection results corresponding to at least two detection models.
[0127] In an embodiment of the present application, a pre-trained model set (preset model) is used to analyze the collected raw data (first data) of the battery charging process to be tested. The preset model includes at least two detection models, such as an autoencoder and a GAN discriminator, which evaluate the data from different dimensions. Ultimately, each detection model will output an independent detection result, which will be further integrated to comprehensively determine the health status of the battery, realizing multi-dimensional and accurate detection of battery anomalies.
[0128] In one embodiment, see Figure 5 , is a schematic diagram of the process of obtaining the test results provided in the embodiment of the present application Figure 1 , step S103 includes:
[0129] S501: Perform feature learning and reconstruction on first data according to a first detection model to obtain a reconstruction error.
[0130] In this embodiment of the present application, after the original electrical parameters (first data) of the battery charging process to be tested are input into the model, the autoencoder (first detection model) first extracts features from the data through the encoder, mapping the high-dimensional original data into a low-dimensional latent space to complete the learning of the core features of the normal charging mode. The decoder then reconstructs the original data based on the latent space features. Finally, the difference between the original first data and the reconstructed data (i.e., the reconstruction error) is calculated.
[0131] S502: Detect an abnormal state of the battery according to the reconstruction error to obtain a first detection result.
[0132] In an embodiment of the present application, the abnormal state of the battery is judged by the reconstruction error and the reconstruction error can be compared with a preset threshold to obtain a comparison result, namely the first detection result. If the error value is small, it means that the battery data characteristics are consistent with the normal mode learned by the model, and the first detection result shows that the battery is in a normal state; if the reconstruction error exceeds the preset threshold, it means that the data characteristics deviate significantly from the normal mode, and the first detection result will determine that the battery is in an abnormal state, which may indicate fault risks such as internal short circuit and early thermal runaway.
[0133] This method uses the autoencoder's feature reconstruction error to achieve refined anomaly identification in battery data. It can accurately capture subtle deviations in features such as voltage curve distortion and charging time anomalies, providing a highly sensitive quantitative indicator for early warning of thermal runaway. As an intuitive anomaly metric with clear physical meaning and threshold boundaries, the reconstruction error can be directly linked to changes in the battery's internal physical state, significantly improving the reliability and interpretability of anomaly detection, effectively reducing the risk of false alarms and missed alerts, and providing more accurate and timely decision-making for battery safety management.
[0134] In another embodiment, see Figure 6 , is a schematic diagram of the process of obtaining the test results provided in the embodiment of the present application Figure 2 , step S103 includes:
[0135] S601, performing feature learning on the first data according to the second detection model to obtain a first probability; wherein the first probability is a probability that the first data is true data.
[0136] In this embodiment of the present application, the collected raw electrical parameters of the battery charging process (first data) are input into the second detection model. The model then extracts and analyzes the data using structures such as convolutional layers and fully connected layers, learning the distribution pattern and key features of normal data. Based on this, the model outputs a value between 0 and 1 (i.e., a first probability).
[0137] S602: Detect an abnormal state of the battery according to the first probability to obtain a second detection result.
[0138] In this embodiment, the battery's abnormal state is determined using a first probability. The first probability represents the likelihood that the first data conforms to a normal data distribution and is truly normal data. The closer the first probability is to 1, the more normal the battery's current data is. If the first probability is close to 0, it means the data deviates from the normal distribution, and the battery may be abnormal.
[0139] In the above method, the second detection model is used to learn the features of the first data and output the first probability, so as to deeply explore the abnormal state of the battery from the data distribution level. By judging the probability that the first data belongs to the real normal data, it is possible to keenly capture the data distribution deviation caused by battery aging, internal minor faults, etc. This probability-based detection mechanism can effectively identify hidden anomalies that are difficult to detect with traditional methods. Compared with a single detection dimension, the judgment basis based on probability can not only quantify the degree of battery abnormality, but also enhance the robustness of the model to complex working conditions and noise interference, and achieve high-precision and dynamic monitoring of battery abnormality, providing more comprehensive and reliable technical support for battery health management and reducing potential safety risks.
[0140] S104: Determine an abnormal state of the battery according to the detection results corresponding to at least two detection models.
[0141] In the embodiment of the present application, the results output by at least two different detection models are comprehensively utilized to determine whether the battery is in an abnormal state.
[0142] In the above method, the operating condition data (such as voltage, current, internal resistance, etc.) of the battery to be tested during the charging and discharging process are collected and sent to the preset model for abnormality detection. Since the preset model includes two detection models, each detection model performs abnormality detection on the input operating condition data separately, and obtains two detection results. The abnormal state of the battery to be tested is determined by combining the detection results of the two detection models. Among them, because the dual-model detection architecture adopted can cope with complex operating condition changes, the dual detection models work together to cover the blind spots of a single detection model, and can capture subtle abnormal information of the battery from different angles, providing multi-angle evidence for health status assessment, and can more accurately detect abnormal battery conditions.
[0143] In one embodiment, step S104 includes:
[0144] If at least one of the detection results corresponding to the at least two detection models is outside a preset range, the battery state is determined to be abnormal.
[0145] In this embodiment of the present application, if the reconstruction error exceeds a certain threshold ε1, the data is considered to be abnormal. If the probability P(D=1|x) output by the GAN discriminator is lower than a certain threshold ε2, the data is considered to be abnormal. The final anomaly detection judgment is based on:
[0146]
[0147] If it is judged to be abnormal, the battery will produce thermal runaway.
[0148] In this method, the reconstruction error output by the autoencoder can reflect anomalies at the data feature level, while the probability output by the generative adversarial network discriminator can reflect anomalies at the data distribution level. By setting rules to integrate these results, if the reconstruction error exceeds a threshold, or the discriminator output probability falls below a threshold, or both are triggered simultaneously, the battery is determined to have an anomaly. This allows for more comprehensive and accurate identification of fault risks such as internal battery defects and early stages of thermal runaway, avoiding the limitations of single-model detection.
[0149] See also Figure 7 , is a general framework diagram of battery abnormality detection provided by an embodiment of the present application, such as Figure 7 As shown, the detection steps include:
[0150] (1) Data acquisition and preprocessing: Collect sensor data such as voltage and current from the battery charging process, and standardize, denoise, and resample the raw data.
[0151] (2) Autoencoder: Use autoencoder to learn and reconstruct the features of battery data, and use the reconstruction error to evaluate the abnormality of the data.
[0152] (3) Generative Adversarial Network Discriminator: The discriminator in GAN is introduced to further enhance the discriminative ability of the model, and the discriminators of latent space and reconstruction space are combined to improve the detection accuracy.
[0153] (4) Joint training: Combine the reconstruction error of the autoencoder and the output of the GAN discriminator for joint training and optimization.
[0154] (5) Thermal runaway detection: Determine whether the data is abnormal based on the reconstruction error of the model and the probability value output by the GAN discriminator.
[0155] It should be noted that during the training process, the historical operating data (i.e., the second data) collected by this application is a series of experiments conducted on a real lithium battery charging data set. Figure 8 As shown in FIG. 1 , it is a schematic diagram showing the comparison of the lithium battery before and after thermal runaway provided by the embodiment of the present application. Figure 8 As shown in the figure, the data used in the experiment comes from a commercial lithium battery thermal runaway test platform, such as Figure 9 1 is a schematic diagram of the change curve of the collected operating condition data provided in an embodiment of the present application, including the change curves of battery electrical parameters, energy parameters, and resistance parameters under thermal runaway.
[0156] See also Figure 10 , is a schematic diagram of voltage distribution under different cycles provided by the present application, such as Figure 10As shown in the figure, a boxplot illustrates the voltage distribution for each charging cycle, providing a visual tool for analyzing cycle-to-cycle voltage stability and potential anomalies. The voltage data for each cycle is presented as a boxplot with a red median line, clearly showing the interquartile range, median, and possible outliers. The height and position of the boxplot reflect the concentration of voltage and cycle-to-cycle variability. This ensures that each cycle contains sufficient representative data to identify cycles with voltage anomalies, providing clues for anomaly detection.
[0157] See also Figure 11 , is a diagram of training error and loss analysis provided by the implementation of this application, such as Figure 11 As shown in the figure, it provides a key basis for evaluating model performance and determining the anomaly detection threshold. The figure contains two sub-figures: the upper sub-figure uses the kernel density estimation (KDE) method to plot the probability density distribution of the reconstruction mean squared error, the orange dashed line marks the mean MSE, and the red solid line marks the anomaly detection threshold. The KDE curve provides a continuous distribution feature of the MSE, which facilitates the identification of the error range of potential anomaly cycles. The lower sub-figure shows the changes in three training losses over the rounds: the latent space discriminator loss, the visual discriminator loss, and the autoencoder loss. The convergence trend of the loss curve indicates that the model has reached a stable state in learning the normal charging mode and the adversarial discrimination task.
[0158] See also Figure 12 , is a schematic diagram of the abnormal cycle comparison provided by the implementation of this application, such as Figure 12 As shown in the figure above, the resampled normalized voltage curve is shown. The significant deviation between the abnormal curve and the reconstructed curve indicates that the autoencoder has difficulty reconstructing the abnormal period. The lower figure compares the original voltage data and shows the voltage fluctuation or offset characteristics of the abnormal period. This highlights the physical characteristics of the abnormal period and provides an important basis for identifying potential thermal runaway risks.
[0159] See also Figure 13 , is a schematic diagram of battery thermal runaway provided by the present application, such as Figure 13 As shown in the figure, the upper subgraph plots the voltage and current as a function of the data point index. The anomalous periods are highlighted in orange shading, and the starting point is marked with a red dashed line, indicating the triggering time and duration of thermal runaway. The lower subgraph shows the mean squared error of normal periods with green bars, orange bars and asterisks mark anomalous periods, and the red dashed line indicates the threshold, highlighting the period where thermal runaway occurs.
[0160] This application proposes an unsupervised detection method for thermal runaway anomalies during lithium-ion battery charging by combining the advantages of an autoencoder and a generative adversarial network discriminator. Experimental results demonstrate that the model can effectively capture subtle anomaly features in voltage and current signals, accurately identifying abnormal periods preceding thermal runaway on a real-world dataset. Through standardized resampling and a dual discriminator mechanism, the model significantly improves detection sensitivity and robustness, providing a reliable technical approach for lithium-ion battery safety monitoring.
[0161] At the methodological level, the reconstruction capabilities of the autoencoder are combined with the adversarial training mechanism of the GAN discriminator, enabling the model to more accurately characterize the distribution characteristics of normal data, thereby enhancing its ability to discriminate abnormal signals. Experimental analysis shows that the model performs well in multiple test scenarios, and the anomaly detection results are highly consistent with the actual observed data, verifying the effectiveness and interpretability of the method. In addition, the model's adaptability to charging cycles of varying lengths facilitates its application in practical engineering projects.
[0162] In summary, this invention provides a new technical approach for early warning of thermal runaway in lithium batteries and lays an important foundation for subsequent research. Future work will focus on real-time optimization of the model and its deployment in industrial scenarios to promote its practical application in battery safety management.
[0163] 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.
[0164] Corresponding to the battery abnormality detection method of the above embodiment, Figure 14 1 is a structural block diagram of the battery abnormality device 14 provided in an embodiment of the present application. For the sake of convenience, only the parts related to the embodiment of the present application are shown.
[0165] Reference Figure 14 , the device 14 comprises:
[0166] The data acquisition module 141 is used to acquire first data, where the first data is collected operating condition data of the battery to be tested during the charging and discharging process;
[0167] A model acquisition module 142 is used to acquire a preset model, wherein the preset model includes at least two detection models, and different detection models have different abnormality judgment logics;
[0168] A state detection module 143 is configured to detect the first data according to the preset model to obtain detection results corresponding to at least two detection models;
[0169] The state determination module 144 is configured to determine the abnormal state of the battery according to the detection results corresponding to at least two of the detection models.
[0170] Optionally, the model acquisition module 142 is further configured to:
[0171] Acquire a plurality of second data, where the second data is historical operating condition data collected for a similar battery during a charging and discharging process;
[0172] Two detection models are trained according to the second data to obtain the preset model.
[0173] Optionally, the model acquisition module 142 is further configured to:
[0174] Calculating a mean and a standard deviation of a plurality of the second data;
[0175] performing standardization processing on each of the second data according to the mean and the standard deviation to obtain a plurality of the third data after the standardization processing;
[0176] resampling and noise reduction processing are performed on each of the third data after the normalization processing to obtain a plurality of fourth data;
[0177] Two detection models are trained according to the fourth data to obtain the preset model.
[0178] Optionally, the model acquisition module 142 is further configured to:
[0179] Inputting the fourth data into a first detection model, performing feature learning and data reconstruction on the fourth data according to the first detection model, and obtaining a first loss between the fourth data and the reconstructed data;
[0180] Inputting the reconstructed variables corresponding to the reconstructed data into the second detection model to obtain pseudo data;
[0181] Inputting the fourth data into a second detection model, learning features of the fourth data according to the second detection model, and obtaining a second loss between the fourth data and the pseudo data;
[0182] When the first loss and the second loss have not reached their respective convergence conditions, continue to iteratively train the parameters corresponding to the first detection model and the second detection model according to the plurality of the fourth data until the first loss and the second loss reach their respective convergence conditions, output the first detection model and the second detection model with converged parameters, and obtain the preset model.
[0183] Optionally, the status detection module 143 is further configured to:
[0184] Performing feature learning and reconstruction on the first data according to a first detection model to obtain a reconstruction error;
[0185] An abnormal state of the battery is detected according to the reconstruction error to obtain a first detection result.
[0186] Optionally, the status detection module 143 is further configured to:
[0187] Performing feature learning on the first data according to a second detection model to obtain a first probability; wherein the first probability is a probability that the first data is true data;
[0188] An abnormal state of the battery is detected according to the first probability to obtain a second detection result.
[0189] Optionally, the state determination module 144 is further configured to:
[0190] If at least one of the detection results corresponding to the at least two detection models is outside a preset range, the battery state is determined to be abnormal.
[0191] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0192] in addition, Figure 2 The device shown may be a software unit, a hardware unit, or a combination of software and hardware units built into an existing terminal device, or may be integrated into the terminal device as an independent accessory, or may exist as an independent terminal device.
[0193] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0194] Figure 15This is a schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 15 As shown, the terminal device 15 of this embodiment includes: at least one processor 150 ( Figure 15 Only one is shown in the figure) a processor, a memory 151, and a computer program 152 stored in the memory 151 and executable on at least one processor 150. When the processor 150 executes the computer program 152, the steps in any of the above-mentioned battery abnormality detection method embodiments are implemented.
[0195] The terminal device can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 15 It is merely an example of the terminal device 15 and does not constitute a limitation on the terminal device 15. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0196] The processor 150 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, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0197] In some embodiments, the memory 151 may be an internal storage unit of the terminal device 15, such as a hard disk or memory of the terminal device 15. In other embodiments, the memory 151 may also be an external storage device of the terminal device 15, such as a plug-in hard disk equipped on the terminal device 15, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. Furthermore, the memory 151 may include both an internal storage unit of the terminal device 15 and an external storage device. The memory 151 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of a computer program. The memory 151 may also be used to temporarily store data that has been output or is about to be output.
[0198] 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, the steps in the above-mentioned method embodiments can be implemented.
[0199] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0200] If the integrated 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 processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. 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. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable medium cannot be an electric carrier signal or a telecommunication signal.
[0201] 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.
[0202] 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.
[0203] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal devices and methods can be implemented in other ways. For example, the device / terminal device embodiments described above are merely illustrative. For example, the division of 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.
[0204] Units described as separate components may or may not be physically separate, and 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.
[0205] The above 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.
Claims
1. A battery abnormality detection method, characterized in that: The method comprises: Acquiring first data, where the first data is collected operating condition data of the battery to be tested during a charging and discharging process; Obtaining a preset model, wherein the preset model includes at least two detection models, and different detection models have different abnormality judgment logics; Detecting the first data according to the preset model to obtain detection results corresponding to at least two detection models; The abnormal state of the battery is determined according to the detection results corresponding to at least two of the detection models.
2. The battery abnormality detection method according to claim 1, wherein: The detecting the first data according to the preset model to obtain detection results corresponding to at least two detection models respectively includes: Performing feature learning and reconstruction on the first data according to a first detection model to obtain a reconstruction error; An abnormal state of the battery is detected according to the reconstruction error to obtain a first detection result.
3. The battery abnormality detection method according to claim 1, wherein: The detecting the first data according to the preset model to obtain detection results corresponding to at least two detection models respectively includes: Performing feature learning on the first data according to a second detection model to obtain a first probability; wherein the first probability is a probability that the first data is true data; An abnormal state of the battery is detected according to the first probability to obtain a second detection result.
4. The battery abnormality detection method according to any one of claims 1 to 3, characterized in that: The obtaining of the preset model includes: Acquire a plurality of second data, where the second data is historical operating condition data collected for a similar battery during a charging and discharging process; Two detection models are trained according to the second data to obtain the preset model.
5. The battery abnormality detection method according to claim 4, wherein: The step of training the two detection models according to the second data to obtain the preset model includes: Calculating a mean and a standard deviation of a plurality of the second data; performing standardization processing on each of the second data according to the mean and the standard deviation to obtain a plurality of standardized third data; resampling and noise reduction processing are performed on each of the third data after the normalization processing to obtain a plurality of fourth data; Two detection models are trained according to the fourth data to obtain the preset model.
6. The battery abnormality detection method according to claim 5, wherein: The step of training two detection models according to the fourth data to obtain the preset model includes: Inputting the fourth data into a first detection model, performing feature learning and data reconstruction on the fourth data according to the first detection model, and obtaining a first loss between the fourth data and the reconstructed data; Inputting the reconstructed variables corresponding to the reconstructed data into the second detection model to obtain pseudo data; Inputting the fourth data into a second detection model, learning features of the fourth data according to the second detection model, and obtaining a second loss between the fourth data and the pseudo data; When the first loss and the second loss have not reached their respective convergence conditions, continue to iteratively train the parameters corresponding to the first detection model and the second detection model according to the plurality of the fourth data until the first loss and the second loss reach their respective convergence conditions, output the first detection model and the second detection model with converged parameters, and obtain the preset model.
7. The battery abnormality detection method according to claim 1, wherein: Determining the abnormal state of the battery according to the detection results corresponding to at least two of the detection models, including: If at least one of the detection results corresponding to the at least two detection models is outside a preset range, the battery state is determined to be abnormal.
8. A battery abnormality detection device, characterized in that: include: A data acquisition module, configured to acquire first data, wherein the first data is collected operating condition data of the battery to be tested during the charging and discharging process; A model acquisition module is used to acquire a preset model, wherein the preset model includes at least two detection models, and different detection models have different abnormality judgment logics; a state detection module, configured to detect the first data according to the preset model and obtain detection results corresponding to at least two detection models; A state determination module is used to determine the abnormal state of the battery according to the detection results corresponding to at least two of the detection models.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Behavior anomaly detection and identification method based on multi-modal perception information
CN121211380A
Security detection method and device for network transmission data
CN121485969A