Battery thermal failure prediction method based on topology perception and alternating space-time attention
By constructing a cell physical topology diagram and an alternating spatiotemporal attention network, the inconsistency and robustness of multi-task outputs in the prediction of thermal failure of power batteries in the existing technology are solved, realizing early prediction and reliable warning of thermal failure risk of power batteries, and improving the interpretability and reliability of the warning system.
Patent Information
- Application Number
- CN202611226277.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-11-20
AI Technical Summary
Existing methods for predicting thermal failure of power batteries are unable to simultaneously model the temporal evolution and spatial thermal coupling of the battery system, lack the ability to identify early weak abnormal signals, have poor robustness, inconsistent outputs across multiple tasks, and the warning logic is prone to false alarms or missed alarms.
A battery thermal failure prediction method based on topology perception and alternating spatiotemporal attention is adopted. By constructing a physical topology map of the battery cell, introducing an alternating spatiotemporal attention network, and combining dynamic edge weight update and multi-task supervised fine-tuning, the method can achieve early prediction of thermal failure risk, abnormal cell location, and thermal diffusion path interpretation.
It enables early prediction and reliable warning of the risk of thermal failure of power batteries, improves the sensitivity to early weak abnormal signals, ensures the interpretability and reliability of warning information, and quantifies the credibility of prediction results.
Smart Images

Figure CN123136395A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive power battery safety monitoring and early warning technology, and in particular to a battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention. Background Technology
[0002] With the rapid development of the new energy vehicle industry, the safety of power batteries, as a core component, is directly related to the safety of the entire vehicle and its occupants, the safety of users' lives and property, and the after-sales maintenance costs of enterprises. Under abnormal conditions such as high temperature, overcharging, over-discharging, internal short circuit, mechanical compression, poor heat dissipation, and high-rate charging and discharging, power batteries may experience abnormal local temperature rise, thermal diffusion, thermal failure, or even thermal runaway, which may lead to serious safety accidents such as fire and explosion.
[0003] Existing methods for predicting thermal failure of power batteries mainly include: (1) rule-based detection methods based on fixed thresholds, which are simple to implement but mainly rely on human experience and are difficult to adapt to the differences in different vehicle models, battery pack structures, and operating conditions, and are prone to false alarms or missed alarms. (2) Prediction methods based on single time-series signals, which only capture local time trends and ignore the spatial thermal coupling relationship between cells, making it difficult to identify the propagation path of heat between different cells. (3) Battery thermal propagation modeling methods based on graph structures, which mostly use static edge weights and do not fully consider practical problems such as weak early abnormal signals of thermal failure, scarce fault samples, lack of sensors, and differences in thermal propagation behavior under different operating conditions.
[0004] In summary, existing technologies have the following main shortcomings: they are difficult to simultaneously model the temporal evolution and spatial thermal coupling relationships of battery systems; they lack the ability to identify early weak anomaly signals; they heavily rely on fault samples, while real thermal failure samples are scarce; they have poor robustness to actual vehicle-side problems such as sensor loss and data packet loss; they lack physical consistency constraints among multi-task outputs, leading to inconsistencies in the interpretation of risk probability, remaining risk time, abnormal cell location, and thermal diffusion path; and their early warning logic relies solely on risk probability, making it difficult to balance prediction reliability and risk sensitivity, which can easily result in false alarms or missed alarms. Summary of the Invention
[0005] The purpose of this invention is to provide a battery thermal failure prediction method based on topology awareness and alternating spatiotemporal attention. By using cell physical topology graphs, topology awareness mask pre-training, alternating spatiotemporal attention stacking, dynamic edge weight update, physical consistency multi-task output, and uncertainty-based hierarchical early warning mechanism, the method can achieve early prediction of power battery thermal failure risk, abnormal cell location, and thermal diffusion path interpretation.
[0006] The technical solution adopted in this invention is:
[0007] A battery thermal failure prediction method based on topology awareness and alternating spatiotemporal attention includes:
[0008] Acquire the operating data of the power battery pack and the vehicle operating data, extract the cell-level statistical features from the operating data of the battery pack within multiple consecutive time windows, and form the model input sequence;
[0009] A physical topology map of the battery cells is constructed based on the physical coordinates of each individual cell, the module connection relationship, the thermal insulation structure, and the temperature probe mapping relationship. Dynamic heat propagation edge weights are then calculated and generated based on the physical distance between cells, temperature difference, temperature rise rate difference, and heat propagation direction.
[0010] An alternating spatiotemporal attention network is constructed, consisting of multiple stacked alternating spatiotemporal attention blocks output via a multi-task output module. Each alternating spatiotemporal attention block executes cyclically in the following order: spatial graph attention layer, temporal self-attention layer, operating condition gated injection layer, thermal propagation residual correction layer, and dynamic edge weight update layer. The spatial graph attention layer aggregates spatial thermal coupling information of adjacent cells to obtain spatial features. The temporal self-attention layer models the hidden state of each cell in the time dimension to obtain temporal features. The operating condition gated injection layer adaptively fuses spatial and temporal features. The thermal propagation residual correction layer constructs thermal propagation residual terms and injects them into the hidden state of nodes. The dynamic edge weight update layer updates the graph edge weights used in the next layer based on the cell's anomaly contribution score and the temperature gradient of adjacent cells.
[0011] The alternating spatiotemporal attention network is pre-trained using a masking task based on the physical topology map of the battery cell to recover the features of the masked battery cell for training. The network is then fine-tuned using labeled samples under multi-task supervision to obtain the trained alternating spatiotemporal attention network. The supervised fine-tuning adopts a multi-task joint loss function with physical consistency constraints, and the model parameters are adjusted by minimizing the loss function.
[0012] The model input sequence for the period to be predicted and the corresponding dynamic heat propagation edge weights are input into the trained alternating spatiotemporal attention network. The alternating spatiotemporal attention network calculates and outputs the probability of thermal failure risk, the remaining risk time, the abnormal contribution score of each cell, the weight of the heat diffusion path, and the model uncertainty.
[0013] A tiered early warning system is implemented based on the probability of thermal failure risk and the model uncertainty. When the probability of thermal failure risk is higher than the first threshold and the model uncertainty is lower than the second threshold, a high confidence warning is triggered. When the probability of thermal failure risk is higher than the first threshold but the model uncertainty is higher than the second threshold, an observation warning is triggered. When the probability of thermal failure risk is lower than the first threshold but higher than the third threshold, a thermal failure trend risk warning is triggered.
[0014] Furthermore, in some implementations, the extraction of cell-level statistical characteristics from the battery pack's operating data over multiple consecutive time windows includes: extracting the maximum, minimum, mean, standard deviation, voltage difference, and voltage change rate of each cell within each time window; the maximum, minimum, mean, standard deviation, temperature difference, and temperature rise rate of each cell; the maximum, minimum, mean, standard deviation, and current change rate of each cell; as well as the mean and difference of state of charge, the mean of health status, the mean of mileage, and the operating condition code.
[0015] Furthermore, in some implementations, the edge weights of any two cells i and j in the dynamic heat propagation edge weights are calculated. The calculation formula is as follows:
[0016] ;
[0017] in, The physical distance between cells i and j. This is the distance attenuation coefficient. The temperature difference between cells i and j The temperature rise rate difference between cells i and j Let i be the direction of heat propagation from cell i to cell j. This is the physical topology mask between cell i and cell j (based on physical adjacency and thermal insulation structure). These are the weighting coefficients.
[0018] Furthermore, in some implementations, topology-aware mask pre-training employs at least one of the following masking strategies:
[0019] Single-cell channel mask: randomly select some cells and mask the voltage, temperature or temperature rise rate characteristics of the corresponding cells;
[0020] Neighborhood cell masking, which uses a target cell as the center to mask the overall features of multiple cells that are physically adjacent to the target cell;
[0021] A continuous time segment mask can be used to mask the data of a battery cell within multiple consecutive time windows.
[0022] Thermal propagation path masking: Selecting physically adjacent cells along the temperature gradient direction to partially mask features of the target cell;
[0023] The sensor is missing a mask; mask the area covered by the temperature probe or the voltage acquisition channel.
[0024] Furthermore, in some implementations, the loss function for topology-aware mask pre-training includes the reconstruction error of the masked features, as well as the topology consistency loss that makes the recovered results conform to the physical distance decay relationship between cells and the direction of temperature gradient.
[0025] Furthermore, in some implementations, the implementation of each alternating spatiotemporal attention block in the alternating spatiotemporal attention network includes:
[0026] The spatial graph attention layer is used to calculate the graph attention score based on the physical distance between cells, temperature difference, temperature rise rate difference and dynamic edge weight, and aggregate the spatial thermal coupling information of adjacent cells.
[0027] The temporal self-attention layer is used to perform temporal dimension modeling of the hidden state of each cell in multiple consecutive time windows along the time dimension, including local window attention and cross-window long attention.
[0028] The working condition gating injection layer is used to generate gating coefficients based on the current working condition of the vehicle, and to adaptively fuse spatial features and temporal features using the gating coefficients.
[0029] The thermal propagation residual correction layer constructs thermal propagation residual terms and injects them into node features based on the temperature difference direction, physical distance, and temperature rise trend of adjacent cells.
[0030] The dynamic edge weight update layer updates the graph edge weights used in the next layer based on the cell anomaly contribution score output by the current layer.
[0031] Specifically, as a feasible implementation, the stacking number L of the alternating spatiotemporal attention blocks is preferably 4; the basic time window length is 256 seconds, and 7 consecutive basic time windows are selected to form a model input sequence of approximately 30 minutes; the model input samples are represented as... Where T represents the number of continuous time windows, N represents the number of cells, and F represents the number of feature channels corresponding to each cell.
[0032] Furthermore, in some implementations, dynamic edge weights are introduced into the calculation of the attention weights of cell i to cell j in the spatial graph attention layer. The calculation formula is:
[0033] ;
[0034] ;
[0035] in, and For node features, and For learnable parameters, This indicates vector concatenation.
[0036] Furthermore, in some implementations, physical consistency constraints include at least one of the following constraints:
[0037] Distance attenuation consistency: the weight of the constrained heat propagation path decreases as the physical distance increases;
[0038] The temperature gradient direction is consistent, and the propagation weight from high-temperature cells to low-temperature cells is greater than that in the opposite direction.
[0039] Topological blocking consistency ensures that the weight of inter-cell heat propagation blocked by the insulation structure approaches zero;
[0040] The risk trend is consistent; as the probability of constrained thermal failure increases, the remaining risk time decreases.
[0041] Anomaly localization and path consistency are ensured by increasing the weight of thermal diffusion paths associated with cells that contribute high anomalies.
[0042] Furthermore, in some implementations, the multi-task joint loss function is:
[0043] ;
[0044] in: Classify losses for thermal failure risk. For the remaining risk time regression loss, This is due to the location loss of abnormal battery cells. To predict losses for thermal diffusion paths, Loss due to physical consistency constraints; These represent the weights of each loss term, and these weights can be adjusted based on the performance on the validation set. As one feasible technical solution, the weights for each loss term are as follows: =1.0, =2.0, =0.5, =0.5, =0.3.
[0045] Specifically, the thermal failure risk probability represents the probability of thermal failure or reaching a high-risk state within a preset time range in the future; the remaining risk time represents the estimated remaining time before reaching the thermal failure warning state; the abnormal cell contribution score represents the degree of contribution of each cell to the current thermal failure risk, used for abnormal cell location; the thermal diffusion path weight represents the possibility of abnormal risk propagating from cell i to cell j, used for thermal diffusion path explanation; and the model uncertainty represents the reliability of the model for the current prediction results.
[0046] Furthermore, in some implementations, the alternating spatiotemporal attention network calculates and synchronously outputs the thermal failure risk probability, remaining risk time, anomaly contribution score of each cell, thermal diffusion path weights, and model uncertainty, including:
[0047] Obtaining the final hidden state vector: The alternating spatiotemporal attention network outputs a final hidden state vector for each cell i, which contains spatiotemporal coupling information and the physical laws of heat propagation.
[0048] Calculate the probability of thermal failure risk: Aggregate the final hidden states of all cells through a global pooling layer (such as attention pooling or max pooling) to obtain the global risk representation vector of the entire battery pack; feed the global risk representation vector into a classification head composed of a fully connected layer, and activate it through the Sigmoid function to output the probability value P∈[0,1] of thermal failure occurring within a preset time range in the future.
[0049] Calculate the remaining risk time: Input the global risk representation vector into another regression head consisting of fully connected layers to obtain a positive real number representing the predicted remaining risk time; supervised training is performed using regression loss (such as Huber loss);
[0050] Calculate the anomaly contribution score for each cell: the final hidden state for each cell i. A standalone cell-level multilayer perceptron (MLP) is used to calculate its raw anomaly score. Then, the scores of all cells are Softmax normalized to obtain the contribution score. ,satisfy This directly indicates the relative probability that each battery cell will become the source of an anomaly or a key propagation node;
[0051] Calculate the thermal diffusion path weights: Using the final hidden states of any two cells and combining the initial dynamic edge weights between the two cells as priors, calculate the thermal diffusion path weights of the two cells.
[0052] Model uncertainty is calculated using Monte Carlo Dropout (MC Dropout). During the inference phase, the Dropout layer in the network is kept active, and K forward propagations are performed on the same input to obtain K sets of predicted thermal failure risk probabilities. Model uncertainty σ is defined as the statistical variance (or standard deviation) of K prediction results, which quantifies the model's confidence in the current prediction result.
[0053] Furthermore, in some implementations, the model uncertainty σ is obtained through any of the following methods: MC Dropout, deep integration, or prediction variance estimation. The tiered warning system is as follows: Level 1 High Confidence Warning: triggered when P ≥ 0.85 and σ ≥ 0.2; Level 2 Observation Warning: triggered when P ≥ 0.85 and σ > 0.2; Level 3 Trend Risk Warning: triggered when 0.65 ≤ P < 0.85.
[0054] The present invention adopts the above technical solution and has the following beneficial effects compared with the prior art:
[0055] (1) This invention uses an alternating spatiotemporal attention network to perform spatial graph attention and temporal self-attention in each network block, and with dynamic edge weight updates, to achieve joint modeling of the spatial thermal coupling relationship and state temporal evolution law between cells, breaking through the limitation of short-term single variable prediction; the introduction of graph attention layer is superior to the unidirectional propagation method that completely relies on voltage / temperature time series.
[0056] (2) This invention introduces a topology-aware mask pre-training mechanism and designs a variety of masking strategies such as single cell, neighborhood, continuous segment, heat propagation path and sensor missing in combination with the physical topology of the cell. This enables the model to learn the normal heat propagation law under the condition of no fault label, which greatly improves the sensitivity of early weak abnormal signals when real thermal failure samples are scarce.
[0057] (3) The present invention simultaneously outputs the probability of thermal failure, the remaining risk time, the location of abnormal cells, the thermal diffusion path and the model uncertainty, and uses a physical consistency loss function composed of distance decay, temperature gradient direction and topological blockage to jointly constrain the prediction results, thereby ensuring that the prediction results are mutually verified, avoiding logical contradictions between outputs and providing more interpretable early warning information.
[0058] (4) This invention incorporates model uncertainty into early warning decision-making. Under the premise of high risk probability, it triggers high confidence early warning or observation early warning based on the level of uncertainty, and provides trend prompts in combination with the remaining risk time, thereby realizing a quantitative assessment of the credibility of the prediction results and significantly improving the reliability and practicality of the early warning system. Attached Figure Description
[0059] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments;
[0060] Figure 1 This is a schematic diagram of the battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to the present invention.
[0061] Figure 2 This is a schematic diagram of topology-aware mask pre-training in a specific implementation of the present invention. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0063] like Figure 1 As shown in Figure 2, a specific embodiment of the present invention discloses a battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention, including:
[0064] Step 1: Obtain the operating data of the power battery pack and the vehicle operating data, extract the cell-level statistical features from the operating data of the battery pack within multiple consecutive time windows, and form the model input sequence;
[0065] Specifically, during vehicle operation, real-time data on each individual cell in the power battery system and related vehicle operation are collected. This collected data includes, but is not limited to: individual cell voltage, total current, individual cell temperature, total voltage, state of charge (SOC), state of health (SOH), vehicle mileage, charge / discharge status, vehicle speed, ambient temperature, timestamp, and temperature probe number and location. Assuming the power battery pack comprises N individual cells, the state characteristics of the i-th cell collected at time t are as follows:
[0066] ;
[0067] in: This represents the voltage of the i-th cell at time t; This represents the temperature of the i-th cell at time t; This represents the current of the battery system at time t; Indicates the state of charge; Indicates health status; Indicates the vehicle's cumulative mileage; This indicates that the vehicle or battery is in a state of charging, discharging, resting, fast charging, high-rate discharging, or low-temperature starting.
[0068] A model input sequence of approximately 30 minutes is constructed by consecutively selecting seven basic time windows, each with a length of 256 seconds. Therefore, the seven basic windows correspond to approximately 30 minutes. The model input samples can be represented as follows: Where T represents the number of continuous time windows, N represents the number of cells, and F represents the number of feature channels corresponding to each cell.
[0069] For each cell node, statistical features are extracted within each base time window. These features include, but are not limited to: voltage features: [Vmax, Vmin, Vmean, Vstd, Vdiff, Vr]; temperature features: [Tmax, Tmin, Tmean, Tstd, Tdiff, Tr]; current features: [Imax, Imin, Imean, Istd, Ir]; SOC features: [SOCmean, SOCdiff]; SOH features: [SOHmean]; mileage features: [Mmean]; and operating condition features: [Mode]. Where Vdiff represents the difference between the maximum and minimum voltage values within the current window; Tiff represents the difference between the maximum and minimum temperature values within the current window; Vr represents the voltage change rate; Tr represents the temperature rise rate; and Ir represents the current change rate. All features are normalized using min-max and log+min-max to enhance model stability. For the operating condition Mode, one-hot encoding is used to obtain the operating condition embedding vector. F(i,t)=[Voltage statistical characteristics, Temperature statistical characteristics, Current statistical characteristics, SOC characteristics, SOH characteristics, Mileage characteristics, Operating condition characteristics].
[0070] Step 2: Construct a physical topology map of the battery cells based on the physical coordinates of each individual cell, the module connection relationship, the thermal insulation structure and the temperature probe mapping relationship, and calculate and generate dynamic heat propagation edge weights based on the physical distance between cells, temperature difference, temperature rise rate difference and heat propagation direction.
[0071] Specifically, the physical topology of the battery cells described above is represented as: G=(V,E,W); where V represents the set of battery cell nodes; E represents the set of edges between battery cells; and W represents the set of edge weights between battery cells. Each individual battery cell is a node in the graph. Taking a typical 3x4 plug-in battery module as an example, the module contains 12 cells, numbered i=1,2,...,12. Each cell corresponds to a center coordinate: ,in and This represents the position of the i-th cell in the planar coordinate system of the battery module. If the battery pack has a multi-layer structure, it can also be extended to a three-dimensional coordinate system. ,in This indicates the layer or height position of the i-th cell.
[0072] For any two battery cells i and j, the physical distance between them is: If three-dimensional coordinates are used, the physical distance is: The physical topology mask between battery cells is represented as follows: However, when there is a physical adjacency or potential heat propagation path between cell i and cell j, If we take 1, but there is a thermal insulation structure blocking the flow of heat between the two, or there is no effective heat transfer path, Take an attenuation value of 0 or less than 1.
[0073] To express the heat propagation relationship between battery cells, this invention not only constructs graph edges based on physical adjacency but also introduces physical distance, temperature difference, temperature rise rate difference, and heat propagation direction to generate dynamic edge weights. The temperature difference between battery cell i and battery cell j is: The temperature rise rate difference between cell i and cell j is: ;in This represents the temperature rise rate of the i-th cell within the current time window, which can be calculated from the difference between the average temperature of the current window and the average temperature of the previous window.
[0074] The direction of heat propagation is defined based on the direction of the temperature gradient. ,when Greater than When the value is greater than the value, it indicates that heat is more likely to propagate from cell i to cell j. Considering the above factors, a dynamic edge weighting is constructed:
[0075] ;
[0076] in: This represents the distance attenuation coefficient, used to control the effect of distance on thermal coupling strength; Indicates the temperature difference weighting index; Indicates the weighted index of temperature rise rate differences; Indicates the weighting index for the direction of heat propagation; This represents the physical topology mask. When there is a physical adjacency or potential heat propagation path between cell i and cell j... =1; when there is a thermal insulation structure blocking the heat transfer or no effective heat transfer path exists between the two. =0 or take an attenuation value less than 1.
[0077] In a preferred embodiment, a top-K sparsity strategy is adopted, that is, for each cell node, only the K edges with the highest edge weights are retained, and K is selected as 3 or 4. In this way, the graph structure constructed by the model is not a fixed static graph, but a heat propagation graph that is dynamically adjusted according to the cell temperature, temperature rise rate, operating conditions and anomaly propagation trends.
[0078] Step 3: Construct an alternating spatiotemporal attention network. The alternating spatiotemporal attention network consists of multiple stacked alternating spatiotemporal attention blocks, which are output through a multi-task output module. Each alternating spatiotemporal attention block is executed cyclically in the following order: spatial graph attention layer, temporal self-attention layer, operating condition gated injection layer, thermal propagation residual correction layer, and dynamic edge weight update layer. The spatial graph attention layer is used to aggregate the spatial thermal coupling information of adjacent cells to obtain spatial features. The temporal self-attention layer is used to perform temporal dimension modeling of the hidden state of each cell to obtain temporal features. The operating condition gated injection layer is used to adaptively fuse spatial features and temporal features. The thermal propagation residual correction layer is used to construct thermal propagation residual terms and inject them into the hidden state of nodes. The dynamic edge weight update layer updates the graph edge weights used in the next layer according to the cell anomaly contribution score and the temperature gradient of adjacent cells.
[0079] Specifically, this invention constructs an alternating spatiotemporal attention network to simultaneously model the spatial thermal coupling relationship between battery cells and the evolution of cell states over time. The alternating spatiotemporal attention network is formed by stacking L alternating spatiotemporal attention blocks. Preferably, L is 4. Each alternating spatiotemporal attention block includes the following sub-layers: a spatial graph attention sub-layer, a temporal self-attention sub-layer, a condition-gated injection sub-layer, a thermal propagation residual correction sub-layer, a dynamic edge weight update sub-layer, residual connections, and a LayerNorm layer. This invention does not simply use a graph neural network and a transformer in series; instead, it iteratively models the data within each network block according to the sequence of "spatial propagation - temporal evolution - condition modulation - thermal propagation correction - edge weight update." This allows the model to learn data-driven features while being constrained by the physical thermal propagation laws of the battery.
[0080] (1) The spatial graph attention sublayer is used to aggregate spatial thermal coupling information between adjacent cells. For the Kth layer alternating spatiotemporal attention block, the input node features are: ,in, This represents the hidden state of the i-th cell in the (k-1)-th layer.
[0081] Spatial graph attention score is calculated as follows: ;
[0082] The normalized attention weights are: ;
[0083] The spatial aggregation characteristics of the target battery cell are finally obtained: ;in: The score is the influence of cell j on cell i before normalization. The node characteristics of target cell i; Let W be the node characteristics of neighboring cell j; W is the learnable linear transformation matrix. This is the transpose of the learnable attention parameters. The dynamic heat propagation weight between cell i and cell j; This represents the vector concatenation operation. Let represent the set of neighboring nodes of cell i.
[0084] Through this spatial graph attention layer, the model can adaptively aggregate neighborhood cell information based on the physical distance between cells, temperature gradient, temperature rise rate difference, and dynamic heat propagation edge weights.
[0085] (2) The temporal self-attention sublayer is used to model the state evolution of the same cell within multiple consecutive time windows. For the i-th cell, its spatial aggregation representation within T consecutive time windows is as follows: ;
[0086] By concatenating or adding it with the time location code and the operating condition embedding, a time-series token can be obtained:
[0087] Where: post represents time location encoding; Emb(Modet) represents the working condition embedding vector.
[0088] The temporal self-attention layer includes local window attention and cross-window long attention. Local window attention divides a continuous time window into multiple local sub-windows, performing self-attention within each sub-window to capture short-term temperature fluctuations, voltage spikes, and local anomalies. Cross-window long attention performs sparse long attention or dilated attention between different local windows to capture long-term evolutionary processes during thermal failure, such as slow temperature increases, local accumulation, and rapid mutations. By combining local window attention and cross-window long attention, the model can simultaneously focus on both short-term anomalous mutations and long-term risk accumulation.
[0089] (3) The voltage, current, and temperature variations of power batteries differ significantly under various operating conditions, including charging, discharging, resting, fast charging, high-rate discharging, and low-temperature starting. To distinguish between normal operating condition fluctuations and precursors to thermal failure, this invention introduces an operating condition-gated injection sublayer. Gating coefficients are generated based on the operating condition vector Mode:
[0090] ;
[0091] Where Wg represents the learnable weight matrix; bg represents the bias term; and g represents the condition gating coefficient.
[0092] Apply the operating condition gating factor to spatial and temporal characteristics:
[0093] ;
[0094] in, The time-series self-attention output represents the temporal evolution characteristics of the current battery cell; The spatial graph attention output represents the spatial thermal coupling characteristics between the current cell and surrounding cells. For element-wise multiplication; These are the characteristics of the fused battery cell.
[0095] Through condition-gated injection, the model can adaptively adjust the weights of spatial thermal coupling features and temporal evolution features according to the current vehicle operating conditions.
[0096] (4) To ensure that the model learning results conform to the physical laws of battery heat propagation, this invention introduces a heat propagation residual correction sublayer in each alternating spatiotemporal attention block. The heat propagation residual term is constructed based on the direction of temperature difference between adjacent cells, physical distance attenuation, and historical temperature rise trend:
[0097] ;
[0098] in: This represents the thermal propagation residual term of the i-th battery cell; This represents the coefficient of influence of cell j on the thermal propagation of cell i; Represents the residual mapping function for heat propagation; Indicates the direction of temperature difference; Indicates the physical distance between battery cells; This indicates the difference in the rate of temperature rise.
[0099] Inject the heat propagation residual term into the node's hidden state:
[0100] By correcting for thermal propagation residuals, the model learns data-driven features while being constrained by the laws of thermal diffusion, thereby improving the stability and interpretability of early thermal failure risk prediction.
[0101] (5) After each alternating spatiotemporal attention block, dynamically update the edge weights used by the graph attention in the next layer based on the anomaly risk of the current layer output. Let the anomaly contribution score of cell i in the k-th layer output be... Then the edge weights of the next layer are updated as follows:
[0102] ;
[0103] in: Indicates the edge weight update coefficient; This represents the anomaly propagation enhancement function; Let i and j represent the abnormal contribution scores of cells i and j in the k-th layer, respectively. Indicates temperature difference; This indicates the difference in the rate of temperature rise.
[0104] The contribution score of abnormal cells can be output by the cell-level risk prediction head, and the expression is:
[0105] ;
[0106] By updating edge weights dynamically, the model can gradually focus on potential heat diffusion links during multi-layer stacking, rather than always relying on static physical adjacency relationships.
[0107] (6) After passing through L layers of alternating spatiotemporal attention blocks, the model outputs a cell-level risk representation. Based on this cell-level risk representation, this invention sets up a multi-task output module to synchronously output the following results: 1. Thermal failure risk probability P represents the probability of thermal failure or reaching a high-risk state within a preset time range in the future. 2. Remaining risk time TTF represents the estimated remaining time before reaching the thermal failure warning state. 3. Abnormal cell contribution score. This indicates the contribution of each cell to the current thermal failure risk, used for locating abnormal cells. 4. Thermal diffusion path weights This indicates the probability of abnormal risk propagating from cell i to cell j, used for explaining the thermal diffusion path. 5. Model uncertainty σ represents the confidence level of the model in the current prediction results, and can be obtained through MC Dropout (Monte Carlo uncertainty estimation method), deep integration, or prediction variance estimation.
[0108] Step 4: Use the masking task constructed based on the physical topology map of the battery cell to perform topology-aware mask pre-training on the alternating spatiotemporal attention network to recover the masked battery cell features for training. Then, use labeled samples to perform multi-task supervised fine-tuning on the pre-trained network to obtain the trained alternating spatiotemporal attention network. The supervised fine-tuning adopts a multi-task joint loss function with physical consistency constraints, and the model parameters are adjusted by minimizing the loss function.
[0109] Specifically, due to the scarcity of real-world power battery thermal failure samples and the weak early-stage abnormal signals of thermal failure, this invention introduces a topology-aware mask pre-training mechanism before supervised training. This allows the model to learn the normal heat propagation patterns between battery cells under conditions of no or few fault labels. Unlike random masks, the masking strategy of this invention is designed in conjunction with the physical topology of the battery cells, the relationship between adjacent cells, the direction of the temperature gradient, the heat propagation path, and scenarios where vehicle-side sensors are missing. Furthermore, in some implementations, the topology-aware mask pre-training employs at least one of the following masking strategies:
[0110] Single-cell channel masking randomly selects some cell nodes and masks their voltage, temperature, temperature rise rate, or voltage difference characteristics, so that the model can recover the masked characteristics based on the historical state of the cell and the state of neighboring cells.
[0111] Neighborhood cell masking uses a target cell as the center and selects several physically adjacent cells to perform overall masking. This is used to simulate local acquisition anomalies, missing temperature probes, or local communication anomalies in the module.
[0112] Continuous time-segment masking masks the temperature or voltage data of a battery cell across multiple consecutive time windows, allowing the model to learn long-term evolution patterns. This masking method is used to simulate packet loss, communication interruptions, or missing time segments in vehicle-side data acquisition.
[0113] Heat propagation path masking involves partially masking multiple adjacent cells along a potential heat propagation path based on the temperature gradient direction and physical adjacency. For example, if, within a certain time period, Ti > Tj > Tk and cells i, j, and k are physically adjacent, a potential heat propagation path i->j->k can be constructed. Partial node features along this path are masked, allowing the model to learn the heat diffusion direction and path dependencies.
[0114] Sensor missing masking simulates real vehicle-side problems such as temperature probe failure, voltage acquisition anomalies, and local communication packet loss. Masking the temperature probe coverage area or voltage acquisition channel improves the robustness of the model in actual vehicle operating environments.
[0115] Furthermore, during the topology-aware mask pre-training process, the model needs to recover the following targets at the occluded location: voltage value, temperature value, voltage change rate, temperature rise rate, voltage difference, temperature gradient, local statistical features, neighborhood heat propagation trend, and the pre-training loss function includes reconstruction loss and topology consistency loss. ;in, Represents the reconstruction error of the mask features; This indicates the consistency constraints between the recovery results and the battery's physical topology, distance decay, and temperature gradient direction. The weighting coefficient represents the topology consistency loss.
[0116] The reconstruction loss can be expressed as mean squared error: ;
[0117] Topological consistency loss is used to constrain the model recovery results to conform to the laws of physical heat propagation. For example, when two cells are physically close and have a large temperature difference, the temperature change trend after recovery should have a strong correlation; when there is no physical adjacency between two cells or there is a thermal insulation structure blocking them, the correlation of heat propagation between the recovery results should be suppressed.
[0118] Specifically, to avoid inconsistencies in results caused by independent predictions between tasks, this invention introduces a multi-task joint loss function with physical consistency constraints: ;in: This indicates the loss categorized by thermal failure risk. This represents the remaining risk time regression loss; This indicates a loss of battery cell positioning due to abnormality; This indicates the predicted loss for the thermal diffusion path; This represents the loss due to physical consistency constraints; , , , , These represent the weights of each loss term. As a feasible implementation, the weights are set to 1.0, 2.0, 0.5, 0.5, and 0.3, respectively. The weights can be adjusted based on the performance of the validation set.
[0119] The aforementioned physical consistency is used to ensure that the model output conforms to the thermal propagation laws of power batteries, specifically including the following constraints:
[0120] Distance attenuation consistency constraint: When two cells are physically close, their heat propagation path weight can be higher; when two cells are physically far apart, their heat propagation path weight should be suppressed.
[0121] Temperature gradient direction consistency constraint: When the temperature of cell i is higher than that of cell j, and the two are physically adjacent, the weight of the heat propagation path i->j should be higher than the weight of the reverse path j->i.
[0122] Topological blocking consistency constraint: When there is no physical adjacency between two cells, or when there is a thermal insulation structure blocking them, the weight of the predicted heat propagation path in the model should be suppressed.
[0123] Consistency constraint on risk trends: When the predicted thermal failure probability P increases continuously over time, the predicted time to risk (TTF) should show a decreasing trend.
[0124] Anomaly localization and path consistency constraints: When a certain cell anomaly contributes a score When the value is high, the weight of the thermal diffusion path originating from or pointing to the cell should be increased accordingly. This is to ensure that the abnormal cell location results are consistent with the thermal diffusion path interpretation results.
[0125] Specifically, the model training mentioned above includes a pre-training phase and a supervised fine-tuning phase.
[0126] (1) During the pre-training phase, a large amount of normal operating data and a small amount of abnormal operating data are used. The topology-aware mask recovery task is performed without relying on hot failure labels. The steps are as follows:
[0127] 1. Input cell-level timing samples and cell physical topology diagram;
[0128] 2. Generate mask samples based on single-cell channel mask, neighboring cell mask, continuous time segment mask, heat propagation path mask, and sensor missing mask;
[0129] 3. Input the masked samples into an alternating spatiotemporal attention network;
[0130] 4. Output the restored results of the occluded areas;
[0131] 5. Update the model parameters based on the reconstruction loss and topology consistency loss.
[0132] Through the pre-training phase, the model is able to learn the normal heat propagation patterns between battery cells, the voltage-temperature difference variation patterns, and the operating condition-related variation patterns even in the absence of thermal failure labels.
[0133] (2) During the supervised fine-tuning phase, labeled samples are used to train the multi-task output module. Labels include, but are not limited to: whether thermal failure has occurred, remaining time until thermal failure or reaching the warning state, abnormal cell number, thermal propagation path labeling or weak labeling, and risk level label. The training process during the supervised fine-tuning phase is as follows:
[0134] 1. Input complete cell-level timing samples and dynamic physical topology diagram;
[0135] 2. Extracting cell-level risk characterizations using an alternating spatiotemporal attention network;
[0136] 3. The multi-task output module synchronously outputs P, TTF, , and σ;
[0137] 4. Calculate the joint loss of multiple tasks;
[0138] 5. Update model parameters through backpropagation.
[0139] The training optimizer can be AdamW, with a learning rate of 1e-4, a batch size of 32 or 64, and a dropout ratio of 0.2. During training, early stopping can be implemented based on metrics such as the validation set F1 score, AUC, early warning time, and accuracy of abnormal cell location.
[0140] Step 5: Input the model input sequence for the period to be predicted and the corresponding dynamic heat propagation edge weights into the trained alternating spatiotemporal attention network. The alternating spatiotemporal attention network calculates and outputs the thermal failure risk probability, remaining risk time, abnormal contribution score of each cell, heat diffusion path weights, and model uncertainty simultaneously.
[0141] Specifically, real-time data on the operation of the power battery is collected at the vehicle terminal or cloud system, and a model is constructed using a sliding window as input. The model output is... Where: P represents the probability of thermal failure; TTF represents the remaining risk time; ... σ represents the contribution score of each cell to anomalies; H represents the thermal diffusion path matrix; σ represents the model uncertainty.
[0142] Specifically, the thermal failure risk probability represents the probability of thermal failure or reaching a high-risk state within a preset time range in the future; the remaining risk time represents the estimated remaining time before reaching the thermal failure warning state; the abnormal cell contribution score represents the degree of contribution of each cell to the current thermal failure risk, used for abnormal cell location; the thermal diffusion path weight represents the possibility of abnormal risk propagating from cell i to cell j, used for thermal diffusion path explanation; and the model uncertainty represents the reliability of the model for the current prediction results.
[0143] Step 6: Execute graded early warning based on the probability of thermal failure risk and model uncertainty; when the probability of thermal failure risk is higher than the first threshold and the model uncertainty is lower than the second threshold, a high confidence warning is triggered; when the probability of thermal failure risk is higher than the first threshold but the model uncertainty is higher than the second threshold, an observation warning is triggered; when the probability of thermal failure risk is lower than the first threshold but higher than the third threshold, a thermal failure trend risk warning is triggered.
[0144] Furthermore, the above steps involve tiered early warning based on the thermal failure risk probability P, the remaining risk time TTF, and the model uncertainty σ; the specific tiers are as follows:
[0145] Level 1 High Confidence Warning: A Level 1 high confidence warning is triggered when P ≥ 0.85 and σ ≤ 0.2. This indicates that the model judges a high risk of thermal failure and that the prediction results are highly reliable.
[0146] Level 2 observation and warning: When P ≥ 0.85 and σ > 0.2, it indicates that the model judgment has a high risk, but the prediction uncertainty is large, and further observation is required.
[0147] Level 3 trend risk warning: When 0.65≤P<0.85 is met, it means that the current high-risk warning threshold has not been reached, but the risk is on the rise.
[0148] The specific working principle of the present invention is illustrated below with specific embodiments:
[0149] Taking a new energy vehicle power battery module as an example, the module includes 12 individual cells arranged in a 3×4 intercalation configuration. Each individual cell corresponds to a number i, 1,...,12. During vehicle operation, the following data is collected every second: voltage of each individual cell, temperature of each cell or its corresponding temperature probe temperature, total current of the battery pack, total voltage of the battery pack, SOC, SOH, vehicle mileage, vehicle speed, operating mode, ambient temperature, and timestamp. Using a basic time window of 256 seconds, the statistical characteristics of each cell within that window are calculated. Seven consecutive basic time windows are selected, forming a model input sequence of approximately 30 minutes.
[0150] Physical center coordinates of each cell: Based on the heat conduction and coupling relationships between nodes, the specific edge weight relationship can be expressed as follows:
[0151] ;
[0152] in, It is the physical spatial distance between cell i and cell j in the module; It is the temperature difference between the two battery cells; It is a difference in the rate of temperature rise; For the direction of heat propagation: =max(0, ); For physical topology mask; This is the distance attenuation coefficient; , , This is a configurable weighting index. In this embodiment, The setting value is 8mm; It can be set to 1.0. The β and γ parameters are set to 0.5.
[0153] For each node cell, the following features are extracted within a 256-second base window: [Vmax, Vmin, Vmean, Vstd, Vdiff, Vr, Tmax, Tmin, Tmean, Tstd, Tdiff, Tr, Imax, Imin, Imean, Istd, Ir, SOCmean, SOCdiff, SOHmean, Mmean, Mode]. Min-Max normalization is applied to continuous features: the mileage M is first log-transformed and then normalized to address the scale inhomogeneity issue. Embedded encoding is used for the operating condition Mode to obtain the operating condition vector.
[0154] During the pre-training phase, unlabeled samples were constructed from normal operating data and a small amount of abnormal operating data. The following masking strategies were applied to the input samples: (1) 15% of the cells were randomly selected to perform single-cell channel masking; (2) 10% of the local neighborhood cells were randomly selected to perform neighborhood cell masking; (3) 10% of the continuous time segments were randomly selected to perform time segment masking; (4) potential heat propagation paths were selected according to the direction of the temperature gradient, and heat propagation path masking was performed on some nodes on the path; (5) temperature probe loss or voltage acquisition packet loss was randomly simulated.
[0155] The masked input is fed into an alternating spatiotemporal attention network, and the model outputs recovered values of the masked features, including temperature, voltage, rate of temperature rise, voltage difference, and temperature gradient. The pre-training loss is: , Choose 0.2
[0156] Specific training steps for single-cell channel mask:
[0157] (1) Taking cell No. 5 as an example, in a certain time window t, its temperature channel is selected as the channel to be masked, and the original temperature value is: T 5,t =36.9℃
[0158] (2) Replace it with a learnable mask vector. And add a mask-indicator flag.
[0159] T 5,t =[mask];
[0160] mask-indicator 5,t =1;
[0161] Other locations without a mask: mask-indicator=0;
[0162] The original value of 36.9℃ was retained as the supervision label. The model reconstructed this temperature value based on the historical state of the 5th best cell, the state of neighboring cells, operating condition information, and topology.
[0163] Mask feature reconstruction is achieved using a multilayer perceptron, and the expression is: ;
[0164] The masking loss is calculated only for the masked area, and its expression is: ;
[0165] in, Represents the mask matrix, This represents the feature values recovered by the model. This represents the original feature value.
[0166] In this embodiment, the model is formed by stacking L alternating spatiotemporal attention blocks, with L preferably being 4. Each alternating spatiotemporal attention block is not simply a series of spatial attention layers and temporal attention layers, but rather performs "spatial propagation - temporal evolution - operating condition modulation - thermal propagation correction - edge weight update" in each layer.
[0167] The k-th alternating spatiotemporal attention block includes the following sub-layers:
[0168] 1) Spatial graph attention sublayer: based on cell node characteristics As input, based on the physical distance of the battery cell Temperature difference Difference in temperature change rate and dynamic edge weights Calculate graph attention weights and aggregate features of adjacent cells.
[0169] 2) Temporal self-attention sub-layer: The hidden state of each cell in multiple consecutive time windows is modeled in the time dimension to capture the evolution patterns of different stages such as slow temperature rise, local fluctuations, and rapid mutations.
[0170] 3) Operating Condition Gating Injection Sublayer: Based on the current operating conditions of the vehicle, such as charging, discharging, stationary, fast charging, high-rate discharging, or low-temperature starting, a gating coefficient g is generated, and the spatial and temporal representations are adaptively weighted.
[0171] 4) Thermal propagation residual correction sublayer: Based on the direction of temperature difference between adjacent cells, physical distance attenuation, and historical temperature rise trend, construct the thermal propagation residual term R. heat And inject it into the node's hidden state.
[0172] 5) Dynamic edge weight update sub-layer: Based on the cell-level anomaly contribution score Ci and the temperature gradient of adjacent cells output by the current layer, update the edge weights used by the spatial graph attention of the next layer, so that the model gradually focuses on potential heat diffusion links during the multi-layer stacking process.
[0173] Each alternating spatiotemporal attention block incorporates residual connections and LayerNorm to enhance training stability. After L layers of alternating iterations, the model outputs a cell-level risk representation that includes temporal evolution information, spatial thermal coupling information, and operating context information.
[0174] During the supervised training phase, the model outputs the following results simultaneously based on the pre-trained cell-level risk representation:
[0175] a) Thermal failure risk probability P, used to determine whether there is a risk of thermal failure within a preset time range in the future;
[0176] b) Time to Risk (TTF), used to predict the remaining time before reaching the thermal failure warning state;
[0177] c) Abnormal cell contribution score Ci, used to locate the cell that may be the first to become abnormal;
[0178] d) Thermal diffusion path weight Hij, used to represent the probability of abnormal risk propagating from cell i to cell j;
[0179] e) Model uncertainty σ is used to assess the reliability of the prediction results.
[0180] The model's total loss function is:
[0181] ;in: This indicates the loss categorized by thermal failure risk. This represents the remaining risk time regression loss; This indicates a loss of battery cell positioning due to abnormality; This indicates the predicted loss for the thermal diffusion path; This represents the loss due to physical consistency constraints; , , , , These represent the weights of each loss term. As a feasible implementation, the weights are set to 1.0, 2.0, 0.5, 0.5, and 0.3, respectively. The weights can be adjusted based on the performance of the validation set.
[0182] The AdamW optimizer was used during training, with an initial learning rate of 1e-4 and a batch size of 64.
[0183] During vehicle operation, data on voltage, temperature, current, SOC, SOH, mileage, charge / discharge status, and timestamps of 12 individual battery cells are collected per second. The system generates a base time window every 256 seconds, and seven consecutive base time windows are selected to form the model input. The model inference output includes: thermal failure probability P, remaining safe time (TTF), and model uncertainty estimate. Abnormal cell contribution score The thermal diffusion path matrix H.
[0184] For example, during the operation of a vehicle, cell #5 exhibits a higher rate of temperature rise than its neighboring cells over multiple consecutive time windows, and cell #5 forms a significant temperature gradient with cells #6 and #9. The model output is as follows:
[0185] Thermal failure risk probability P=0.87; Residual risk time TTF=18min; Model uncertainty =0.16; Cell No. 5 has the highest contribution score for anomaly. The heat diffusion path weights show the risk propagation direction as: 5-6-9.
[0186] Since P ≥ 0.85 and σ ≤ 0.2, the system triggers a Level 1 high-confidence warning.
[0187] The present invention adopts the above technical solution and has the following beneficial effects compared with the prior art:
[0188] (1) This invention uses an alternating spatiotemporal attention network to perform spatial graph attention and temporal self-attention in each network block, and with dynamic edge weight updates, to achieve joint modeling of the spatial thermal coupling relationship and state temporal evolution law between cells, breaking through the limitation of short-term single variable prediction; the introduction of graph attention layer is superior to the unidirectional propagation method that completely relies on voltage / temperature time series.
[0189] (2) This invention introduces a topology-aware mask pre-training mechanism and designs a variety of masking strategies such as single cell, neighborhood, continuous segment, heat propagation path and sensor missing in combination with the physical topology of the cell. This enables the model to learn the normal heat propagation law under the condition of no fault label, which greatly improves the sensitivity of early weak abnormal signals when real thermal failure samples are scarce.
[0190] (3) The present invention simultaneously outputs the probability of thermal failure, the remaining risk time, the location of abnormal cells, the thermal diffusion path and the model uncertainty, and uses a physical consistency loss function composed of distance decay, temperature gradient direction and topological blockage to jointly constrain the prediction results, thereby ensuring that the prediction results are mutually verified, avoiding logical contradictions between outputs and providing more interpretable early warning information.
[0191] (4) This invention incorporates model uncertainty into early warning decision-making. Under the premise of high risk probability, it triggers high confidence early warning or observation early warning based on the level of uncertainty, and provides trend prompts in combination with the remaining risk time, thereby realizing a quantitative assessment of the credibility of the prediction results and significantly improving the reliability and practicality of the early warning system.
[0192] Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Without conflict, the embodiments and features in the embodiments of this application can be combined with each other. The components of the embodiments of this application described and illustrated herein can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
Claims
1. A battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention, characterized in that, include: Acquire the operating data of the power battery pack and the vehicle operating data, extract the cell-level statistical features from the operating data of the battery pack within multiple consecutive time windows, and form the model input sequence; A physical topology map of the battery cells is constructed based on the physical coordinates of each individual cell, the module connection relationship, the thermal insulation structure, and the temperature probe mapping relationship. Dynamic heat propagation edge weights are then calculated and generated based on the physical distance between cells, temperature difference, temperature rise rate difference, and heat propagation direction. An alternating spatiotemporal attention network is constructed, which consists of multiple stacked alternating spatiotemporal attention blocks and is output through a multi-task output module. Each alternating spatiotemporal attention block is executed cyclically in the order of spatial graph attention layer, temporal self-attention layer, operating condition gated injection layer, thermal propagation residual correction layer and dynamic edge weight update layer. The spatial graph attention layer is used to aggregate the spatial thermal coupling information of adjacent cells to obtain spatial features. The temporal self-attention layer is used to model the hidden state of each cell in the time dimension to obtain temporal features; the operating condition gated injection layer is used to adaptively fuse spatial features and temporal features; The thermal propagation residual correction layer is used to construct thermal propagation residual terms and inject node hidden states; the dynamic edge weight update layer updates the graph edge weights used in the next layer based on the cell anomaly contribution score and the temperature gradient of adjacent cells. The alternating spatiotemporal attention network is pre-trained using a masking task based on the physical topology map of the battery cell to recover the features of the masked battery cell for training. The network is then fine-tuned using labeled samples under multi-task supervision to obtain the trained alternating spatiotemporal attention network. The supervised fine-tuning adopts a multi-task joint loss function with physical consistency constraints, and the model parameters are adjusted by minimizing the loss function. The model input sequence for the period to be predicted and the corresponding dynamic heat propagation edge weights are input into the trained alternating spatiotemporal attention network. The alternating spatiotemporal attention network calculates and outputs the probability of thermal failure risk, the remaining risk time, the abnormal contribution score of each cell, the weight of the heat diffusion path, and the model uncertainty. Implement graded early warning based on the probability of thermal failure risk and model uncertainty; When the probability of thermal failure risk is higher than the first threshold and the uncertainty of the model is lower than the second threshold, a high confidence warning is triggered. When the probability of thermal failure risk exceeds the first threshold but the model uncertainty exceeds the second threshold, an observation warning is triggered. When the probability of thermal failure risk is lower than the first threshold but higher than the third threshold, a thermal failure trend risk warning is triggered.
2. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 1, characterized in that, The implementation of extracting cell-level statistical features from the operating data of the battery pack within multiple consecutive time windows includes: extracting the maximum, minimum, mean, standard deviation, voltage difference and voltage change rate of each cell within each time window; the maximum, minimum, mean, standard deviation, temperature difference and temperature rise rate of each cell; the maximum, minimum, mean, standard deviation and current change rate of each cell; as well as the mean and difference of state of charge, the mean of health status, the mean of mileage, and the operating condition code.
3. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 1, characterized in that, Calculate the edge weights of any two cells i and j in the generated dynamic heat propagation edge weights. The calculation formula is as follows: ; in, The physical distance between cells i and j This is the distance attenuation coefficient. The temperature difference between cells i and j The difference in temperature rise rate between cells i and j Let i be the direction of heat propagation from cell i to cell j. This is the physical topology mask between cell i and cell j. These are the weighting coefficients.
4. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 1, characterized in that, Topology-aware masking pre-training employs at least one of the following masking strategies: Single-cell channel mask: randomly select some cells and mask the voltage, temperature or temperature rise rate characteristics of the corresponding cells; Neighborhood cell masking, which uses a target cell as the center to mask the overall features of multiple cells that are physically adjacent to the target cell; A continuous time segment mask can be used to mask the data of a battery cell within multiple consecutive time windows. Thermal propagation path masking: Selecting physically adjacent cells along the temperature gradient direction to partially mask features of the target cell; The sensor is missing a mask; mask the area covered by the temperature probe or the voltage acquisition channel.
5. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 4, characterized in that, The loss function for topology-aware mask pre-training includes the reconstruction error of the masked features, and the topology consistency loss to make the restored result conform to the physical distance decay relationship between cells and the temperature gradient direction.
6. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 1, characterized in that, The implementation of each alternating spatiotemporal attention block in the alternating spatiotemporal attention network includes: The spatial graph attention layer is used to calculate graph attention weights based on the physical distance between cells, temperature difference, temperature rise rate difference, and dynamic heat propagation edge weights, and to aggregate spatial thermal coupling information of adjacent cells to obtain spatial features. The temporal self-attention layer is used to perform temporal dimensional modeling of the hidden state of each cell in multiple consecutive time windows to obtain temporal features. Temporal dimensional modeling includes local window attention and cross-window long attention. The working condition gating injection layer is used to generate gating coefficients based on the current working condition of the vehicle, and to adaptively fuse spatial features and temporal features using the gating coefficients. The thermal propagation residual correction layer constructs thermal propagation residual terms based on the temperature difference direction between adjacent cells, physical distance attenuation, and temperature rise trend, and injects them into the node hidden state to apply physical constraints on thermal diffusion. The dynamic edge weight update layer updates the graph edge weights used in the next layer based on the cell anomaly contribution score output by the current layer and the temperature gradient of adjacent cells.
7. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 6, characterized in that, In the spatial graph attention layer, the calculation of the attention weight of cell i to cell j introduces dynamic edge weights. The calculation formula is: ; ; in, and For node features, and For learnable parameters, This indicates vector concatenation.
8. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 1, characterized in that, The joint loss function for multiple tasks is: ; in: Classify losses for thermal failure risk. For the remaining risk time regression loss, This is due to the location loss of abnormal battery cells. To predict losses for thermal diffusion paths, Loss due to physical consistency constraints; These are the weights of each loss term.
9. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 1 or 8, characterized in that, Physical consistency constraints include at least one of the following constraints: Distance attenuation consistency: the weight of the constrained heat propagation path decreases as the physical distance increases; The temperature gradient direction is consistent, and the propagation weight from high-temperature cells to low-temperature cells is greater than that in the opposite direction. Topological blocking consistency ensures that the weight of inter-cell heat propagation blocked by the insulation structure approaches zero; The risk trend is consistent; as the probability of constrained thermal failure increases, the remaining risk time decreases. Anomaly localization and path consistency are ensured by increasing the weight of thermal diffusion paths associated with cells that contribute high anomalies.
10. The battery thermal failure prediction method based on topological perception and alternating spatiotemporal attention according to claim 1, characterized in that, Thermal failure risk probability represents the probability of thermal failure or reaching a high-risk state within a preset time range in the future; remaining risk time represents the estimated remaining time before reaching the thermal failure warning state; anomaly The cell contribution score represents the degree to which each cell contributes to the current risk of thermal failure, and is used to locate abnormal cells; The thermal diffusion path weight represents the probability of an abnormal risk propagating from cell i to cell j, and is used for thermal diffusion path interpretation. Model uncertainty represents the degree of confidence that the model can provide for the current prediction results.
