Battery capacity prediction method

By reshaping, splicing, and fusing multi-dimensional features, and combining random forest algorithm and learnable location coding, the accuracy and robustness problems of existing battery capacity prediction methods are solved, and high-precision battery capacity prediction is achieved.

CN122017654APending Publication Date: 2026-05-12REPOWER TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
REPOWER TECH CO LTD
Filing Date
2026-04-13
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing battery capacity prediction methods suffer from problems such as weak anti-interference ability, limited prediction accuracy, high computational cost, insufficient robustness of training strategies, and low feature utilization, making it difficult to accurately predict battery capacity.

Method used

By employing a multi-dimensional feature reshaping, splicing, and fusion approach, combined with the random forest algorithm and learnable location coding, and using Savitzky-Golay filters for noise reduction and extreme outlier data removal, capacity features, differential trend features, and moving average features are generated. After adding location coding, these features are input into a trained prediction model for battery capacity prediction.

Benefits of technology

It achieves high-precision prediction of battery capacity, improves the anti-interference ability and prediction accuracy of the prediction model, reduces computational cost, and improves feature utilization and the robustness of the training strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017654A_ABST
    Figure CN122017654A_ABST
Patent Text Reader

Abstract

The invention provides a battery capacity prediction method, which comprises the following steps: filtering and rejecting first battery capacity data to obtain first data, and mapping the first data into second data; the first battery capacity data comprises battery capacities of the first battery during first N times of charging or discharging, and splicing and fusing dimension remodeled capacity characteristics generated based on the second data, differential trend characteristics and moving average characteristics to obtain first time sequence data characteristics; the method comprises the following steps: acquiring a first time sequence data feature, performing reconstruction to obtain a second time sequence data feature, adding a position code to obtain a third time sequence data feature, adding a position code to the second time sequence data feature to obtain the third time sequence data feature, and inputting the third time sequence data feature into a trained prediction model to obtain first battery capacity prediction data of a first battery. The first battery capacity prediction data comprises the predicted battery capacity of the first battery at the (N + 1) th charging or discharging time. By adopting the method, accurate prediction of the battery capacity can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery life prediction technology, and in particular to a method for predicting battery capacity. Background Technology

[0002] Existing battery capacity prediction methods are mainly divided into two categories: traditional model-based methods and data-driven deep learning methods. Traditional model-based methods focus on battery aging mechanisms, predicting capacity by establishing capacity decay models or equivalent circuit models. These methods rely on accurate battery aging parameter calibration and complex manual feature extraction, and are significantly affected by factors such as battery type, charging and discharging conditions, and ambient temperature fluctuations, exhibiting prominent problems such as weak anti-interference ability and limited prediction accuracy. Existing deep learning methods still suffer from many shortcomings, including insufficient data feature mining, redundant model structures, high computational costs, insufficient robustness of training strategies, and low feature utilization, making it difficult to accurately predict battery capacity and providing reliable data support for battery life assessment. Summary of the Invention

[0003] To address the aforementioned technical issues, this application provides a battery capacity prediction method that achieves high-precision prediction of battery capacity through feature enhancement methods such as multi-dimensional feature reshaping, splicing, and fusion, as well as the addition of learnable positional encoding.

[0004] In a first aspect, this application provides a battery capacity prediction method, the method comprising: The first battery capacity data of the first battery is filtered and denoised using a Savitzky-Golay filter to remove extreme outliers, obtaining the first data. This first data is then normalized to map it to the 0-1 range, yielding the second data. The first battery capacity data includes: the first battery's capacity data at the beginning of the process... The battery capacity during each charge or discharge cycle, of which... It is a positive integer; Based on the capacity features, differential trend features, and moving average features reshaped by the second data generation dimension, the capacity features, differential trend features, and moving average features reshaped by the dimension are spliced ​​and fused to obtain the first time series data features. The random forest algorithm is used to filter and reconstruct the features of the first time series data to obtain the features of the second time series data. Position encoding is added to the second time-series data features to obtain the third time-series data features. These third time-series data features are then input into the trained prediction model to obtain the first battery capacity prediction data for the first battery. The first battery capacity prediction data includes: the predicted first battery capacity in the [missing information - likely a specific time series]. Battery capacity during the first charge or discharge cycle.

[0005] In conjunction with the first aspect, in one alternative implementation, Before adding position encoding to the second time-series data features to obtain the third time-series data features, and inputting the third time-series data features into the trained prediction model to obtain the first battery capacity prediction data for the first battery, the process further includes: Obtain training data for the prediction model, wherein the training data includes data according to the preset batch size. Division Each batch has characteristics, among which... The Each batch's characteristics are derived from the second battery capacity data. The data was generated after filtering and denoising, removal of extreme and outlier data, extremum standardization, splicing and fusion, feature selection, and reconstruction. It is a positive integer; second battery capacity data Including: the second battery respectively in The battery capacity during each charge or discharge cycle, of which... It is a positive integer; Will The first of the batch features Batch characteristics Input into the prediction model to obtain the first Batch characteristics Corresponding batch prediction value And based on batch prediction values With the Batch characteristics Corresponding batch actual value The error between the values ​​is used to update the parameters of the prediction model to obtain a trained prediction model, wherein the batch true value... Based on the capacity data of each second battery and preset batch size What was obtained.

[0006] In conjunction with the first aspect, in one alternative implementation, The capacity features, difference trend features, and moving average features reshaped based on the second data generation dimension specifically include: The battery capacity characteristics are obtained according to equation (1), where, (1), This indicates the battery capacity characteristics of dimensional reshaping. Indicates the second data. Indicates the number of samples. Indicates the time step. The difference trend characteristics of dimension reshaping are obtained according to equations (2), (3), and (4), where, (2), (3), (4), in, Indicates the first The sample, the first Capacity data at each time step. This represents the battery capacity difference characteristic between adjacent time steps. This represents the battery capacity difference feature between adjacent time steps for all samples. This represents the result after adding zero values ​​to the end of the battery capacity difference features between adjacent time steps across all samples. This represents a dimensional reshaping feature used to capture the differential trend of battery capacity changes between adjacent time steps. The moving average characteristics are obtained from equations (5), (6), and (7). (5), in, (6), (7), in, Indicates the first The sample, the first Capacity data at each time step. This represents the volume data for all samples and all time steps. The moving average feature represents dimensional reshaping, where, , , , They are all positive integers.

[0007] In conjunction with the first aspect, in one alternative implementation, The capacity feature, difference trend feature, and moving average feature reshaped by the aforementioned dimensions are concatenated and fused to obtain the first time-series data feature, which specifically includes: The first time-series data feature is obtained according to equation (8), where, (8), in, This represents the characteristics of the first time series data.

[0008] In conjunction with the first aspect, in one alternative implementation, The random forest algorithm is used to filter and reconstruct the features of the first time-series data to obtain the features of the second time-series data, specifically including: The second time-series data features are obtained according to equations (9), (10), and (11). (9), in, (10) (11), It is a two-dimensional feature matrix. Indicates the characteristics of the first time series data The resulting two-dimensional feature matrix after filtering has dimensions of , The number of selected features, The reconstructed time step, This represents the second time-series data features after feature filtering and reconstruction, where, ,in, Indicates the first The importance weight of each feature after flattening. Indicates the first In the decision tree, remove the first one. After considering each feature, the change in the mean squared error of the prediction model is... This represents the number of decision trees in a random forest. Indicates the importance threshold, It is a positive integer.

[0009] In conjunction with the first aspect, in one alternative implementation, Add position encoding to the second time-series data features to obtain the third time-series data features, including: The third time series data feature is obtained through equation (12). (12), in, This represents the learnable location encoding matrix. This represents the third time-series data feature after adding position encoding.

[0010] In conjunction with the first aspect, in one alternative implementation, Adding positional encoding to the second time-series data features yields a third time-series data feature. This third time-series data feature is then input into a trained prediction model to obtain the predicted capacity data for the first battery. Specifically, this includes: The first battery capacity prediction data is obtained through equations (13) to (20); (13), among which, (14) (15) (16) (17), (18), (19), (20) in, This represents the predicted capacity of the first battery. This represents the temporal features after attention weighting. Represents the regularization function. Represents probability. This represents the weight matrix of the fully connected layer. This represents the bias vector of the fully connected layer. express The model's first The fusion of hidden states at each time step express The last time step of the model The fusion hidden state, This indicates that after adding position encoding, the first... Feature vectors at each time step Features of third time series data What was obtained Indicates feature splicing, express Gating unit operation functions , , The query matrix, key matrix, and value matrix of the attention mechanism are respectively represented by... It is obtained through a linear transformation, where, , , , The first Submatrices corresponding to each attention head This indicates the dimensions of the query matrix and the key matrix. This represents the weight normalization function. for The output of each attention head Represents the feature concatenation function. Output a linear transformation matrix for attention.

[0011] In conjunction with the first aspect, in one alternative implementation, After obtaining the predicted capacity data for the first battery, the following is also included: Using equations (21) and (22), the first battery capacity data is calibrated for shape and outlier filtered to obtain first battery capacity suppression data; the first battery capacity prediction data is calibrated for shape and outlier filtered to obtain first battery suppression prediction data. The first battery capacity suppression data includes: the first battery respectively in the front The battery capacity during the first charge or discharge is filtered data after shape calibration and outlier filtering; the first battery suppression prediction data includes: the first battery capacity prediction data after shape calibration and outlier filtering. (twenty one), (twenty two), This represents the predicted capacity of the first battery. This indicates the first battery capacity data. This represents the first cell suppression prediction data for the first battery. This indicates the first battery capacity suppression data. This indicates the rated capacity of the first battery. This represents the outlier suppression function.

[0012] In conjunction with the first aspect, in one alternative implementation, After performing shape calibration and outlier filtering on the first battery capacity data using equations (21) and (22) to obtain first battery capacity suppression data, and performing shape calibration and outlier filtering on the first battery capacity prediction data to obtain first battery suppression prediction data, the process further includes: The prediction model is determined according to equations (23), (24), and (25). Losses, among which, (twenty three), (twenty four), (25) in, This indicates the error between the first battery capacity suppression data and the first battery suppression prediction data. This represents the absolute value of the error between the first battery capacity suppression data and the first battery suppression prediction data. Indicates the first Error per sample, express Loss threshold The prediction model represents loss.

[0013] In conjunction with the first aspect, in one alternative implementation, Before adding position encoding to the second time-series data features to obtain the third time-series data features, and inputting the third time-series data features into the trained prediction model to obtain the first battery capacity prediction data for the first battery, the process further includes: The AdamW optimizer is used to update the parameters of the prediction model to obtain a well-trained prediction model; among which, The step of updating the parameters of the prediction model using the AdamW optimizer to obtain a trained prediction model specifically includes: The parameters of the prediction model are updated using equations (26), (27), (28), (29), (30), and (31) to obtain a trained prediction model, wherein... (26) (27) (28) (29) (30) (31), in, Indicates the first The parameters of the prediction model at the next iteration Represented as the parameter gradient, , These represent the initial smoothing coefficients, express The first moment estimate, express The second moment estimate, Indicates the learning rate. This represents the minimum value during initialization. This represents the initial weight decay coefficient. It is a positive integer. , .

[0014] This application provides a battery capacity prediction method, comprising: filtering and denoising the first battery capacity data of a first battery using a Savitzky-Golay filter and removing extreme outlier data to obtain first data; and performing extreme value normalization on the obtained first data to map the first data to the 0~1 interval to obtain second data; wherein, the first battery capacity data includes: the first battery capacity data in the first... The battery capacity during each charge or discharge cycle, of which... The first time-series data feature is a positive integer. Based on the second data generation dimension, capacity features, difference trend features, and moving average features are reshaped. These features are then concatenated and fused to obtain the first time-series data feature. The first time-series data feature is then filtered and reconstructed using a random forest algorithm to obtain the second time-series data feature. Position encoding is added to the second time-series data feature to obtain the third time-series data feature. This third time-series data feature is then input into the trained prediction model to obtain the first battery capacity prediction data for the first battery. The first battery capacity prediction data includes: the predicted capacity of the first battery in the [missing information - likely a specific time series]. Battery capacity during the first charge or discharge cycle. In summary, by employing this application and utilizing feature enhancement methods such as multi-dimensional feature reshaping, splicing, and fusion, as well as the addition of learnable positional encoding, high-precision prediction of battery capacity can be achieved. Attached Figure Description

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

[0016] Figure 1 This is a schematic flowchart of a battery capacity prediction method provided in this application. Detailed Implementation

[0017] It should be noted that the terms "first," "second," and "third" in this application are only used to distinguish different types of data, batteries, battery capacity data, time-series data characteristics, batch characteristics, battery capacity prediction data, etc., and have no other meaning, and should not limit the scope of protection of this application.

[0018] See Figure 1 This is a flowchart illustrating a battery capacity prediction method provided in this application, as shown below. Figure 1 As shown, the battery capacity prediction method may specifically include, but is not limited to, the following steps: S101. The first battery capacity data of the first battery is filtered and denoised using a Savitzky-Golay filter, and extreme outlier data is removed to obtain the first data. The obtained first data is then normalized to map the first data to the 0~1 range to obtain the second data.

[0019] Specifically, the first battery capacity data includes: the first battery is located in the front... The battery capacity during each charge or discharge cycle, of which... It is a positive integer. That is to say, the first battery is located at... Battery capacity during the first charge or discharge cycle.

[0020] S102. Based on the second data generation dimension, the capacity feature, differential trend feature, and moving average feature are reshaped, and the reshaped capacity feature, differential trend feature, and moving average feature are spliced ​​and fused to obtain the first time series data feature.

[0021] Optionally, the capacity features, difference trend features, and moving average features reshaped based on the second data generation dimension specifically include: The battery capacity characteristics are obtained according to equation (1), where, (1), This indicates the battery capacity characteristics of dimensional reshaping. Indicates the second data. This represents the sample size, specifically the number of times the first battery was charged or discharged. Indicates the time step. The difference trend characteristics of dimension reshaping are obtained according to equations (2), (3), and (4), where, (2), (3), (4), in, Indicates the first The sample, the first Capacity data at each time step. This represents the battery capacity difference characteristic between adjacent time steps. This represents the battery capacity difference feature between adjacent time steps for all samples. This represents the result after adding zero values ​​to the end of the battery capacity difference features between adjacent time steps across all samples. This represents a dimensional reshaping feature used to capture the differential trend of battery capacity changes between adjacent time steps. The moving average characteristics are obtained from equations (5), (6), and (7). (5), in, (6), (7), in, Indicates the first The sample, the first Capacity data at each time step. This represents the volume data for all samples and all time steps. This indicates that a moving average is calculated for each sample's volumetric time-series data over time steps. The moving average feature represents dimensional reshaping, where, , , , They are all positive integers.

[0022] It should be noted that, among them, The function representing the reconstruction of matrix dimensions. The function represents the concatenation of functions.

[0023] Optionally, the capacity feature, difference trend feature, and moving average feature reshaped by the dimension are concatenated and fused to obtain the first time-series data feature, specifically including: The first time-series data feature is obtained according to equation (8), where, (8), in, This represents the characteristics of the first time series data.

[0024] It should be noted that batch training is used to train the prediction model, which reduces memory usage and improves training efficiency by loading data in batches.

[0025] In other words, during the training process, the screened and reconstructed features are divided into multiple sample batches according to the prediction batch size, and each batch is input into the prediction model for training. The prediction error is calculated and backpropagation is used to update the prediction model parameters.

[0026] S103. Based on the random forest algorithm, feature selection and reconstruction of the first time series data features are performed to obtain the second time series data features.

[0027] In this application, the second time-series data features are obtained by feature filtering and reconstruction based on the random forest algorithm, specifically including: The second time-series data features are obtained according to equations (9), (10), and (11). (9), in, (10) (11), It is a two-dimensional feature matrix. Indicates the characteristics of the first time series data The resulting two-dimensional feature matrix after filtering has dimensions of , The number of selected features, The reconstructed time step, This represents the second time-series data features after feature filtering and reconstruction, where, It is a three-dimensional temporal feature.

[0028] It should be noted that, based on the random forest algorithm, the correlation between each flattened feature and the true battery capacity is mined through model training, and the importance weight of each feature is calculated. The core formula is as follows: ,in, Indicates the first The importance weights of each flattened feature are determined by its weight; a higher weight value indicates a greater contribution of that feature to battery capacity prediction. This represents the number of decision trees in the random forest. In this application, The optimal value is 100, which can be flexibly adjusted according to user needs or actual requirements. Indicates the first In the decision tree, remove the first one. After considering each feature, the change in the mean square error of the prediction model is considered. The larger the change, the greater the impact of that feature on the prediction accuracy of the model.

[0029] It should be noted that an importance threshold can also be set. Filter out those with an importance weight greater than the importance threshold. The features are used as the filtering features, which are also the final input features. At the same time, redundant features with low importance are removed. The selected feature index set after filtering is... , It is a positive integer.

[0030] S104. Add position encoding to the second time-series data features to obtain the third time-series data features. Input the third time-series data features into the trained prediction model to obtain the first battery capacity prediction data of the first battery. The first battery capacity prediction data includes: the predicted first battery capacity in the first time series. Battery capacity during the first charge or discharge cycle.

[0031] It should be noted that the first battery capacity prediction data includes at least: the predicted capacity of the first battery at... The battery capacity during the first charge or discharge cycle. That is, based on the first battery's capacity during the first charge or discharge cycle. The battery capacity during the first charge or discharge can predict the capacity of the first battery. Battery capacity during the first charge or discharge cycle.

[0032] Optionally, before adding position encoding to the second time-series data features to obtain the third time-series data features, and inputting the third time-series data features into the trained prediction model to obtain the first battery capacity prediction data of the first battery, the method further includes: Obtain training data for the prediction model, wherein the training data includes data according to the preset batch size. Division Each batch has characteristics, among which... The Each batch's characteristics are derived from the second battery capacity data. The data was generated after filtering and denoising, removal of extreme and outlier data, extremum standardization, splicing and fusion, feature selection, and reconstruction. It is a positive integer; second battery capacity data Including: the second battery respectively in The battery capacity during each charge or discharge cycle, of which... It is a positive integer; Will The first of the batch features Batch characteristics Input into the prediction model to obtain the first Batch characteristics Corresponding batch prediction value And based on batch prediction values With the Batch characteristics Corresponding batch actual value The error between the values ​​is used to update the parameters of the prediction model to obtain a trained prediction model, wherein the batch true value... Based on the capacity data of each second battery and preset batch size What was obtained.

[0033] Optionally, position encoding is added to the second time-series data features to obtain the third time-series data features, including: The third time series data feature is obtained through equation (12). (12), in, This represents the learnable location encoding matrix. The parameters can be adaptively adjusted as the prediction model is trained. This represents the third time-series data feature after adding position encoding.

[0034] Adding positional encoding to the second time-series data features yields a third time-series data feature. This third time-series data feature is then input into a trained prediction model to obtain the predicted capacity data for the first battery. Specifically, this includes: The first battery capacity prediction data is obtained through equations (13) to (20); (13), among which, (14) (15) (16) (17) (18) (19) (20) in, This represents the predicted capacity of the first battery. This represents the attention-weighted temporal features, used to improve feature representation capabilities. This represents the features after residual connection, used to alleviate the gradient vanishing problem during the training of prediction models. Represents the regularization function. express Probability is used to randomly discard some features and suppress overfitting. express The features are then used as input to the fully connected layer. This represents the weight matrix of the fully connected layer. This represents the bias vector of the fully connected layer. express The model's first The fusion of hidden states at each time step express The last time step of the model The fusion hidden state, This indicates that after adding position encoding, the first... Feature vectors at each time step Features of third time series data What was obtained Indicates feature splicing, express Gating unit operation functions , , The query matrix, key matrix, and value matrix of the attention mechanism are respectively represented by... This is obtained through a linear transformation, here. , , , The first Submatrices corresponding to each attention head This indicates the dimensions of the query matrix and the key matrix. This represents the weight normalization function. for The output of each attention head Represents the feature concatenation function. The attention output is a linear transformation matrix, which is used to map the concatenated features to the target dimension. It is a positive integer.

[0035] It should be noted that, This can represent the forward GRU at the th... The hidden states at each time step are used to capture the temporal dependencies in the decreasing direction of the time steps. This can represent the backward GRU in the th... The hidden state at each time step.

[0036] It should be noted that by using a well-trained prediction model in the prediction phase, predictions can be made on the validation set and the test set, ensuring the stability and efficiency of the prediction process.

[0037] Optionally, after obtaining the predicted capacity data of the first battery, the method further includes: Using equations (21) and (22), the first battery capacity data is calibrated for shape and outlier filtered to obtain first battery capacity suppression data; the first battery capacity prediction data is calibrated for shape and outlier filtered to obtain first battery suppression prediction data. The first battery capacity suppression data includes: the first battery respectively in the front The battery capacity during the first charge or discharge is filtered data after shape calibration and outlier filtering; the first battery suppression prediction data includes: the first battery capacity prediction data after shape calibration and outlier filtering. (twenty one), (twenty two), This represents the predicted capacity of the first battery. This indicates the first battery capacity data. This represents the first cell suppression prediction data for the first battery. This indicates the first battery capacity suppression data. This indicates the rated capacity of the first battery. This represents the outlier suppression function.

[0038] Optionally, after performing shape calibration and outlier filtering on the first battery capacity data to obtain first battery capacity suppression data and performing shape calibration and outlier filtering on the first battery capacity prediction data to obtain first battery suppression prediction data using equations (21) and (22), the method further includes: The prediction model is determined according to equations (23), (24), and (25). Losses, among which, (twenty three), (twenty four), (25) in, This indicates the error between the first battery capacity suppression data and the first battery suppression prediction data. This represents the absolute value of the error between the first battery capacity suppression data and the first battery suppression prediction data. Indicates the first Error per sample, express Loss threshold The prediction model represents For loss, squared loss is used to improve fitting accuracy when the error is small, while linear loss is used to reduce the impact of extreme values ​​when the error is large.

[0039] It should be noted that, The loss function adaptively switches between squared loss and linear loss calculation methods by setting a loss threshold, thus achieving both fitting accuracy and robustness.

[0040] Optionally, before adding position encoding to the second time-series data features to obtain the third time-series data features, and inputting the third time-series data features into the trained prediction model to obtain the first battery capacity prediction data of the first battery, the method further includes: The AdamW optimizer is used to update the parameters of the prediction model to obtain a well-trained prediction model; among which, The step of updating the parameters of the prediction model using the AdamW optimizer to obtain a trained prediction model specifically includes: The parameters of the prediction model are updated using equations (26), (27), (28), (29), (30), and (31) to obtain a trained prediction model, wherein... (26) (27) (28) (29) (30) (31), Among them, here Indicates the first The parameters of the prediction model at the next iteration Represented as the parameter gradient, , These represent the initial smoothing coefficients, express The first-order moment estimate is used for smooth gradient updates. express The second-order moment estimate is used to adaptively adjust the update step size for different parameters. The learning rate, used to control the parameters of the prediction model to update the step size, can be initialized or set based on user needs, and can also be dynamically adjusted through a cosine annealing learning rate scheduler. This represents the minimum value of the initialization, used to avoid the denominator being zero. This represents the initial weight decay coefficient, used to suppress excessively large parameters in the prediction model and prevent overfitting. It is a positive integer. , .

[0041] It should be noted that the parameters of the prediction model may include, but are not limited to, one or more of the following: location encoding parameters, Parameters, attention parameters, fully connected layer parameters.

[0042] It should be noted that before updating the parameters of the prediction model using the AdamW optimizer to obtain the trained prediction model, the process also includes: A cosine annealing learning rate scheduler is used to dynamically adjust the learning rate. , making the learning rate The periodicity varies with the number of training iterations, balancing the model's convergence speed and accuracy. Specifically, it can be expressed as equation (32).

[0043] (32), among which, Indicates the first The learning rate at the next iteration This represents the minimum learning rate. This represents the initial learning rate. This refers to the number of training iterations at this point. Indicates the learning rate annealing period. This represents the cosine function, used to achieve the periodic decay and rebound of the learning rate.

[0044] Before obtaining a trained prediction model, the following may also be included: An early stopping mechanism is introduced. When the difference between the current comprehensive score and the current best score of the prediction model is less than a preset improvement threshold within a preset time, the early stopping counter is activated to stop training the prediction model and use the parameters of the currently obtained prediction model as the parameters of the trained prediction model to prevent overfitting. The difference between the current comprehensive score and the best score of the prediction model can be calculated using equations (33) and (34).

[0045] (33), (34), in, This represents the root mean square error, reflecting the overall deviation between the predicted and actual battery capacity. This indicates relative error, reflecting the degree of relative deviation from the predicted battery capacity. The mean absolute error (MAE) reflects the average deviation between the predicted and actual battery capacity. The coefficient of determination reflects the goodness of fit of the prediction model; a value closer to 1 indicates a better fit. Each evaluation indicator represents a different indicator. The weighting coefficients, This indicates the current overall score. This represents the current optimal overall score. Indicates the current overall score Compared to the current best score The difference.

[0046] In summary, this application can use the AdmW optimizer combined with a cosine annealing learning rate regulator to optimize all trainable parameters of the prediction model, minimize the prediction error, improve the training stability and convergence accuracy of the prediction model, and introduce an early stopping mechanism to prevent overfitting.

[0047] Figure 1 This is only used to illustrate the embodiments of this application and should not be construed as limiting the scope of protection of this application.

[0048] Those skilled in the art will recognize that the method steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0049] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the devices and equipment described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0050] In the several embodiments provided in this application, it should be understood that the methods can be implemented in other ways. For example, the composition and steps of each example have been described. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0051] The embodiments described above are merely illustrative. For example, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface or module, or it may be an electrical, mechanical or other form of connection.

[0052] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0053] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for predicting battery capacity, characterized in that, include: The first battery capacity data of the first battery is filtered and denoised using a Savitzky-Golay filter to remove extreme outliers, obtaining the first data. This first data is then normalized to map it to the 0-1 range, yielding the second data. The first battery capacity data includes: the first battery's capacity data at the beginning of the process... The battery capacity during each charge or discharge cycle, of which... It is a positive integer; Based on the capacity features, differential trend features, and moving average features reshaped by the second data generation dimension, the capacity features, differential trend features, and moving average features reshaped by the dimension are spliced ​​and fused to obtain the first time series data features. The random forest algorithm is used to filter and reconstruct the features of the first time series data to obtain the features of the second time series data. Position encoding is added to the second time-series data features to obtain the third time-series data features. These third time-series data features are then input into the trained prediction model to obtain the first battery capacity prediction data for the first battery. The first battery capacity prediction data includes: the predicted first battery capacity in the [missing information - likely a specific time series]. Battery capacity during the first charge or discharge cycle.

2. The battery capacity prediction method as described in claim 1, characterized in that, Before adding position encoding to the second time-series data features to obtain the third time-series data features, and inputting the third time-series data features into the trained prediction model to obtain the first battery capacity prediction data for the first battery, the process further includes: Obtain training data for the prediction model, wherein the training data includes data arranged according to a preset batch size. Division Each batch has characteristics, among which... The Each batch's characteristics are derived from the second battery capacity data. The data was generated after filtering and denoising, removal of extreme and outlier data, extremum standardization, splicing and fusion, feature selection, and reconstruction. It is a positive integer; second battery capacity data Including: the second battery respectively in The battery capacity during each charge or discharge cycle, of which... It is a positive integer; Will The first of the batch features Batch characteristics Input into the prediction model to obtain the first Batch characteristics Corresponding batch prediction value And based on batch prediction values With the Batch characteristics Corresponding batch actual value The error between the values ​​is used to update the parameters of the prediction model to obtain a trained prediction model, wherein the batch true value... Based on the capacity data of each second battery and preset batch size What was obtained.

3. The battery capacity prediction method as described in claim 1, characterized in that, The capacity features, difference trend features, and moving average features reshaped based on the second data generation dimension specifically include: The battery capacity characteristics are obtained according to equation (1), where, (1), This represents the battery capacity characteristics of dimensional reshaping. Indicates the second data. Indicates the number of samples. Indicates the time step. The difference trend characteristics of dimension reshaping are obtained according to equations (2), (3), and (4), where, (2), (3), (4), in, Indicates the first The sample, the first Capacity data at each time step. This represents the battery capacity difference characteristic between adjacent time steps. This represents the battery capacity difference characteristics between adjacent time steps for all samples. This represents the result after adding zero values ​​to the end of the battery capacity difference features between adjacent time steps across all samples. This represents a dimensional reshaping feature used to capture the differential trend of battery capacity changes between adjacent time steps. The moving average characteristics are obtained from equations (5), (6), and (7). (5), in, (6), (7), in, Indicates the first The sample, the first Capacity data at each time step. This represents the volume data for all samples and all time steps. This represents the moving average feature of dimensional reshaping, where, , , , They are all positive integers.

4. The battery capacity prediction method as described in claim 3, characterized in that, The capacity feature, difference trend feature, and moving average feature reshaped by the aforementioned dimensions are concatenated and fused to obtain the first time-series data feature, which specifically includes: The first time-series data feature is obtained according to equation (8), where, (8), in, This represents the characteristics of the first time series data.

5. The battery capacity prediction method as described in claim 4, characterized in that, The random forest algorithm is used to filter and reconstruct the features of the first time-series data to obtain the features of the second time-series data, specifically including: The second time-series data characteristics are obtained according to equations (9), (10), and (11). (9), in, (10) (11), It is a two-dimensional feature matrix. Indicates the characteristics of the first time series data The resulting two-dimensional feature matrix after filtering has dimensions of , The number of selected features, The reconstructed time step, This represents the second time-series data features after feature filtering and reconstruction, where, ,in, Indicates the first The importance weight of each feature after flattening. Indicates the first In a decision tree, remove the first... After considering each feature, the change in the mean squared error of the prediction model is... This represents the number of decision trees in a random forest. Indicates the importance threshold, It is a positive integer.

6. The battery capacity prediction method as described in claim 5, characterized in that, Add position encoding to the second time-series data features to obtain the third time-series data features, including: The third time series data feature is obtained through equation (12). (12), in, This represents the learnable location encoding matrix. This represents the third time-series data feature after adding position encoding.

7. The battery capacity prediction method as described in claim 6, characterized in that, Adding positional encoding to the second time-series data features yields a third time-series data feature. This third time-series data feature is then input into a trained prediction model to obtain the predicted capacity data for the first battery. Specifically, this includes: The first battery capacity prediction data is obtained through equations (13) to (20); (13), among which, (14), (15), (16), (17), (18), (19), (20), in, This represents the predicted capacity of the first battery. This represents the temporal features after attention weighting. Represents the regularization function. Represents probability. This represents the weight matrix of the fully connected layer. This represents the bias vector of the fully connected layer. express The model's first The fusion of hidden states at each time step express The last time step of the model The fusion hidden state, This indicates that after adding position encoding, the first... Feature vectors at each time step Features of third time series data What was obtained Indicates feature splicing, express Gating unit operation functions , , The query matrix, key matrix, and value matrix of the attention mechanism are respectively represented by... It is obtained through a linear transformation, where, , , , The first Submatrices corresponding to each attention head This indicates the dimensions of the query matrix and the key matrix. This represents the weight normalization function. for The output of each attention head Represents the feature concatenation function. Output a linear transformation matrix for attention.

8. The battery capacity prediction method as described in claim 7, characterized in that, After obtaining the predicted capacity data for the first battery, the following is also included: Using equations (21) and (22), the first battery capacity data is calibrated for shape and outlier filtered to obtain first battery capacity suppression data; the first battery capacity prediction data is calibrated for shape and outlier filtered to obtain first battery suppression prediction data. The first battery capacity suppression data includes: the first battery respectively in the front The battery capacity during the first charge or discharge is filtered data after shape calibration and outlier filtering; the first battery suppression prediction data includes: the first battery capacity prediction data after shape calibration and outlier filtering. (21), (22), This represents the predicted capacity of the first battery. This indicates the first battery capacity data. This represents the first cell suppression prediction data for the first battery. This indicates the first battery capacity suppression data. This indicates the rated capacity of the first battery. This represents the outlier suppression function.

9. The battery capacity prediction method as described in claim 8, characterized in that, After performing shape calibration and outlier filtering on the first battery capacity data using equations (21) and (22) to obtain first battery capacity suppression data, and performing shape calibration and outlier filtering on the first battery capacity prediction data to obtain first battery suppression prediction data, the process further includes: The prediction model is determined according to equations (23), (24), and (25). Losses, among which, (23), (24), (25), in, This indicates the error between the first battery capacity suppression data and the first battery suppression prediction data. This represents the absolute value of the error between the first battery capacity suppression data and the first battery suppression prediction data. Indicates the first Error per sample, express Loss threshold The prediction model represents loss.

10. The battery capacity prediction method as described in claim 9, characterized in that, Before adding position encoding to the second time-series data features to obtain the third time-series data features, and inputting the third time-series data features into the trained prediction model to obtain the first battery capacity prediction data for the first battery, the process further includes: The AdamW optimizer is used to update the parameters of the prediction model to obtain a well-trained prediction model; among which, The step of updating the parameters of the prediction model using the AdamW optimizer to obtain a trained prediction model specifically includes: The parameters of the prediction model are updated using equations (26), (27), (28), (29), (30), and (31) to obtain a trained prediction model, wherein... (26), (27), (28), (29), (30), (31), in, Indicates the first The parameters of the prediction model at the next iteration Represented as the parameter gradient, , These represent the initial smoothing coefficients, express The first moment estimate, express The second moment estimate, Indicates the learning rate. This represents the minimum value during initialization. This represents the initial weight decay coefficient. It is a positive integer. , .