Lithium battery remaining service life prediction method, device, equipment, medium and product

By decomposing historical capacity data of lithium batteries using CEEMD and combining it with LSTM and Transformer models, the problem of accuracy in predicting the remaining lifespan of lithium batteries was solved, achieving accurate prediction in low-temperature environments and improving the driving range and safety of electric vehicles.

CN118731720BActive Publication Date: 2026-05-19ANQING NORMAL UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANQING NORMAL UNIV
Filing Date
2024-06-20
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict the remaining lifespan of lithium batteries. In particular, the inconsistent degradation rates and pathways of individual battery cells in low-temperature environments make it difficult to estimate the state of the battery pack, impacting the driving range and safety of electric vehicles.

Method used

The complementary set empirical mode decomposition method is used to decompose historical battery capacity data, and LSTM and Transformer models are trained together. The CEEMD-Transformer-LSTM model is then used to predict the remaining lifespan of lithium batteries.

Benefits of technology

It improves the prediction accuracy of the remaining lifespan of lithium batteries, effectively removes noise and accurately predicts the remaining lifespan of lithium batteries, ensuring the safe and efficient operation of electric vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118731720B_ABST
    Figure CN118731720B_ABST
Patent Text Reader

Abstract

The application discloses a lithium battery residual service life prediction method, device, equipment, medium and product, relates to the technical field of lithium battery residual service life prediction, and comprises the following steps: decomposing historical battery capacity data sequences by using a complementary ensemble empirical mode decomposition method; further training LSTM models and Transformer models based on historical charging and discharging cycle data sequences, historical intrinsic mode component data sequences and historical residual data sequences; directly obtaining predicted battery capacity data sequences by using the trained LSTM models and the trained Transformer models; and further determining the residual service life of the lithium battery based on the predicted battery capacity data sequences. Thus, the residual service life of the lithium battery can be predicted by fusing the LSTM models and the Transformer models, and the prediction accuracy of the residual service life of the lithium battery can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of lithium battery remaining life prediction technology, and in particular to a method, apparatus, equipment, medium and product for predicting the remaining life of lithium batteries based on CEEMD-Transformer-LSTM. Background Technology

[0002] Lithium-ion power batteries (i.e., lithium batteries) have advantages such as high energy density, high operating voltage, wide operating temperature range, long storage life, light weight, high safety, and no pollution. They are widely used in electric vehicles, aerospace, mobile communications and other fields. The failure of lithium batteries will cause equipment performance degradation, malfunction, slow response and other electronic failures. Therefore, it is crucial to predict the remaining lifespan of lithium batteries.

[0003] The internal structure of a lithium battery mainly consists of positive electrode materials, negative electrode materials, and electrolyte. Through oxidation reactions at the internal electrodes, chemical energy is converted into electrical energy to propel the vehicle. However, with the increase in the number of charge-discharge cycles, irreversible chemical reactions such as overcharging and oxidation decomposition occur internally, leading to increased internal resistance and a decrease in maximum usable capacity, energy, and peak power, thus significantly reducing the driving range of electric vehicles. Due to the poor low-temperature discharge capability of lithium batteries, the degree of degradation is difficult to predict. Furthermore, differences in the manufacturing and usage environments of individual battery cells result in varying degradation rates and paths, leading to significant inconsistencies between cells. This makes accurate estimation of the state of the lithium battery pack, including State of Health (SOH) and Remaining Useful Life (RUL), extremely difficult. This causes users to worry about the uncertain driving range when using the battery in low-temperature environments. When the health of some lithium batteries deteriorates rapidly, the performance of the entire Battery Management System (BMS) is affected, accelerating lifespan degradation and even triggering safety issues. Therefore, accurately predicting the remaining lifespan of lithium batteries is of great significance for determining the driving range of electric vehicles and ensuring the safe and efficient operation of lithium battery packs.

[0004] The health status of lithium batteries is generally characterized by their battery capacity. Capacity data is obtained through continuous charge and discharge cycles. Due to the unavoidable electromagnetic interference, measurement errors, random loads, and unpredictable physical or chemical reactions inside the lithium battery during the measurement process, the capacity measurement data of lithium batteries generally contains various types and magnitudes of noise. Furthermore, the manufacturing and usage environments of individual battery cells differ, resulting in different degradation rates and paths among individual battery cells, and significant inconsistencies between individual cells. This makes it impossible to accurately predict the remaining lifespan of lithium batteries. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, device, medium, and product for predicting the remaining service life of lithium batteries, which can accurately predict the remaining service life of lithium batteries.

[0006] To achieve the above objectives, this application provides the following solution:

[0007] Firstly, this application provides a method for predicting the remaining lifespan of a lithium battery, the method comprising:

[0008] Acquire historical charge-discharge cycle data sequence and historical battery capacity data sequence of lithium battery; the historical charge-discharge cycle data sequence includes multiple consecutive historical charge-discharge cycles of lithium battery, the historical charge-discharge cycle being the charge-discharge cycle that lithium battery has already experienced; the historical battery capacity data sequence includes the battery capacity of lithium battery after each historical charge-discharge cycle.

[0009] The historical battery capacity data sequence is decomposed using the complementary set empirical mode decomposition method to obtain the historical intrinsic mode component data sequence and the historical residual data sequence;

[0010] Using the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels, the LSTM model is trained to obtain a trained LSTM model; using the historical charge-discharge cycle data sequence as input and the historical residual data sequence as labels, the Transformer model is trained to obtain a trained Transformer model.

[0011] Using the predicted charge-discharge cycle data sequence as input, the trained LSTM model is used to obtain the predicted intrinsic mode component data sequence, and the trained Transformer model is used to obtain the predicted margin data sequence; the predicted charge-discharge cycle data sequence includes multiple consecutive predicted charge-discharge cycles of the lithium battery, and the predicted charge-discharge cycle is the charge-discharge cycle that the lithium battery has not yet experienced.

[0012] The predicted intrinsic mode component data sequence and the predicted margin data sequence are summed to obtain the predicted battery capacity data sequence; the remaining service life of the lithium battery is determined based on the predicted battery capacity data sequence; the predicted battery capacity data sequence includes the battery capacity of the lithium battery after each predicted charge-discharge cycle.

[0013] Secondly, this application provides a lithium battery remaining life prediction device, the lithium battery remaining life prediction device comprising:

[0014] The data acquisition module is used to acquire historical charge-discharge cycle data sequences and historical battery capacity data sequences of lithium batteries; the historical charge-discharge cycle data sequences include multiple consecutive historical charge-discharge cycles of the lithium battery, and the historical charge-discharge cycles are the charge-discharge cycles that the lithium battery has already experienced; the historical battery capacity data sequences include the battery capacity of the lithium battery after each historical charge-discharge cycle.

[0015] The data decomposition module is used to decompose the historical battery capacity data sequence using the complementary set empirical mode decomposition method to obtain the historical intrinsic mode component data sequence and the historical residual data sequence.

[0016] The training module is used to train the LSTM model with the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels to obtain a trained LSTM model; and to train the Transformer model with the historical charge-discharge cycle data sequence as input and the historical residual data sequence as labels to obtain a trained Transformer model.

[0017] The prediction module is used to take the predicted charge-discharge cycle data sequence as input, use a trained LSTM model to obtain the predicted intrinsic mode component data sequence, and use a trained Transformer model to obtain the predicted margin data sequence; the predicted charge-discharge cycle data sequence includes multiple consecutive predicted charge-discharge cycles of the lithium battery, and the predicted charge-discharge cycle is the charge-discharge cycle that the lithium battery has not yet experienced.

[0018] The lifespan determination module is used to sum the predicted intrinsic mode component data sequence and the predicted margin data sequence to obtain a predicted battery capacity data sequence; and to determine the remaining lifespan of the lithium battery based on the predicted battery capacity data sequence; the predicted battery capacity data sequence includes the battery capacity of the lithium battery after each predicted charge-discharge cycle.

[0019] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for predicting the remaining lifespan of a lithium battery.

[0020] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method for predicting the remaining lifespan of a lithium battery.

[0021] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method for predicting the remaining lifespan of a lithium battery.

[0022] According to the specific embodiments provided in this application, the following technical effects are disclosed:

[0023] This application provides a method, apparatus, device, medium, and product for predicting the remaining lifespan of lithium batteries. It utilizes complementary set empirical mode decomposition (CMD) to decompose historical battery capacity data sequences, resulting in historical intrinsic mode component (IMC) data sequences and historical remaining capacity data sequences that more closely match the historical battery capacity data sequences. Subsequently, using historical charge-discharge cycle data sequences as input and historical IMC data sequences as labels, an LSTM model is trained; using historical charge-discharge cycle data sequences as input and historical remaining capacity data sequences as labels, a Transformer model is trained. In actual lithium battery remaining lifespan prediction, the predicted charge-discharge cycle data sequences are directly used as input. The trained LSTM model obtains the predicted IMC data sequences, and the trained Transformer model obtains the predicted remaining capacity data sequences, further yielding the predicted battery capacity data sequences. Based on the predicted battery capacity data sequences, the remaining lifespan of the lithium battery is determined. Therefore, by fusing the LSTM and Transformer models to predict the remaining lifespan of lithium batteries, the prediction accuracy of the remaining lifespan of lithium batteries can be significantly improved. Attached Figure Description

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

[0025] Figure 1 This is an application environment diagram of a lithium battery remaining life prediction method provided in an embodiment of this application.

[0026] Figure 2 This is a flowchart illustrating a method for predicting the remaining lifespan of a lithium battery, provided as an embodiment of this application.

[0027] Figure 3 This is a detailed flowchart illustrating a method for predicting the remaining lifespan of a lithium battery, provided as an embodiment of this application.

[0028] Figure 4 This is a schematic diagram of the process for finding the optimal learning rate using SSA optimization, provided as an embodiment of this application.

[0029] Figure 5This is a schematic diagram showing the change of capacity measurement data of a lithium battery (numbered CX2-37) provided in an embodiment of this application with charge and discharge cycles.

[0030] Figure 6 This is a schematic diagram of the various IMFs data sequences and residual data sequences generated after the capacity measurement data of the lithium battery provided in an embodiment of this application are decomposed by CEEMD.

[0031] Figure 7 This is a schematic diagram comparing the capacity noise reduction data and capacity measurement data of a lithium battery after applying CEEMD noise reduction, as provided in an embodiment of this application.

[0032] Figure 8 This is a schematic diagram illustrating the change in the fitness function value when applying SSA to optimize the learning rate, as provided in an embodiment of this application.

[0033] Figure 9 This is a schematic diagram illustrating the prediction results of using CEEMD-Transformer-LSTM to predict the battery capacity data of a lithium battery for the next 544 charge-discharge cycles, as provided in an embodiment of this application.

[0034] Figure 10 This is a schematic diagram of the functional modules of a lithium battery remaining life prediction device provided in an embodiment of this application.

[0035] Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

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

[0037] The lithium battery remaining life prediction method provided in this application embodiment can be applied to, for example... Figure 1The application environment shown depicts a scenario where the terminal communicates with the server via a network. The data storage system stores the data the server needs to process. This data storage system can be configured independently, integrated into the server, or located in the cloud or on another server. The terminal can send the data to be processed (i.e., the historical charge-discharge cycle data sequence, historical battery capacity data sequence, and predicted charge-discharge cycle data sequence of the lithium battery) to the server. After receiving the data, the server uses the complementary set empirical mode decomposition method to decompose the historical battery capacity data sequence into historical intrinsic mode component data sequence and historical remaining capacity data sequence. Using the historical charge-discharge cycle data sequence as input and the historical intrinsic mode component data sequence as labels, an LSTM model is trained to obtain a trained LSTM model. Using the historical charge-discharge cycle data sequence as input and the historical remaining capacity data sequence as labels, a Transformer model is trained to obtain a trained Transformer model. Using the predicted charge-discharge cycle data sequence as input, the trained LSTM model is used to obtain the predicted intrinsic mode component data sequence, and the trained Transformer model is used to obtain the predicted remaining capacity data sequence. The predicted intrinsic mode component data sequence and the predicted remaining capacity data sequence are summed to obtain the predicted battery capacity data sequence. Based on the predicted battery capacity data sequence, the remaining lifespan of the lithium battery is determined. The server can then feed back the obtained remaining lifespan of the lithium battery to the terminal.

[0038] In addition, in some embodiments, the method for predicting the remaining lifespan of a lithium battery can also be implemented by a server or a terminal. For example, the terminal can directly process the data to be processed, or the server can obtain the data to be processed from the data storage system and process it.

[0039] The terminal can be, but is not limited to, various desktop computers, laptops, smartphones, tablets and IoT devices. The server can be a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.

[0040] In one exemplary embodiment, such as Figure 2 and Figure 3 As shown, a method for predicting the remaining lifespan of a lithium battery is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking the server in the example, the following steps are included:

[0041] S1, acquire the historical charge-discharge cycle data sequence and historical battery capacity data sequence of the lithium battery; the historical charge-discharge cycle data sequence includes multiple consecutive historical charge-discharge cycles of the lithium battery, and the historical charge-discharge cycle is the charge-discharge cycle that the lithium battery has experienced; the historical battery capacity data sequence includes the battery capacity of the lithium battery after each historical charge-discharge cycle.

[0042] S2, the historical battery capacity data sequence is decomposed using the complementary set empirical mode decomposition method to obtain the historical intrinsic mode component data sequence and the historical surplus data sequence.

[0043] S3. Using the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels, train the LSTM model to obtain a trained LSTM model; using the historical charge-discharge cycle data sequence as input and the historical residual data sequence as labels, train the Transformer model to obtain a trained Transformer model.

[0044] S4, using the predicted charge-discharge cycle data sequence as input, the trained LSTM model is used to obtain the predicted intrinsic mode component data sequence, and the trained Transformer model is used to obtain the predicted margin data sequence; the predicted charge-discharge cycle data sequence includes multiple consecutive predicted charge-discharge cycles of the lithium battery, and the predicted charge-discharge cycle is the charge-discharge cycle that the lithium battery has not yet experienced.

[0045] S5, sum the predicted intrinsic mode component data sequence and the predicted margin data sequence to obtain the predicted battery capacity data sequence; determine the remaining service life of the lithium battery based on the predicted battery capacity data sequence; the predicted battery capacity data sequence includes the battery capacity of the lithium battery after each predicted charge-discharge cycle.

[0046] Complementary Ensemble Empirical Mode Decomposition (CEEMD) is a signal decomposition method further developed from Ensemble Empirical Mode Decomposition (EEMD). Unlike EEMD, CEEMD employs a complementary set construction strategy in the generation and addition of random noise, improving the robustness of signal decomposition. Furthermore, the use of strategies such as combined weighting and iterative decomposition effectively solves the mode confusion phenomenon of traditional EEMD, further enhancing the stability and accuracy of CEEMD's signal decomposition. LSTM models, through cell states and gating mechanisms, achieve information memory and forgetting, effectively mitigating the gradient vanishing problem. They are time-sensitive and capture long-term dependencies in battery capacity data sequences. Compared to traditional recurrent neural networks, LSTM models have better memory performance, retaining more distant contextual information when processing sequential data. The Transformer model relies on an attention mechanism to map the global dependencies between inputs and outputs. Like most neural sequence transformation models, it has an encoder-decoder structure. The encoder maps the input time series, represented by the battery capacity data sequence, to a continuous representation sequence. Under given conditions, the decoder outputs one element at a time, and several elements are further used to form the output time series. The model performs autoregression at each time step of the time series prediction, and when generating the output time series at time n+1, the output time series generated at the previous time step (i.e., time n) is used as an additional input. Implementing S1 to S5 above, this embodiment proposes a lithium battery remaining life prediction method based on CEEMD-Transformer-LSTM. It uses complementary set empirical mode decomposition to extract capacity denoised data close to the original data (i.e., historical battery capacity data sequences). The capacity denoised data includes historical remaining data sequences and historical IMFs (Intrinsic Mode Functions) data sequences corresponding to the original data. Based on this capacity denoised data, the Transformer-LSTM fusion model is trained. The trained Transformer-LSTM fusion model is then used to determine the remaining life of the lithium battery. This method has the advantages of effectively removing noise, extracting capacity denoised data close to the original data, and accurately predicting the remaining life of the lithium battery.

[0047] In this embodiment, the health status data of the lithium battery during each historical charge-discharge cycle is obtained by measurement. The health status data refers to the battery capacity data. When measuring battery capacity data, the lithium battery operates in two states: charging and discharging. During charging, the lithium battery typically initially receives a constant current. When the charging voltage rises to the rated voltage, it remains constant until the charging current drops to a set value, at which point charging is complete. During discharging, the operating current of the lithium battery is maintained constant until the operating voltage drops to another set value, at which point discharging is complete. One complete charge-discharge process constitutes one charge-discharge cycle. After one charge-discharge cycle, the battery capacity can be measured and calculated. The experienced charge-discharge cycles are defined as historical charge-discharge cycles. Multiple consecutive historical charge-discharge cycles form a historical charge-discharge cycle data sequence, and the battery capacity after multiple consecutive historical charge-discharge cycles forms a historical battery capacity data sequence. The battery capacity of a lithium battery generally decreases with the increase of the number of charge-discharge cycles.

[0048] Before using the CEEMD method to decompose the historical battery capacity data sequence to obtain the historical intrinsic modal component data sequence and the historical margin data sequence, the lithium battery remaining service life prediction method in this embodiment further includes: using the Posterior Feedback Entropy and Relevance (PFER) method to determine the number of modal decomposition layers of the lithium battery capacity measurement data (i.e., the historical battery capacity data sequence). The number of modal decomposition layers is the number of intrinsic modal components obtained by decomposing the historical battery capacity data sequence using the CEEMD method. That is, complementary set empirical mode decomposition is performed on the lithium battery capacity measurement data to generate several intrinsic modal components and a margin. The number of modal decomposition layers is generated by the PFER method to generate capacity denoised data that is close to the original data.

[0049] The determination of the number of mode decomposition layers using the PFER method specifically includes:

[0050] (1) Randomly set the initial modal decomposition layer number.

[0051] In this embodiment, the initial number of mode decomposition layers can be set to 2. Simultaneously, this embodiment can also initialize the CEEMD algorithm parameters, such as the standard deviation of the added noise Nstd, the sampling frequency Ts, the sampling period T, and the stopping condition.

[0052] (2) Under the constraint of the initial modal decomposition layer, the historical battery capacity data sequence is decomposed by the complementary set empirical modal decomposition method to obtain the initial historical intrinsic modal component data sequence; the number of intrinsic modal components included in the initial historical intrinsic modal component data sequence is the sum of the initial modal decomposition layer and 1.

[0053] (3) Determine whether the stopping condition is met. The stopping condition is designed based on the information entropy and Pearson correlation coefficient between the historical battery capacity data sequence and the initial historical intrinsic mode component data sequence.

[0054] In this embodiment, the stopping condition is:

[0055]

[0056] Where H(x) is the correlation confidence between the historical battery capacity data sequence and the initial historical intrinsic mode component data sequence, x is the historical battery capacity data sequence; n is the initial mode decomposition level; p(x) i Let be the i-th intrinsic mode component x in the historical battery capacity data sequence x and the initial historical intrinsic mode component data sequence. i Information entropy between; ρ(x) i′ Let be the i′-th intrinsic mode component x in the historical battery capacity data sequence x and the initial historical intrinsic mode component data sequence. i′ The Pearson correlation coefficient between them, i′=n+1.

[0057] This embodiment calculates the information entropy and Pearson correlation coefficient between the historical battery capacity data sequence and the initial historical intrinsic mode component data sequence to verify whether the stopping condition is met.

[0058] (4) If satisfied, the initial modal decomposition layer number n = i′-1 is taken as the final modal decomposition layer number.

[0059] (5) If not satisfied, increment the initial modal decomposition layer number by 1, i.e., n = n + 1, and return to the step of "under the constraint of the initial modal decomposition layer number, use the complementary set empirical modal decomposition method to decompose the historical battery capacity data sequence to obtain the initial historical intrinsic modal component data sequence" until the stopping condition is met.

[0060] By pre-determining the number of mode decomposition layers, the running time of CEEMD can be saved, and the decomposition accuracy of CEEMD can be improved to a certain extent.

[0061] In this embodiment, the CEEMD method is used to decompose the historical battery capacity data sequence to obtain the historical intrinsic modal component data sequence and the historical margin data sequence, specifically including:

[0062] (1) Construct a complementary set, and add n (i.e., the number of mode decomposition layers) pairs of positive and negative white noise to the historical battery capacity data sequence. After each pair of positive and negative white noise is added to the historical battery capacity data sequence, two sets of signals are generated, represented as follows:

[0063]

[0064] Where M1 and M2 are the signals after adding positive and negative white noise, respectively, i.e., two sets of signals; S is the original signal, i.e., the historical battery capacity data sequence; N is the added auxiliary white noise; thus, 2n sets of signals can be obtained.

[0065] (2) Perform EEMD decomposition on each of the 2n groups of signals to obtain 2n groups of IMF components. The j-th IMF component of the i-th signal is denoted as IMF. ij .

[0066] (3) Combine and weight each group of IMF components to generate a total IMF component, represented as:

[0067]

[0068] Among them, IMF j Let j be the j-th total IMF component, where j = 1, 2, ..., n, and n is the mode decomposition level.

[0069] (4) Perform EEMD decomposition on each of the total IMF components in a set of total IMF components to obtain n new IMF components. Repeat steps (3)-(4) until the number of IMF components obtained does not increase. The set of total IMF components obtained in the last iteration is the historical intrinsic modal component data sequence. The difference between the historical battery capacity data sequence and the historical intrinsic modal component data sequence is the historical margin data sequence.

[0070] After CEEMD decomposition, the reconstructed signal can be expressed as:

[0071]

[0072] Where x(t)′= is the reconstructed signal; n is the total number of intrinsic modal components; IMF i (t) represents the i-th intrinsic modal component; r n (t) represents the margin.

[0073] The CEEMD method can analyze and process different IMF components, effectively eliminating or reducing noise in lithium battery capacity measurement data, including the separation of long-term and short-term trends of the signal. After performing complementary set empirical mode decomposition on the original data, capacity denoising data close to the original data is obtained, that is, the historical residual data sequence and historical IMFs data sequence corresponding to the original data are obtained.

[0074] In this embodiment, based on the capacity denoising data of the lithium battery and the historical charge-discharge cycle data sequence, the Sparrow Search algorithm (SSA) is applied to optimize and generate the optimal value of the hyperparameter of the LSTM model's learning rate. Before training the LSTM model with the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels to obtain the trained LSTM model, the lithium battery remaining life prediction method in this embodiment further includes: using SSA to determine the optimal learning rate of the LSTM model.

[0075] like Figure 4 As shown, the process of applying SSA to optimize the learning rate for generating the LSTM model is as follows:

[0076] (1) Standardize the original dataset. The original dataset includes historical charge and discharge cycle data sequences, historical intrinsic modal component data sequences, and historical residual data sequences. Divide the original dataset into training set and test set. The training set is used for training the Transformer model and LSTM model, and the test set is used for evaluating the Transformer model and LSTM model.

[0077] (2) Initialize SSA parameters, including iteration number, population size, discoverer percentage, joiner percentage, vigilant percentage, and warning value.

[0078] (3) The root mean square error (RMSE) is used as the fitness function to evaluate the performance of the model hyperparameters and measure the prediction accuracy of the model. Each sparrow represents the hyperparameters of an LSTM model. Based on the hyperparameters of the LSTM model, the model is trained using a training set. Specifically, the historical charge-discharge cycle data sequence is used as input, and the historical intrinsic modal component data sequence is used as the label to train the LSTM model. At the same time, the historical charge-discharge cycle data sequence is used as input, and the historical residual data sequence is used as the label to train the Transformer model. The model is then tested using a test set. That is, the historical charge-discharge cycle data sequence in the test set is used as input, and the predicted value of the remaining useful life is determined using the trained LSTM model and the trained Transformer model. At the same time, the true value of the remaining useful life is determined using the historical intrinsic modal component data sequence and the historical residual data sequence in the test set. The root mean square error is calculated based on the predicted and true values ​​of the remaining useful life to obtain the fitness function value of the sparrow. The fitness function value represents the difference between the predicted value and the true value output by the model.

[0079] (4) Update the positions of different sparrow types and find the optimal hyperparameters.

[0080] (5) Determine whether the iteration termination condition has been met. The iteration termination condition can be reaching the maximum number of iterations. If the maximum number of iterations has been reached, terminate the iteration process and obtain the current optimal hyperparameter. The hyperparameter is the learning rate, and the learning rate ranges from [0.001 to 0.1]. Otherwise, continue to execute step (4) to continuously optimize the hyperparameter.

[0081] (6) Use the obtained optimal hyperparameters to build the optimal LSTM model.

[0082] SSA divides sparrow populations into discoverers and followers based on their foraging abilities. Discoverers are responsible for finding food sources and guiding followers to food sources. Simultaneously, some sparrows are randomly selected as scouts, who will engage in anti-predation behavior when danger is detected. SSA iteratively updates the positional information of discoverers, followers, and scouts based on the fitness function values ​​of individual sparrows. The smaller the fitness function value, the better the individual sparrow. This process yields the positional information of the globally optimal sparrow individual. At the end of the iteration, the positional information of this globally optimal sparrow individual is the optimal learning rate.

[0083] The location update status of the discoverer is represented as follows:

[0084]

[0085] in, Let i be the position state of the i-th sparrow in the j-th dimension during the (t+1)-th iteration. The position states of the sparrow in all dimensions constitute the position information of the sparrow. Let T be the position and state of the i-th sparrow in the j-th dimension during the t-th iteration; α is a random number between 0 and 1; T max R1 represents the maximum number of iterations; R2 is the alert value, a random number between 0 and 1; ST is the alert threshold, representing the safe range; Q is a random number following a standard normal distribution; L is a 1×d unit vector with the same dimension d as the sparrow's location information. When the alert value R2 is less than the alert threshold ST, it means the predation environment is safe, the sparrow population is not threatened, and the discoverer can conduct a wide search; when the alert value R2 is greater than or equal to the alert threshold ST, it means that some sparrows in the population have sensed the danger around them, warned the remaining sparrows, and immediately moved to a safe area to forage.

[0086] The follower's position update status is represented as follows:

[0087]

[0088] in, represents the location information of the worst-performing sparrow individual in the t-th iteration; n is the total number of sparrow individuals in the sparrow population; Let A represent the optimal location information of the finder in the (t+1)th iteration; A represents a 1×d vector, where d is the dimension of the sparrow's location information, and each element in A randomly takes the value 1 or -1. + =A T (AA T ) -1 When i > n / 2, it indicates that the sparrow individual with a lower fitness function value is in a state of hunger. The i-th follower has not obtained food and therefore must move to find food.

[0089] The location update status of the vigilant is indicated as follows:

[0090]

[0091] in, Let f be the location information of the globally optimal sparrow individual in the t-th iteration; β is a random number following a standard normal distribution; f i f is the fitness function value of the i-th sparrow individual; g The fitness function value is the current globally optimal sparrow individual; K is a random number between -1 and 1; f w Let f be the fitness function value of the worst sparrow individual in the current global dataset; ε is a constant to prevent the denominator from being zero. When f i >f g At that time, sparrows were located on the edge of the population and were vulnerable to threats. i =f g When this happens, it means the sparrow is aware of the danger and moves towards a safer location to escape it.

[0092] The capacity noise-reduced data of the lithium battery in each charge-discharge cycle are H1, H2, ..., H. n Where n≥1, n is the number of charge-discharge cycles measured, and the corresponding capacity denoising data is [H1, H2, ..., H]. n The charge / discharge cycles of the lithium battery capacity noise reduction data are T1, T2, ..., T... n The corresponding charge / discharge cycle data sequence is [T1, T2, ..., T]. n The CEEMD-Transformer-LSTM model refers to using an integrated Transformer model and an LSTM model to model and predict the remaining lifespan data sequence and IMF data sequence obtained by the CEEMD method, respectively. Specifically, the Transformer-LSTM model is trained and modeled on historical IMF data sequences and historical remaining lifespan data sequences separately to better predict the remaining lifespan of lithium batteries and enhance the generalization ability of the prediction method. This includes:

[0093] (1) The measured lithium battery strong nonlinear discharge capacity data (i.e., historical battery capacity data sequence) is decomposed into historical residual data sequence and a series of historical IMFs data sequences using the CEEMD method. Among them, the historical residual data sequence reflects the overall aging trajectory trend of lithium battery, and the historical IMFs data sequence comprehensively reflects the regenerative phenomenon of lithium battery and the influence of external measurement noise.

[0094] (2) The historical residual data sequence and the historical IMFs data sequence are divided into training set and test set in a 1:1 ratio.

[0095] (3) Based on the training set of historical residual data sequence, the number of cycles (i.e. charge and discharge cycles) is used as the training sample, and the corresponding historical residual data sequence is used as the training target. The Transformer model is used to establish a residual data sequence prediction model.

[0096] (4) Based on the training set of historical IMFs data sequences, the number of cycles is used as the training sample, and a series of corresponding historical IMFs data sequences are used as the training target. An IMFs data sequence prediction model is established based on the LSTM model.

[0097] (5) Input the number of cycles corresponding to the test set into the residual data sequence prediction model and the IMFs data sequence prediction model to obtain the predicted residual data sequence and IMFs data sequence.

[0098] (6) Using the number of cycles as a pointer, the predicted residual data sequence and IMFs data sequence are accumulated and predicted to generate the predicted lithium battery discharge capacity data.

[0099] (7) Calculate the remaining lifespan of the lithium battery based on the predicted lithium battery discharge capacity data, evaluate the prediction results using different evaluation indicators, and assess the prediction performance.

[0100] The Transformer model uses a self-attention mechanism, sometimes called internal attention. It's essentially a scaled dot product attention computation method, a mechanism that connects different positions within a single sequence to compute its representation. The self-attention layer dynamically aggregates information through interactions between queries, keys, and values. For the input sequence z∈R... N×d Through the linear mapping matrix U QKV Map this to three variables, Q, K, and V, as follows:

[0101]

[0102] Simultaneously, an attention function is computed on a set of queries, integrating them to form matrix Q. Key and value pairs also form matrices K and V. Based on this, the similarity A between Q and K is calculated, and V is weighted according to A, resulting in the output matrix:

[0103]

[0104] The weighted aggregation process can be represented as:

[0105] SA(z) = AV;

[0106] The positional encoding principle of the Transformer model is to add generated sine and cosine data of different frequencies as positional codes to the input sequence, thereby enabling the Transformer model to capture the relative positional relationships of the input sequence. The calculation process is as follows:

[0107] PE (pos,2i) =sin(pos / 10000) 2i / d );

[0108] PE (pos,2i+1) =cos(pos / 10000) 2i / d );

[0109] Where pos is the position of each capacity value in the entire sequence, and i∈[0,…,d / 2] is used to calculate the index of the channel dimension. For the same i, the encoding of the 2i and 2i+1 positions on the channel is the sine and cosine values ​​with the same angular velocity. In order for the position encoding to be added to the input embedding, the position encoding needs to maintain the same velocity as the embedding.

[0110] The network structure of the LSTM model mainly consists of cell states and threshold mechanisms.

[0111] The forgetting threshold is reached by using the state information h from the previous time step. t-1 and current state x t The input to the Sigmoid activation function controls whether information from the cell state at the previous time point is forgotten. The calculation formula can be expressed as:

[0112] f(t)=σ(W f [h t-1 ,x t ]+b f );

[0113] Where f(t) is the output of the forget gate, where 0 represents complete forgetting and 1 represents complete retention; W f Forget gate weights; b f Offset the forget gate.

[0114] The input threshold continuously updates the state of the memory cell, starting from the input x. t Selectively retain valid information in C t The calculation formula can be expressed as:

[0115] i t =σ(W i [h t-1 ,x t ]+b i );

[0116]

[0117] Among them, W i and b i These are the weights and bias matrices of the Sigmoid layer, respectively; W represents the state value of the candidate memory cell at time t. c and b c These are the weights and bias matrices of the tanh layer, respectively; C t Let t be the state value of the current memory cell at time t.

[0118] The output threshold includes the hidden state h. t With the current layer output o t The calculation formula can be expressed as:

[0119] o t =σ(W o ×[h t-1 ,x t ]+b o );

[0120] h t =o t ·tanh(C t );

[0121] Among them, W o and b o These represent the weights and biases of the output gate neural network, respectively.

[0122] In this embodiment, the historical charge-discharge cycle data sequence is used as input, and the historical intrinsic modal component data sequence is used as label to train the LSTM model, resulting in a trained LSTM model; the historical charge-discharge cycle data sequence is used as input, and the historical residual data sequence is used as label to train the Transformer model, resulting in a trained Transformer model.

[0123] Remaining lifespan refers to the number of charge-discharge cycles remaining before a lithium battery fails. The method for predicting the remaining lifespan of a lithium battery using the CEEMD-Transformer-LSTM model involves fusing the predicted remaining lifespan data sequence and the IMFs data sequence, and then calculating the remaining lifespan for the current charge-discharge cycle T. n The battery capacity is then continuously predicted for each charge-discharge cycle to find the first time that H is satisfied. n+g ≥H threshold And H n+g+1 <H threshold Condition T n+g In the T charge / discharge cycle, the lithium battery in the Tth cycle... n+g It fails after one charge-discharge cycle, and its remaining service life is g charge-discharge cycles. Wherein, H n+g For the Tth n+g Battery capacity after one charge-discharge cycle, H threshold H is the battery capacity threshold at which the lithium battery fails. n+g+1 For the Tth n+g+1 Battery capacity after one charge-discharge cycle. Specifically, the battery capacity threshold for lithium battery failure is generally 65%-75% of the nominal capacity of the lithium battery.

[0124] The remaining lifespan of the lithium battery is determined based on the predicted battery capacity data sequence. Specifically, for each predicted charge / discharge cycle, it is determined whether the battery capacity after the predicted charge / discharge cycle is greater than or equal to a battery capacity threshold, and whether the battery capacity after the next predicted charge / discharge cycle is less than the battery capacity threshold. If so, the difference between the predicted charge / discharge cycle and the current charge / discharge cycle is the remaining lifespan of the lithium battery, where the current charge / discharge cycle is the last charge / discharge cycle the lithium battery has already experienced. The battery capacity threshold is 65%-75% of the nominal capacity of the lithium battery.

[0125] To demonstrate the process and prediction performance of the lithium battery remaining life prediction method based on CEEMD-Transformer-LSTM proposed in this embodiment, an example is provided here.

[0126] A verification experiment was conducted using battery capacity data measured by the Center for Advanced Life Cycle Engineering (CALCE) at the University of Maryland. Specifically, the capacity measurement data of lithium battery CX2-37 provided by CALCE was used as the experimental subject. The capacity measurement data of lithium battery CX2-37 changes with charge-discharge cycles as follows: Figure 5 As shown, by Figure 5 As can be seen, the capacity of lithium batteries tends to decrease with the increase of charge and discharge cycles, but in some charge and discharge cycles, the battery capacity increases rapidly and briefly, which is generally caused by noise interference.

[0127] Based on the capacity measurement data of lithium battery CX2-37, the PFER method was used to optimize the number of mode decomposition layers to reduce computational resources and minimize the loss of effective information. The optimized number of mode decomposition layers for lithium battery CX2-37 was calculated to be 5 layers. The results for each layer are shown in Table 1. Figure 6 The CEEMD decomposition results of lithium battery CX2-37 with 5 modal decomposition layers are shown. In this embodiment, the margin is defined as the capacity decrease trend sequence and other IMFs are defined as the characteristic component sequence.

[0128] Table 1. Optimization results of each layer using the PFER method.

[0129]

[0130] Comparative analysis clearly shows that the Pearson correlation coefficients between the CEEMD decomposition results and the capacity measurement data of battery CX2-37 are both greater than or equal to 99%. The capacity denoising data of the lithium battery generated by the CEEMD denoising method proposed in this embodiment steadily decreases with each charge-discharge cycle, consistent with the actual capacity changes of the lithium battery. Furthermore, the capacity denoising data remains close to the capacity measurement data during its decrease, meaning that the capacity denoising data reflects the change process of the capacity measurement data and exhibits the same changing pattern. Figure 7 As shown.

[0131] According to data provided by CALCE, the rated capacity of the CX2-37 battery is 1.33Ah. In this experiment, the battery capacity threshold was set to 0.92Ah. A total of 1089 charge-discharge cycles were collected for capacity measurement. Based on the denoised capacity data, the first 1034 charge-discharge cycles were considered effective, with battery capacity consistently above 0.92Ah. In subsequent charge-discharge cycles, the lithium battery failed due to capacity falling below 0.92Ah. The denoised capacity data from the first 545 charge-discharge cycles was used as training data, and the denoised capacity data from the following 544 cycles was used as test data. At this point, the actual remaining lifespan of the lithium battery was 489 charge-discharge cycles. The prediction accuracy of the CEEMD-Transformer-LSTM was then verified using the test data.

[0132] Using SSA, the optimal learning rate for the LSTM model was determined to be 30. The maximum number of training iterations was set to 2000, the gradient threshold to 1, and the learning rate adjustment factor to 0.2. Figure 8To illustrate the process of generating the optimal learning rate using SSA optimization based on training data, this optimal learning rate is applied to CEEMD-Transformer-LSTM to predict the battery capacity of lithium battery number CX2-37 for future charge-discharge cycles. The predicted capacity is then compared with the actual battery capacity values ​​from test data. The prediction results are as follows: Figure 9 As shown, the effectiveness of the proposed method for predicting the remaining lifespan of lithium batteries is evaluated using three error metrics: absolute error (AE), mean absolute error (MAE), and root square error (RMSE). The formulas for calculating AE, MAE, and RMSE are as follows:

[0133]

[0134]

[0135]

[0136] Where x(i) is the number of remaining usable cycles at the end of the actual battery life of the i-th sample (i.e., the predicted value of the remaining lifespan). Let N be the number of remaining usable cycles at the end of the battery's lifespan under the predicted scenario for the i-th sample (i.e., the actual value of the remaining lifespan), where N is the number of samples and L is the total length of the original capacity data sequence, which is also the number of samples.

[0137] Table 2 presents the statistical error between the predicted remaining lifespan of lithium batteries and the actual capacity aging trajectory under the CEEMD-Transformer-LSTM dual-drive machine learning prediction method.

[0138] Table 2 Error Statistics of CEEMD-Transformer-LSTM Prediction Method

[0139] Battery Real RUL Predicting RUL AE MAE (%) RMSE (%) CX2-37 489 488 -1 1.04 1.24

[0140] In this prediction, the effective lifespan of the lithium battery is predicted to be 488 charge-discharge cycles, the remaining lifespan is predicted to be 55 charge-discharge cycles, the error is 1 cycle, and the MAE and RMSE generated by the predicted data and test data are 1.04% and 1.24%, respectively.

[0141] To further verify the reliability of the lithium battery remaining life prediction method proposed in this embodiment, comparative analyses were conducted using LSTM, CEEMD-LSTM, and the previously developed WTD-Transformer with CEEMD-Transformer-LSTM. These analyses demonstrated the accuracy and superiority of the proposed method in predicting the remaining life of lithium batteries. Table 3 shows the statistical errors in the CX2-37 battery capacity prediction results based on LSTM, CEEMD-LSTM, CEEMD-Transformer-LSTM, and WTD-Transformer.

[0142] Table 3 Error statistics for different prediction methods

[0143]

[0144] Analysis of the data in Table 3 verifies that the prediction method proposed in this embodiment has excellent prediction accuracy. Based on the predictive ability of the overall aging trajectory trend of lithium batteries, the use of the CEEMD method brings better robustness to the model prediction. Specifically, the prediction errors of the CX2-37 battery based on LSTM, CEEMD-LSTM, and WTD-Transformer are 4, 24, and 25 respectively, with MAE and RMSE both less than 1.3%. This indicates that the CEEMD-Transformer-LSTM proposed in this embodiment reduces the prediction error by an average of 16.67% compared to the traditional LSTM, CEEMD-LSTM, and WTD-Transformer prediction methods.

[0145] This example demonstrates that the lithium battery remaining life prediction method based on CEEMD-Transformer-LSTM proposed in this embodiment is simple and effective to operate, while also having high prediction accuracy.

[0146] This embodiment discloses a method for predicting the remaining lifespan of lithium batteries based on CEEMD-Transformer-LSTM. The method uses the proposed PFER method to obtain the number of mode decomposition layers from the lithium battery capacity measurement data. CEEMD is applied to extract capacity-denoised data close to the original data, obtaining a residual data sequence and IMFs data sequence corresponding to the original data. Based on this capacity-denoised data, a prediction model is established using CEEMD-Transformer-LSTM to predict the remaining lifespan of the lithium battery. Specifically, the method involves: measuring the capacity measurement data of the lithium battery with each charge-discharge cycle; performing complementary ensemble empirical mode decomposition (CIMD) denoising on the lithium battery capacity measurement data; calculating the battery capacity threshold for lithium battery failure; using SSA optimization to generate the optimal learning rate of CEEMD-Transformer-LSTM based on the capacity-denoised data and charge-discharge cycle data sequence; and applying CEEMD-Transformer-LSTM to predict the remaining lifespan of the lithium battery. This prediction method is simple and effective, and can accurately predict the remaining lifespan of lithium batteries.

[0147] This embodiment applies the CEEMD method to denoise the capacity measurement data, obtaining a residual data sequence and an IMFs data sequence. The PFER method is used to determine the number of mode decomposition layers; the denoised capacity data generated at the determined number of mode decomposition layers is closer to the original data and better reflects the changes in lithium battery capacity. This embodiment applies SSA to optimize the CEEMD-Transformer-LSTM model, quickly obtaining the optimal learning rate. Based on the residual data sequence and IMFs data sequence obtained by the CEEMD method, it proposes using the CEEMD-Transformer-LSTM model to complete the fusion prediction of the remaining lifespan of the lithium battery, improving prediction accuracy.

[0148] This application also provides an application scenario in which the above-described method for predicting the remaining lifespan of a lithium battery is applied. Specifically, the method for predicting the remaining lifespan of a lithium battery provided in this embodiment can be applied in the scenario of predicting the driving range of an electric vehicle. The scenario of predicting the driving range of an electric vehicle includes a lithium battery capacity measurement stage and a lithium battery remaining lifespan prediction stage, with capacity measurement data entering the lithium battery remaining lifespan prediction stage from the lithium battery capacity measurement stage. The method for predicting the remaining lifespan of a lithium battery provided in this embodiment belongs to the lithium battery remaining lifespan prediction stage.

[0149] Based on the same inventive concept, this application also provides a lithium battery remaining life prediction device for implementing the lithium battery remaining life prediction method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of the one or more lithium battery remaining life prediction devices provided below can be found in the limitations of the lithium battery remaining life prediction method described above, and will not be repeated here.

[0150] In one exemplary embodiment, a lithium battery remaining lifespan prediction device is provided, such as... Figure 10 As shown, the lithium battery remaining lifespan prediction device includes:

[0151] The data acquisition module M1 is used to acquire historical charge-discharge cycle data sequences and historical battery capacity data sequences of lithium batteries; the historical charge-discharge cycle data sequences include multiple consecutive historical charge-discharge cycles of lithium batteries, and the historical charge-discharge cycles are the charge-discharge cycles that lithium batteries have experienced; the historical battery capacity data sequences include the battery capacity of lithium batteries after each of the historical charge-discharge cycles.

[0152] The data decomposition module M2 is used to decompose the historical battery capacity data sequence using the complementary set empirical mode decomposition method to obtain the historical intrinsic mode component data sequence and the historical residual data sequence.

[0153] The training module M3 is used to train the LSTM model with the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels to obtain a trained LSTM model; and to train the Transformer model with the historical charge-discharge cycle data sequence as input and the historical residual data sequence as labels to obtain a trained Transformer model.

[0154] The prediction module M4 is used to take the predicted charge-discharge cycle data sequence as input, use the trained LSTM model to obtain the predicted intrinsic mode component data sequence, and use the trained Transformer model to obtain the predicted margin data sequence; the predicted charge-discharge cycle data sequence includes multiple consecutive predicted charge-discharge cycles of the lithium battery, and the predicted charge-discharge cycle is the charge-discharge cycle that the lithium battery has not yet experienced.

[0155] The lifespan determination module M5 is used to sum the predicted intrinsic mode component data sequence and the predicted margin data sequence to obtain a predicted battery capacity data sequence; and to determine the remaining lifespan of the lithium battery based on the predicted battery capacity data sequence; the predicted battery capacity data sequence includes the battery capacity of the lithium battery after each predicted charge-discharge cycle.

[0156] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 11 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data to be processed. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a method for predicting the remaining lifespan of a lithium battery.

[0157] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0158] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0159] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0160] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0161] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0162] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0163] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0164] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0165] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for predicting the remaining lifespan of a lithium battery, characterized in that, The method for predicting the remaining lifespan of lithium batteries includes: Acquire historical charge-discharge cycle data sequence and historical battery capacity data sequence of lithium battery; the historical charge-discharge cycle data sequence includes multiple consecutive historical charge-discharge cycles of lithium battery, the historical charge-discharge cycle being the charge-discharge cycle that lithium battery has already experienced; the historical battery capacity data sequence includes the battery capacity of lithium battery after each historical charge-discharge cycle. The historical battery capacity data sequence is decomposed using the complementary set empirical mode decomposition method to obtain the historical intrinsic mode component data sequence and the historical residual data sequence; Using the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels, the LSTM model is trained to obtain a trained LSTM model; using the historical charge-discharge cycle data sequence as input and the historical residual data sequence as labels, the Transformer model is trained to obtain a trained Transformer model. Using the predicted charge-discharge cycle data sequence as input, the trained LSTM model is used to obtain the predicted intrinsic mode component data sequence, and the trained Transformer model is used to obtain the predicted margin data sequence; the predicted charge-discharge cycle data sequence includes multiple consecutive predicted charge-discharge cycles of the lithium battery, and the predicted charge-discharge cycle is the charge-discharge cycle that the lithium battery has not yet experienced. The predicted intrinsic mode component data sequence and the predicted margin data sequence are summed to obtain the predicted battery capacity data sequence; the remaining service life of the lithium battery is determined based on the predicted battery capacity data sequence; the predicted battery capacity data sequence includes the battery capacity of the lithium battery after each predicted charge-discharge cycle; Before using the complementary set empirical mode decomposition method to decompose the historical battery capacity data sequence to obtain the historical intrinsic mode component data sequence and the historical remaining data sequence, the lithium battery remaining service life prediction method further includes: using the posterior information entropy feedback method to determine the number of mode decomposition layers, wherein the number of mode decomposition layers is the number of intrinsic mode components obtained by decomposition using the complementary set empirical mode decomposition method; The method of determining the number of mode decomposition layers using posterior information entropy feedback specifically includes: The initial number of mode decomposition layers is randomly set; Under the constraint of the initial modal decomposition layer number, the historical battery capacity data sequence is decomposed using the complementary set empirical modal decomposition method to obtain the initial historical intrinsic modal component data sequence; the number of intrinsic modal components included in the initial historical intrinsic modal component data sequence is the sum of the initial modal decomposition layer number and 1; Determine whether the stopping condition is met; the stopping condition is designed based on the information entropy and Pearson correlation coefficient between the historical battery capacity data sequence and the initial historical intrinsic mode component data sequence; If the conditions are met, the initial modal decomposition layer number is used as the final modal decomposition layer number. If not satisfied, increment the initial modal decomposition layer number by 1 and return to the step of "under the constraint of the initial modal decomposition layer number, decompose the historical battery capacity data sequence using the complementary set empirical modal decomposition method to obtain the initial historical intrinsic modal component data sequence". The stopping condition is: ; in, For the relevant confidence level, This is a sequence of historical battery capacity data; This represents the initial number of mode decomposition layers; Historical battery capacity data sequence and the first in the initial historical connotation modal component data sequence One intrinsic modal component Information entropy between them; Historical battery capacity data sequence and the first in the initial historical connotation modal component data sequence One intrinsic modal component The Pearson correlation coefficient between them = +1.

2. The method for predicting the remaining service life of a lithium battery according to claim 1, characterized in that, Before training the LSTM model using the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels to obtain the trained LSTM model, the lithium battery remaining lifespan prediction method further includes: using a sparrow search algorithm to determine the optimal learning rate of the LSTM model.

3. The method for predicting the remaining service life of a lithium battery according to claim 1, characterized in that, Determining the remaining lifespan of the lithium battery based on the predicted battery capacity data sequence specifically includes: For each predicted charge / discharge cycle, determine whether the battery capacity after the predicted charge / discharge cycle is greater than or equal to the battery capacity threshold, and whether the battery capacity after the next predicted charge / discharge cycle is less than the battery capacity threshold. If so, the difference between the predicted charge / discharge cycle and the current charge / discharge cycle is the remaining lifespan of the lithium battery; the current charge / discharge cycle is the last charge / discharge cycle that the lithium battery has already experienced.

4. The method for predicting the remaining service life of a lithium battery according to claim 3, characterized in that, The battery capacity threshold is 65%-75% of the nominal capacity of the lithium battery.

5. A device for predicting the remaining lifespan of a lithium battery, characterized in that, The lithium battery remaining lifespan prediction device includes: The data acquisition module is used to acquire historical charge-discharge cycle data sequences and historical battery capacity data sequences of lithium batteries; the historical charge-discharge cycle data sequences include multiple consecutive historical charge-discharge cycles of the lithium battery, and the historical charge-discharge cycles are the charge-discharge cycles that the lithium battery has already experienced; the historical battery capacity data sequences include the battery capacity of the lithium battery after each historical charge-discharge cycle. The data decomposition module is used to decompose the historical battery capacity data sequence using the complementary set empirical mode decomposition method to obtain the historical intrinsic mode component data sequence and the historical residual data sequence. The training module is used to train the LSTM model with the historical charge-discharge cycle data sequence as input and the historical intrinsic modal component data sequence as labels to obtain a trained LSTM model; and to train the Transformer model with the historical charge-discharge cycle data sequence as input and the historical residual data sequence as labels to obtain a trained Transformer model. The prediction module is used to take the predicted charge-discharge cycle data sequence as input, use a trained LSTM model to obtain the predicted intrinsic mode component data sequence, and use a trained Transformer model to obtain the predicted margin data sequence; the predicted charge-discharge cycle data sequence includes multiple consecutive predicted charge-discharge cycles of the lithium battery, and the predicted charge-discharge cycle is the charge-discharge cycle that the lithium battery has not yet experienced. The lifespan determination module is used to sum the predicted intrinsic mode component data sequence and the predicted margin data sequence to obtain a predicted battery capacity data sequence; and to determine the remaining lifespan of the lithium battery based on the predicted battery capacity data sequence; the predicted battery capacity data sequence includes the battery capacity of the lithium battery after each predicted charge-discharge cycle. Before using the complementary set empirical mode decomposition method to decompose the historical battery capacity data sequence to obtain the historical intrinsic mode component data sequence and the historical remaining data sequence, the lithium battery remaining service life prediction system further includes: using the posterior information entropy feedback method to determine the number of mode decomposition layers, wherein the number of mode decomposition layers is the number of intrinsic mode components obtained by decomposition using the complementary set empirical mode decomposition method; The method of determining the number of mode decomposition layers using posterior information entropy feedback specifically includes: The initial number of mode decomposition layers is randomly set; Under the constraint of the initial modal decomposition layer number, the historical battery capacity data sequence is decomposed using the complementary set empirical modal decomposition method to obtain the initial historical intrinsic modal component data sequence; the number of intrinsic modal components included in the initial historical intrinsic modal component data sequence is the sum of the initial modal decomposition layer number and 1; Determine whether the stopping condition is met; the stopping condition is designed based on the information entropy and Pearson correlation coefficient between the historical battery capacity data sequence and the initial historical intrinsic mode component data sequence; If the conditions are met, the initial modal decomposition layer number is used as the final modal decomposition layer number. If not satisfied, increment the initial modal decomposition layer number by 1 and return to the step of "under the constraint of the initial modal decomposition layer number, decompose the historical battery capacity data sequence using the complementary set empirical modal decomposition method to obtain the initial historical intrinsic modal component data sequence". The stopping condition is: ; in, For the relevant confidence level, This is a sequence of historical battery capacity data; This represents the initial number of mode decomposition layers; Historical battery capacity data sequence and the first in the initial historical connotation modal component data sequence One intrinsic modal component Information entropy between them; Historical battery capacity data sequence and the first in the initial historical connotation modal component data sequence One intrinsic modal component The Pearson correlation coefficient between them = +1.

6. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the lithium battery remaining life prediction method according to any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the lithium battery remaining life prediction method according to any one of claims 1-4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the lithium battery remaining life prediction method according to any one of claims 1-4.