Training method and device of battery performance degradation trend prediction model

By dividing battery discharge capacity data into multiple data blocks and employing a two-stage mask autoencoder pre-training method, the problem of low accuracy in predicting lithium battery performance degradation in existing technologies is solved, and more accurate prediction of battery performance degradation trends is achieved.

CN121858983APending Publication Date: 2026-04-14BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing time series forecasting and battery trend forecasting methods are easily affected by local fluctuations during the performance degradation of lithium batteries, resulting in low forecast accuracy and difficulty in accurately grasping the health status and safety hazards of batteries.

Method used

A two-stage masked autoencoder pre-training method based on progressive prediction is adopted. By dividing the battery discharge capacity data into multiple data blocks, the joint optimization of the sequence reconstruction network and the prediction network is used, and the model parameters are adjusted by combining MSE loss and PS loss to generate a battery performance degradation trend prediction model.

Benefits of technology

It improves the model's ability to learn multi-level temporal degradation features of battery discharge capacity data, enhances the accuracy of prediction results, can more accurately predict the performance degradation trend of batteries, reduces computational resource consumption, and avoids ignoring data time dependencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121858983A_ABST
    Figure CN121858983A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a training method and device of a battery performance degradation trend prediction model, and the training method of the battery performance degradation trend prediction model comprises the steps: obtaining the discharge capacity data of a battery in a historical period, and dividing the discharge capacity data into a plurality of data blocks according to different time scales; inputting the plurality of data blocks into a sequence reconstruction network of a to-be-trained prediction model for processing, and calculating a first loss value according to an output result of the sequence reconstruction network and a predetermined first label; determining training sample data of the current training round according to the training stage to which the current training round belongs; inputting the training sample data into a prediction network of a to-be-trained prediction model for processing, and calculating a second loss value according to an output result of the prediction network and a predetermined second label; and adjusting model parameters of the to-be-trained prediction model based on the first loss value and the second loss value, and generating a battery performance degradation trend prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of battery technology, and in particular to a training method for a battery performance degradation trend prediction model. Background Technology

[0002] Lithium-ion batteries, as a new type of energy source, have been widely used in mobile phones, laptops, energy storage systems, military equipment, aerospace, and many other fields. With the rapid development of next-generation industrial technologies and the increasing integration and intelligence of products, the application environment for lithium batteries is becoming more complex. During battery use, due to irregular charging and discharging under various usage scenarios, battery performance gradually declines as its capacity degrades and its impedance increases, making it prone to problems such as internal short circuits and thermal runaway, potentially leading to battery fires and catastrophic accidents. Therefore, conducting targeted lifespan prediction and reliability assessments for specific lithium batteries can more accurately grasp the battery's health status and future operational capabilities, allowing for timely identification of potential safety hazards at each stage of the battery's lifespan and preventing accidents.

[0003] However, existing time series forecasting and battery trend forecasting methods are highly susceptible to local fluctuations when conducting general predictions of battery performance degradation, thus losing their ability to predict the overall degradation trend and resulting in low prediction accuracy. Therefore, an effective method is urgently needed to solve this problem. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a training method for a battery performance degradation trend prediction model. One or more embodiments of this specification also relate to a training apparatus for a battery performance degradation trend prediction model, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a method for training a battery performance degradation trend prediction model is provided, comprising: Obtain battery discharge capacity data for historical periods and divide the discharge capacity data into multiple data blocks according to different time scales; The multiple data blocks are input into the sequence reconstruction network of the prediction model to be trained for processing, and a first loss value is calculated based on the output of the sequence reconstruction network and a predetermined first label. Based on the training stage to which the current training round belongs, determine the training sample data for the current training round; The training sample data is input into the prediction network of the prediction model to be trained for processing, and a second loss value is calculated based on the output of the prediction network and a predetermined second label. The model parameters of the prediction model to be trained are adjusted based on the first loss value and the second loss value to generate a battery performance degradation trend prediction model.

[0006] Optionally, determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: If it is determined that the current training round belongs to the first training phase, the multiple data blocks and the battery discharge capacity data from the initial training round to the previous training round are determined as the training sample data of the current training round. The first training phase is from the first training round to the m1th training round, where m1 is a positive integer greater than 1. The starting training round is the first training round, and the historical time period is before the starting training round.

[0007] Optionally, determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: Given that the current training round belongs to the second training phase, calculate the proportion of the prediction network's output from the initial training round to the previous training round in the training sample data of the current training round; The prediction network's output from the initial training round to the previous training round, the multiple data blocks, and the battery's discharge capacity data from the initial training round to the previous training round are combined according to the stated proportion to generate the training sample data for the current training round. The second training phase consists of training rounds m1+1 to m2, where m2 is a positive integer greater than m1+1.

[0008] Optionally, determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: If it is determined that the current training round belongs to the third training stage, the output results of the prediction network from the initial training round to the previous training round are determined as the training sample data of the current training round. The third training phase consists of training rounds m2+1 to n, where n is a positive integer greater than m2+1.

[0009] Optionally, the training method for the battery performance degradation trend prediction model further includes: Determine the battery performance degradation trend corresponding to each data block, and group the data blocks according to the battery performance degradation trend; Determine the mask rate corresponding to each group, and perform masking processing on the data blocks contained in the corresponding group according to the mask rate; Multiple data blocks after masking are input into the sequence reconstruction network of the prediction model to be trained for processing.

[0010] Optionally, calculating the first loss value based on the output of the sequence reconstruction network and a predetermined first label includes: Based on the output of the sequence reconstruction network and the predetermined first label, calculate the first loss value of the mean squared error loss function; The output of the sequence reconstruction network is the prediction result obtained by predicting the valid data blocks among the multiple data blocks after masking, and the first label is the valid data block among the multiple data blocks after masking.

[0011] Optionally, calculating the second loss value based on the output of the prediction network and the predetermined second label includes: The second loss value of the block structure loss function is calculated based on the output of the prediction network and the pre-determined second label. The output of the prediction network is the prediction result of the battery's discharge capacity in the current training round, and the second label is the battery's actual discharge capacity in the current training round.

[0012] Optionally, adjusting the model parameters of the prediction model to be trained based on the first loss value and the second loss value includes: The first loss value and the second loss value are summed, and the model parameters of the prediction model to be trained are adjusted according to the summation result.

[0013] Optionally, the prediction model to be trained includes at least two multi-scale encoders, and the number of the at least two multi-scale encoders is the same as the number of time scales. The at least two multi-scale encoders are shared by the sequence reconstruction network and the prediction network. The sequence reconstruction network also includes a reconstruction task output layer, and the prediction network also includes a prediction task output layer.

[0014] According to a second aspect of the embodiments of this specification, a training apparatus for a battery performance degradation trend prediction model is provided, comprising: The segmentation module is configured to acquire the battery's discharge capacity data over historical periods and divide the discharge capacity data into multiple data blocks according to different time scales. The first processing module is configured to input the plurality of data blocks into the sequence reconstruction network of the prediction model to be trained for processing, and to calculate a first loss value based on the output of the sequence reconstruction network and a predetermined first label. The determination module is configured to determine the training sample data for the current training round based on the training stage to which the current training round belongs; The second processing module is configured to input the training sample data into the prediction network of the prediction model to be trained for processing, and calculate the second loss value based on the output of the prediction network and the predetermined second label. The generation module is configured to adjust the model parameters of the prediction model to be trained based on the first loss value and the second loss value, thereby generating a battery performance degradation trend prediction model.

[0015] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement any of the steps of the training method for the battery performance degradation trend prediction model.

[0016] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the training method for any of the battery performance degradation trend prediction models.

[0017] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the training method for the battery performance degradation trend prediction model described above.

[0018] This embodiment of the specification acquires battery discharge capacity data over historical periods and divides the discharge capacity data into multiple data blocks according to different time scales; inputs multiple data blocks into the sequence reconstruction network of the prediction model to be trained for processing, and calculates a first loss value based on the output of the sequence reconstruction network and a pre-determined first label; determines the training sample data for the current training round according to the training stage to which the current training round belongs; inputs the training sample data into the prediction network of the prediction model to be trained for processing, and calculates a second loss value based on the output of the prediction network and a pre-determined second label; and adjusts the model parameters of the prediction model to be trained based on the first loss value and the second loss value to generate a battery performance degradation trend prediction model. By dividing the discharge capacity data into multiple data blocks before subsequent processing, the model can learn the time dependencies of the data itself when processing the discharge capacity data. In addition, the embodiments in this specification adopt a two-stage masked autoencoder pre-training method based on progressive prediction. Through joint optimization of reconstruction and prediction tasks, and by adjusting the model parameters of the prediction model to be trained in combination with MSE loss and PS loss, a battery performance degradation trend prediction model is obtained. Through this training method, the model can learn the multi-level temporal degradation characteristics of battery discharge capacity data, thereby effectively improving the accuracy of the model output results. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating a training method for a battery performance degradation trend prediction model provided in one embodiment of this specification. Figure 2 This is a schematic diagram of a model pre-training process provided in one embodiment of this specification; Figure 3 This is a schematic diagram of the loss change curve of a pre-training process provided in one embodiment of this specification; Figure 4 This is a schematic diagram of the structure of a training device for a battery performance degradation trend prediction model provided in one embodiment of this specification; Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0020] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0021] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0022] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0023] This specification provides a training method for a battery performance degradation trend prediction model. This specification also relates to a training device for a battery performance degradation trend prediction model, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.

[0024] Figure 1 A flowchart is shown of a training method for a battery performance degradation trend prediction model according to an embodiment of this specification, specifically including the following steps.

[0025] Step 102: Obtain the battery's discharge capacity data for historical periods, and divide the discharge capacity data into multiple data blocks according to different time scales.

[0026] Specifically, before pre-training the model, it is necessary to first obtain the battery's discharge capacity data over historical periods.

[0027] Since battery-related datasets are typically stored separately for each individual battery cell, with each dataset recording data such as voltage, current, charging capacity, and discharging capacity for each charge and discharge step in each cycle, the discharging capacity data of each battery cell during the charge-discharge cycle can be directly extracted from each dataset as data for model pre-training. However, if the dataset does not contain discharging capacity data, the battery's discharging capacity can be calculated using the charging / discharging current and time from the dataset.

[0028] In practical applications, the discharge capacity data obtained through the aforementioned process can be divided into a training set, a validation set, and a test set in a ratio of 25:5:16. Specifically, 25 individual battery cell discharge capacity data are selected for model pre-training. During the training process, the discharge capacity data of another 5 individual battery cells are used to validate the model's prediction performance, helping to select the model with the best prediction performance. Finally, autoregressive extrapolation prediction tests are performed on the remaining 16 individual battery cell discharge capacity data to verify the model's prediction performance.

[0029] Furthermore, before inputting the discharge capacity data into the model for processing and analysis, the time-series discharge capacity data can be segmented into different block sequences according to different time scales. That is, the input sequence is... ,in, to All data are discharge capacity data, then... according to Segmentation is performed to obtain block-shaped sequences. .for Its sequence length ,in, The interval between two data blocks is set to a value that is taken by default. t represents the number of battery cycles. For example, if a battery undergoes 1000 cycles from the initial discharge to the end of its lifespan, then the value of t is 1000. The included content is according to right The generated data blocks are divided.

[0030] Dividing the discharge capacity data into multiple data blocks before subsequent processing not only helps reduce computational resource consumption but also helps prevent the model from ignoring the time dependencies of the data when processing the discharge capacity data, thereby improving the accuracy of the model's output results.

[0031] Step 104: Input the multiple data blocks into the sequence reconstruction network of the prediction model to be trained for processing, and calculate the first loss value based on the output of the sequence reconstruction network and the predetermined first label.

[0032] In one alternative implementation, the prediction model to be trained includes at least two multi-scale encoders, and the number of the at least two multi-scale encoders is the same as the number of time scales. The at least two multi-scale encoders are shared by the sequence reconstruction network and the prediction network. The sequence reconstruction network also includes a reconstruction task output layer, and the prediction network also includes a prediction task output layer.

[0033] In the embodiments of this specification, multiple data blocks are input into the sequence reconstruction network of the prediction model to be trained for processing. Specifically, data blocks generated by dividing the discharge capacity data according to the same time scale are input into the same multi-scale encoder, while data blocks generated by dividing the discharge capacity data according to different time scales are input into different multi-scale encoders for processing. Then, the prediction result of the model is output by the reconstruction task output layer, and the first loss value is calculated based on the prediction result and the predetermined first label.

[0034] In addition, the training method for the battery performance degradation trend prediction model provided in the embodiments of this specification also includes: Determine the battery performance degradation trend corresponding to each data block, and group the data blocks according to the battery performance degradation trend; Determine the mask rate corresponding to each group, and perform masking processing on the data blocks contained in the corresponding group according to the mask rate; Multiple data blocks after masking are input into the sequence reconstruction network of the prediction model to be trained for processing.

[0035] Furthermore, based on the masking process applied to the data blocks, the calculation of the first loss value according to the output of the sequence reconstruction network and the predetermined first label includes: Based on the output of the sequence reconstruction network and the predetermined first label, calculate the first loss value of the mean squared error loss function; The output of the sequence reconstruction network is the prediction result obtained by predicting the valid data blocks among the multiple data blocks after masking, and the first label is the valid data block among the multiple data blocks after masking.

[0036] Specifically, the embodiments in this specification employ a dual-phase masked autoencoder with progressive forecasting (DPMAP) pre-training method to pre-train the prediction model. Through joint optimization of reconstruction and prediction tasks, multi-level temporal degradation characteristics of battery discharge capacity data are learned. The entire process uses a unified Transformer architecture to handle multi-scale time blocks. The reconstruction task uses different mask rates in the stationary and degradation phases to enhance the model's ability to model non-stationary degradation phases. The prediction task models long-term degradation trends through a progressive autoregressive strategy. The reconstruction and prediction tasks share a multi-scale encoder backbone network, achieving collaborative decoupling between local fluctuation features and global trend representation. Finally, hierarchical feature fusion is performed, providing a pre-training foundation for a general prediction model of battery performance degradation trends. A schematic diagram of the model pre-training process provided in the embodiments of this specification is shown below. As shown. Figure 2 A multi-scale encoder is composed of a multi-head attention module, a residual connection + layer normalization module, a feedforward neural network module, and another residual connection + layer normalization module. Figure 2 Only three multi-scale encoders are shown for illustration. In actual applications, the number of multi-scale encoders can be set according to actual needs, and no limit is imposed here.

[0037] The reconstruction task in pre-training employs a degradation-aware multi-scale masking strategy. First, the discharge capacity data is divided into blocks at different time scales. Then, masks are dynamically applied according to the battery degradation stage. A low mask ratio is used during periods of gradual capacity decay to focus on local detail reconstruction, while a higher mask ratio is used during periods of accelerated capacity decay to enhance global trend inference. The prediction model to be trained takes the masked multi-scale segments as input and reconstructs the original sequence by minimizing the mean square error, enabling the encoder to learn cross-scale dependencies and noise-invariant features during the degradation process.

[0038] Specifically, the discharge capacity data is divided into block sequences according to different time scales. Based on this, for each A time-block level mask is randomly generated, and different mask ratios are used at different stages of the degraded data. A low mask ratio (low_mask_ratio) is used at the beginning of the charge-discharge cycle, and a high mask ratio (high_mask_ratio) is used at the end of the charge-discharge cycle.

[0039] The embodiments of this specification can determine the battery performance degradation trend corresponding to the data block by the last discharge capacity data in the data block, and group the data block according to the battery performance degradation trend to divide it into the initial stage of the charge-discharge cycle and the later stage of the charge-discharge cycle. Then, the mask rate corresponding to each group is determined, and the data blocks contained in the corresponding group are masked according to the mask rate.

[0040] In practical applications, the degradation trend threshold can be set to 90%. If the value of the last discharge capacity data in the data block is greater than or equal to 90%, the battery performance degradation trend corresponding to the data block can be determined as the starting stage of the charge-discharge cycle. If the value of the last discharge capacity data in the data block is less than 90%, the battery performance degradation trend corresponding to the data block can be determined as the later stage of the charge-discharge cycle.

[0041] Subsequently, the masked data blocks are input into a multi-scale encoder. The final reconstructed sequence is obtained through multi-scale feature fusion and reconstruction spatial mapping. Specifically, data blocks generated by dividing the discharge capacity data according to the same time scale and then masked are input into the same multi-scale encoder, while data blocks generated by dividing the discharge capacity data according to different time scales and then masked are input into different multi-scale encoders for processing.

[0042] In the embodiments of this specification, the input to the sequence reconstruction network of the prediction model to be trained includes: a discharge capacity degradation sequence used for pre-training. ,insufficient The sequence is filled, where, This represents the number of samples input to the model in a single iteration; for example, 64 indicates that 64 samples are processed simultaneously. This refers to the sequence length, which also includes the actual effective length of all sequences. Time scale Masking parameters include high mask ratio, low mask ratio, and trend threshold.

[0043] The output of the sequence reconstruction network of the prediction model to be trained includes: reconstruction loss. and reconstruct sequence .

[0044] The specific processing steps of the sequence reconstruction network are as follows: 1) If the Reversible Instance Normalization method Revin is enabled, the input sequence X will be normalized. 2) Create a valid mask (valid_mask) at the time step granularity to mark non-filled data areas; 3) Initialize the multi-scale feature list multi_scale_features; 4) For each time scale, calculate the number of valid blocks at the current scale: The sequence X is divided into data blocks, with the shape of the segmented sequence being [Batch, num_patches, patch_size×D]. A block-level effective mask `patch_mask` is created to mark non-filled data blocks. The degradation trend of each patch is calculated to obtain a trend shape of [Batch, num_patches]. A mask ratio matrix is ​​generated: the default value is low_mask_ratio. The effective data blocks are sorted in ascending order of trend, and the first `trend_threshold` ratio data blocks are set to high_mask_ratio. Random masks `mask_indices` are generated based on the ratio matrix. Linear projection: `projected = Linear(patches)`, with the shape of `projected` being [Batch, num_patches, d_model]. Position encoding is added. Apply a mask: masked_projected = replace (mask_indices area with mask_token), When calculating attention, the padding part is ignored. Block feature aggregation: aggregated = average along the block dimension (transformer_output), with shape [Batch, d_model]. Aggregated is added to multi_scale_features. 5) Perform multi-scale feature fusion: fused_feature = self-attention aggregation(stack(multi_scale_features)), with shape [Batch, d_model]; 6) Sequence reconstruction: reconstruction = fully connected reconstruction decoder (fused_feature), with shape [Batch, seq_len×D]; 7) Calculate reconstruction loss: Calculate the mean squared error loss of the effective region of the original sequence and the effective region of the predicted sequence; 8) If RevIN is enabled, reverse normalization is performed on reconstruction.

[0045] Step 106: Determine the training sample data for the current training round based on the training stage to which the current training round belongs.

[0046] In one optional implementation, determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: If it is determined that the current training round belongs to the first training phase, the multiple data blocks and the battery discharge capacity data from the initial training round to the previous training round are determined as the training sample data of the current training round. The first training phase is from the first training round to the m1th training round, where m1 is a positive integer greater than 1. The starting training round is the first training round, and the historical time period is before the starting training round.

[0047] In another optional implementation, determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: Given that the current training round belongs to the second training phase, calculate the proportion of the prediction network's output from the initial training round to the previous training round in the training sample data of the current training round; The prediction network's output from the initial training round to the previous training round, the multiple data blocks, and the battery's discharge capacity data from the initial training round to the previous training round are combined according to the stated proportion to generate the training sample data for the current training round. The second training phase consists of training rounds m1+1 to m2, where m2 is a positive integer greater than m1+1.

[0048] In another optional implementation, determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: If it is determined that the current training round belongs to the third training stage, the output results of the prediction network from the initial training round to the previous training round are determined as the training sample data of the current training round. The third training phase consists of training rounds m2+1 to n, where n is a positive integer greater than m2+1.

[0049] Specifically, in the DPMAP prediction task, a three-stage progressive autoregressive training method is adopted, including: a Teacher Forcing stage, a Warm-up transition stage, and a fully autoregressive stage. Teacher Forcing is an early method used for RNN model training. Because the model output is poor in the early stages of training, the poor output of the first layer affects the output of subsequent layers, leading to slow model learning and difficulty in loss convergence. Therefore, by using real data instead of model output as input for the next layer in the early stages of model training, the model's modeling ability in the early stages is improved. After the Teacher Forcing stage, the proportion of real data as input is gradually reduced in the Warm-up stage, reducing the model's dependence on real data. Finally, a fully autoregressive extrapolation prediction is performed, using only the model's own prediction results for multi-step extrapolation, significantly alleviating the problem of error accumulation in long-term predictions. Throughout the prediction task, a basic framework based on multi-scale time-block Transformers is used, sharing the Transformer encoder backbone network parameters with the reconstruction task.

[0050] Specifically, a separate prediction head (decoder) is set up in DPMAP to generate future prediction sequences. During inference, the model's previous prediction output is used as the input for the current iteration, i.e., autoregressive extrapolation prediction. In the Teacher Forcing phase, multiple masked data blocks are concatenated with the battery's discharge capacity data from the initial training iteration to the previous training iteration as the input for the next step; in the warm-up phase, the masked data blocks are combined with the prediction sequence... According to the sched_sampling_prob ratio (predicted sequence) The proportion of the total input data gradually increases; eventually evolving into a fully autoregressive prediction training, predicting the sequence. This will be used directly as input for the next prediction task until the complete prediction of the sequence length is achieved.

[0051] Step 108: Input the training sample data into the prediction network of the prediction model to be trained for processing, and calculate the second loss value based on the output of the prediction network and the predetermined second label.

[0052] In one optional implementation, calculating the second loss value based on the output of the prediction network and a predetermined second label includes: The second loss value of the block structure loss function is calculated based on the output of the prediction network and the pre-determined second label. The output of the prediction network is the prediction result of the battery's discharge capacity in the current training round, and the second label is the battery's actual discharge capacity in the current training round.

[0053] In the embodiments of this specification, the input to the prediction network of the prediction model to be trained includes: a discharge capacity degradation sequence used for pre-training. ,insufficient The sequence is padded, and the actual effective length of all sequences is also included. Time scale Single prediction step size And the planned sampling probability (the proportion of the actual value replaced by the predicted value). .

[0054] The output of the prediction network of the prediction model to be trained includes: prediction loss. and predicted sequences .

[0055] The specific processing procedure of the prediction network is as follows: 1) Divide the historical window and the future window based on the effective lengths: , This indicates the proportion of the history window length to the effective length; Future window length ; Maximum future window length ; 2) Construct a historical window and the window to the future : For each training sample data, from Start taking Length of historical window ; ; right Perform tail filling to ; 3) Initialize the current input: ; 4) Initialize the prediction container: predictions = empty list; 5) Initialize the number of predicted steps to 0. ; 6) When the number of predicted steps (pred_steps) is less than the maximum future window length (max_future_len), the following process is executed repeatedly: Multiscale feature list ; For each time scale, split current_input into , perform linear projection: , with shape [Batch, num_patches, d_model], add positional encoding: , apply Transformer encoding: , perform block feature aggregation: aggregated = average(transformer_output) along the block dimension, with shape [Batch, d_model], add aggregated to ; Multi-scale feature fusion: fused_feature = self-attention aggregation(stack( )), with shape [Batch, d_model]; Predict the next forecast_horizon steps: pred_step = fully-connected decoder(fused_feature), with shape [Batch, forecast_horizon, D], trained according to the task; Calculate the number of steps to be predicted this time: needed = min(forecast_horizon, max_future_len - pred_steps); Store the first needed steps of pred_step into predictions; Schedule sampling decision: If the random number < sched_sampling_prob, use the predicted value, otherwise use the true value; Update the current input: Remove the first needed steps from current_input, and concatenate the needed steps of the predicted value or the true value to the end of current_input; pred_steps += needed; 7) Concatenate all predictions: predictions = concatenate(predictions) along the time dimension, with shape [Batch, max_future_len, D]; 8) Create a valid mask future_mask for the future window (mark the non-padding regions); 9) Calculate the prediction loss: prediction_loss = PS(X_future[future_mask], predictions[future_mask]).

[0056] Step 110: Adjust the model parameters of the prediction model to be trained based on the first loss value and the second loss value to generate a battery performance degradation trend prediction model.

[0057] In one optional implementation, adjusting the model parameters of the prediction model to be trained based on the first loss value and the second loss value includes: The first loss value and the second loss value are summed, and the model parameters of the prediction model to be trained are adjusted according to the summation result.

[0058] In the embodiments of this specification, the hyperparameters set during pre-training include: batch_size (batch size during pre-training); in_features (feature dimension of input data, set to 1 since the input lithium battery discharge capacity data only has one feature, discharge capacity); patch_sizes (time scale for dividing data blocks); d_model (dimensionality of the projection space onto which the data of each patch is projected); nhead (number of heads in the Transformer multi-head attention); num_layers (number of Transformer encoder layers); history and forecast_horizon (input data and prediction window length for the prediction task, respectively); lr, weight_decay, epochs, and early_stop_patience (learning rate, weight decay coefficient, training iterations, and early stop timing for the training optimizer, respectively); stride (step size when cutting time blocks); and high_mask_ratio and low_mask_ratio (high and low mask ratios in the pre-training reconstruction task, respectively). trend_threshold indicates that the data blocks to be cut are sorted from high to low according to the degradation trend during the reconstruction task, and the first trend_threshold data blocks use a high mask rate.

[0059] The above hyperparameter settings are used to begin pre-training of a two-stage masked autoencoder based on progressive prediction. The reconstruction task uses MSE loss, and the prediction task uses PS loss. The total loss is the sum of the reconstruction loss (first loss value) and the prediction loss (second loss value). A schematic diagram of the loss variation curve during the pre-training process is shown below. As shown.

[0060] In practical applications, Teacher Forcing can be used in the first 0-1500 training cycles (rounds) of pre-training, resulting in an overall decreasing trend in pre-training loss; from 1500-3000 training cycles, Teacher Forcing can be used to further reduce the loss. The training loss gradually increases during this stage as the proportion of model output data used as input in extrapolation prediction. When the training cycle reaches 3000, the training method becomes fully autoregressive extrapolation prediction, and the model's training loss gradually converges in subsequent training. Therefore, the DPMAP pre-training loss generally shows a pattern of first decreasing, then increasing, and finally decreasing again before stabilizing.

[0061] In addition, the embodiments in this specification introduce Revin normalization for instances and "Patch-wise Structural Loss" for time block statistical features during the training process.

[0062] Revin is an instance-reversible normalization method for time series data distribution drift (such as significant changes in the mean and variance of data over time). It mainly includes normalization and denormalization: normalization is performed before the data is input into the model, and denormalization is performed on the model's output after learning. Revin's calculation method is simple, effectively eliminating non-stationary information from instances while restoring trend characteristics from the model's output.

[0063] For a single lithium battery discharge capacity data sample used in model training The model learns the prediction sequence of the input. , where T is the length of the model's input data, i.e., the history window length in the hyperparameters, and P is the length of the model's prediction window, corresponding to the size of the forecast_horizon hyperparameter.

[0064] First, calculate the mean of sequence X. and standard deviation The normalization and denormalization calculation methods are as follows: Normalization:

[0065] Anti-normalization:

[0066] in, Use non-negative decimals to prevent division by zero in formulas. and The affine transformation parameters that the model can learn. and These are the normalized model input and the denormalized model output, respectively.

[0067] The final prediction result output by the battery performance degradation trend prediction model Right now With the real label sequence The loss calculation adopts .

[0068] used This is to compensate for the insufficient correlation between the output sequence trained based on MSE loss and the real sequence. First, and The time sequence is divided into time blocks according to the same time scale (Patch-Size (PS) and step size (Stride). and ,in , Then, for time blocks within the same time period... and The correlation loss, variance loss, and mean loss are calculated separately for each of them. Finally, a gradient-based dynamic weighting strategy is used to adaptively fuse the correlation loss, variance loss, and mean loss to obtain... .

[0069]

[0070] Correlation loss ( This quantifies the consistency of direction and pattern between predicted and actual time blocks:

[0071] in, This is the Pearson correlation coefficient.

[0072]

[0073] In the formula , These are the standard deviations of the i-th time block. , These are the average values ​​of the i-th time block.

[0074] Variance loss ( This quantifies the fluctuations between time blocks:

[0075]

[0076]

[0077] This represents the amount of information lost when approximating P with Q.

[0078] Mean loss ( This quantifies the numerical differences between predicted and actual time blocks:

[0079] Gradient-based loss dynamic weighting dynamically adjusts the gradients of the three loss methods relative to the total loss based on the gradients of the three loss methods during training. This contributes to preventing a particular loss from becoming dominant during training.

[0080] In the t-th gradient calculation, W represents the final output header parameters of the model. First, calculate... , , Regarding the 2-norm of the gradient of W:

[0081]

[0082]

[0083] Mean gradient norm:

[0084] Based on the calculated gradient norm, the weights of the loss weighting are set as follows:

[0085]

[0086]

[0087] in:

[0088]

[0089] for and covariance, and They are respectively and Standard deviation.

[0090] calculate Afterwards, Weighted summation with MSE-loss:

[0091] in, These are the hyperparameters that need to be set during training.

[0092] By adjusting the model parameters of the prediction model to be trained based on MSE loss and PS loss, a battery performance degradation trend prediction model can be generated.

[0093] This embodiment of the specification acquires battery discharge capacity data over historical periods and divides the discharge capacity data into multiple data blocks according to different time scales; inputs multiple data blocks into the sequence reconstruction network of the prediction model to be trained for processing, and calculates a first loss value based on the output of the sequence reconstruction network and a pre-determined first label; determines the training sample data for the current training round according to the training stage to which the current training round belongs; inputs the training sample data into the prediction network of the prediction model to be trained for processing, and calculates a second loss value based on the output of the prediction network and a pre-determined second label; and adjusts the model parameters of the prediction model to be trained based on the first loss value and the second loss value to generate a battery performance degradation trend prediction model. By dividing the discharge capacity data into multiple data blocks before subsequent processing, the model can learn the time dependencies of the data itself when processing the discharge capacity data. In addition, the embodiments in this specification adopt a two-stage masked autoencoder pre-training method based on progressive prediction. Through joint optimization of reconstruction and prediction tasks, and by adjusting the model parameters of the prediction model to be trained in combination with MSE loss and PS loss, a battery performance degradation trend prediction model is obtained. Through this training method, the model can learn the multi-level temporal degradation characteristics of battery discharge capacity data, thereby effectively improving the accuracy of the model output results.

[0094] Corresponding to the above method embodiments, this specification also provides an embodiment of a training device for a battery performance degradation trend prediction model. Figure 4 This specification illustrates a schematic diagram of a training device for a battery performance degradation trend prediction model, provided in one embodiment. Figure 4 As shown, the device includes: The partitioning module 402 is configured to acquire the discharge capacity data of the battery in historical time periods and divide the discharge capacity data into multiple data blocks according to different time scales; The first processing module 404 is configured to input the plurality of data blocks into the sequence reconstruction network of the prediction model to be trained for processing, and to calculate a first loss value based on the output of the sequence reconstruction network and a predetermined first label. The determination module 406 is configured to determine the training sample data of the current training round based on the training stage to which the current training round belongs; The second processing module 408 is configured to input the training sample data into the prediction network of the prediction model to be trained for processing, and calculate the second loss value based on the output of the prediction network and the predetermined second label. The generation module 410 is configured to adjust the model parameters of the prediction model to be trained based on the first loss value and the second loss value, and generate a battery performance degradation trend prediction model.

[0095] Optionally, the determining module 406 is further configured to: If it is determined that the current training round belongs to the first training phase, the multiple data blocks and the battery discharge capacity data from the initial training round to the previous training round are determined as the training sample data of the current training round. The first training phase is from the first training round to the m1th training round, where m1 is a positive integer greater than 1. The starting training round is the first training round, and the historical time period is before the starting training round.

[0096] Optionally, the determining module 406 is further configured to: Given that the current training round belongs to the second training phase, calculate the proportion of the prediction network's output from the initial training round to the previous training round in the training sample data of the current training round; The prediction network's output from the initial training round to the previous training round, the multiple data blocks, and the battery's discharge capacity data from the initial training round to the previous training round are combined according to the stated proportion to generate the training sample data for the current training round. The second training phase consists of training rounds m1+1 to m2, where m2 is a positive integer greater than m1+1.

[0097] Optionally, the determining module 406 is further configured to: If it is determined that the current training round belongs to the third training stage, the output results of the prediction network from the initial training round to the previous training round are determined as the training sample data of the current training round. The third training phase consists of training rounds m2+1 to n, where n is a positive integer greater than m2+1.

[0098] Optionally, the training device for the battery performance degradation trend prediction model further includes a third processing module, configured as follows: Determine the battery performance degradation trend corresponding to each data block, and group the data blocks according to the battery performance degradation trend; Determine the mask rate corresponding to each group, and perform masking processing on the data blocks contained in the corresponding group according to the mask rate; Multiple data blocks after masking are input into the sequence reconstruction network of the prediction model to be trained for processing.

[0099] Optionally, the first processing module 404 is further configured to: Based on the output of the sequence reconstruction network and the predetermined first label, calculate the first loss value of the mean squared error loss function; The output of the sequence reconstruction network is the prediction result obtained by predicting the valid data blocks among the multiple data blocks after masking, and the first label is the valid data block among the multiple data blocks after masking.

[0100] Optionally, the second processing module 408 is further configured to: The second loss value of the block structure loss function is calculated based on the output of the prediction network and the pre-determined second label. The output of the prediction network is the prediction result of the battery's discharge capacity in the current training round, and the second label is the battery's actual discharge capacity in the current training round.

[0101] Optionally, the generation module 410 is further configured to: The first loss value and the second loss value are summed, and the model parameters of the prediction model to be trained are adjusted according to the summation result.

[0102] Optionally, the prediction model to be trained includes at least two multi-scale encoders, and the number of the at least two multi-scale encoders is the same as the number of time scales. The at least two multi-scale encoders are shared by the sequence reconstruction network and the prediction network. The sequence reconstruction network also includes a reconstruction task output layer, and the prediction network also includes a prediction task output layer.

[0103] The above is a schematic diagram of a training device for a battery performance degradation trend prediction model according to this embodiment. It should be noted that the technical solution of this training device for the battery performance degradation trend prediction model and the technical solution of the aforementioned training method for the battery performance degradation trend prediction model belong to the same concept. Details not described in detail in the technical solution of the training device for the battery performance degradation trend prediction model can be found in the description of the technical solution of the aforementioned training method for the battery performance degradation trend prediction model.

[0104] Figure 5 A structural block diagram of a computing device 500 according to one embodiment of this specification is shown. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.

[0105] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0106] In one embodiment of this specification, the above-described components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0107] The computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 500 can also be a mobile or stationary server.

[0108] The processor 520 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the training method for the battery performance degradation trend prediction model described above.

[0109] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the training method for the battery performance degradation trend prediction model described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the training method for the battery performance degradation trend prediction model described above.

[0110] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the training method for the battery performance degradation trend prediction model described above.

[0111] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the training method for the battery performance degradation trend prediction model described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the training method for the battery performance degradation trend prediction model described above.

[0112] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the training method for the battery performance degradation trend prediction model described above.

[0113] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the training method for the battery performance degradation trend prediction model described above belong to the same concept. Details not described in detail in the computer program's technical solution can be found in the description of the technical solution of the training method for the battery performance degradation trend prediction model described above.

[0114] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0115] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0116] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0117] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0118] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A training method for a battery performance degradation trend prediction model, comprising: Obtain battery discharge capacity data for historical periods and divide the discharge capacity data into multiple data blocks according to different time scales; The multiple data blocks are input into the sequence reconstruction network of the prediction model to be trained for processing, and a first loss value is calculated based on the output of the sequence reconstruction network and a predetermined first label. Based on the training stage to which the current training round belongs, determine the training sample data for the current training round; The training sample data is input into the prediction network of the prediction model to be trained for processing, and a second loss value is calculated based on the output of the prediction network and a predetermined second label. The model parameters of the prediction model to be trained are adjusted based on the first loss value and the second loss value to generate a battery performance degradation trend prediction model.

2. The training method for the battery performance degradation trend prediction model according to claim 1, wherein determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: If it is determined that the current training round belongs to the first training phase, the multiple data blocks and the battery discharge capacity data from the initial training round to the previous training round are determined as the training sample data of the current training round. The first training phase is from the first training round to the m1th training round, where m1 is a positive integer greater than 1. The starting training round is the first training round, and the historical time period is before the starting training round.

3. The training method for the battery performance degradation trend prediction model according to claim 1 or 2, wherein determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: Given that the current training round belongs to the second training phase, calculate the proportion of the prediction network's output from the initial training round to the previous training round in the training sample data of the current training round; The prediction network's output from the initial training round to the previous training round, the multiple data blocks, and the battery's discharge capacity data from the initial training round to the previous training round are combined according to the stated proportion to generate the training sample data for the current training round. The second training phase consists of training rounds m1+1 to m2, where m2 is a positive integer greater than m1+1.

4. The training method for the battery performance degradation trend prediction model according to claim 1 or 2, wherein determining the training sample data for the current training round based on the training stage to which the current training round belongs includes: If it is determined that the current training round belongs to the third training stage, the output results of the prediction network from the initial training round to the previous training round are determined as the training sample data of the current training round. The third training phase consists of training rounds m2+1 to n, where n is a positive integer greater than m2+1.

5. The training method for the battery performance degradation trend prediction model according to claim 1 further includes: Determine the battery performance degradation trend corresponding to each data block, and group the data blocks according to the battery performance degradation trend; Determine the mask rate corresponding to each group, and perform masking processing on the data blocks contained in the corresponding group according to the mask rate; Multiple data blocks after masking are input into the sequence reconstruction network of the prediction model to be trained for processing.

6. The training method for the battery performance degradation trend prediction model according to claim 1, wherein calculating the first loss value based on the output of the sequence reconstruction network and the predetermined first label includes: Based on the output of the sequence reconstruction network and the predetermined first label, calculate the first loss value of the mean squared error loss function; The output of the sequence reconstruction network is the prediction result obtained by predicting the valid data blocks among the multiple data blocks after masking, and the first label is the valid data block among the multiple data blocks after masking.

7. The training method for the battery performance degradation trend prediction model according to claim 6, wherein calculating the second loss value based on the output of the prediction network and a predetermined second label includes: The second loss value of the block structure loss function is calculated based on the output of the prediction network and the pre-determined second label. The output of the prediction network is the prediction result of the battery's discharge capacity in the current training round, and the second label is the battery's actual discharge capacity in the current training round.

8. The training method for the battery performance degradation trend prediction model according to claim 7, wherein adjusting the model parameters of the prediction model to be trained based on the first loss value and the second loss value includes: The first loss value and the second loss value are summed, and the model parameters of the prediction model to be trained are adjusted according to the summation result.

9. The training method for the battery performance degradation trend prediction model according to claim 1, wherein the prediction model to be trained includes at least two multi-scale encoders, and the number of the at least two multi-scale encoders is the same as the number of time scales, wherein the at least two multi-scale encoders are shared by the sequence reconstruction network and the prediction network, wherein the sequence reconstruction network further includes a reconstruction task output layer, and the prediction network further includes a prediction task output layer.

10. A training device for a battery performance degradation trend prediction model, comprising: The segmentation module is configured to acquire the battery's discharge capacity data over historical periods and divide the discharge capacity data into multiple data blocks according to different time scales. The first processing module is configured to input the plurality of data blocks into the sequence reconstruction network of the prediction model to be trained for processing, and to calculate a first loss value based on the output of the sequence reconstruction network and a predetermined first label. The determination module is configured to determine the training sample data for the current training round based on the training stage to which the current training round belongs; The second processing module is configured to input the training sample data into the prediction network of the prediction model to be trained for processing, and calculate the second loss value based on the output of the prediction network and the predetermined second label. The generation module is configured to adjust the model parameters of the prediction model to be trained based on the first loss value and the second loss value, thereby generating a battery performance degradation trend prediction model.