Power battery internal short circuit early warning method, computer equipment and computer readable medium

By using a CNN-Transformer hybrid architecture short-circuit warning model, which leverages a four-dimensional data feature space and a multi-head attention mechanism, the problems of high false negative rate and short timeliness in short-circuit warning of power batteries are solved, achieving high-precision early thermal runaway warning and meeting the safety management needs of new energy vehicles.

CN121899655APending Publication Date: 2026-04-21LISHEN (QINGDAO) NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LISHEN (QINGDAO) NEW ENERGY CO LTD
Filing Date
2025-12-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies for short circuit warning in power batteries suffer from high false negative rates and short warning time. Especially under complex conditions such as low temperature fast charging, traditional threshold methods are difficult to effectively block the thermal runaway chain reaction, resulting in a high proportion of thermal runaway accidents.

Method used

The short-circuit warning model adopts a CNN-Transformer hybrid architecture. It constructs a four-dimensional data feature space and combines voltage, temperature, current and SOC data. It uses a multi-head attention mechanism to analyze the long-term dependence of cells in the battery pack, capture the long-term degradation law such as lithium plating accumulation, and realize global feature fusion and anomaly warning.

Benefits of technology

It significantly improved the accuracy of early warning, reduced the false alarm rate to 1.8%, and extended the early warning time to 72 hours, meeting the safety requirements of new energy vehicles and achieving a revolutionary progress in early thermal runaway warning capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121899655A_ABST
    Figure CN121899655A_ABST
Patent Text Reader

Abstract

The invention discloses a power battery internal short circuit early warning method, computer equipment and a computer readable medium, and the method comprises the steps: obtaining the voltage and temperature of each single cell, the system-level total current and the four-dimensional data of SOC, and constructing a four-dimensional input vector feature space; inputting the four-dimensional input vector feature space into a short-circuit early-warning model of a CNN-Transform hybrid architecture, extracting microscopic abnormal local features of cell-level voltage and / or temperature in each time window through a CNN network, performing global modeling through a Transform model, analyzing a long-time dependency relationship of cell states in a battery pack in the whole time window by using a multi-head attention mechanism, and performing short-circuit early-warning on the cell states of the battery pack in the whole time window according to the long-time dependency relationship. Capturing a lithium precipitation accumulation equal-length time sequence degradation rule to obtain a global dependency feature; and carrying out adaptive weighted fusion processing on the global dependency features and the microscopic abnormal local features to obtain the abnormal probability of each battery cell, thereby realizing short-circuit early warning. According to the invention, the prediction accuracy and timeliness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery monitoring technology, and in particular to a method for early warning of internal short circuits in power batteries, a computer device, and a computer-readable medium. Background Technology

[0002] The root cause of the safety crisis in batteries used in new energy vehicles can be traced back to the unpredictability of microscopic defects in batteries. Traditional threshold alarm methods rely on fixed voltage / temperature thresholds, which have significant limitations, with a false alarm rate as high as 25%, especially severe under complex operating conditions such as low-temperature fast charging, where the false alarm rate reaches 28.6%. In practice, tests on multiple vehicle models have revealed that progressive thermal runaway caused by micro-short circuits (e.g., <100mΩ) accounts for 42% of all accidents. Traditional methods have an average warning time of only 5-10 minutes for such faults, far below the standard requirement of a 2-hour safety window, making it difficult to effectively prevent the thermal runaway chain reaction. This delayed warning mechanism is insufficient to effectively prevent the thermal runaway chain reaction, resulting in thermal runaway accidents caused by internal short circuits accounting for 67%. Even more serious is that "data gaps" caused by sensor failure can further increase the false alarm rate. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings and defects of the prior art and to provide a method for early warning of internal short circuits in power batteries, a computer device, and a computer-readable medium.

[0004] One object of the present invention is to provide a method for early warning of internal short circuit in a power battery, comprising the following steps:

[0005] Acquire four-dimensional data of the voltage and temperature of multiple individual cells in the battery system, the total system current, and the state of charge (SOC); process the four-dimensional data to construct a four-dimensional input vector feature space;

[0006] The four-dimensional input vector feature space is input into a pre-trained CNN-Transformer hybrid architecture short-circuit warning model. The CNN network extracts microscopic anomaly local features of cell-level voltage and / or temperature within each time window, and the Transformer model performs global modeling. The multi-head attention mechanism is used to analyze the long-term dependence of cell states within the battery pack throughout the entire time window, capturing the long-term degradation law of lithium plating accumulation, and obtaining global dependency features. The global dependency features and microscopic anomaly local features are fused, and global average pooling is performed on the fused features. The global feature vector obtained after global average pooling is mapped through a fully connected layer to obtain the original anomaly score of each cell. Then, the sigmoid function is used to convert the original score into anomaly probability of each cell ranging from 0 to 1, and short-circuit warning is performed based on the anomaly probability.

[0007] Preferably, the cell-level microscopic anomaly local features include at least voltage drop features and / or temperature gradient abrupt changes.

[0008] Preferably, the short-circuit early warning model includes multiple output heads, the number of which is the same as the number of battery cells, and each output head corresponds to outputting the abnormal probability of one battery cell.

[0009] Preferably, when the predicted value of the abnormal probability of any of the output heads exceeds the threshold, it is determined that the corresponding battery cell is abnormal.

[0010] Preferably, during the training of the short-circuit warning model, after acquiring real-time data from the battery system, the data is preprocessed, and an input vector feature space is constructed to input the short-circuit warning model for training, including:

[0011] Impossible values ​​in the obtained real-time four-dimensional data are deleted; if there is instantaneous missing data, it is filled by interpolation of the mean over a preset time period; if there is systematically failed data, the data is reconstructed using the inverse distance weighting method.

[0012] The temperature data of the battery cells is mapped and reconstructed, and then the data is standardized by calculating the mean and standard deviation of the features to obtain the reconstructed four-dimensional input vector feature space.

[0013] Preferably, for systematic failure data, an inverse distance weighted algorithm is used to reconstruct the data, as shown in the following formula:

[0014] ;

[0015] in, Indicates the target point Reconstructed data; Indicates the target point The set of neighboring points; The weights represent the weights in the inverse distance weighting algorithm; Indicates in the neighborhood In the middle, the first The actual measurement value of a known valid data point.

[0016] Preferably, the weights of the inverse distance weighting algorithm are calculated using the following formula:

[0017] ,

[0018] in These are the weighting coefficients. Indicates at a point in time , No. Readings of each effective sensor node.

[0019] Preferably, during the training of the short-circuit early warning model, the temporal information of the data is protected through a dual mechanism, including:

[0020] Explicitly injected sinusoidal position encoding Clearly identify the sequence order; among which, In the position encoding vector, it corresponds to the first position in the sequence. The position, the Encoded values ​​for each dimension; This represents the absolute index of a data point within the sequence; This represents the embedding dimension of the Transformer model;

[0021] If invalid data exists, a dynamic mask pooling mechanism is used: a dynamic mask matrix formed during interpolation completion and / or data reconstruction is used to participate in gradient calculation, guiding the Transformer model's attention to focus on the effective information region; a mask offset is applied to invalid regions with a mask label of 0, causing the normalized exponential function Softmax weights to approach zero; and weighted average pooling is performed on the effective regions. This yields the global feature vector; where Indicates the first The attention weights at each time step are dynamically generated from the importance of features; Indicates the first Feature representation of each time step; This represents the global feature vector obtained after the pooling operation.

[0022] Preferably, during the model inference stage, before the data is input into the model, a dynamic mask matrix is ​​used to filter invalid noise in the data, and when the model outputs the predicted anomaly probability, a dynamic mask matrix is ​​used for intelligent filtering to ensure the accuracy of the predicted anomaly probability.

[0023] Another object of the present invention is to provide a computer device including a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the processor implements the battery short circuit warning method when executing the computer program.

[0024] A third objective of the present invention is to provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the battery internal short circuit warning method.

[0025] This invention focuses on real-time analysis, constructing a four-dimensional feature space of voltage-temperature-current-SOC under all charging and discharging conditions to achieve collaborative monitoring of micro-individual cells and macro-systems. The CNN-Transformer hybrid architecture is specifically designed to capture early and weak features of internal short-circuit faults. It focuses on the four-dimensional electrochemical core parameters of "voltage-temperature-current-SOC" to achieve vertical and horizontal correlation from individual cell voltage to system current SOC. Using a time-series model (CNN-Transformer), it provides early warning of internal short-circuit faults and can specifically detect voltage anomalies, a core characteristic of internal short circuits, making the target more targeted rather than a generalized state assessment and scoring.

[0026] This invention employs a dynamic masking mechanism to address the real-time failure problem of sensors. The dynamic masking mechanism is a real-time data cleaning and reconstruction tool that solves the problem of missing real-time data caused by sensor hardware failure. By using the inverse distance weighting method for interpolation, it can ensure the integrity of the data input to the downstream model.

[0027] This invention is a purely supervised deep learning fault diagnosis model. Its CNN-Transformer architecture early warning model can complete the end-to-end mapping from raw data to fault judgment. All components (dynamic masking, feature extraction, classification decision) are integrated in a unified framework, making the structure more compact and integrated.

[0028] This invention constructs an "active immune" safety protection system and technical framework, realizing a paradigm shift in power battery management, achieving early thermal runaway warning capabilities, solving the technical bottlenecks of high false negative rates and short warning timeliness in traditional methods, and promoting a paradigm shift in battery safety management from "passive response" to "active prevention," thus meeting the technical needs of the large-scale development of new energy vehicles.

[0029] This invention proposes a "four-dimensional spatiotemporal fusion" power battery health monitoring architecture, which can achieve early thermal runaway warning capability at the 72-hour level, resulting in a significant improvement in warning timeliness, a revolutionary advancement compared to the 5-10 minutes of traditional methods. Through four-dimensional time series modeling of voltage-temperature-current-SOC, the false alarm rate is reduced to 1.8%, significantly improving warning accuracy. It effectively solves the technical bottlenecks of high false alarm rate and short warning timeliness of traditional methods, successfully addressing the triangular contradiction of "high accuracy-low cost-strong real-time" faced by the industry. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the power battery internal short circuit early warning method of the present invention.

[0031] Figure 2 This is a first schematic diagram of the cell temperature mapping reconstruction of the present invention.

[0032] Figure 3This is a second schematic diagram of the cell temperature mapping reconstruction of the present invention. Detailed Implementation

[0033] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0034] The exemplary embodiments of this application innovatively adopt a CNN-Transformer dual-stream fusion architecture to achieve accurate early warning of internal short-circuit faults through a collaborative and complementary mechanism.

[0035] An exemplary embodiment of this application provides a method for early warning of internal short circuits in a power battery, comprising the following steps:

[0036] Acquire four-dimensional data of the voltage and temperature of multiple individual cells in the battery system, the total system current, and the state of charge (SOC); process the four-dimensional data to construct a four-dimensional input vector feature space;

[0037] The four-dimensional input vector feature space is input into the pre-trained CNN-Transformer hybrid architecture short circuit warning model, and the short circuit warning model outputs the abnormal probability of each cell.

[0038] Specifically, after the four-dimensional input vector feature space is input into the model, the model extracts the microscopic anomaly local features of cell-level voltage and / or temperature within each time window through a CNN network, performs global modeling through a Transformer model, and uses a multi-head attention mechanism to analyze the long-term dependence of cell states within the entire time window, capturing the long-term degradation law of lithium plating accumulation, and obtaining global dependency features. The global dependency features are fused with the microscopic anomaly local features, and the fused features are subjected to global average pooling. The global feature vector obtained after global average pooling is mapped through a fully connected layer to obtain the original anomaly score of each cell. Then, the original score is converted into the predicted value of the anomaly probability of each cell in the range of 0 to 1 through the sigmoid function, and a short circuit warning is performed based on the predicted value of the anomaly probability (after comparison with a threshold).

[0039] For example, in the short-circuit warning model of the CNN-Transformer hybrid architecture in this application, the CNN (Convolutional Neural Network) branch design employs a double-layer convolutional structure (convolutional layer parameter kernel_size=7→5) to specifically capture microscopic anomalies at the cell level, focusing on identifying high-risk signals including voltage drops (>0.5V / 100ms) and temperature gradient abrupt changes (>2℃ / min); the Transformer branch model is configured with a three-layer encoder (core hyperparameter configuration: model feature dimension d_model=128, number of "heads" in the multi-head attention mechanism nhead=8), utilizing the multi-head attention mechanism to analyze the coupling effect between cells within the battery pack and capture the long-term degradation law of lithium plating accumulation. This hybrid architecture fully leverages the local perception advantages of CNN and the global modeling capabilities of Transformer, achieving efficient computation in the multidimensional, such as 194-dimensional feature space of the battery system.

[0040] For example, the cell-level microscopic anomaly local features include at least voltage drop features (such as voltage drop events >0.5V / 100ms) and / or temperature gradient abrupt change features. The voltage drop features and / or temperature gradient abrupt change features can be used to determine and identify short circuits within the battery.

[0041] In some embodiments, the model can also perform real-time calculations based on DC internal resistance analysis. ( and The changes in battery terminal voltage and load current are used as auxiliary features to enhance the sensitivity to micro-short circuits (such as <100mΩ). Furthermore, by analyzing the static voltage drop and using a sliding window (window length SEQ_LEN=60) to statistically analyze the mean, variance, and other statistical quantities, abnormal self-discharge can be identified.

[0042] For example, in this application, the short-circuit warning model includes multiple output heads, the number of which is the same as the number of battery cells. Each output head corresponds to outputting the anomaly probability of one battery cell. That is, for each battery cell in the battery module or battery system, one output head is configured, and each output head corresponds to outputting the anomaly probability of one battery cell. For example, when the predicted value of the anomaly probability of any output head exceeds a threshold, it is determined that the corresponding battery cell is abnormal. The threshold can be 0.5 or other values.

[0043] In this embodiment of the application, during the training of the short-circuit warning model, after acquiring real-time data of the battery system, the data is preprocessed, and an input vector feature space is constructed to input the short-circuit warning model for training, including:

[0044] Impossible values ​​are deleted from the acquired real-time four-dimensional data, such as records with a total voltage <100V or >500V. If there is transient missing data, it is filled in by interpolation using the mean of the time intervals before and after the missing data. For example, for a continuous 10-second missing data, the effective mean of the time intervals before and after the missing data is used for interpolation. The interpolation formula is as follows: =( + If there is systematic failure data, the inverse distance weighting method is used to reconstruct the data. Through interpolation and reconstruction, a dynamic mask matrix is ​​formed. The temperature data of the battery cell is mapped and reconstructed with the battery cell. Then, the data is standardized. The mean and standard deviation of the features are calculated and normalized to obtain the reconstructed four-dimensional input vector feature space.

[0045] Furthermore, in the data preprocessing, temperature compensation loop technology can be used, such as using a third-order polynomial to fit the voltage-temperature relationship curve, to eliminate measurement deviations in the working temperature range of -30℃ to 60℃ and ensure the rationality of the temperature data.

[0046] In this embodiment, the four-dimensional input vector feature space is composed of a voltage-temperature-current-SOC four-dimensional feature space, which serves as the core input of the model and is mathematically represented as a feature matrix F:

[0047]

[0048] Taking a battery system with 96 cells as an example, this matrix vertically integrates the voltage of 96 individual cells (…). ) and reconstruction temperature ( ), horizontal integration system-level total current Together with the SOC (States of Charge) parameter, this forms a complete characterization system covering "microscopic individual cell behavior - macroscopic system state". This design breaks through the limitations of traditional single-dimensional monitoring, and can simultaneously capture cell voltage drops and abnormal fluctuations in system-level SOC, providing a data foundation for the correlation analysis of latent faults.

[0049] For example, in this embodiment of the application, for systematic failure data, preferably, an inverse distance weighted algorithm is used to reconstruct the data, as shown in the following formula:

[0050] ;

[0051] in, Indicates the target point Reconstructed data; Indicates the target point The set of neighboring points; The weights represent the weights in the inverse distance weighting algorithm; Indicates in the neighborhood In the middle, the first The actual measurement value of a known valid data point.

[0052] Taking temperature data monitored by a temperature probe as an example, the following formula is used to calculate the temperature data during reconstruction:

[0053] ,in =1 / , Let be the topological distance between probe k and the failed probe.

[0054] For example, in this application, the weights of the inverse distance weighting algorithm are calculated using the following formula:

[0055] ,

[0056] in These are the weighting coefficients. Indicates at a point in time , No. Readings of each effective sensor node.

[0057] For example, in this application, the time-series information of the short-circuit early warning model is protected during training through a dual mechanism, including:

[0058] Explicitly injected sinusoidal position encoding Clearly identify the sequence order; among which, In the position encoding vector, it corresponds to the first position in the sequence. The position, the Encoded values ​​for each dimension; This represents the absolute index of a data point within the sequence; This represents the embedding dimension of the Transformer model;

[0059] If transient or systematic data failures exist, a startup mask pooling mechanism is used. This involves employing a dynamic mask matrix generated during interpolation completion and / or data reconstruction to participate in gradient calculation, guiding the Transformer model's attention to focus on the effective information region. A mask offset is applied to invalid regions with a mask flag of 0, causing the Softmax weights of the normalized exponential function to approach zero. Weighted average pooling is then performed on the effective regions. This yields the global feature vector; where Indicates the first The attention weights at each time step are dynamically generated from the importance of features; Indicates the first Feature representation of each time step; This represents the global feature vector obtained after the pooling operation.

[0060] In some embodiments, during the model inference stage, before the data is input into the model, a dynamic mask matrix is ​​used to filter invalid noise in the data, and when the model outputs the predicted anomaly probability, a dynamic mask matrix is ​​used for intelligent filtering to ensure the accuracy of the predicted anomaly probability.

[0061] The dynamic masking mechanism, a key technology for engineering adaptation, addresses the challenge of sensor failure. It scans abnormal channels in the data stream in real time, uses an inverse distance weighting method for interpolation and reconstruction of failed nodes, and generates corresponding weight coefficients using the aforementioned weight generation formula or algorithm. Simultaneously, a binary mask matrix is ​​generated to mark valid data regions. During model training, the dynamic mask matrix participates in gradient calculation, guiding the model's attention to focus on valid information regions. During model inference, it dynamically filters out invalid noise. Experimental results show that compared to traditional fixed masking strategies, this technology improves the data utilization rate of a 96-cell battery system by 29%.

[0062] The CNN-Transformer architecture model in this application extracts local spatiotemporal features of voltage and / or temperature at the cell level from the CNN layer to generate a high-resolution feature map. Then, it is adaptively weighted and fused with the globally dependent features extracted by the Transformer through a cross-modal attention module. Multi-scale information fusion is achieved through a feature cascading mechanism, and finally, a cell-level anomaly probability score is output at the decoder layer. This design solves the problem of delayed response of traditional methods to sudden micro short circuits (such as <100mΩ).

[0063] Performance comparison data shows that the CNN-Transformer architecture has significant advantages: the traditional threshold method can only provide an 8-minute warning time and an accuracy of only 75.2%; the LSTM model improves the timeliness to 24 hours and the accuracy to 88.1%; this solution greatly extends the warning timeliness to 72 hours and improves the accuracy to 94.3%, achieving a dual breakthrough in warning capability and computational efficiency.

[0064] In this application, the following steps are used during model training:

[0065] 1. Data Collection:

[0066] Collect time-series monitoring parameters uploaded by new energy electric vehicles: timestamp (TIME), charging status (CHARGE_STATUS), vehicle speed (SPEED), cumulative mileage (SUM_MILE_AGE), total voltage (SUM_VOLTAGE), total current (SUM_CURRENT), SOC value, and 95 / 96 cell voltage (U_1). ~ U_95 / U_1 ~ U_96) and 34 / 32 channel temperature probe data (T_1) ~T_34 / T_1 ~ (T_32). The data sampling frequency is 10 seconds / time, covering all operating conditions such as vehicle stationary, charging and discharging.

[0067] 2. Data cleaning:

[0068] A three-stage cleaning strategy is employed to address data quality issues. First, physically impossible values ​​are removed: records with a total voltage <100V or >500V are deleted. Second, transient missing values ​​are handled: for consecutive 10-second gaps, effective mean interpolation is used, with the formula U_t = (U_(t-10) + U_(t+10)) / 2. Finally, for systematic failures: such as temperature probe failure causing no temperature change (while other temperature probes show changes), inverse distance weighting is used for reconstruction. , where ω_k=1 / d_k (d_k is the topological distance between probe k and the failed probe).

[0069] 3. Data conversion:

[0070] Includes temperature mapping reconstruction and standardized sliding window:

[0071] Among them, temperature mapping reconstruction: based on the 1p5s (1p6s) cell topology, through the formula The temperature probe data (T_i) is mapped to the cell P_T_j. ~ P_T_{j+4}(P_T_j ~ P_T_{j+5}).

[0072] Standardization and sliding window: Z-score standardization is performed on 96-dimensional voltage, 96-dimensional reconstructed temperature, current, and SOC. , This represents the data before normalization. This represents data after normalization to eliminate dimensional differences; a sliding window with SEQ_LEN=60 (covering 10 minutes) is set to generate time-series samples with a 50% overlap rate. A single sample contains a 60-step × 194-dimensional (96V+96T+1I+1SOC) tensor.

[0073] The mean of the 194-dimensional features (96 voltage + 96 temperature + 1 current + 1 SOC) was calculated based on the training set statistics. and standard deviation Then, Z-score normalization is applied.

[0074] The sliding window processing addresses the issue of inconsistent sequence lengths by employing a dynamic padding mechanism. This involves padding the end of sequences shorter than SEQ_LEN=60 with zeros, downsampling excessively long sequences with a step size of 10, generating a binary mask tensor (mask=1 indicates valid data), and finally outputting a floating-point tensor with dimensions [BATCH, SEQ_LEN, 194] and an equal-dimensional mask matrix (BATCH represents the batch size in deep learning model training), forming a standardized sample space that the model can process.

[0075] 4. Feature Space Construction

[0076] A four-dimensional feature space comprising voltage, temperature, current, and state of charge (SOC) is constructed as the core input of the model, and its mathematical representation is the feature matrix F:

[0077]

[0078] This matrix vertically integrates 96 cell-level individual voltages ( ) and reconstruction temperature ( ), horizontal integration system-level total current Together with the SOC (States of Charge) parameter, this forms a complete characterization system covering "microscopic individual cell behavior - macroscopic system state". This design breaks through the limitations of traditional single-dimensional monitoring, and can simultaneously capture cell voltage drops and abnormal fluctuations in system-level SOC, providing a data foundation for the correlation analysis of latent faults.

[0079] 5. Forward propagation stage of model training

[0080] This stage achieves multi-level feature fusion. The input tensor first enters the feature extraction module: a one-dimensional convolutional layer (kernel_size=5, stride=1) captures local abnormal patterns and outputs a high-dimensional feature map; the Transformer encoder (3 layers + 8 heads) parses the global coupling relationship between cells through the self-attention weight matrix.

[0081] Timing information is protected through a dual mechanism: explicitly injected sinusoidal position encoding. Clearly identify the sequence order, where, In the position encoding vector, corresponding to the first position in the sequence... The position in the vector. Encoded values ​​for each dimension; This represents the absolute index of a data point within the sequence. (This represents the embedding dimension of the Transformer model), while the self-attention mechanism implicitly learns the stage dependence of the charging and discharging process.

[0082] Dynamic mask pooling mechanism: Apply mask offset to invalid regions with a mask flag of 0, making the Softmax (normalized exponential function) weights approach zero; for valid regions, perform weighted average pooling. , Indicates the first The attention weights at each time step are dynamically generated from the importance of features; Indicates the first Feature representation of each time step; This represents the global feature vector obtained after the pooling operation.

[0083] 6. Backpropagation and Optimization Phase

[0084] First, calculate the predicted value. Compared with the true value Mean square error loss The AdamW optimizer is used. Update parameters, weight decay factor Decoupling from gradient updates suppresses the risk of overfitting in the Transformer layer.

[0085] The learning rate scheduler implements the ReduceLROnPlateau strategy: if the validation loss does not decrease for three consecutive rounds, the learning rate decays by 50% (from the initial value). Down to ).

[0086] The loss function incorporates triple regularization: weight decay constrains parameter norm, Dropout rate of 0.1 randomly masks neurons, and gradient pruning restricts update step size to ≤1.0.

[0087] After the model is trained, the following steps are used to perform inference or judgment:

[0088] First, the battery module (taking 96 cells as an example) is monitored in real time via CAN bus, collecting data on the voltage of the 96 cells, 32 temperature probes, total current, and SOC (sampling frequency 0.1 Hz). To address environmental sensor failure issues (such as continuous loss of individual cell voltage and temperature), a dynamic mask filtering module is used to automatically identify abnormal channels.

[0089] When all-zero / NaN data is detected, the nearest cell interpolation mechanism is immediately triggered, and the data is reconstructed using an inverse distance weighted algorithm. , Indicates the target point Reconstructed data; Indicates the target point The set of neighboring points; The weights represent the weights in the inverse distance weighting algorithm; Indicates in the neighborhood In the middle, the first The actual measured values ​​of known valid data points are used to generate binary masks to mark the valid regions, forming a dynamic mask matrix. The valid data of the four-dimensional input vector of the battery system without interpolation or reconstruction, or the data of the battery system after interpolation or reconstruction, along with the corresponding dynamic mask matrix, are entered into the CNN-Transformer hybrid model for real-time inference and judgment.

[0090] The model's CNN network extracts local fluctuation patterns of cell voltage and temperature within each time window through one-dimensional convolutional operations, mapping the raw features into a 128-dimensional high-level feature representation. The CNN network's role is to capture anomalous fluctuations in the cell over short time scales, such as sudden drops in voltage or anomalous increases in temperature. The high-level features extracted by the CNN network serve as input to the Transformer encoder.

[0091] Specifically, a CNN outputs a 128-dimensional feature sequence across 60 time steps. To accommodate the input sequence requirements of the Transformer encoder, the feature dimensions are permuted, resulting in 60 time steps, each represented by a 128-dimensional feature vector. Thus, the feature vector at each time step contains local pattern information extracted by the CNN. The Transformer encoder uses a self-attention mechanism to encode these time step feature vectors, thereby capturing the long-term dependencies of the cell state within the entire time window. Through this connection, the CNN is responsible for extracting local temporal patterns, while the Transformer is responsible for modeling global temporal dependencies. The two types of features are fused or combined to form a more comprehensive representation of the battery cell state. The Transformer encoder outputs a 60-time-step feature sequence, each with 128 dimensions, where the feature vector at each time step incorporates the contextual information of the entire time window.

[0092] Subsequently, a global average pooling layer is used to average each feature channel over the time dimension, resulting in a 128-dimensional feature vector. This feature vector is then mapped to 96 dimensions through a fully connected layer, corresponding to the original anomaly scores of 96 battery cells. Finally, the sigmoid function is used to convert the original scores into the anomaly probability of each battery cell, ranging from 0 to 1.

[0093] In determining the anomaly probability, the logic employs dynamic mask filtering and threshold decision-making. Specifically, the model uses a 96-output head architecture, with each output head corresponding to the fault detection of cells 1 to 96. In practical applications, for data samples containing only 95 cells, the system uses a dynamic mask matrix for automatic completion processing. During the inference and prediction phase, this dynamic mask matrix is ​​used to intelligently filter the output results, ensuring the accuracy of the prediction.

[0094] The decision-making mechanism of the model in this application adopts a threshold-based judgment scheme: when the predicted value of any output head exceeds the threshold of 0.5, it is determined that the cell corresponding to that number is abnormal; if the predicted values ​​of all output heads are below 0.5, the output result is 0, indicating that no abnormal cell was detected in the current sample. This design ensures the model's compatibility with battery modules of different sizes, and also ensures the reliability of fault judgment through strict threshold control. Example

[0095] I. The dataset is composed as follows:

[0096] Table 1 Internal Short Circuit Fault Data Set

[0097]

[0098] This dataset comprises three parts: a labeled training set, an unlabeled training set, and a test set. The labeled training set contains only four anomalous samples, with the typical fault type being a cell-level internal short circuit. This small sample size and predominantly anomalous nature necessitates careful attention to overfitting risks during model training. The unlabeled training set contains 36 samples, all of which are known to be free of internal short circuits. While the data volume is relatively sufficient, the lack of anomalous samples poses a challenge to training the fault detection model. The test set is the largest, containing 50 samples. Its anomalous proportion is unknown, and it may contain hidden faults, placing higher demands on the model's generalization ability. Overall, the dataset exhibits characteristics of scarce labeled samples and an imbalance between normal and anomalous data. Subsequent modeling will require techniques such as data augmentation and semi-supervised learning to improve model performance. Furthermore, the presence of hidden faults in the test set necessitates stronger robustness and the ability to identify unknown faults.

[0099] II. Training of Internal Short Circuit Early Warning Model

[0100] The main information recorded during the model training process is as follows:

[0101] 1. Training Information

[0102] The training consists of 10 epochs (Epoch 1 / 10 to Epoch 10 / 10), and the training loss for the current epoch is output after each epoch.

[0103] The data processing progress is displayed at 10% intervals during each training round (e.g., train:10%, train:100%). Ultimately, 327 / 327 batches are completed, indicating that data loading and iteration are normal.

[0104] Training time and speed: approximately 0.11 seconds per batch. ~0:12 (minutes:seconds), single sample processing speed approximately 25.17. ~ 27.96 it / s (iterations per second), overall speed is stable.

[0105] During the rapid decline phase, the loss in Epoch 1-2 dropped sharply from the initial 0.0297 to 0.0028, a decrease of over 90%, representing a drop of an order of magnitude. This indicates that the learning rate setting was reasonable and the optimizer performed well.

[0106] During the slow convergence phase, the loss in Epoch 3-10 starts from the 3rd epoch (0.00036), and the rate of loss decrease slows down significantly. By the 10th epoch, it stabilizes at a very low value close to 0 (0.000015), and the curve tends to flatten out, entering the fine-tuning phase. This shows that the model has basically converged and there is no obvious overfitting.

[0107] No significant fluctuations: The curve is smooth overall, with no abnormal rebounds or oscillations, indicating that the training process is stable and there are no problems such as gradient explosion / vanishing. The model converges stably on the training set.

[0108] 2. Training loss curve of internal short circuit early warning model

[0109] Table 2. Trend of Training Loss

[0110]

[0111] After the 6th round, the loss was less than 0.0001. The decrease in subsequent rounds was small (e.g., in Epoch 7-10, it only decreased from 0.000039 to 0.000015). The curve tended to flatten out and entered the fine-tuning stage, indicating that the model's fit to the training data was close to saturation.

[0112] Overall trend: The training loss decreased from 0.0297 in the first round to 0.000015 in the tenth round, a decrease of more than 99.95%, indicating that the model fits well on the training set.

[0113] Convergence Status: Starting from the 5th round, the rate of loss decrease slows significantly, and by the 10th round it approaches 0, reaching the minimum loss on the training set. The model has learned the training data quite well. The training process is stable, the loss decreases rapidly and gradually converges, and the model fits the training data well.

[0114] III. Identification of Faulty Vehicles

[0115] Table 3 Vehicles with internal short circuit faults

[0116]

[0117] A diagnostic model for sudden internal short circuit faults, built based on training data, successfully identified two vehicles with sudden internal short circuit faults. The fault in vehicle JBGS25000005794 occurred in the first cell (U_1) of the battery module, while the fault in vehicle JBGS25000009425 occurred in a cell slightly towards the rear of the module (U_60). If products from the same batch exhibit similar spatial distribution characteristics, with internal short circuits occurring in both the first and last cells, this fault case (JBGS25000005794) may indicate a systemic risk in the battery module's structural design or assembly process. This could stem from separator damage caused by mechanical stress concentration at the module's ends, or from localized thermal runaway caused by differences in heat dissipation conditions at the module's ends.

[0118] This head-and-tail fault distribution pattern provides important clues for optimizing battery system reliability, suggesting that manufacturers need to focus on strengthening the mechanical fixing and thermal management design of cells at the end of the module, while implementing more stringent quality monitoring and life prediction measures for cells at extreme locations in the battery pack.

[0119] In a further embodiment of the present invention, a computer device is provided, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the battery short circuit warning method.

[0120] In a further embodiment of the present invention, a computer-readable medium is provided having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the battery internal short circuit warning method.

[0121] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention.

[0122] Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of the equivalents of the claims be included within the invention.

[0123] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for early warning of internal short circuit in a power battery, characterized in that, Includes the following steps: Acquire four-dimensional data of the voltage and temperature of multiple individual cells in the battery system, the total system current, and the state of charge (SOC); process the four-dimensional data to construct a four-dimensional input vector feature space; The four-dimensional input vector feature space is input into the pre-trained CNN-Transformer hybrid architecture short-circuit warning model. The CNN network extracts the microscopic abnormal local features of cell-level voltage and / or temperature within each time window. The Transformer model is used for global modeling. The multi-head attention mechanism is used to analyze the long-term dependence of cell state within the battery pack within the entire time window, capture the long-term degradation law such as lithium plating accumulation, and obtain global dependence features. Global dependent features and micro-anomaly local features are fused together, and global average pooling is applied to the fused features. The global feature vector obtained after global average pooling is mapped through a fully connected layer to obtain the original anomaly score for each cell. Then, the original score is converted into an anomaly probability for each cell in the range of 0 to 1 using the sigmoid function, and short circuit warning is performed based on the anomaly probability.

2. The battery internal short circuit early warning method according to claim 1, characterized in that, The local microscopic anomalies at the cell level include at least voltage drop characteristics and / or temperature gradient abrupt changes.

3. The battery internal short circuit early warning method according to claim 1, characterized in that, The short-circuit early warning model includes multiple output heads, the number of which is the same as the number of battery cells. Each output head corresponds to the output of the abnormal probability of one battery cell.

4. The battery internal short circuit early warning method according to claim 3, characterized in that, When the predicted value of the abnormal probability of any of the output heads exceeds the threshold, it is determined that the corresponding battery cell is abnormal.

5. The battery internal short circuit early warning method according to claim 1, characterized in that, During the training of the short-circuit warning model, after acquiring real-time data from the battery system, the data is preprocessed, and an input vector feature space is constructed to input the short-circuit warning model for training, including: Impossible values ​​in the obtained real-time four-dimensional data are deleted; if there is instantaneous missing data, it is filled by interpolation of the mean within a preset time period; if there is systematic failure data, the data is reconstructed using the inverse distance weighting method; the temperature data of the battery cells is mapped and reconstructed with the battery cells, and then the data is standardized by calculating the mean and standard deviation of the features to obtain the reconstructed four-dimensional input vector feature space.

6. The battery internal short circuit early warning method according to claim 5, characterized in that, For systematically failed data, an inverse distance weighted algorithm is used to reconstruct the data, as shown in the following formula: ; in, Indicates the target point Reconstructed data; Indicates the target point The set of neighboring points; The weights represent the weights in the inverse distance weighting algorithm; Indicates in the neighborhood In the middle, the first The actual measurement value of a known valid data point.

7. The battery internal short circuit early warning method according to claim 6, characterized in that, The weights of the inverse distance weighting algorithm are calculated using the following formula: , in These are the weighting coefficients. Indicates at a point in time , No. Readings of each effective sensor node.

8. The battery internal short circuit early warning method according to claim 1, characterized in that, During training, the short-circuit early warning model ensures the temporal information of the data through a dual mechanism, including: Explicitly injected sinusoidal position encoding Clearly identify the sequence order; among which, In the position encoding vector, it corresponds to the first position in the sequence. The position, the Encoded values ​​for each dimension; This represents the absolute index of a data point within the sequence; This represents the embedding dimension of the Transformer model; If invalid data exists, a dynamic mask pooling mechanism is used: the dynamic mask matrix formed during interpolation completion and / or data reconstruction participates in gradient calculation, guiding the Transformer model's attention to focus on the effective information region; a mask offset is applied to invalid regions with a mask label of 0, making the normalized exponential function Softmax weights approach zero; and weighted average pooling is performed on the effective regions. This yields the global feature vector; where Indicates the first The attention weights at each time step are dynamically generated from the importance of features; Indicates the first Feature representation of each time step; This represents the global feature vector obtained after the pooling operation. Preferably, during the model inference stage, before the data is input into the model, a dynamic mask matrix is ​​used to filter invalid noise in the data, and when the model outputs the predicted anomaly probability, a dynamic mask matrix is ​​used for intelligent filtering to ensure the accuracy of the predicted anomaly probability.

9. A computer device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the battery internal short circuit warning method as described in any one of claims 1-8.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the battery internal short circuit warning method as described in any one of claims 1-8.