A bidirectional cross-attention mechanism lithium battery state of health prediction method

By using Gram corner field and bidirectional cross-attention mechanism, one-dimensional temporal features are transformed into two-dimensional spatial features and fused, which solves the feature mismatch problem in the prediction of lithium-ion battery health status in existing methods and improves prediction accuracy and robustness.

CN122307372APending Publication Date: 2026-06-30YANCHENG INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANCHENG INST OF TECH
Filing Date
2026-05-09
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Most existing methods for predicting the health status of lithium-ion batteries extract features from one-dimensional time series, which cannot fully reflect the aging characteristics of the battery. Furthermore, there are issues of feature dimension mismatch and information complementarity between one-dimensional and two-dimensional health features.

Method used

Gram corner field is used to convert one-dimensional temporal health features into two-dimensional spatial features, and spatial features are extracted by CNN-TCN network. The one-dimensional and two-dimensional health features are then fused and enhanced by a bidirectional cross-attention mechanism.

Benefits of technology

It improves the accuracy and robustness of lithium-ion battery health status prediction, and can more comprehensively capture the time-series dynamic features and higher-order dependencies related to battery aging, solving the problems of feature dimension mismatch and information complementarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122307372A_ABST
    Figure CN122307372A_ABST
Patent Text Reader

Abstract

This invention discloses a bidirectional cross-attention mechanism for predicting the state of health (SOH) of lithium batteries. The steps are as follows: First, acquire a lithium battery aging cycle dataset. Extract preliminary health features related to voltage and current from the charge-discharge cycle data and standardize the charge-discharge data. Then, use the Pearson correlation coefficient method to screen the health features, obtaining those with high correlation coefficients. Select half of these one-dimensional health features and convert them into two-dimensional health features using Gram's corner field (GAF). Input the remaining one-dimensional health features and the calculated two-dimensional health features into a CNN-TCN network structure. The GAF image is used to interpret the global spatial pattern of battery aging, while the remaining one-dimensional health features are used to capture local detail changes during aging. Feature enhancement and fusion are performed through a bidirectional cross-attention mechanism. Finally, the fused health features are input into the TCN model to achieve SOH prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of lithium-ion battery management technology and relates to a method for predicting the health status of lithium batteries using a bidirectional cross-attention mechanism. Background Technology

[0002] Lithium-ion batteries play a crucial role in electric vehicles, microgrids, and energy storage systems due to their long cycle life, high energy density, and high reliability. State of Health (SOH) prediction is a vital component of Battery Management Systems (BMS) and is essential for ensuring the safe and stable operation of batteries. However, most existing methods extract features related to battery aging from one-dimensional time series data to estimate SOH, and these extracted features cannot fully reflect the battery's aging characteristics.

[0003] Patent (CN121114807A) discloses a method for estimating the state of health (SOH) of lithium-ion batteries based on multi-scale Gram matrix entropy. First, it collects the voltage and current signals of the target lithium-ion battery. Then, it uses a Gram matrix to convert the voltage and current signals into two-dimensional images. The two-dimensional images are then decomposed into images at different scales. Shannon entropy is used to quantize these images at different scales to obtain health feature information. This health feature information is then input into an MLP model to obtain the estimated SOH value of the target lithium-ion battery. However, this method compresses all information into the entropy values ​​of the multi-scale images, and then uses an MLP to input the quantized entropy features. Therefore, the model depends on the quality of the health features. To address this problem, this invention employs a fusion method of deep networks and cross-attention mechanisms. This fuses the two-dimensional health features processed by the deep network with the one-dimensional health features, avoiding the decline in prediction accuracy caused by low-quality health feature extraction. Patent (CN117872204B) discloses a method, device, and electronic device for assessing the health status of lithium-ion batteries. First, it uses Gram angle difference fields to convert the first features of the charging and discharging data corresponding to the lithium-ion battery into a two-dimensional image. Then, based on a multi-layer attention mechanism, it enhances the second features corresponding to the two-dimensional image to obtain a third feature. A random neighborhood embedding algorithm is then used to reduce the dimensionality of the third feature to obtain a fourth feature. Finally, the fourth feature is used to determine the predicted health status value of the lithium-ion battery. However, this method primarily uses a two-dimensional image flow and does not demonstrate dedicated parallel modeling or systematic fusion with the one-dimensional original sequence, which may lead to the loss of one-dimensional information. To address this problem, this invention employs a dual-branch network structure using convolutional neural networks to extract and compress spatial features of the two-dimensional health features, discovering local spatial patterns and retaining significant responses, reducing spatial dimensionality and computational load, and providing a more compact and abstract spatial representation for subsequent fusion. A temporal convolutional neural network is used to model the causal and multi-scale time dependence of the one-dimensional temporal health features, capturing time patterns from short-term fluctuations to long-term trends, ensuring causality, and improving training stability and transitivity through residuals and regularization.

[0004] Time-dependent modeling captures time patterns from short-term fluctuations to long-term trends, ensuring causality and improving training stability and transitivity through residuals and regularization. Summary of the Invention

[0005] The problem addressed by this invention is to provide a bidirectional cross-attention mechanism for predicting the state of health (SOH) of lithium batteries. On the one hand, existing methods mostly extract features related to battery aging from one-dimensional time series to estimate SOH, and the extracted features cannot fully reflect the aging characteristics of the battery. This invention uses Gram angle field to convert one-dimensional time series health features into two-dimensional spatial health features, thereby enabling a more comprehensive prediction of battery health status. On the other hand, a bidirectional cross-attention mechanism is adopted to solve the problem of feature dimension mismatch and information complementarity between one-dimensional and two-dimensional health features.

[0006] To achieve the above objectives, the present invention proposes the following technical solution:

[0007] S1. Obtain voltage, current, and time data during the aging cycle charge and discharge process of lithium battery, extract preliminary health characteristics reflecting battery degradation, and standardize the preliminary health characteristic data.

[0008] S2. The Pearson correlation coefficient method is used to calculate the correlation between each preliminary health feature and the battery health status, and the screened health features are divided into two parts. The first part is used as a one-dimensional health feature, and the second part is used as a health feature to be converted.

[0009] S3. The Gram angle field (GAF) is used to convert the health features to be transformed from one-dimensional time series data into two-dimensional health features. The specific steps are as follows: The selected health features are first linearly normalized to convert the numerical range to (-1, 1), then polar coordinates are used to convert them into angles, the Gram matrix is ​​obtained using the Gram angle field formula, and finally the selected one-dimensional health features are converted into two-dimensional health features.

[0010] S4. Input the one-dimensional health features into the TCN network and the two-dimensional health features into the CNN network to extract one-dimensional temporal features and two-dimensional spatial features respectively.

[0011] S5. A bidirectional cross-attention mechanism is used to fuse and enhance the one-dimensional temporal features and the two-dimensional spatial features. The detailed steps are as follows: Calculate the query (Q), key (K), and value (Q) of the one-dimensional health feature and the two-dimensional health feature respectively. Calculate the attention score matrices of the one-dimensional and two-dimensional health features respectively using the query and key. Normalize the matrices using the Softmax function to obtain the attention weight matrix. Then, perform a weighted summation of the attention weight matrix calculated from the one-dimensional health feature and the value of the two-dimensional health feature. Simultaneously, perform a weighted summation of the attention weight matrix calculated from the two-dimensional health feature and the value of the one-dimensional health feature to obtain two enhanced feature parts. Finally, obtain the enhanced features through residual connection and perform feature fusion to obtain the fused health feature.

[0012] S6. Input the fused health features into the TCN prediction model to obtain the predicted value of the lithium battery health status.

[0013] The health characteristic parameters mentioned in step S1 include charging time and charging energy within the constant current stage charging voltage range, and charging time and charging energy within the constant voltage stage charging current range. The preliminary health characteristic data is standardized, and the calculation formula for this standardization is as follows: In the formula, For health characteristic data, For the standardized data, max(x) and min(x) are the maximum and minimum values ​​in the corresponding health characteristic data;

[0014] In step S2, the Pearson correlation coefficient method is used to screen health features. The correlation coefficient between each health feature and the actual value of the battery health status is calculated, and health features with an absolute value of the correlation coefficient greater than a preset threshold are selected as the screened features. The calculation formula is as follows:

[0015]

[0016] In the formula, r represents the Pearson correlation coefficient. and These represent health characteristic data and actual SOH values, respectively. and is the average of the two values, and n is the number of battery charge-discharge cycles.

[0017] In step S3, the one-dimensional health feature is transformed into a two-dimensional health feature using a Gram angle field (GAF). Specifically, the health feature to be transformed is first linearly normalized to change its numerical range to (-1, 1), as shown in the following formula: In the formula, For health characteristic data, For the standardized data, max(x) and min(x) are the maximum and minimum values ​​in the corresponding health feature data. Then, the normalized health feature values ​​are mapped to angles using the inverse cosine function. , In the formula The value of the inverse cosine function. The data is standardized; the inverse cosine function value is obtained. Then, the Gram angle and field matrix can be calculated and constructed from the Gram angle and field (GASF) based on the angle values. The calculation formula is as follows: After calculating the Gram matrix, the Gram matrix is ​​visualized to obtain two-dimensional health characteristics.

[0018] In step S4, the TCN-CNN dual-branch network structure is used to further extract the one-dimensional health features and the two-dimensional health features;

[0019] The CNN branch includes an input layer, a first convolutional-pooling layer, a second convolutional-pooling layer, and an output layer. The input layer receives two-dimensional health features; the first convolutional-pooling layer extracts and downsamples the local spatial patterns of the two-dimensional health features; the second convolutional-pooling layer extracts and compresses deep features; and the output layer outputs the processed two-dimensional health features.

[0020] The TCN branch includes an input layer, a dilated causal convolution module, a regularization and activation layer, a residual connection layer, and an output layer. The input layer receives one-dimensional health features. The dilated causal convolution module uses stacked dilated convolution layers, with each convolution kernel depending only on the current and past time steps, and the dilation rate increases exponentially. The regularization and activation layer performs batch normalization on the convolution output and corrects the ReLU function activation. The residual connection layer adds the module input to the convolution output. The output layer outputs the processed one-dimensional health features.

[0021] In step S5, a bidirectional cross-attention mechanism is used to fuse and enhance the one-dimensional and two-dimensional health features obtained in step S4, specifically including:

[0022] 1) One-dimensional temporal features from TCN branches are received through the feature projection layer. Where L is the time step, D is the feature dimension and the two-dimensional spatial features from the CNN branch. Where H and W are the height and width of the feature map, respectively, the two-dimensional spatial features Flattened in spatial dimension ,in ; through learnable linear transformation of the weight matrix Generate query vector Q, key vector K, and value vector V for one-dimensional time-series features and two-dimensional spatial features, respectively: , ;

[0023] 2) Calculate the attention score matrix in both directions using a bidirectional cross-attention computation layer: For attention from one-dimensional features to two-dimensional spatial features, calculate the attention score matrix using the query vector of the one-dimensional feature and the key vector of the two-dimensional feature, and then normalize along the spatial dimension using the Softmax function to obtain the attention weight matrix. : Attention is directed from two-dimensional spatial features to one-dimensional temporal features. An attention score matrix is ​​calculated using the query vector of the two-dimensional features and the key vector of the one-dimensional features, and then normalized along the time dimension using the Softmax function to obtain the attention weight matrix. : In the formula, The scaling factor is used to prevent the gradient of the Softmax function from vanishing due to excessively large dot product results; the Softmax function is normalized along the last dimension to generate attention weight matrices. and ;

[0024] 3) Perform a weighted summation of the attention weight matrix and its corresponding value vector: , , The enhanced one-dimensional features are obtained. Compared with enhanced two-dimensional features After obtaining the two feature enhancement components, the enhanced features are finally fused with the original features through residual connections, outputting the fused comprehensive features:

[0025] , ,

[0026] In the formula, The output projection matrix is ​​a learnable matrix, where LayerNorm represents the layer normalization operation, and Concat represents concatenation along the feature dimensions. This is a learnable fusion weight matrix.

[0027] In step S6, the health features processed by the bidirectional cross-attention mechanism are input into the TCN prediction model to obtain the prediction results. Then, the mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are selected as evaluation indicators to evaluate the prediction accuracy of the prediction model, thereby determining whether it meets the design requirements. The specific formula is as follows: , , In the formula, N represents the number of experimental predictions. This is the actual value of SOH. This is the predicted value for SOH.

[0028] Compared with existing technologies, this invention has the following technical advantages: First, it converts one-dimensional temporal features into two-dimensional spatial features through Gram angle field and further extracts these two types of health features through CNN-TCN, enabling the model to better capture the temporal dynamic features related to battery aging in one-dimensional health features while possessing both one-dimensional temporal and two-dimensional spatial features, and to capture high-order dependencies and nonlinear interaction features that cannot be represented by traditional one-dimensional temporal features; Second, it uses a bidirectional cross-attention mechanism to enhance and fuse one-dimensional temporal and two-dimensional spatial features, solving the problems of feature dimension mismatch and information complementarity, and improving the accuracy and robustness of SOH prediction. Attached Figure Description

[0029] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0030] In the attached diagram:

[0031] Figure 1 This is a flowchart of a lithium battery health status prediction method based on a bidirectional cross-attention mechanism.

[0032] Figure 2 This is a flowchart of the bidirectional cross-attention mechanism structure;

[0033] Figure 3 This is a flowchart of the CNN-TCN structure. Detailed Implementation

[0034] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0035] Example: Figure 1 As shown, a bidirectional cross-attention mechanism method for predicting the health status of lithium batteries comprises the following steps:

[0036] Step 1: Obtain voltage and current data of lithium-ion batteries during charging and discharging during aging cycles. Taking NASA's B0005 battery dataset as an example, the battery charging and discharging experimental procedure is as follows: In the charging stage, a constant current charging mode is first used to charge the battery with a current of 1.5 A until the voltage reaches 4.2 V; then, the constant voltage charging mode is switched to maintain the voltage at 4.2 V until the charging current drops to 20 mA. In the discharging stage, a constant current discharging mode is used to discharge the battery with a current of 2 A until the battery voltage drops from 4.2 V to the preset cutoff voltage. By calculating the discharge capacity during the battery aging cycle, the cycle SOH value of the battery is obtained. The health feature data extracted are the charging time and charging energy in the charging voltage range of 3.8V to 4.2V in the CC stage, and the charging time and charging energy in the charging current range of 1.5A to 0.5A in the CV stage. Therefore, the charging time and charging energy in each voltage and current range are extracted as health feature parameters, and then the calculated preliminary health features are normalized. The min-max normalization method is used, and the calculation formula is as follows: In the formula, For health characteristic data, For the standardized data, max(x) and min(x) represent the maximum and minimum values ​​in the corresponding health characteristic data. Therefore, the time points when the voltage rises to 3.8V and 4.2V in each charging cycle, and the time points when the current decreases from 1.5A to 0.5A in each charging cycle, are selected as the equal voltage difference charging time and the equal current difference charging time, respectively. The formula for calculating the equal voltage difference charging time is as follows: The formula for calculating the charging time of equal current difference is: In the formula, k is the number of iterations. , These correspond to the time points when the voltage rises to 3.8V and 4.2V in each cycle, respectively. , These correspond to the time points when the current decreases from 1.5A to 0.5A in each cycle; simultaneously, based on the ranges of equal pressure difference and equal current difference, the equal pressure difference charging energy and equal current difference charging energy are calculated respectively. The formula for calculating the equal pressure difference charging energy is as follows: The formula for calculating the energy of equal current difference charging is: In the formula, k is the number of iterations. and These represent the voltage and current during the charging phase, respectively.

[0037] Step 2: Screening Health Features using Pearson Correlation Coefficient: The Pearson correlation coefficient method is used to calculate the correlation between the extracted preliminary health feature parameters and the State of Health (SOH), and health feature parameters with a correlation coefficient above 0.85 are selected. The specific calculation formula is as follows:

[0038]

[0039] In the formula, r represents the Pearson correlation coefficient. and These represent health characteristic data and actual SOH values, respectively. and is the average of the two values, and n is the number of battery charge-discharge cycles.

[0040] Step 3: Calculate two-dimensional health characteristics. The specific steps are as follows:

[0041] The Gram-squared field (GAF) is used to convert one-dimensional health features into two-dimensional health features. The specific steps are as follows: For the selected health features, linear normalization is first applied, changing the numerical range to (-1, 1). The specific formula is as follows:

[0042] In the formula, For health characteristic data, For the standardized data, max(x) and min(x) are the maximum and minimum values ​​of the corresponding health feature data. Then, the inverse trigonometric function is used to map the health feature values ​​to angles. , In the formula The value of the inverse cosine function. The data is standardized; the inverse cosine function value is obtained. Then, the Gram matrix can be calculated from the Gram angle and field (GASF) using the following formula: After calculating the Gram matrix, the Gram matrix is ​​visualized to obtain two-dimensional health characteristics.

[0043] Step 4: Use the CNN-TCN dual-branch network structure to further extract health features. The specific steps are as follows:

[0044] The TCN-CNN dual-branch network structure is used to further extract one-dimensional and two-dimensional health features;

[0045] The CNN branch includes an input layer, a first convolutional-pooling layer, a second convolutional-pooling layer, and an output layer. The input layer receives two-dimensional health features. The first convolutional-pooling layer extracts and downsamples the local spatial patterns of the two-dimensional health features, reducing the spatial dimension of the feature map, enhancing the translation invariance of the features, and reducing computational cost while retaining the most significant feature responses. The second convolutional-pooling layer performs deep feature extraction and compression. The output layer outputs the processed two-dimensional health features.

[0046] The TCN branch comprises an input layer, a dilated causal convolutional module, a regularization and activation layer, a residual connection layer, and an output layer. The input layer receives one-dimensional health features. The dilated causal convolutional module uses stacked dilated convolutional layers, where each kernel depends only on the current and past time steps, and the receptive field is gradually expanded through an exponentially increasing dilation rate. This allows the module to capture multi-scale time-dependent patterns from short-term fluctuations to long-term trends in the input sequence without significantly increasing the number of parameters. The regularization and activation layer performs batch normalization on the convolutional output and corrects the ReLU activation layer to accelerate training convergence, improve model stability, and introduce non-linear expressive power. The residual connection layer adds the module input to the convolutional output, effectively mitigating the gradient vanishing problem in deep networks and ensuring robust propagation of temporal features. The output layer outputs the processed one-dimensional health features.

[0047] The CNN-TCN dual-branch network structure is initialized, including the input layer, first convolutional-pooling layer, second convolutional-pooling layer, and output layer of the CNN branch; and the input layer, dilated causal convolutional module, regularization and activation layer, residual connection layer, and output layer of the TCN branch, as well as the settings for the fusion and classification layers. The 2D health feature size received by the input layer of the CNN branch is set to (64, 64, 1). The first convolutional-pooling layer has 32 kernels, a kernel size of (3, 3), a stride of 1, the same padding method, max pooling, a pooling window of (2, 2), and a pooling stride of 2. The second convolutional-pooling layer has 64 kernels, a kernel size of (3, 3), a stride of 1, the same padding method, max pooling, and a pooling window of (2, 2). 2) The pooling stride is 2, and the output layer uses global average pooling. The one-dimensional health feature time-series data received by the TCN branch input layer has a size of (100, 10). The number of layers in the dilated causal convolution module is 3, the number of filters in each layer is (64, 64, 64), the convolution kernel size is 3, and the dilation rate sequence is (1, 2, 4). Causal constraints are achieved through left padding. The regularization and activation layers use a combination of batch normalization and ReLU activation function. The residual connection is executed after each dilated causal convolution module. The output layer uses global average pooling in the time dimension. The feature fusion method in the fusion and classification layers is concatenation. The fully connected layers are set to 2 layers with 128 and 64 neurons respectively and the activation function is ReLU. The activation function of the output layer is Softmax. In the network general parameters, the activation function is ReLU, the weight initialization method is He Normal, the optimizer is Adam, the initial learning rate is 0.001, and the regularization strategy is a combination of Dropout (rate=0.3) and L2 regularization (coefficient 1e-4).

[0048] Step 5: Perform feature fusion using a bidirectional cross-attention mechanism. The specific steps are as follows:

[0049] 1) The feature projection layer receives the outputs from the TCN branches (one-dimensional temporal features). Where L is the time step and D is the feature dimension) and the output from the CNN branch (two-dimensional spatial features) (where H and W are the height and width of the feature map, respectively). Flattened in spatial dimension ,in Next, the weight matrix is ​​transformed using a learnable linear transformation. Generate a query vector Q, a key vector K, and a value vector V for each of the two features: , ;

[0050] 2) The attention score matrix for each direction is calculated by the bidirectional cross-attention computation layer and normalized using Softmax: attention from one-dimensional temporal features to two-dimensional spatial features is processed using... right The query is performed, the attention score matrix is ​​calculated, and then normalized along the spatial dimension (corresponding to S) using the Softmax function to obtain the attention weight matrix. : Attention from two-dimensional spatial features to one-dimensional temporal features: using right The query is performed, the attention score matrix is ​​calculated, and then normalized along the time dimension (corresponding to L) using the Softmax function to obtain the attention weight matrix. : In the formula, The scaling factor is used to prevent the gradient of the Softmax function from vanishing due to excessively large dot product results; the Softmax function is normalized along the last dimension to generate attention weight matrices. and .

[0051] 3) After obtaining the attention weight matrix, perform a weighted summation using the values ​​of the two-dimensional health features and the attention weight matrix calculated from the one-dimensional health features: , This indicates that the one-dimensional temporal features are enhanced by focusing on key information in the two-dimensional space; simultaneously, the attention weight matrix calculated from the one-dimensional health features and the two-dimensional health features is weighted and summed. , This represents the enhancement of two-dimensional spatial features by focusing on one-dimensional temporal key information; after obtaining the two enhanced feature parts, the enhanced features are finally obtained through residual connection and then fused:

[0052] , ,

[0053] In the formula, The output projection matrix is ​​a learnable matrix, where LayerNorm represents the layer normalization operation, and Concat represents concatenation along the feature dimensions. This is a learnable fusion weight matrix.

[0054] Step Six: Input the health features processed by the bidirectional cross-attention mechanism into the TCN prediction model to obtain the predicted values. Then, select Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE) as evaluation indicators to evaluate the prediction accuracy of the prediction model, thereby determining whether it meets the design requirements. The specific formula is as follows: , , In the formula, N represents the number of experimental predictions. This is the actual value of SOH. This is the predicted value for SOH.

[0055] Finally, it should be noted that the above descriptions are merely examples of the present invention and are not intended to limit the 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 method for predicting the health status of lithium batteries using a bidirectional cross-attention mechanism, characterized in that, Includes the following steps: S1. Obtain voltage, current, and time data during the aging cycle charge and discharge of lithium batteries, extract preliminary health characteristics reflecting battery degradation, and standardize the preliminary health characteristic data. S2. The Pearson correlation coefficient method is used to calculate the correlation between each preliminary health feature and the battery health status, and the screened health features are divided into two parts. The first part is used as a one-dimensional health feature, and the second part is used as a health feature to be converted. S3. Use Gram angle field to convert the health features to be converted from one-dimensional time series data into two-dimensional health features; S4. Input the one-dimensional health features into the TCN network and the two-dimensional health features into the CNN network to extract one-dimensional temporal features and two-dimensional spatial features respectively. S5. A bidirectional cross-attention mechanism is used to fuse and enhance the one-dimensional temporal features and the two-dimensional spatial features to obtain the fused health features. The bidirectional cross-attention mechanism is designed as follows: the query, key, and value of the one-dimensional health features and the two-dimensional health features are calculated respectively. The attention score matrix of the one-dimensional and two-dimensional health features is calculated by cross-calculating the query and key. The attention weight matrix is ​​obtained by normalization through the Softmax function. The value of the two-dimensional health features is then weighted and summed with the attention weight matrix calculated by the one-dimensional health features. At the same time, the value of the one-dimensional health features is weighted and summed with the attention weight matrix calculated by the two-dimensional health features to obtain two feature enhancement parts. Finally, the enhanced features are obtained through residual connection and feature fusion is performed. S6. Input the fused health features into the TCN prediction model to obtain the predicted value of the lithium battery health status.

2. The method for predicting the health status of lithium batteries using a bidirectional cross-attention mechanism according to claim 1, characterized in that: In step S1, the health characteristic parameters include charging time and charging energy within the constant current stage charging voltage range, and charging time and charging energy within the constant voltage stage charging current range. The preliminary health characteristic data are then standardized.

3. The method for predicting the health status of lithium batteries using a bidirectional cross-attention mechanism according to claim 1, characterized in that: In step S2, the Pearson correlation coefficient method is used to screen the preliminary health features, calculate the correlation coefficient between each health feature and the actual value of the battery health status, and select health features with an absolute value of the correlation coefficient greater than the preset threshold as the screened features.

4. The method for predicting the health status of a lithium battery using a bidirectional cross-attention mechanism according to claim 1, characterized in that: In step S3, the one-dimensional health features are converted into two-dimensional health features using a Gram angle field, specifically including: 1) Linearly normalize the health characteristics to be transformed, and transform the numerical range to (-1, 1); 2) The normalized health feature values ​​are mapped to angle values ​​using the inverse cosine function; 3) Construct a Gram angle and field matrix based on the angle values. The element in the i-th row and j-th column of this matrix is ​​the cosine of the sum of the i-th angle value and the j-th angle value. 4) Visualize the Gram matrix to obtain two-dimensional health features.

5. The method for predicting the health status of a lithium battery using a bidirectional cross-attention mechanism according to claim 1, characterized in that: In step S4, the TCN-CNN dual-branch network structure is used to further extract the one-dimensional health features and the two-dimensional health features; The CNN branch includes an input layer, a first convolutional-pooling layer, a second convolutional-pooling layer, and an output layer. The input layer receives two-dimensional health features; the first convolutional-pooling layer extracts and downsamples the local spatial patterns of the two-dimensional health features; the second convolutional-pooling layer extracts and compresses deep features; and the output layer outputs the processed two-dimensional health features. The TCN branch includes an input layer, a dilated causal convolution module, a regularization and activation layer, a residual connection layer, and an output layer; the input layer is used to receive one-dimensional health features; the dilated causal convolution module uses stacked dilated convolution layers, each convolution kernel depends only on the current and past time steps, and the dilation rate increases exponentially. The regularization and activation layer is used to batch normalize the convolution output and correct the ReLU function activation of the linear unit; the residual connection layer is used to add the module input and the convolution output; the output layer is used to output the processed one-dimensional health features.

6. The method for predicting the health status of a lithium battery using a bidirectional cross-attention mechanism according to claim 1, characterized in that: In step S5, a bidirectional cross-attention mechanism is used to fuse and enhance the one-dimensional and two-dimensional health features obtained in step S4, specifically including: 1) One-dimensional temporal features from TCN branches are received through the feature projection layer. Where L is the time step, D is the feature dimension, and the two-dimensional spatial features are from the CNN branch. Where H and W are the height and width of the feature map, respectively, the two-dimensional spatial features Flattened in spatial dimension ,in ; through learnable linear transformation of the weight matrix Each of the one-dimensional temporal features and the two-dimensional spatial features generates its own query vector, key vector, and value vector. 2) Calculate the attention score matrix in both directions using a bidirectional cross-attention computation layer: Attention from one-dimensional temporal features to two-dimensional spatial features is calculated using the query vector of the one-dimensional feature and the key vector of the two-dimensional feature. The matrix is ​​then normalized along the spatial dimension using the Softmax function to obtain the attention weight matrix. Attention is directed from two-dimensional spatial features to one-dimensional temporal features. An attention score matrix is ​​calculated using the query vector of the two-dimensional features and the key vector of the one-dimensional features, and then normalized along the time dimension using the Softmax function to obtain the attention weight matrix. . 3) The attention weight matrix and the corresponding value vector are weighted and summed to obtain the enhanced one-dimensional feature. Compared with enhanced two-dimensional features Then, the enhanced features are fused with the original features through residual connections to output the fused comprehensive features.

7. The method for predicting the health status of a lithium battery using a bidirectional cross-attention mechanism according to claim 1, characterized in that: In step S6, the health features processed by the bidirectional cross-attention mechanism are input into the TCN prediction model to obtain the prediction results of the lithium battery health status. The mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are used as evaluation indicators to evaluate the prediction results.