CNN-LSTM-SE battery thermal runaway early warning method and system based on transfer learning

By using a CNN-LSTM-SE neural network model based on transfer learning, the problem of delayed early warning caused by insufficient data in battery thermal runaway prediction is solved, enabling early identification and stable early warning of battery status, and improving the identification sensitivity and response speed of the early warning model.

CN122017583APending Publication Date: 2026-05-12STATE GRID SHANXI ELECTRIC POWER COMPANY CHANGZHIELECTRIC POWER SUPPLY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANXI ELECTRIC POWER COMPANY CHANGZHIELECTRIC POWER SUPPLY
Filing Date
2026-01-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing battery thermal runaway prediction methods suffer from delayed early warning responses when data collection is insufficient or missing, failing to fully utilize the timing characteristics of battery operation, leading to false alarms or missed alarms, and are not adaptable to different types of batteries and changing operating conditions.

Method used

A CNN-LSTM-SE neural network model based on transfer learning is adopted. Through source domain pre-training and target domain fine-tuning, the spatiotemporal features of battery voltage and temperature are extracted. Combined with a hybrid attention module and multi-level error thresholds, early warning is achieved to realize early identification and warning of battery status.

Benefits of technology

Under conditions of limited data acquisition, the recognition sensitivity and stability of the early warning model are significantly improved, enabling it to issue warnings hundreds of seconds before thermal runaway, shortening response time and improving the timeliness and reliability of the warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017583A_ABST
    Figure CN122017583A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power lithium battery application, and particularly relates to a CNN-LSTM-SE battery thermal runaway early warning method and system based on transfer learning, and the method comprises the steps: obtaining a source domain data set and a target domain data set, and carrying out the standardization processing, and obtaining a source domain standardized data sequence and a target domain standardized data sequence; constructing a CNN-LSTM-SE neural network model according to the source domain standardized data sequence; the method comprises the following steps: pre-training a CNN-LSTM-SE neural network model to obtain a source domain model; performing fine adjustment on weight parameters of the source domain model by using the target domain standardized data sequence to obtain a target domain early warning model; performing regression prediction on the target domain standardized data sequence according to the target domain early warning model to obtain a prediction value, and taking a difference value between the prediction value and a true value as a prediction error; comparing the prediction error with a preset multi-level threshold value, and generating an early warning signal; according to the method, accurate early warning of the thermal runaway fault of the battery is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power lithium battery application technology, specifically a CNN-LSTM-SE battery thermal runaway early warning method and system based on transfer learning. Background Technology

[0002] Lithium-ion batteries are widely used in electric vehicles and energy storage power stations due to their high energy density and long cycle life. However, under extreme conditions, such as electrical abuse, mechanical puncture, and thermal abuse, the internal temperature of the battery may rise sharply and trigger thermal runaway, leading to serious accidents such as explosions and fires. In recent years, thermal runaway events in energy storage systems have occurred frequently, causing casualties and property damage. Therefore, how to monitor the battery's operating status in real time and provide early warnings is an important technical direction for ensuring battery safety.

[0003] Existing battery thermal runaway prediction methods mainly rely on data-driven models, using machine learning or deep learning algorithms to extract patterns from operational data. However, in practical applications, there are problems such as insufficient data collection, data gaps, and delayed early warning responses. To save energy, many battery management systems only start data recording when parameters such as voltage and temperature exceed thresholds, resulting in a lack of continuous and complete data under stable operating conditions. The limited storage space and data transmission bandwidth of embedded sensors lead to the overwriting or neglect of normal operating data. During normal charging and discharging, parameter fluctuations are small and the sampling frequency is low, making training data scarce. At the same time, traditional threshold-based methods only alarm when parameters exceed set values, failing to fully utilize the temporal characteristics of battery operation to detect anomalies in advance. They are also unable to adapt to different types of batteries and changing operating conditions, leading to false alarms or missed alarms. Summary of the Invention

[0004] The purpose of this invention is to provide a CNN-LSTM-SE battery thermal runaway early warning method and system based on transfer learning, which effectively solves the problems of untimely prediction, false alarms, and delayed alarms in the existing early warning system.

[0005] The technical solution of this invention is: a CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning, comprising:

[0006] S1: Obtain the source domain dataset and the target domain dataset, slice and standardize the source domain dataset and the target domain dataset to obtain the source domain standardized data sequence and the target domain standardized data sequence, respectively.

[0007] S2: Construct a CNN-LSTM-SE neural network model based on the source domain standardized data sequence. The constructed CNN-LSTM-SE neural network model has a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-target prediction output layer. The parallel feature extraction layer includes a CNN layer and a bidirectional LSTM layer set in parallel. A hybrid attention module is fused after the bidirectional LSTM layer. The hybrid attention module consists of a channel attention module and a temporal attention module. The feature fusion layer includes an MTLA attention module.

[0008] S3: Divide the source domain standardized data sequence into source domain training data and source domain validation data in a 7:3 ratio. Pre-train the CNN-LSTM-SE neural network model using the source domain training data. After each iteration, immediately validate the CNN-LSTM-SE neural network model using the source domain validation data. Simultaneously monitor the changing trends of the source domain training loss and source domain validation loss. After multiple iterations, if the changes in both the source domain training loss and source domain validation loss are less than a preset threshold 1e-5, the pre-training process of the CNN-LSTM-SE neural network model automatically stops, indicating that the pre-training of the CNN-LSTM-SE neural network model is complete. This allows the CNN-LSTM-SE neural network model to learn and extract the spatiotemporal features of the battery's voltage, temperature, voltage change rate, and temperature change rate, thus obtaining the source domain model.

[0009] S4: Based on transfer learning, the fully connected layer, parallel feature extraction layer, and feature fusion layer in the source domain model are frozen. Data before 1500s in the standardized data sequence of the target domain is used as the target domain training data, and data after 1500s in the standardized data sequence of the target domain is used as the target domain validation data. The weights of the temporal attention module, the MTLA attention module, and the dual-target prediction output layer in the source domain model are fine-tuned using the target domain training data. After each iteration of fine-tuning, the source domain model is immediately validated using the target domain validation data. At the same time, the changing trends of the target domain training loss and the target domain validation loss are monitored. After multiple iterations, if the change amplitude of the target domain training loss and the target domain validation loss is less than the preset threshold 1e-5, it is determined that the fine-tuning of the temporal attention module, the MTLA attention module, and the dual-target prediction output layer of the source domain model is completed, and the target domain early warning model is obtained.

[0010] S5: Use the target domain early warning model to perform regression prediction on the battery temperature and voltage in the target domain standardized data sequence to obtain the predicted values ​​of temperature and voltage at future time steps; read the actual values ​​of temperature and voltage at the corresponding time steps in the target domain standardized data sequence; calculate the absolute value of the difference between the predicted value and the actual value to obtain the temperature prediction error and voltage prediction error.

[0011] S6: Compare the temperature prediction error and voltage prediction error with preset multi-level temperature and voltage error thresholds to determine the battery status and generate corresponding warning signals.

[0012] Preferably, in step S1, the source domain dataset consists of voltage data, voltage change rate data, temperature data, and temperature change rate data collected during normal vehicle operation. The source domain dataset is sliced ​​and standardized to obtain a source domain standardized data sequence, which is then divided into source domain training data and source domain validation data in a 7:3 ratio. The target domain dataset is obtained through a single-cell thermal runaway experiment, including temperature and voltage data of the battery before and after thermal runaway. The collected temperature and voltage data are filled and calculated to obtain parameters such as voltage, voltage change rate, temperature, and temperature change rate.

[0013] Preferably, when slicing the source domain dataset and the target domain dataset, the time window length is set to N time steps, and a sliding window method is used to extract continuous subsequences. Each subsequence contains four features: voltage, voltage change rate, temperature, and temperature change rate. The standardization processing of the source domain dataset and the target domain dataset uses the Z-score method, and the calculation formula is as follows: ,in, x It is the raw data that was collected. μ and σ These are the mean and standard deviation of the data characteristics, respectively. z It is standardized data.

[0014] Preferably, in step S2, the CNN-LSTM-SE neural network model includes a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-target prediction output layer;

[0015] The fully connected layer uses the ReLU activation function for nonlinear transformation; the preprocessed source domain normalized data sequence is input into the fully connected layer, the number of neurons in the fully connected layer is set to 20, and the ReLU activation function is used to introduce nonlinear transformation, which converts the data into spatiotemporal data composed of batch size B, time step T and feature dimension F;

[0016] The parallel feature extraction layer consists of a CNN layer and a bidirectional LSTM layer connected in parallel. The bidirectional LSTM layer is used to extract the temporal features of the spatiotemporal data. A hybrid attention module is fused after the bidirectional LSTM layer. The hybrid attention module is used to enable the CNN-LSTM-SE neural network model to dynamically focus on the key temporal information of the spatiotemporal data. The CNN layer is used to extract the spatial features of the spatiotemporal data.

[0017] The bidirectional LSTM layer expands the spatiotemporal data processed by the fully connected layer along the time dimension to obtain historical and future time-series information on voltage, temperature, voltage change rate, and temperature change rate. The bidirectional LSTM layer consists of four LSTM units, forming a bidirectional and stacked structure. These four LSTM units include a forward LSTM layer 1, a forward LSTM layer 2, a backward LSTM layer 1, and a backward LSTM layer 2. The forward LSTM layer 1 and forward LSTM layer 2 are used to extract forward time-series features of battery operating parameters from the past to the present time step, while the backward LSTM layer 1 and backward LSTM layer 2 are used to extract reverse time-series features from the future to the present time step, simultaneously capturing both historical dependencies and future trends in battery state. Each LSTM layer... The number of hidden units in the LSTM unit is 2. Each LSTM unit generates a hidden layer state at each time step. The output of the hidden layer state at each time step is a two-dimensional vector, which is used to characterize the electrical and thermal characteristics during battery operation. The first unit in the hidden unit is used to learn the time dependence of electrical characteristics, including the dynamic change law of voltage and voltage change rate. The second unit in the hidden unit is used to learn the time dependence of thermal characteristics, including the time evolution characteristics of temperature and temperature change rate. The bidirectional LSTM layer obtains two hidden layer states with opposite time series through the forward 1st LSTM unit, the forward 2nd LSTM unit and the backward 1st LSTM unit, and the backward 2nd LSTM unit, and outputs a time feature vector with dimensions including batch size B, time step T and time feature dimension F1.

[0018] The hybrid attention module includes a channel attention module and a temporal attention module set in parallel. The temporal attention module has an adaptive attention network. A hybrid attention module is added after the bidirectional LSTM layer. The hybrid attention module adopts a hybrid attention mechanism. On the basis of the channel attention module, an adaptive temporal attention module for extracting temporal features is connected in parallel. The channel attention module makes the bidirectional LSTM layer pay attention to the importance of the feature dimension and the dynamic changes of the time dimension, while the temporal attention module makes the bidirectional LSTM layer adaptively assign higher weights to key temporal information.

[0019] The CNN layer is used to extract local pattern features of voltage, temperature, and voltage and temperature change rates from the spatiotemporal data processed by the fully connected layer in the spatial dimension. The CNN layer contains two one-dimensional convolutional layers, which extract the spatial features of voltage and temperature, respectively. Each one-dimensional convolutional layer in the CNN layer has 7 convolutional kernels with a 1×7 coverage area, forming 7 kernel weight parameters with a stride of 1 and SAME padding. The spatial dimension of the output data of each one-dimensional convolutional layer is consistent with the spatial dimension of the spatiotemporal data processed by the fully connected layer. Each one-dimensional convolutional layer is followed by a Batch Normalization (BN) module. The two one-dimensional convolutional layers in the CNN layer... All layers employ a one-dimensional convolutional structure with local perception and kernel weight sharing mechanisms. The local perception mechanism extracts features only within a local range of the input spatiotemporal data by setting the coverage of the convolutional kernel, capturing abrupt changes in voltage, temperature, and their rate of change over a short period of time. The same kernel weights are reused at different positions throughout the time series, constituting the kernel weight sharing mechanism. The CNN layer is followed by a ReLU activation function, and then a global average pooling layer. The global average pooling layer compresses the spatial dimension while preserving the time step T, and outputs a spatial feature vector with batch size B, time step T, and spatial feature dimension F2.

[0020] The feature fusion layer weighted and merges the temporal information extracted by the bidirectional LSTM layer and the spatial information extracted by the CNN layer. It then concatenates the temporal feature vectors output from the bidirectional LSTM layer and the spatial feature vectors output from the CNN layer, resulting in a spatiotemporal feature vector with dimensions F1 + F2: batch size B, time step T, and the sum of the temporal and spatial feature dimensions. An MTLA attention module is introduced into the feature fusion layer to assign weights to the concatenated spatiotemporal feature vector according to the time step and feature dimensions. The scaling factor of the MTLA attention module is [missing information]. The system has 4 attention heads and outputs a spatiotemporal fusion feature weighted by batch size B, time step T, and spatiotemporal feature vectors F1+F2. A modified fully connected layer is embedded at the end of the feature fusion layer. The activation function of the modified fully connected layer is LeakyReLU with a slope of 0.2. The weighted average of the spatiotemporal fusion features output by the MTLA attention module from the modified fully connected layer is used to map the weighted spatiotemporal fusion features to the target dimension, forming high-dimensional voltage and temperature features. Two output branches are set in the feature fusion layer, corresponding to the battery's high-dimensional voltage and temperature features, respectively.

[0021] The dual-objective prediction output layer is used to output the voltage and temperature prediction values ​​for future time steps. The high-dimensional voltage and high-dimensional temperature features output by the feature fusion layer are mapped to dual-objective prediction values ​​for predicting voltage and temperature for future time steps through the dual-objective prediction output layer.

[0022] Preferably, in the hybrid attention module, the channel attention module includes a one-dimensional average pooling branch and a one-dimensional max pooling branch. The channel attention module extracts global and local information of each feature channel, and then fuses them after processing by two fully connected layers to obtain channel attention weights. The temporal attention module sets up an adaptive temporal weight calculation network, and uses the Softmax function to assign weights to the input features at different time steps to obtain temporal attention weights. The temporal attention weights and channel attention weights are then fused to perform weighted processing on the input features.

[0023] Preferably, in step S3, the CNN-LSTM-SE neural network model is pre-trained using source domain standardized data sequences. The pre-training process includes: using the voltage, voltage change rate, temperature, and temperature change rate of the sliced ​​battery as inputs to predict the temperature and voltage at future time steps; using mean squared error as the loss function and the Adam optimizer to update the network parameters until the mean squared error loss value no longer decreases. At this point, the parameters in the CNN-LSTM-SE neural network model have converged and stabilized. The parameters are then mapped and stored in the weight matrix and bias parameters of the CNN-LSTM-SE neural network model through the Adam optimizer. The resulting source domain model has the ability to extract and express the general spatiotemporal features of the battery.

[0024] Preferably, the specific steps of step S4 are as follows:

[0025] S41: Load the weight parameters of the source domain model obtained from step S3, freeze the parameters of the fully connected layer, the bidirectional LSTM layer and CNN layer in the parallel feature extraction layer, and the modified fully connected layer in the feature fusion layer of the source domain model, and set the weight parameters of the dual-target prediction output layer, the temporal attention module in the parallel feature extraction layer and the MTLA attention module in the feature fusion layer to be trainable.

[0026] S42: Using the standardized data sequence of the target domain as input, the hyperparameter settings include: batch sample size of 128, initial learning rate of 0.0001, 20 to 30 iterations, mean squared error as the loss function, and using the Adam optimizer to iteratively update the weight parameters of the dual-target prediction output layer, the temporal attention module, and the MTLA attention module while keeping the parameters of the bidirectional LSTM layer and CNN layer in the fully connected layer, the parallel feature extraction layer, and the modified fully connected layer in the feature fusion layer unchanged, until convergence, to obtain a target domain early warning model that can characterize the battery operating state of the target domain.

[0027] Preferably, in step S5, the target domain early warning model obtained in step S4 is used to perform regression prediction on the temperature and voltage of the target domain data. The process includes: taking the target domain data slice as the input of the target domain early warning model, processing it through the fully connected layer, parallel feature extraction layer and feature fusion layer of the target domain early warning model, and directly obtaining the predicted temperature and voltage values ​​for the future time step in the dual-target prediction output layer of the target domain early warning model; using the mean squared error loss function to measure the difference between the predicted value and the actual collected temperature and voltage values, and calculating the difference between the predicted value and the actual value as the prediction error.

[0028] Preferably, the multi-level temperature and voltage error thresholds include a first-level temperature error threshold and a first-level voltage error threshold, a second-level temperature error threshold and a second-level voltage error threshold, and a third-level temperature error threshold and a third-level voltage error threshold. Based on the error between the predicted value and the actual collected value, the error is first compared with the temperature threshold, and then compared with the voltage threshold. Based on the comprehensive comparison result of the error and the threshold, the battery status is determined to be normal, abnormal, about to fail, or in a fault state, and a monitoring command or alarm signal is issued accordingly.

[0029] This invention also provides a CNN-LSTM-SE battery thermal runaway early warning system based on transfer learning, comprising:

[0030] The data acquisition and preprocessing module is used to collect voltage and temperature data from the source and target domains, and to perform slicing and standardization preprocessing on the source and target domain data to obtain source domain standardized data sequences and target domain standardized data sequences.

[0031] The model building module is used to construct a CNN-LSTM-SE neural network model based on the source domain standardized data sequence. The CNN-LSTM-SE neural network model includes a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-objective prediction output layer in sequence.

[0032] The model pre-training module is used to pre-train the CNN-LSTM-SE neural network model using source domain standardized data sequences to obtain the source domain model;

[0033] The transfer learning module is used to fine-tune the source domain model based on transfer learning and utilize the target domain standardized data sequence to obtain the target domain early warning model.

[0034] The prediction and error calculation module is used to predict the temperature and voltage of the standardized data sequence of the target domain based on the target domain early warning model and calculate the prediction error.

[0035] The early warning decision module is used to compare the prediction error with preset multi-level temperature and voltage error thresholds, and output a corresponding early warning signal based on the comparison result.

[0036] The beneficial effects of this invention are as follows:

[0037] The CNN-LSTM-SE neural network model was pre-trained using source domain standardized data sequences to enable it to grasp the general spatiotemporal characteristics of battery voltage and temperature changes. Then, combined with a transfer learning strategy, with very few samples in the target domain, the parameters of the fully connected layer, the bidirectional LSTM layer and CNN layer in the parallel feature extraction layer, and the feature fusion layer of the source domain model were frozen. Only the parameters of the dual-target prediction output layer, the temporal attention module in the parallel feature extraction layer, and the MTLA attention module in the feature fusion layer were fine-tuned. This transferred the feature extraction capability of the source domain model to the target domain early warning model, avoiding overfitting due to insufficient data, while maintaining the high accuracy of the target domain early warning model in feature extraction. This enabled the target domain early warning model to still have stable prediction capabilities in scenarios with limited data collection.

[0038] In the parallel feature extraction layer, a parallel bidirectional LSTM layer and a CNN layer are designed to extract the temporal and spatial features of battery temperature and voltage, respectively. By introducing a hybrid attention module at the end of the bidirectional LSTM layer, it is ensured that the target domain early warning model is not overwhelmed by a large amount of stable normal data, but can keenly focus on the critical moment when fault precursors appear, significantly improving the sensitivity of the target domain early warning model to early weak fault signals. The feature fusion layer concatenates the temporal features extracted by the bidirectional LSTM layer and the spatial features extracted by the CNN layer, and introduces an MTLA attention module for secondary weighting. Finally, a nonlinear mapping is performed through a modified fully connected layer. This deep feature fusion strategy makes full use of the continuity of the time dimension and the local correlation of the spatial dimension, so that the target domain early warning model can maintain stable prediction performance when facing different types of batteries or complex charging and discharging conditions, and has strong robustness.

[0039] Regression prediction is used to forecast temperature and voltage at future time steps, and the error between the predicted and actual values ​​is calculated. Combined with dynamically set multi-level temperature and voltage error thresholds, abnormal trends are classified and assessed, enabling tiered early warnings from normal to abnormal, impending failure, and failure states. Based on the error changes of the target domain prediction model, warnings can be issued hundreds of seconds before the thermal runaway trigger temperature, effectively shortening response time and improving the timeliness and reliability of warnings. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is an overall flowchart of the CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning of this invention;

[0042] Figure 2 This is a schematic diagram of the CNN-LSTM-SE neural network model for battery thermal runaway in step S2 of an embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of the channel attention process according to an embodiment of the present invention;

[0044] Figure 4 This is a graph showing the battery voltage and temperature prediction error in step S6 of this embodiment of the invention.

[0045] Figure 5 This is an overall flowchart of the CNN-LSTM-SE battery thermal runaway early warning system based on transfer learning of this invention. Detailed Implementation

[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] In the description of this invention, it should be noted that the terms "installation," "setting," and "connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0048] like Figure 1-4 As shown, embodiments of the present invention provide a CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning, comprising:

[0049] S1: Obtain the source domain dataset and the target domain dataset, slice and standardize the source domain dataset and the target domain dataset to obtain the source domain standardized data sequence and the target domain standardized data sequence, respectively.

[0050] S2: Construct a CNN-LSTM-SE neural network model based on the source domain standardized data sequence. The constructed CNN-LSTM-SE neural network model has a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-target prediction output layer. The parallel feature extraction layer includes a CNN layer and a bidirectional LSTM layer set in parallel. A hybrid attention module is fused after the bidirectional LSTM layer. The hybrid attention module consists of a channel attention module and a temporal attention module. The feature fusion layer includes an MTLA attention module.

[0051] S3: Divide the source domain standardized data sequence into source domain training data and source domain validation data in a 7:3 ratio. Pre-train the CNN-LSTM-SE neural network model using the source domain training data. After each iteration, immediately validate the CNN-LSTM-SE neural network model using the source domain validation data. Simultaneously monitor the changing trends of the source domain training loss and source domain validation loss. After multiple iterations, if the changes in both the source domain training loss and source domain validation loss are less than a preset threshold 1e-5, the pre-training process of the CNN-LSTM-SE neural network model automatically stops, indicating that the pre-training of the CNN-LSTM-SE neural network model is complete. This allows the CNN-LSTM-SE neural network model to learn and extract the spatiotemporal features of the battery's voltage, temperature, voltage change rate, and temperature change rate, thus obtaining the source domain model.

[0052] S4: Based on transfer learning, the fully connected layer, parallel feature extraction layer, and feature fusion layer in the source domain model are frozen. Data before 1500s in the standardized data sequence of the target domain is used as the target domain training data, and data after 1500s in the standardized data sequence of the target domain is used as the target domain validation data. The weights of the temporal attention module, the MTLA attention module, and the dual-target prediction output layer in the source domain model are fine-tuned using the target domain training data. After each iteration of fine-tuning, the source domain model is immediately validated using the target domain validation data. At the same time, the changing trends of the target domain training loss and the target domain validation loss are monitored. After multiple iterations, if the change amplitude of the target domain training loss and the target domain validation loss is less than the preset threshold 1e-5, it is determined that the fine-tuning of the temporal attention module, the MTLA attention module, and the dual-target prediction output layer of the source domain model is completed, and the target domain early warning model is obtained.

[0053] S5: Use the target domain early warning model to perform regression prediction on the battery temperature and voltage in the target domain standardized data sequence to obtain the predicted values ​​of temperature and voltage at future time steps; read the actual values ​​of temperature and voltage at the corresponding time steps in the target domain standardized data sequence; calculate the absolute value of the difference between the predicted value and the actual value to obtain the temperature prediction error and voltage prediction error.

[0054] S6: Compare the temperature prediction error and voltage prediction error with preset multi-level temperature and voltage error thresholds to determine the battery status and generate corresponding warning signals.

[0055] Based on the above embodiments, the CNN-LSTM-SE neural network model is pre-trained using source domain standardized data sequences to obtain the source domain model. The target domain early warning model inherits the feature extraction capability of the source domain model on continuous spatiotemporal sequences, thereby achieving rapid adaptation to the target domain standardized data sequences.

[0056] In step S1, the source domain dataset consists of voltage data, voltage change rate data, temperature data, and temperature change rate data collected during normal vehicle operation. Specifically, in this embodiment, vehicle operation data published by a research group from a certain university on the Beihang University cloud database is selected as the source data. This dataset contains 18.2 million valid data points from 515 vehicles, involving parameters such as voltage, current, temperature, and SOC. Specifically, the voltage V, voltage change rate dV / dt, temperature T, and temperature change rate dT / dt during normal vehicle operation are selected as the source domain dataset. The source domain dataset is sliced ​​and standardized to obtain a source domain standardized data sequence. The source domain standardized data sequence is divided into source domain training data and source domain validation data in a 7:3 ratio. Simultaneously, a thermal runaway experiment is conducted on a single battery cell, collecting voltage and temperature data before and after thermal runaway. Specifically, in this embodiment, the selected... An overcharge thermal runaway experiment was conducted on an 86Ah lithium iron phosphate battery. The positive electrode active material of this battery is lithium iron phosphate, the negative electrode is graphite, the rated voltage is 3.2V, and the operating temperature is -20-55℃. Voltage and temperature data of the battery were collected throughout the entire process before and after the thermal runaway was triggered, totaling 7000 samples. The collected data were filled and calculated to obtain voltage, voltage change rate, temperature, and temperature change rate parameters to establish a target domain dataset. Since the number of samples in the target domain dataset is small, the 0-1500s period of the battery thermal runaway experiment represents the normal or slowly rising temperature stage of the battery. Data before 1500s was used as the target domain training data. After 1500s, drastic temperature changes or abnormal fluctuations began to occur. At this time, the battery was in the fault stage and could be used to detect whether the model could identify the trend of impending thermal runaway. Therefore, the sample data after 1500s was selected as the target domain validation data.

[0057] It should be noted that the temperature and voltage data in this application can be directly collected, and the rate of temperature change and the rate of voltage change can be calculated from the temperature and voltage data respectively. Specifically: through... and The rates of change of voltage and temperature were obtained separately, where, v 1 For the voltage data at the next moment, v 0This is the voltage data from the previous moment. T 1 For the temperature data at the next moment, T 0 This is the temperature data from the previous moment.

[0058] Furthermore, in step S1, when slicing the source domain dataset and the target domain dataset, the time window length is set to N time steps, and a sliding window method is used to extract continuous subsequences. Each subsequence contains four features: voltage, voltage change rate, temperature, and temperature change rate. The standardization processing of the source domain dataset and the target domain dataset uses the Z-score method, and the calculation formula is as follows: ,in, x It is the raw data. μ and σ These are the mean and standard deviation of the data characteristics, respectively. z It is standardized data.

[0059] In this embodiment, in step S2, the CNN-LSTM-SE neural network model includes: a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-target prediction output layer.

[0060] The fully connected layer uses the ReLU activation function for nonlinear transformation. The source domain normalized data sequence obtained in step S1 is input into the fully connected layer, and nonlinear transformation is performed through the ReLU activation function. Specifically, in this embodiment, the preprocessed source domain normalized data sequence is input into the fully connected layer, the number of neurons in the fully connected layer is set to 20, and the ReLU activation function is used to introduce nonlinear transformation. The fully connected layer converts the data into spatiotemporal data composed of batch size B, time step T, and feature dimension F. The introduction of nonlinear transformation through the ReLU activation function enables the CNN-LSTM-SE neural network model to learn and express the multi-scale features of the battery, reducing the complexity of the CNN-LSTM-SE neural network model.

[0061] The parallel feature extraction layer consists of a CNN layer and a bidirectional LSTM layer connected in parallel. The bidirectional LSTM layer is used to extract the temporal features of the spatiotemporal data. A hybrid attention module is fused after the bidirectional LSTM layer. The hybrid attention module is used to enable the CNN-LSTM-SE neural network model to dynamically focus on the key temporal information of the spatiotemporal data. The CNN layer is used to extract the spatial features of the spatiotemporal data.

[0062] The bidirectional LSTM layer expands the spatiotemporal data processed by the fully connected layer along the time dimension to obtain historical and future time-series information on voltage, temperature, voltage change rate, and temperature change rate. This embodiment uses four LSTM units, forming a bidirectional and stacked structure. Specifically, the four LSTM units include a forward LSTM layer 1, a forward LSTM layer 2, a backward LSTM layer 1, and a backward LSTM layer 2. The forward LSTM layer 1 and forward LSTM layer 2 are used to extract forward time-series features of battery operating parameters from the past to the current time step, while the backward LSTM layer 1 and backward LSTM layer 2 are used to extract reverse time-series features from the future to the current time step, simultaneously capturing the historical dependence and future trend of the battery state. Each LSTM unit has two hidden units, and each LSTM unit generates one hidden unit at each time step. The hidden layer state output at each time step is a two-dimensional vector, used to characterize the electrical and thermal properties during battery operation. The first unit in the hidden unit is used to learn the time dependence of electrical features, including the dynamic changes of voltage and voltage change rate. The second unit in the hidden unit is used to learn the time dependence of thermal features, including the time evolution features of temperature and temperature change rate. The bidirectional LSTM layer obtains two hidden layer states with opposite time series through forward LSTM layer 1, forward LSTM layer 2 and backward LSTM layer 1, backward LSTM layer 2, thereby capturing historical information before the current moment and future information after the current moment. It captures the long-term dependence between the four sets of input parameters to form a time series feature matrix. The output dimension is a time feature vector containing batch size B, time step T and time feature dimension F1, which is used as the input feature of the hybrid attention module.

[0063] A hybrid attention module is added after the bidirectional LSTM layer. This module employs a hybrid attention mechanism, comprising a parallel channel attention module and a temporal attention module for extracting temporal features. This simultaneously enhances the representation of key features in both the feature dimension and the time dimension, thereby improving the accuracy of battery temporal feature extraction and the timeliness of thermal runaway warning. The temporal attention module features an adaptive attention network that automatically adjusts the weights of each time step based on the input temporal features using a learnable mapping function. It employs a Softmax function for normalization, forming a dynamic temporal weight distribution that does not rely on fixed weights or preset rules. It can dynamically allocate the weights of each time step according to different battery operating conditions, enabling the bidirectional LSTM layer to focus on critical moments with significant temperature or voltage changes during battery operation. This maintains sensitivity to thermal runaway trends and predictive stability under different data distributions. It is important to note that the channel attention module and the temporal attention module are parallel rather than sequential. The channel attention module allows the bidirectional LSTM layer to focus on both the importance of the feature dimension and the dynamic changes in the time dimension, while the temporal attention module allows the bidirectional LSTM layer to adaptively assign higher weights to key temporal information.

[0064] Specifically, such as Figure 3As shown, the channel attention module includes a one-dimensional average pooling branch and a one-dimensional max pooling branch. The channel attention module extracts global and local information from each feature channel, and then fuses them after processing by two fully connected layers to obtain enhanced channel attention weights. Both the one-dimensional average pooling branch and the one-dimensional max pooling branch sequentially include a first fully connected layer with a ReLU activation function, and a second fully connected layer with a Sigmoid activation function, used to generate channel attention weights. The one-dimensional average pooling branch performs a one-dimensional average pooling operation on the input features to compress the spatial dimension to extract global features. It then undergoes dimensionality reduction through the first fully connected layer, introduces a ReLU activation function to increase non-linear expression, then undergoes dimensionality increase through the second fully connected layer, and finally generates global channel attention weights through the Sigmoid activation function. The one-dimensional max pooling branch performs a one-dimensional max pooling operation on the input features to focus on local salient features. After processing by the first fully connected layer... The process involves layer dimensionality reduction and ReLU activation to increase non-linearity, followed by dimensionality increase via a second fully connected layer and generation of local channel attention weights via a Sigmoid activation function. The global and local channel attention weights are then fused element-wise and dimensionally expanded to output enhanced channel attention weights. Dimensional expansion involves multiplying the fused global and local channel attention weights element-wise along the time axis, dynamically weighting different feature channels across the entire time series. It's important to note that dimensional expansion simply copies the fused global and local channel attention weights to each time point. Finally, the fused and dimensionally expanded attention weights are multiplied point-by-point with the original input feature matrix to achieve weighting, completing the core function of the attention mechanism: enhancing important features and suppressing secondary features, resulting in the enhanced channel attention weight output.

[0065] The temporal attention module sets up an adaptive temporal weight calculation network, which calculates a weight for each time step of the input feature. The input features at different time steps are assigned weights by the Softmax function to obtain the temporal attention weights, which reflect outliers in the entire time series. The temporal attention weights are fused with the enhanced channel attention weights to perform weighted processing on the input features to obtain a weighted temporal feature matrix.

[0066] The CNN layer is used to extract local pattern features of voltage, temperature, and voltage and temperature change rates from the spatiotemporal data processed by the fully connected layers in the spatial dimension. The CNN layer contains two one-dimensional convolutional layers, which extract the spatial features of temperature and voltage, respectively. Each one-dimensional convolutional layer in the CNN layer has multiple convolutional kernels with a large kernel coverage area to extract local features; specifically, there are 7 convolutional kernels with a 1×7 coverage area, forming 7 kernel weight parameters. This allows the convolution operation to cover more input feature regions, capturing a wider range of weighted spatial features. The stride is [missing value]. 1. This method is used to extract local pattern features of voltage, temperature, and voltage and temperature change rates within a spatial dimension. The padding method is SAME, ensuring that the spatial dimension of the output data of each one-dimensional convolutional layer is consistent with the spatial dimension of the spatiotemporal data processed by the fully connected layers. Each one-dimensional convolutional layer is followed by a Batch Normalization (BN) module, which makes the mean and variance of the inputs of the two one-dimensional convolutional layers close to 0 and 1, respectively. Furthermore, both one-dimensional convolutional layers in the CNN layer employ a one-dimensional convolutional structure with local perception and kernel weight sharing mechanisms. The local perception mechanism sets the coverage area of ​​the convolutional kernel, applying weights only to the input spatiotemporal data. Features are extracted from local areas of the data to capture abrupt changes in voltage, temperature, and the rate of change of voltage and temperature within a short period of time. The weights of the same convolutional kernel are reused at different time steps of the input time series, forming a kernel weight sharing mechanism. This mechanism improves training efficiency under small sample conditions, enabling the CNN-LSTM-SE neural network to identify the same local change features at different time points, exhibiting time-translation invariance. The combination of local perception and weight sharing allows the CNN-LSTM-SE neural network model to meticulously characterize battery operating data. The transient features are captured, and the model can be generalized across the entire sample range, thereby enhancing the robustness and cross-domain adaptability of the battery thermal runaway early warning model. After the CNN layer, the ReLU activation function is applied. The ReLU activation function introduces non-linear characteristics. The ReLU activation function is applied after the convolution operation of the CNN layer, retaining values ​​greater than 0, which helps to highlight better features and discard smaller features. After the ReLU activation function, a global average pooling layer is applied. The global average pooling layer compresses the spatial dimension while retaining the time step T, and outputs a spatial feature vector with batch size B, time step T, and spatial feature dimension F2.

[0067] The feature fusion layer is used to weightedly merge the temporal information extracted by the bidirectional LSTM layer and the spatial information extracted by the CNN layer. The feature fusion layer concatenates the temporal feature vector output by the bidirectional LSTM layer and the spatial feature vector output by the CNN layer in terms of dimensions, outputting a spatiotemporal feature vector with dimensions F1 + F2, where the batch size is B, the time step is T, and the sum of the temporal and spatial feature dimensions is F1 + F2. An MTLA attention module, or Multi-head Temporal LatentAttention module, is introduced into the feature fusion layer. The MTLA attention module assigns weights to the concatenated spatiotemporal feature vector according to the time step and feature dimensions. The scaling factor of the MTLA attention module is... The system employs four attention heads, leveraging the MTLA attention module to improve computational speed and reduce memory usage. The output dimension is a spatiotemporal fusion feature weighted by batch size B, time step T, and spatiotemporal feature vectors F1+F2. A modified fully connected layer is embedded at the end of the feature fusion layer. This modified fully connected layer uses LeakyReLU as its activation function with a slope of 0.2. The weighted average of the spatiotemporal fusion features output by the MTLA attention module is then applied through this modified fully connected layer, mapping the weighted spatiotemporal fusion features to the target dimension to form high-dimensional voltage and temperature features. Two output branches are set in the feature fusion layer, corresponding to the battery's high-dimensional voltage and temperature features, respectively.

[0068] The dual-objective prediction output layer is used to output the voltage and temperature prediction values ​​for future time steps. The high-dimensional voltage and high-dimensional temperature features output by the feature fusion layer are mapped to dual-objective prediction values ​​for predicting voltage and temperature for future time steps, i.e., predicting voltage and temperature variables for future time steps.

[0069] In step S3, the CNN-LSTM-SE neural network model is pre-trained using source domain standardized data sequences. This pre-training process includes: using sliced ​​battery voltage, voltage change rate, temperature, and temperature change rate as inputs to predict temperature and voltage at future time steps; using mean squared error as the loss function and the Adam optimizer to update network parameters until convergence, i.e., until the mean squared error loss value no longer decreases. At this point, the parameters in the CNN-LSTM-SE neural network model have converged and stabilized. These parameters are then mapped and stored in the weight matrix and bias parameters of the CNN-LSTM-SE neural network model through the Adam optimizer. The resulting source domain model possesses the spatiotemporal characteristics of the battery. The model's ability to extract and express features was assessed. The input data for the CNN-LSTM-SE neural network model had a dimension of 4, consisting of 20 time series concatenated horizontally, each containing 100 historical data points. The constructed CNN-LSTM-SE neural network model was pre-trained using 70% of the source domain standardized data sequences used in step S1 as the source domain training data. The source domain model employed the Adam optimizer to learn the adjustable parameters, with key hyperparameters set as follows: batch size of 128 samples, initial learning rate of 0.0001, learning rate decay factor of 0.5, learning rate decay period of 5, and a total of 20 iterations. The model evaluation metrics primarily included mean squared error (MSE) and coefficient of determination (R²). 2 The formula for calculating the mean square error is: The formula for calculating the coefficient of determination is: In the formula, n Indicates the number of samples. y i Indicates the first i The true value of each sample Indicates the first i The predicted value for each sample, This represents the average of the actual values.

[0070] Furthermore, the specific steps of step S4 are as follows:

[0071] S41: Load the weight parameters of the source domain model obtained from step S3, freeze the parameters of the fully connected layer, the bidirectional LSTM layer and CNN layer in the parallel feature extraction layer, and the modified fully connected layer in the feature fusion layer of the source domain model, that is, take the fully connected layer, the bidirectional LSTM layer and CNN layer in the parallel feature extraction layer, and the modified fully connected layer in the feature fusion layer as the frozen layer, and set the weight parameters of its dual-target prediction output layer, the temporal attention module in the parallel feature extraction layer and the MTLA attention module in the feature fusion layer to be trainable.

[0072] S42: Using the target domain dataset as input, mean squared error is used as the loss function. The Adam optimizer iteratively updates the weight parameters of the bi-objective prediction output layer, the temporal attention module, and the MTLA attention module while keeping the frozen layer parameters unchanged, until convergence, i.e., until the mean squared error loss value no longer decreases. Small samples of normal data from the target domain standardized data sequence are used to fine-tune the weight parameters of the network output layer. These small samples of normal data from the target domain standardized data sequence are the target domain training data within the target domain standardized data sequence. The fine-tuned source domain model is then retrained using the target domain training data from the target domain standardized data sequence. The hyperparameters are... The setup includes: a batch sample size of 128, an initial learning rate of 0.0001, and 20 to 30 iterations. Specifically, in this embodiment, the number of iterations is set to 30, resulting in a target domain early warning model that can characterize the battery operating state features of the target domain. The trainable parameters are retrained using a small number of samples, where the samples represent battery operating data, and the trainable parameters are the weight parameters of the dual-objective prediction output layer, the temporal attention module, and the MTLA attention module in the source domain model. This ensures that the target domain early warning model maintains the spatiotemporal dependence of battery temperature and voltage learned by the source domain model, while adapting to the target domain data distribution, thereby effectively solving the problems of model overfitting and unstable prediction caused by insufficient target domain samples.

[0073] In step S5, the battery state is regressively predicted based on the target domain early warning model to obtain the prediction error. The target domain early warning model, retrained after transfer learning, is then used to regressively predict the temperature and voltage of the standardized data sequence in the target domain. The target domain data slices are used as input to the target domain early warning model. After processing through the fully connected layer, parallel feature extraction layer, and feature fusion layer of the target domain early warning model, the predicted temperature and voltage values ​​for future time steps are directly obtained in the dual-target prediction output layer of the target domain early warning model. The mean squared error loss function is used to measure the difference between the predicted temperature and voltage values ​​and the actual collected temperature and voltage values. The difference between the predicted value and the actual value is calculated as the prediction error. Since the target domain early warning model is trained using target domain training data during the normal or slow temperature rise phase, the spatiotemporal data features learned are also based on the features of the normal or slow temperature rise phase. The prediction error of the predicted value during the normal or slow temperature rise phase of the battery in the source domain standardized data sequence and the target domain standardized data sequence is extremely small. However, the data of the battery in the fault phase has a large difference in features from the data of the battery in the normal or slow temperature rise phase. Therefore, the prediction error at the moment of battery fault is large. By utilizing this feature, early warning of battery thermal runaway fault can be achieved.

[0074] In this embodiment, as Figure 4As shown, in step S6, the multi-level temperature and voltage error thresholds include a first-level temperature error threshold and a first-level voltage error threshold, a second-level temperature error threshold and a second-level voltage error threshold, and a third-level temperature error threshold and a third-level voltage error threshold. Based on the error between the predicted value and the actual collected value, the error is first compared with the temperature threshold, and then compared with the voltage threshold. Based on the comprehensive comparison result of the error and the threshold, the battery status is determined to be normal, abnormal, about to fail, or in a fault state, and a monitoring command or alarm signal is issued accordingly.

[0075] Specifically, in this embodiment, the first-level temperature error threshold is 10℃ and the voltage error threshold is 0.1V. At this point, the temperature prediction error gradually increases, the battery is in an abnormal state, and signal changes should be monitored at all times. The second-level temperature error threshold is 30℃ and the voltage error threshold is 1V. At this point, the voltage prediction error reaches an inflection point, changing from a slight change in the abnormal state to a significant change. The temperature error is large, and the battery is about to change from an abnormal state to a fault state. An alarm signal should be issued immediately. The third-level temperature error threshold is 50℃ and the voltage error threshold is 2.5V. At this point, the voltage prediction error is large, the temperature error is large, and the battery will soon experience thermal runaway. Immediate measures should be taken.

[0076] Furthermore, based on the error between the predicted and actual values, the battery is first compared with a temperature threshold, then with a voltage threshold. Based on the comprehensive comparison of the error and the thresholds, the battery status is determined to be normal, abnormal, about to fail, or in a fault state, and corresponding monitoring commands or alarm signals are issued. Specifically, in this embodiment, when neither the temperature prediction error nor the voltage prediction error exceeds the first-level threshold, it is determined to be in a normal state; when both the temperature prediction error and the voltage prediction error exceed the first-level warning threshold, it is determined to be in an abnormal state; when both the temperature prediction error and the voltage prediction error exceed the second-level warning threshold, the battery is about to transition from an abnormal state to a fault state, and an alarm signal should be issued immediately; when both the temperature prediction error and the voltage prediction error exceed the third-level warning threshold, it is determined to be in a fault state, and immediate measures should be taken.

[0077] Therefore, according to the thermal runaway prediction process, the actual temperature was first compared with the predicted temperature. At 1510s, the difference between the actual temperature and the predicted temperature exceeded the first-level warning threshold. Then, the actual voltage was compared with the predicted voltage. At 1515s, the difference between the actual voltage and the predicted voltage exceeded the first-level warning threshold, at which point the monitoring of signal changes began. At 2036s, the temperature prediction error exceeded the third-level warning threshold, and at 2402s, the voltage prediction error exceeded the third-level warning threshold. Based on the comprehensive judgment, the battery was about to experience a thermal runaway fault at 2402s, which was 540s earlier than the thermal runaway trigger temperature of 2942s, thus proving the feasibility and effectiveness of the diagnostic method.

[0078] like Figure 5 As shown, this embodiment also provides a CNN-LSTM-SE battery thermal runaway early warning system based on transfer learning, including:

[0079] The data acquisition and preprocessing module is used to collect voltage and temperature data from the source and target domains, and to perform slicing and standardization preprocessing on the source and target domain data to obtain source domain standardized data sequences and target domain standardized data sequences.

[0080] The model building module is used to construct a CNN-LSTM-SE neural network model based on the source domain standardized data sequence. The CNN-LSTM-SE neural network model includes a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-objective prediction output layer in sequence.

[0081] The model pre-training module is used to pre-train the CNN-LSTM-SE neural network model using source domain standardized data sequences to obtain the source domain model;

[0082] The transfer learning module is used to fine-tune the source domain model based on transfer learning and utilize the target domain standardized data sequence to obtain the target domain early warning model.

[0083] The prediction and error calculation module is used to predict the temperature and voltage of the standardized data sequence of the target domain based on the target domain early warning model and calculate the prediction error.

[0084] The early warning decision module is used to compare the prediction error with preset multi-level temperature and voltage error thresholds, and output a corresponding early warning signal based on the comparison result.

[0085] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning, characterized in that, include: S1: Obtain the source domain dataset and the target domain dataset, slice and standardize the source domain dataset and the target domain dataset to obtain the source domain standardized data sequence and the target domain standardized data sequence, respectively. S2: Construct a CNN-LSTM-SE neural network model based on the source domain standardized data sequence. The constructed CNN-LSTM-SE neural network model has a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-target prediction output layer. The parallel feature extraction layer includes a CNN layer and a bidirectional LSTM layer set in parallel. A hybrid attention module is fused after the bidirectional LSTM layer. The hybrid attention module consists of a channel attention module and a temporal attention module. The feature fusion layer includes an MTLA attention module. S3: Divide the source domain standardized data sequence into source domain training data and source domain validation data in a 7:3 ratio. Pre-train the CNN-LSTM-SE neural network model using the source domain training data. After each iteration, immediately validate the CNN-LSTM-SE neural network model using the source domain validation data. Simultaneously monitor the changing trends of the source domain training loss and source domain validation loss. After multiple iterations, if the changes in both the source domain training loss and source domain validation loss are less than a preset threshold 1e-5, the pre-training process of the CNN-LSTM-SE neural network model automatically stops, indicating that the pre-training of the CNN-LSTM-SE neural network model is complete. This allows the CNN-LSTM-SE neural network model to learn and extract the spatiotemporal features of the battery's voltage, temperature, voltage change rate, and temperature change rate, thus obtaining the source domain model. S4: Based on transfer learning, the fully connected layer, parallel feature extraction layer, and feature fusion layer in the source domain model are frozen. Data before 1500s in the standardized data sequence of the target domain is used as the target domain training data, and data after 1500s in the standardized data sequence of the target domain is used as the target domain validation data. The weights of the temporal attention module, the MTLA attention module, and the dual-target prediction output layer in the source domain model are fine-tuned using the target domain training data. After each iteration of fine-tuning, the source domain model is immediately validated using the target domain validation data. At the same time, the changing trends of the target domain training loss and the target domain validation loss are monitored. After multiple iterations, if the change amplitude of the target domain training loss and the target domain validation loss is less than the preset threshold 1e-5, it is determined that the fine-tuning of the temporal attention module, the MTLA attention module, and the dual-target prediction output layer of the source domain model is completed, and the target domain early warning model is obtained. S5: Use the target domain early warning model to perform regression prediction on the battery temperature and voltage in the target domain standardized data sequence to obtain the predicted values ​​of temperature and voltage at future time steps; read the actual values ​​of temperature and voltage at the corresponding time steps in the target domain standardized data sequence; calculate the absolute value of the difference between the predicted value and the actual value to obtain the temperature prediction error and voltage prediction error. S6: Compare the temperature prediction error and voltage prediction error with preset multi-level temperature and voltage error thresholds to determine the battery status and generate corresponding warning signals.

2. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 1, characterized in that, In step S1, the source domain dataset consists of voltage data, voltage change rate data, temperature data, and temperature change rate data collected during normal vehicle operation. The source domain dataset is sliced ​​and standardized to obtain a source domain standardized data sequence, which is then divided into source domain training data and source domain validation data in a 7:3 ratio. The target domain dataset is obtained through a single-cell thermal runaway experiment, including temperature and voltage data of the battery before and after thermal runaway. The collected temperature and voltage data are filled and calculated to obtain parameters such as voltage, voltage change rate, temperature, and temperature change rate.

3. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 2, characterized in that, When slicing the source domain dataset and the target domain dataset, the time window length is set to N time steps, and a sliding window method is used to extract continuous subsequences. Each subsequence contains four features: voltage, voltage change rate, temperature, and temperature change rate. The standardization of the source and target domain datasets is performed using the Z-score method, calculated as follows: ,in, x It is the raw data that was collected. μ and σ These are the mean and standard deviation of the data characteristics, respectively. z It is standardized data.

4. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 3, characterized in that, In step S2, the CNN-LSTM-SE neural network model includes a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-target prediction output layer; Fully connected layers use the ReLU activation function for nonlinear transformation; The preprocessed source domain normalized data sequence is input into a fully connected layer with 20 neurons. The ReLU activation function is used to introduce a nonlinear transformation, which converts the data into spatiotemporal data consisting of batch size B, time step T, and feature dimension F. The parallel feature extraction layer consists of a CNN layer and a bidirectional LSTM layer connected in parallel. The bidirectional LSTM layer is used to extract the temporal features of the spatiotemporal data. A hybrid attention module is fused after the bidirectional LSTM layer. The hybrid attention module is used to enable the CNN-LSTM-SE neural network model to dynamically focus on the key temporal information of the spatiotemporal data. The CNN layer is used to extract the spatial features of the spatiotemporal data. The bidirectional LSTM layer expands the spatiotemporal data processed by the fully connected layer along the time dimension to obtain historical and future time-series information on voltage, temperature, voltage change rate, and temperature change rate. The bidirectional LSTM layer consists of four LSTM units, forming a bidirectional and stacked structure. These four LSTM units include a forward LSTM layer 1, a forward LSTM layer 2, a backward LSTM layer 1, and a backward LSTM layer 2. The forward LSTM layer 1 and forward LSTM layer 2 are used to extract forward time-series features of battery operating parameters from the past to the present time step, while the backward LSTM layer 1 and backward LSTM layer 2 are used to extract reverse time-series features from the future to the present time step, simultaneously capturing both historical dependencies and future trends in battery state. Each LSTM layer... The number of hidden units in the LSTM unit is 2. Each LSTM unit generates a hidden layer state at each time step. The output of the hidden layer state at each time step is a two-dimensional vector, which is used to characterize the electrical and thermal characteristics during battery operation. The first unit in the hidden unit is used to learn the time dependence of electrical characteristics, including the dynamic change law of voltage and voltage change rate. The second unit in the hidden unit is used to learn the time dependence of thermal characteristics, including the time evolution characteristics of temperature and temperature change rate. The bidirectional LSTM layer obtains two hidden layer states with opposite time series through the forward 1st LSTM unit, the forward 2nd LSTM unit and the backward 1st LSTM unit, and the backward 2nd LSTM unit, and outputs a time feature vector with dimensions including batch size B, time step T and time feature dimension F1. The hybrid attention module includes a channel attention module and a temporal attention module set in parallel. The temporal attention module has an adaptive attention network. A hybrid attention module is added after the bidirectional LSTM layer. The hybrid attention module adopts a hybrid attention mechanism. On the basis of the channel attention module, an adaptive temporal attention module for extracting temporal features is connected in parallel. The channel attention module makes the bidirectional LSTM layer pay attention to the importance of the feature dimension and the dynamic changes of the time dimension, while the temporal attention module makes the bidirectional LSTM layer adaptively assign higher weights to key temporal information. The CNN layer is used to extract local pattern features of voltage, temperature, and voltage and temperature change rates from the spatiotemporal data processed by the fully connected layer in the spatial dimension. The CNN layer contains two one-dimensional convolutional layers, which extract the spatial features of voltage and temperature, respectively. Each one-dimensional convolutional layer in the CNN layer has 7 convolutional kernels with a 1×7 coverage area, forming 7 kernel weight parameters with a stride of 1 and SAME padding. The spatial dimension of the output data of each one-dimensional convolutional layer is consistent with the spatial dimension of the spatiotemporal data processed by the fully connected layer. Each one-dimensional convolutional layer is followed by a Batch Normalization (BN) module. The two one-dimensional convolutional layers in the CNN layer... All layers employ a one-dimensional convolutional structure with local perception and kernel weight sharing mechanisms. The local perception mechanism extracts features only within a local range of the input spatiotemporal data by setting the coverage of the convolutional kernel, capturing abrupt changes in voltage, temperature, and their rate of change over a short period of time. The same kernel weights are reused at different positions throughout the time series, constituting the kernel weight sharing mechanism. The CNN layer is followed by a ReLU activation function, and then a global average pooling layer. The global average pooling layer compresses the spatial dimension while preserving the time step T, and outputs a spatial feature vector with batch size B, time step T, and spatial feature dimension F2. The feature fusion layer weighted and merges the temporal information extracted by the bidirectional LSTM layer and the spatial information extracted by the CNN layer. It then concatenates the temporal feature vectors output from the bidirectional LSTM layer and the spatial feature vectors output from the CNN layer, resulting in a spatiotemporal feature vector with dimensions F1 + F2: batch size B, time step T, and the sum of the temporal and spatial feature dimensions. An MTLA attention module is introduced into the feature fusion layer to assign weights to the concatenated spatiotemporal feature vector according to the time step and feature dimensions. The scaling factor of the MTLA attention module is [missing information]. The system has 4 attention heads and outputs a spatiotemporal fusion feature weighted by batch size B, time step T, and spatiotemporal feature vectors F1+F2. A modified fully connected layer is embedded at the end of the feature fusion layer. The activation function of the modified fully connected layer is LeakyReLU with a slope of 0.

2. The weighted average of the spatiotemporal fusion features output by the MTLA attention module from the modified fully connected layer is used to map the weighted spatiotemporal fusion features to the target dimension, forming high-dimensional voltage and temperature features. Two output branches are set in the feature fusion layer, corresponding to the battery's high-dimensional voltage and temperature features, respectively. The dual-objective prediction output layer is used to output the voltage and temperature prediction values ​​for future time steps. The high-dimensional voltage and high-dimensional temperature features output by the feature fusion layer are mapped to dual-objective prediction values ​​for predicting voltage and temperature for future time steps through the dual-objective prediction output layer.

5. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 4, characterized in that, In the hybrid attention module, the channel attention module includes a one-dimensional average pooling branch and a one-dimensional max pooling branch. The channel attention module extracts global and local information of each feature channel and fuses them after processing by two fully connected layers to obtain channel attention weights. The temporal attention module sets up an adaptive temporal weight calculation network, and uses the Softmax function to assign weights to the input features at different time steps to obtain temporal attention weights. The temporal attention weights and channel attention weights are fused to perform weighted processing on the input features.

6. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 5, characterized in that, In step S3, the CNN-LSTM-SE neural network model is pre-trained using source domain standardized data sequences. This pre-training process includes: using the voltage, voltage change rate, temperature, and temperature change rate of the sliced ​​battery as input to predict the temperature and voltage at future time steps; using mean squared error as the loss function and the Adam optimizer to update the network parameters until the mean squared error loss value no longer decreases. At this point, the parameters in the CNN-LSTM-SE neural network model have converged and stabilized. The parameters are then mapped and stored in the weight matrix and bias parameters of the CNN-LSTM-SE neural network model through the Adam optimizer. The resulting source domain model has the ability to extract and express the general spatiotemporal features of the battery.

7. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 6, characterized in that, The specific steps of step S4 are as follows: S41: Load the weight parameters of the source domain model obtained from step S3, freeze the parameters of the fully connected layer, the bidirectional LSTM layer and CNN layer in the parallel feature extraction layer, and the modified fully connected layer in the feature fusion layer of the source domain model, and set the weight parameters of the dual-target prediction output layer, the temporal attention module in the parallel feature extraction layer and the MTLA attention module in the feature fusion layer to be trainable. S42: Using the standardized data sequence of the target domain as input, the hyperparameter settings include: batch sample size of 128, initial learning rate of 0.0001, 20 to 30 iterations, mean squared error as the loss function, and using the Adam optimizer to iteratively update the weight parameters of the dual-target prediction output layer, the temporal attention module, and the MTLA attention module while keeping the parameters of the bidirectional LSTM layer and CNN layer in the fully connected layer, the parallel feature extraction layer, and the modified fully connected layer in the feature fusion layer unchanged, until convergence, to obtain a target domain early warning model that can characterize the battery operating state of the target domain.

8. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 7, characterized in that, In step S5, the target domain early warning model obtained in step S4 is used to perform regression prediction on the temperature and voltage of the target domain data. The process includes: taking the target domain data slice as the input of the target domain early warning model, processing it through the fully connected layer, parallel feature extraction layer and feature fusion layer of the target domain early warning model, and directly obtaining the predicted temperature and voltage values ​​for the future time step in the dual-target prediction output layer of the target domain early warning model; using the mean square error loss function to measure the difference between the predicted value and the actual collected temperature and voltage values, and calculating the difference between the predicted value and the actual value as the prediction error.

9. The CNN-LSTM-SE battery thermal runaway early warning method based on transfer learning according to claim 8, characterized in that, The multi-level temperature and voltage error thresholds include a first-level temperature error threshold and a first-level voltage error threshold, a second-level temperature error threshold and a second-level voltage error threshold, and a third-level temperature error threshold and a third-level voltage error threshold. Based on the error between the predicted value and the actual collected value, the error is first compared with the temperature threshold, and then compared with the voltage threshold. Based on the comprehensive comparison result of the error and the threshold, the battery status is determined to be normal, abnormal, about to fail, or in a fault state, and a monitoring command or alarm signal is issued accordingly.

10. A CNN-LSTM-SE battery thermal runaway early warning system based on transfer learning, characterized in that, include: The data acquisition and preprocessing module is used to collect voltage and temperature data from the source and target domains, and to perform slicing and standardization preprocessing on the source and target domain data to obtain source domain standardized data sequences and target domain standardized data sequences. The model building module is used to construct a CNN-LSTM-SE neural network model based on the source domain standardized data sequence. The CNN-LSTM-SE neural network model includes a fully connected layer, a parallel feature extraction layer, a feature fusion layer, and a dual-objective prediction output layer in sequence. The model pre-training module is used to pre-train the CNN-LSTM-SE neural network model using source domain standardized data sequences to obtain the source domain model; The transfer learning module is used to fine-tune the source domain model based on transfer learning and utilize the target domain standardized data sequence to obtain the target domain early warning model. The prediction and error calculation module is used to predict the temperature and voltage of the standardized data sequence of the target domain based on the target domain early warning model and calculate the prediction error. The early warning decision module is used to compare the prediction error with preset multi-level temperature and voltage error thresholds, and output a corresponding early warning signal based on the comparison result.