Battery life prediction method, terminal equipment and computer readable storage medium
Through the time-series weighted random forest regression framework and dynamic feature engineering, the problem of high complexity in battery life prediction in existing technologies is solved, low-error real-time prediction under complex working conditions is achieved, and the optimization and safety of the battery management system are improved.
Patent Information
- Application Number
- CN202510905782.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-10
AI Technical Summary
The battery life prediction methods based on physical or electrochemical models in the existing technology have high computational complexity and are difficult to meet real-time requirements, resulting in insufficient accuracy in battery life prediction under complex working conditions.
A prediction framework based on time-series weighted random forest regression is adopted, combined with dynamic feature engineering, recursive feature elimination cross-validation and hyperparameter optimization to capture the nonlinear and temporal characteristics of battery degradation, enhance the model's sensitivity to degradation dynamics through hysteresis features and capacity difference features, eliminate redundant features and optimize parameters.
It achieves low-error, real-time battery life prediction under complex working conditions, improves the optimization and safety of the battery management system, and reduces maintenance costs.
Smart Images

Figure CN120761869A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of battery life prediction, and particularly relates to a battery life prediction method, a terminal device and a computer readable storage medium. BACKGROUND
[0002] Ion batteries have become the core energy storage technology for electric vehicles, renewable energy storage systems and portable electronic devices due to their high energy density, long cycle life and low self-discharge rate. Accurate prediction of the remaining useful life (RUL) of lithium ion batteries is of great significance for optimizing battery management systems, extending device operation cycles, improving system safety and reducing maintenance costs.
[0003] In related technologies, methods based on physical or electrochemical models for predicting the life of a battery have high computational complexity and are difficult to meet the real-time requirements of engineering application scenarios, resulting in difficulty in ensuring the accuracy of battery life prediction under complex working conditions. SUMMARY
[0004] The application embodiment provides a battery life prediction method, a terminal device and a computer readable storage medium, which can improve the accuracy of the predicted life of the battery under complex working conditions.
[0005] In a first aspect, the application embodiment provides a battery life prediction method, comprising:
[0006] obtaining first time sequence feature data of a battery to be tested; the first time sequence feature data comprises historical working condition data of the battery to be tested in multiple charging and discharging processes;
[0007] calculating first degradation rate data of the battery to be tested according to the first time sequence feature data; wherein the first degradation rate data represents a charge capacity decline rate of the battery to be tested;
[0008] predicting the life of the battery to be tested according to the first time sequence feature data and the first degradation rate data.
[0009] In the application embodiment, historical working condition data of the battery to be tested in multiple charging and discharging cycles is collected to form the first time sequence feature data. These data have time sequence characteristics and contain original monitoring data such as voltage, current, temperature and capacity changing over time. Since the collected data are historical time sequence working condition data of the battery in the first few cycles, they contain time sequence dynamics and degradation rates, and can identify the impact of different working conditions on the life. Therefore, the above method can improve the predicted life of the battery under complex working conditions.
[0010] In a possible implementation manner of the first aspect, the first time sequence feature data is working condition data of the battery to be tested in multiple backtracking periods, and one backtracking period corresponds to one charging and discharging process.
[0011] Calculating first degradation rate data of the battery to be tested according to the first time series characteristic data includes:
[0012] The rate of change of the charge capacity between every two adjacent traceback cycles is calculated according to the charge data in the first time series characteristic data to obtain first degradation rate data.
[0013] In an embodiment of the present application, by using the operating condition data of multiple charge and discharge retrospective cycles of the battery under test as the first time series characteristic data, and calculating the rate of change of charge capacity in adjacent cycles to obtain the first degradation rate data, it is possible to capture the capacity decay rate of the battery at different stages in an intuitive and quantitative manner. This method, based on the time series data of the actual charge and discharge process, not only fits the real-life battery usage scenario, but also effectively reflects the dynamic evolution of the battery health status through the calculation of the periodic rate of change. It provides critical and reliable data support for battery remaining life prediction, performance evaluation, and fault warning, and helps to promptly detect battery degradation anomalies and optimize battery management strategies.
[0014] In a possible implementation of the first aspect, calculating the rate of change of charge capacity between every two adjacent traceback cycles based on charge data in the first time series feature data to obtain first degradation rate data includes:
[0015] If there are missing values in the first time series feature data, calculating a first statistical value of the operating condition data of an adjacent retrospective period of the first time series feature data with missing values;
[0016] Filling missing values in the first time series feature data according to the first statistical value to obtain filled first time series feature data;
[0017] The rate of change of the charge capacity between every two adjacent traceback cycles is calculated according to the charge data in the padded first time series characteristic data to obtain first degradation rate data.
[0018] In an embodiment of the present application, the missing values are filled by calculating the first statistical value of the operating condition data of the adjacent retrospective cycles of the missing values, thereby ensuring the continuity of the first time series characteristic data, and then accurately calculating the charge capacity change rate of the adjacent cycles to obtain the first degradation rate data, which can avoid the degradation trend analysis deviation caused by data missing and provide complete and reliable time series data support for battery health status assessment.
[0019] In a possible implementation of the first aspect, predicting the life of the battery to be tested according to the first time series characteristic data and the first degradation rate data includes:
[0020] obtaining a first data set; wherein the first data set comprises a first score corresponding to a first time-series feature data and a second score corresponding to a first degradation rate data; the first score and the second score are used to represent the influence degree of the data on the battery life;
[0021] obtaining a score greater than a first preset threshold from the first data set to obtain a second time-series feature data;
[0022] predicting the life of the battery to be detected according to the second time-series feature.
[0023] In the embodiments of the present application, by obtaining a first data set containing influence scores corresponding to time-series features and degradation rates, high-score features greater than a preset threshold are screened to form a second time-series feature data, so as to predict the battery life, focus on key degradation influencing factors, eliminate redundant feature interference, and improve the accuracy and efficiency of life prediction.
[0024] In a possible implementation of the first aspect, obtaining a score greater than a first preset threshold from the first data set to obtain a second time-series feature data, comprises:
[0025] filtering out scores less than a second preset threshold from the first data set to obtain a second data set;
[0026] predicting the life of the battery to be detected according to the second data set to obtain a first prediction result;
[0027] determining the first preset threshold according to the first prediction result;
[0028] obtaining a score greater than the first preset threshold from the second data set to obtain a second time-series feature data.
[0029] In the embodiments of the present application, by filtering out scores less than a second preset threshold from the first data set to form a second data set, predicting the battery life according to the second data set, and dynamically determining the first preset threshold according to the second data set, key features higher than the threshold are screened, adaptive evaluation and screening of feature importance are realized, noise features are eliminated while time-series features having significant influence on life prediction are retained, so as to improve the accuracy and robustness of the prediction model.
[0030] In a possible implementation of the first aspect, determining the first preset threshold according to the first prediction result, comprises:
[0031] predicting the life of the battery to be detected according to the first data set to obtain a second prediction result;
[0032] calculating a difference value between a prediction performance corresponding to the first prediction result and a prediction performance corresponding to the second prediction result;
[0033] if the difference value meets a preset condition, determining the first preset threshold according to the second preset threshold.
[0034] If the difference value does not meet the preset condition, a first preset threshold that meets the preset condition is set; wherein the first preset threshold is greater than the second preset threshold.
[0035] In an embodiment of the present application, by comparing the performance difference between the first prediction result based on the filtered features and the second prediction result based on the full features, the feature screening threshold is dynamically adjusted, and the feature set can be adaptively optimized. While retaining key life influencing factors, the prediction accuracy and model efficiency are balanced, thereby improving the reliability and robustness of battery life prediction.
[0036] In a possible implementation of the first aspect, predicting the life of the battery to be tested according to the second time series feature includes:
[0037] Obtain a trained prediction model; the prediction model includes multiple decision trees, each with a different weight.
[0038] The life of the battery to be tested is predicted according to each decision tree and the weight corresponding to each decision tree, and a life prediction result of the battery to be tested is obtained.
[0039] In an embodiment of the present application, by obtaining a trained prediction model containing multiple decision trees with different weights, an integrated prediction of the battery life is performed based on each decision tree and its corresponding weight. The complementary learning ability of different decision trees for battery degradation characteristics can be utilized to effectively reduce the prediction bias of a single model and improve the accuracy and robustness of the battery life prediction results.
[0040] In a possible implementation of the first aspect, the step of training the prediction model includes:
[0041] Obtain training data for the training battery;
[0042] Input the training data into the prediction model to be trained to obtain the first loss of the prediction model to be trained; wherein the first loss is calculated based on the time decay factor, and the time decay factor is the differentiated weight assigned to the training data based on the time series corresponding to the training data;
[0043] When the first loss does not reach the convergence condition, the parameters of the prediction model to be trained continue to be iteratively trained according to the training data until the first loss reaches the convergence condition. The training is then terminated, and the prediction model to be trained with converged output parameters is the trained prediction model.
[0044] In an embodiment of the present application, by obtaining training data for a training battery and inputting it into the prediction model to be trained, and by assigning differentiated weights to the training data in time series in combination with a time decay factor to calculate the first loss, the model can focus more on recent battery degradation data and effectively capture the nonlinear degradation trend of battery performance over time. Continuously iterating the training model parameters when the loss has not converged until the loss reaches the convergence condition ensures that the model fully learns the battery degradation laws, reducing the noise interference of historical data and improving the real-time and accuracy of the prediction of the current battery state. The final output of the trained model can more accurately adapt to the needs of battery life prediction and provide reliable model support for battery health management.
[0045] In a second aspect, an embodiment of the present application provides a terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a battery life prediction method as described in any one of the first aspects above is implemented.
[0046] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the battery life prediction method as described in any one of the first aspects above.
[0047] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the battery life prediction method of any one of the above-mentioned first aspects.
[0048] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 1 is a flow chart of a battery life prediction method provided in an embodiment of the present application;
[0051] Figure 2 This is a schematic diagram of a process for obtaining first degradation rate data provided in an embodiment of the present application;
[0052] Figure 3 This is a schematic diagram of a process for predicting battery life provided by an embodiment of the present application;
[0053] Figure 4 is a schematic diagram of a flow chart for obtaining a second timing feature provided in an embodiment of the present application;
[0054] Figure 5 is a schematic diagram of a flow chart for determining a first preset threshold value provided in an embodiment of the present application;
[0055] Figure 6 is a schematic diagram of a flow chart for predicting battery life based on second time series characteristic data provided by an embodiment of the present application;
[0056] Figure 7 This is a flow chart of the prediction model training process provided by the embodiment of the present application;
[0057] Figure 8 It is a plurality of working condition data provided by the embodiment of the present application;
[0058] Figure 9 Schematic diagram of a feature importance heat map provided in an embodiment of the present application;
[0059] Figure 10 Schematic diagram of the relationship between the model prediction residual and the key feature variables provided in the embodiment of the present application;
[0060] Figure 11 Schematic diagram of the prediction performance evaluation index provided in the embodiment of the present application;
[0061] Figure 12 1. This is a schematic diagram comparing the training set and the test set of the state of charge and predicted life of the battery provided in an embodiment of the present application;
[0062] Figure 13 This is a schematic diagram comparing the performance of different models provided in the embodiments of the present application;
[0063] Figure 14 This is a structural diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0065] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0066] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0067] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0068] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0069] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.
[0070] Lithium-ion batteries have become the core energy storage technology for electric vehicles, renewable energy storage systems and portable electronic devices due to their advantages such as high energy density, long cycle life and low self-discharge rate. Accurately predicting the remaining useful life (RUL) of lithium-ion batteries is of great significance for optimizing battery management systems, extending equipment operating cycles, improving system safety and reducing maintenance costs.
[0071] The methods based on physical or electrochemical models in related technologies for predicting battery life have high computational complexity and are difficult to meet engineering application scenarios with high real-time requirements, resulting in difficulty in ensuring the accuracy of battery life prediction under complex working conditions.
[0072] In order to solve the problems in the above-mentioned related technologies, an embodiment of the present application provides a battery life prediction method, which captures the nonlinear and temporal characteristics of battery degradation by developing a prediction framework based on time-series weighted random forest regression, combined with dynamic feature engineering, recursive feature elimination cross-validation and hyperparameter optimization. The hysteresis characteristics and capacity difference characteristics are used to enhance the sensitivity of the model to attenuation dynamics, and redundant features are eliminated through recursive feature elimination cross-validation to improve efficiency, and random search optimization parameters are used to ensure prediction accuracy. The present invention can achieve low-error, real-time prediction under complex working conditions, providing reliable support for the optimization and safety improvement of battery management systems.
[0073] See also Figure 1 , is a flow chart of a battery life prediction method provided in an embodiment of the present application. As an example and not a limitation, the method may include the following steps:
[0074] S101, obtaining first time series characteristic data of a battery to be tested; the first time series characteristic data includes historical operating condition data of the battery to be tested during multiple charge and discharge processes.
[0075] In an embodiment of the present application, the battery to be tested refers to a target battery for which remaining life (RUL) prediction is required, which may be any type of lithium-ion battery such as an electric vehicle battery or an energy storage system battery. By collecting the historical operating condition data generated by the battery to be tested in multiple charge and discharge cycles, a basic feature set with time series characteristics is formed. Among them, the "first time series feature data" emphasizes that the data is an initial input with a chronological order, covering the electrical parameters (such as voltage, current, internal resistance), environmental parameters (such as temperature) and health parameters (such as capacity, SOH) of the battery in different charge and discharge stages. These data are strictly sorted by the number of cycles or timestamps, and can reflect the degradation trajectory of battery performance over time. The "multiple charge and discharge processes" require that the data cover enough cycle periods to capture the complete dynamics from normal operation to performance degradation.
[0076] This application adopts a dynamic engineering layer framework that uses a 7-cycle multi-scale sliding window mechanism to generate hysteresis features to capture the temporal dynamic relationship of parameters such as voltage, current, and temperature. Specifically, the mechanism uses 7 cycles as the fixed length of the sliding window, moves backward along the time series, and extracts the historical operating condition data within each window to generate the characteristic values (first temporal features) of the corresponding parameters at different hysteresis periods (such as lag 1 to 7 cycles).
[0077] For example, for the voltage parameters of the current cycle, the voltage values of the previous 1 to 7 cycles can be obtained through this window as hysteresis features (first time series feature data). These features can reflect the changing trends and time series dependencies of the voltage parameters in the recent history. In this way, the dynamic feature engineering layer can effectively capture the dynamic change patterns of battery operating parameters in the time dimension, providing more comprehensive and more time-related feature inputs for subsequent battery remaining life prediction, thereby improving the prediction model's ability to characterize the battery degradation process and the prediction accuracy.
[0078] S102 , calculating first degradation rate data of the battery to be tested based on the first time series characteristic data; wherein the first degradation rate data represents a rate of decrease of the charge capacity of the battery to be tested at different periods.
[0079] In the embodiment of the present application, the purpose of the first degradation rate data is to calculate the charge capacity decrease rate of the battery in different periods of use, that is, the capacity attenuation per unit time (or unit number of cycles), such as "capacity decreases by 0.1% per cycle."
[0080] In one embodiment, the first time series characteristic data is operating condition data of the battery under test within multiple backtracking cycles, where one backtracking cycle corresponds to one charge and discharge process; step S102 includes:
[0081] The rate of change of the charge capacity between every two adjacent traceback cycles is calculated according to the charge data in the first time series characteristic data to obtain first degradation rate data.
[0082] In the embodiments of the present application, the first time series feature refers to the operating condition data of the battery under test within multiple backtracking cycles, where each backtracking cycle corresponds to a complete charge and discharge process. For example, the first backtracking cycle records the voltage, current, capacity, and other data of the first charge and discharge cycle, the second backtracking cycle records the data of the second charge and discharge cycle, and so on, forming a chronological sequence.
[0083] The first degradation rate data can be extracted from the first time series feature data to extract the charge capacity value of each lookback cycle (such as the actual available capacity after each charge and discharge) and arranged in cycle order. For example, the capacity of the nth lookback cycle is Cn, and the capacity of the n+1th cycle is Cn+1. The capacity change rate between two adjacent lookback cycles is calculated using the formula:
[0084]
[0085] This rate of change directly reflects the capacity attenuation of the battery within a single charge and discharge cycle. For example:
[0086] If the capacity change rate between adjacent cycles is 0.05%, it means that the capacity of the battery decreases by 0.05% of the initial capacity every time the battery completes a charge or discharge cycle. This can be used to determine the speed of degradation.
[0087] In this method, the operating condition data of the battery under test over multiple charge and discharge cycles is used as the first time-series characteristic data. Based on this data, the rate of change of charge capacity between adjacent cycles is calculated to obtain the first degradation rate data. This method can capture the rate of capacity decay of the battery at different stages in an intuitive and quantitative manner. This method, based on time-series data from actual charge and discharge processes, not only aligns with the real-world battery usage scenarios, but also effectively reflects the dynamic evolution of the battery's health status through the calculation of periodic rate of change. This provides critical and reliable data support for battery remaining life prediction, performance evaluation, and fault warning, helping to promptly detect battery degradation anomalies and optimize battery management strategies.
[0088] In one embodiment, see Figure 2 , is a flow chart of obtaining first degradation rate data provided by an embodiment of the present application, such as Figure 2 Shown, including:
[0089] S201: If there are missing values in the first time series feature data, calculate a first statistical value of the operating condition data of adjacent retrospective periods of the first time series feature data with missing values.
[0090] In the embodiments of the present application, during multiple charge and discharge lookback cycles, the battery may lose operating condition data (such as voltage, current, and capacity) for a certain cycle due to sensor failure, data recording interruption, etc. For example, the capacity data for the fifth lookback cycle is not recorded, resulting in a missing value.
[0091] To ensure the continuity of characteristic data, a two-way filling method can be used to handle missing values. This method calculates the first statistical value of the operating condition data from adjacent retrospective periods to handle missing values. The core logic is to use the valid data from the periods adjacent to the missing value for statistical analysis to reasonably estimate the missing value and maintain the continuity of the characteristic sequence. The first statistical value is a statistic (such as the mean or median) calculated based on the valid data from the periods adjacent to the missing value.
[0092] S202 : Fill missing values in the first time series feature data according to the first statistical value to obtain filled first time series feature data.
[0093] In an embodiment of the present application, missing data is filled by the first statistical value, so that the originally incomplete first time series feature data is converted into a continuous complete sequence, providing reliable input for subsequent degradation analysis. The calculated first statistical value is filled into the corresponding missing cycle to form a complete time series feature sequence. For example: the original sequence is [98, NaN, 95, NaN, 92]. After calculating the statistics of adjacent cycles, it is filled as [98, 96.5, 95, 93.5, 92]. The second cycle is filled with the mean of the first and third cycles, and the fourth cycle is filled with the mean of the third and fifth cycles. The sequence data after the missing values are filled is the first time series feature data after filling.
[0094] S203 , calculating a rate of change of charge capacity between every two adjacent traceback cycles based on the charge data in the padded first time series feature data to obtain first degradation rate data.
[0095] In this embodiment, the integrity and continuity of the battery's operating condition data over multiple charge and discharge retrospective cycles are ensured by using the first time series characteristic data filled with bidirectional or statistical values. Based on this, the charge capacity data is extracted, and the capacity change magnitude (first degradation rate data) between each two adjacent retrospective cycles is calculated in chronological order.
[0096] In the above method, the missing values are filled by calculating the first statistical value of the operating condition data of the adjacent retrospective cycle of the missing values, thereby ensuring the continuity of the first time series characteristic data, and then accurately calculating the charge capacity change rate of the adjacent cycles to obtain the first degradation rate data. This can avoid the deviation in degradation trend analysis caused by missing data and provide complete and reliable time series data support for battery health status assessment.
[0097] S103: predicting the life of the battery to be tested according to the first time series characteristic data and the first degradation rate data.
[0098] In the embodiment of the present application, the first time series characteristic data (such as capacity and voltage at each cycle) obtained and the capacity change rate of adjacent cycles (i.e., the first degradation rate) calculated therefrom are used to jointly reflect the historical degradation trajectory and speed of the battery. By analyzing the trend of the historical degradation rate (such as whether the degradation is accelerated) and combining it with the battery health threshold (such as the capacity decaying to 80% of the initial value is considered the end of life), the remaining number of cycles or time from the current state to the end of life is estimated, thereby achieving life prediction.
[0099] It should be noted that, in order to enhance the feature characterization capability, the first time series feature data includes statistics such as the data mean and standard deviation calculated based on historical operating condition data.
[0100] In one embodiment, see Figure 3, is a schematic diagram of a process for predicting battery life provided by an embodiment of the present application, wherein step S103 includes:
[0101] S301, obtaining a first data set; wherein the first data set includes a first score corresponding to first time series feature data and a second score corresponding to first degradation rate data; the first score and the second score are used to characterize the degree of impact of the data on battery life.
[0102] In an embodiment of the present application, the first score corresponding to the first timing characteristic data reflects the degree of influence of timing characteristics such as voltage, current, and temperature on the battery life, and the second score corresponding to the first degradation rate data quantifies the contribution of degradation indicators such as capacity decay rate to the life.
[0103] The first and second scores are quantitative indicators obtained through feature importance assessment. Higher values indicate a greater impact of the corresponding data on battery life prediction. A feature importance heat map can be used to obtain the score corresponding to each feature data, namely the first dataset. This heat map calculates the importance score of each feature using a machine learning model (such as a random forest) and displays the contribution of different data to the prediction results in a visual manner (such as color depth). For example, the darker the color, the greater the impact of the corresponding feature (such as the capacity hysteresis feature) on life prediction.
[0104] For the first time series feature data (such as the time series of voltage and current), the model generates a corresponding first score by evaluating its information gain or permutation importance in the prediction. For example, the capacity lag 7 cycle feature has the darkest color in the heat map and its first score is 0.35, indicating that it has the greatest impact on life prediction. For the first degradation rate data (such as the rate of change of capacity between adjacent cycles), the model evaluates its contribution to the prediction results and generates a second score. For example, the second score of the degradation rate feature at a certain stage is 0.25, indicating that its impact on life prediction is second only to the capacity time series feature.
[0105] S302: Obtain a score greater than a first preset threshold from the first data set to obtain second time series feature data.
[0106] In this embodiment of the present application, the first data set includes a first score corresponding to the first time series feature data (e.g., the importance score of a time series feature such as voltage or capacity) and a second score corresponding to the first degradation rate data (e.g., the importance score of the capacity change rate). By setting a "first preset threshold" (e.g., 0.2), data with a score greater than the threshold is filtered out to obtain more focused second time series feature data, that is, only features with a high degree of impact on battery life are retained.
[0107] Among them, the first preset threshold is determined according to the time series feature selection layer provided in this application. The time series feature selection layer adopts improved recursive feature elimination cross-validation, combined with time series cross-validation to prevent information leakage, evaluates feature importance through random forest, and iteratively eliminates low-contribution features (feature data with lower scores) until the model performance drops below the threshold. At this time, the first preset threshold can be determined.
[0108] In one embodiment, see Figure 4 , is a flowchart of obtaining the second timing characteristics provided by an embodiment of the present application, step S302 includes:
[0109] S401: Filter out scores smaller than a second preset threshold from the first data set to obtain a second data set.
[0110] In this embodiment of the present application, the first dataset contains importance scores (i.e., first and second scores) corresponding to various features (e.g., timing features and degradation rate features). These scores quantify the impact of the data on battery life. By setting a "second preset threshold" (e.g., 0.15, which can be the minimum score in the first dataset), features in the dataset with scores less than the threshold are filtered out, i.e., the minimum score in the first dataset is eliminated, retaining only the features with high impact, thereby obtaining a more streamlined second dataset.
[0111] S402: Predict the life of the battery to be tested according to the second data set to obtain a first prediction result.
[0112] In the embodiment of the present application, the second data set is a set of key features obtained by filtering out the lowest-scoring features from the first data set. It contains only timing features (such as high-scoring capacity and voltage hysteresis features) and degradation rate features (such as high-scoring capacity change rates) that have a significant impact on battery life, eliminating redundant or irrelevant data. The battery life is predicted using the second data set, such as by inputting the feature data corresponding to the second data set into a corresponding model to obtain a predicted result for the battery life (i.e., the first predicted result).
[0113] S403: Determine a first preset threshold according to the first prediction result.
[0114] In the embodiment of the present application, the first preset threshold is used to filter out high-scoring feature values (i.e., features that have a significant impact on battery life) from the first data set, and its value directly affects the feature composition of the second data set. For example, when filtering the first data set as described above, a second preset threshold can be initially set. The second preset threshold can be set to the minimum score in the first data set. If the minimum value in the first data set is 0.2, the second preset threshold is set to 0.2, and the scores in the first data set that are lower than the first preset threshold are eliminated (i.e., the minimum value is eliminated). If the minimum value is 0.3, the second preset value can be set to 0.3.
[0115] After removing the minimum value, the lifespan prediction is performed using the removed eigenvalues, and the prediction performance is then evaluated using a time series cross-validation method. If the first prediction result differs significantly from the actual result, further eigenvalue screening is required, i.e., a new preset threshold (the first preset threshold) is reset until the key feature data is screened out and the error between the predicted battery lifespan result and the actual result using the screened key features is within a preset range.
[0116] S404: Obtain a score greater than a first preset threshold from the second data set to obtain second time series feature data.
[0117] In the embodiment of the present application, after determining the first preset threshold, scores greater than the second preset threshold are screened out from the second data set, and the corresponding feature data is the second time series feature data.
[0118] In the above method, a second data set is formed by filtering out the scores below the second preset threshold in the first data set, and the battery life is predicted based on this. The first preset threshold is dynamically determined accordingly, and then the key features above the threshold are screened out. This can achieve adaptive evaluation and screening of feature importance, while removing noise features while retaining time series features that have a significant impact on life prediction, thereby improving the accuracy and robustness of the prediction model.
[0119] In one embodiment, see Figure 5 , is a schematic diagram of a flow chart for determining a first preset threshold value provided in an embodiment of the present application, wherein step S403 includes:
[0120] S501 : Predicting the life of a battery to be tested according to a first data set to obtain a second prediction result.
[0121] In this embodiment, the first dataset contains the importance scores for all time series features (e.g., voltage and capacity) and degradation rate features, without removing any low-scoring features. These scores quantify the impact of each data point on battery life, and all data points are retained regardless of their impact.
[0122] The battery life is directly predicted using the first data set to obtain a prediction result (i.e., a second prediction result), and the battery prediction performance is determined based on the prediction result of the battery life using the characteristic data before and after the special screening. The first preset threshold can be determined based on the prediction performance.
[0123] S502: Calculate a difference between the prediction performance corresponding to the first prediction result and the prediction performance corresponding to the second prediction result.
[0124] In the embodiment of the present application, the evaluation dimensions of the prediction performance include root mean square error, mean absolute error, etc., which are used to measure the deviation between the predicted value and the actual lifespan.
[0125] For example, if the RMSE of the first prediction result is 4.2 cycles and the RMSE of the second prediction result is 5.8 cycles, the difference value = 4.2-5.8 = -1.6, indicating that the error is reduced by 1.6 cycles after the feature is screened, and the performance is improved.
[0126] S503: If the difference value meets the preset condition, determine the first preset threshold value according to the second preset threshold value.
[0127] In the embodiment of the present application, a performance degradation threshold is set. When the performance degradation rate satisfies:
[0128] ΔM (k) =M (k-1) -M (k) <-ε(2)
[0129] It can be considered that the performance of the model has deteriorated significantly, where M k is the prediction performance after feature screening (first prediction performance), M k-1 is the prediction performance of the previous feature screening (the second prediction performance), ε is the descending threshold, and the feature subset corresponding to k-1 is retained as the input feature for the final model prediction.
[0130] In the above example, when the second preset threshold is the minimum score value, such as 0.2, the prediction performance of the model deteriorates after 0.2 is eliminated, that is, the feature data before the score is eliminated is retained as the input data of the final model. Therefore, the second preset threshold can be set to 0, that is, the first preset threshold is 0, and the current feature data is already the optimal feature data, and there is no need to screen the features.
[0131] S504: If the difference value does not meet the preset condition, set a first preset threshold that meets the preset condition; wherein the first preset threshold is greater than the second preset threshold.
[0132] In the embodiment of the present application, if the error between the first prediction performance and the second prediction performance does not meet the above conditions, that is, does not meet ΔM (k) =M (k-1) -M (k) <-ε, then the first preset condition needs to be reset to continue feature screening, and the feature value with the smallest score in the second data set needs to be eliminated.
[0133] After resetting the first preset threshold and eliminating scores less than the first preset threshold in the second data set, a third data set is obtained, and a prediction result of the battery life is obtained based on the third data set. According to the above comparison, if the error between the prediction result obtained based on the feature data corresponding to the third data set and the prediction result obtained based on the feature data corresponding to the second data set meets the above conditions, the feature values are screened according to the first preset conditions. If not, the first preset threshold is continued to be set until the above preset conditions are met according to the setting of the first preset threshold.
[0134] In the above method, by comparing the performance difference between the first prediction result based on the filtered features and the second prediction result based on the full set of features, the feature screening threshold is dynamically adjusted, and the feature set can be adaptively optimized. While retaining key life influencing factors, the prediction accuracy and model efficiency are balanced, thereby improving the reliability and robustness of battery life prediction.
[0135] S404: Obtain a score greater than a first preset threshold from the second data set to obtain second time series feature data.
[0136] In an embodiment of the present application, if the set first preset threshold satisfies the above conditions, the characteristic data corresponding to the score before eliminating the first preset threshold is retained as the final predicted life data (i.e., the second time series characteristic data). For example, if the set first thresholds are preset to 0.3 and 0.4 respectively, and the prediction result obtained by the corresponding characteristic data after eliminating the 0.3 score does not meet the above conditions, the 0.4 score is continued to be eliminated. After eliminating the 0.4 score, the prediction result of the corresponding characteristic data meets the above conditions, the previous characteristic data is retained as the characteristic data with a score greater than 0.3 as the second time series characteristic data.
[0137] In the above method, a second data set is formed by filtering out the scores below the second preset threshold in the first data set, and the battery life is predicted based on this. The first preset threshold is dynamically determined accordingly, and then the key features above the threshold are screened out. This can achieve adaptive evaluation and screening of feature importance, while removing noise features while retaining time series features that have a significant impact on life prediction, thereby improving the accuracy and robustness of the prediction model.
[0138] S303: Predict the life of the battery to be tested according to the second time series feature.
[0139] In an embodiment of the present application, the "second time series feature" is a high-scoring feature (i.e., a feature whose impact on battery life is greater than a first preset threshold) screened out from the first data set. By using this time series feature data to predict the battery life, a relatively accurate prediction result can be obtained.
[0140] In the above method, by obtaining a first data set containing timing features and impact scores corresponding to degradation rates, high-score features greater than a preset threshold are screened out to form a second timing feature data, so as to predict battery life. This can focus on key degradation influencing factors, eliminate redundant feature interference, and improve the accuracy and efficiency of life prediction.
[0141] In one embodiment, see Figure 6 , is a flow chart of predicting battery life based on second time series characteristic data provided by an embodiment of the present application, step S303 includes:
[0142] S601, obtaining a trained prediction model; wherein the prediction model includes multiple decision trees, and each decision tree has a different corresponding weight.
[0143] In an embodiment of the present application, when using the second time series feature data to perform life prediction, the second time series feature data can be input into a trained prediction model to obtain a prediction result of the battery life.
[0144] Among them, the prediction model adopted in this application is an adaptive modeling model, which is a regression model built based on a random forest model, wherein the random forest model is an integrated learning method, which builds multiple weak learners based on the decision tree (DT), and improves the generalization ability of the overall model through an integrated strategy. Its core idea comes from the use of self-service sampling technology to generate multiple different training sets, train multiple independent decision trees, and ultimately reduce the overfitting risk of a single decision tree through an integrated mechanism, thereby improving the stability and robustness of the model. The core advantage of random forests is that they reduce overfitting and show strong robustness when processing high-dimensional data, but they still have shortcomings in capturing sequence dependencies and processing extremely unbalanced data. The mathematical formula of the random forest regression model is as follows,
[0145]
[0146] in, Predicted i th The output of the input sample, T is the total number of decision trees in the forest. t (X i ) from t th Decision tree input X i Prediction. The prediction model provided in this application assigns weights to predictions for individual trees based on their accuracy during validation. The prediction becomes:
[0147]
[0148] t th Tree's ω t The weight is proportional to its accuracy. It is calculated as:
[0149]
[0150] By integrating the sequence feature data generated by dynamic feature engineering, the prediction model can effectively utilize the dynamically constructed features to enhance the modeling ability of the battery status.
[0151] X input =[P,SOC,V,I,T] (6)
[0152] Where P is the second time series data selected by the above feature. State of Charge (SOC) is a key indicator for measuring the current power of a lithium-ion battery relative to its maximum capacity, as shown in formula (7). It reflects the remaining energy level of the battery at a certain moment. Accurate estimation of SOC is of great significance to the battery management system. It is directly related to energy scheduling, charge and discharge control, and the safety of system operation. The formula is as follows:
[0153]
[0154] Where SOC(t) is the state of charge at time t, and SOC(t0) is the initial state of charge at time t0.
[0155] Q normal is the nominal capacity of the battery. The instantaneous current is I(t), where discharge is positive and charge is negative.
[0156] The state of health (SOH) is an important parameter for measuring the degree of battery performance degradation. It is usually defined as the ratio of the current maximum available capacity of the battery to its initial capacity, as shown in formula (2). SOH can reflect the battery's service life and performance change trend, and is the basis for battery maintenance and remaining service life prediction. The SOH formula is as follows:
[0157]
[0158] Among them, the capacity of the battery at time t is C current (t), the original capacity or nominal capacity of the battery is C normal .
[0159] Remaining useful life refers to the time or number of cycles a battery can continue to operate under its current operating and health conditions before its performance degrades to an unacceptable threshold. RUL is a core parameter for predictive maintenance and can provide decision support for battery replacement, scheduling, and fault warning. It makes predictions by analyzing the correlation between degradation variables such as temperature, voltage, current, SOC, and SOH, as shown in the formula:
[0160] RUL=f(SOC(t),SOH(t),temperature(t),current(t),voltage(t))(9)
[0161] This function is used to characterize the mapping relationship between degradation variables and remaining service life. The prediction model provided in this application can effectively learn this function form because it has good nonlinear modeling capabilities and can adapt to the relationship between complex input features and RUL. The prediction model extracts knowledge from historical data and comprehensively considers multi-dimensional characteristics such as battery health status indicators and operating conditions to achieve more accurate life prediction. Based on this, mathematical expressions and training processes can be further constructed to complete the establishment and optimization of the model, so as to obtain the optimized model, namely the above formula (4).
[0162] S602 : Predicting the life of the battery to be tested according to each decision tree and the weight corresponding to each decision tree to obtain a life prediction result of the battery to be tested.
[0163] In this embodiment of the present application, each decision tree independently determines the battery's second time series characteristics (such as the filtered capacity and voltage characteristics) and outputs a lifespan prediction value. For example, Tree 1 predicts 80 cycles remaining, Tree 2 predicts 85 cycles remaining, and Tree 3 predicts 78 cycles remaining.
[0164] The prediction results of all decision trees are weighted and summed to obtain the final prediction result: life expectancy prediction result = ∑i = 1n (prediction value of the i-th tree × weight of the i-th tree), where n is the total number of decision trees and the sum of the weights is usually 1 (for example, if tree 1 has a weight of 0.3, tree 2 has a weight of 0.4, and tree 3 has a weight of 0.3, the result is 80×0.3+85×0.4+78×0.3=81.4 cycles).
[0165] In the above method, by obtaining a trained prediction model containing multiple decision trees with different weights, an integrated prediction of battery life is performed based on each decision tree and its corresponding weight. The complementary learning ability of different decision trees on battery degradation characteristics can be utilized to effectively reduce the prediction bias of a single model and improve the accuracy and robustness of the battery life prediction results.
[0166] In one embodiment, see Figure 7 , is a flowchart of the prediction model training provided by the embodiment of the present application, such as Figure 7 As shown, the training steps of the prediction model include:
[0167] S701: Obtain training data for a training battery.
[0168] In the embodiments of the present application, "training battery" refers to historical battery samples used for model training (such as multiple batteries with known lifespans), and "training data" refers to a set of features extracted from these batteries. The goal is to enable the model to learn the battery degradation law through training data. The training data is obtained by screening out key features that have a great impact on life prediction from original time series data (such as voltage and capacity charge and discharge cycle data) through methods such as feature importance evaluation (such as heat map analysis) and threshold screening (such as a first preset threshold), forming "multiple time series feature data" (such as capacity hysteresis features, degradation rate features, etc.).
[0169] The method for screening the training data is the same as the method for screening the second time series feature data, and will not be described in detail here.
[0170] S702: Input the training data into the prediction model to be trained to obtain a first loss of the prediction model to be trained; wherein the first loss is calculated based on a time decay factor, and the time decay factor is a differentiated weight assigned to the training data based on a time series corresponding to the training data.
[0171] In the embodiment of the present application, the time-sensitive loss function is considered, and a time decay factor is introduced on the basis of the standard mean error, such as formula (9), so that the model pays more attention to the recent prediction accuracy.
[0172]
[0173] Where λ = 0.1 is the attenuation coefficient and T is the total number of cycles.
[0174] According to each training data, the prediction model is input according to the above formula (10) to obtain the first loss corresponding to the training sample.
[0175] S703: When the first loss does not reach the convergence condition, the parameters of the prediction model to be trained are continued to be iteratively trained according to the training data until the first loss reaches the convergence condition. The training is then terminated, and the prediction model to be trained with converged output parameters is the trained prediction model.
[0176] In an embodiment of the present application, when training a battery life prediction model, the training data is first input into the model to be trained, and a first loss weighted by a time decay factor is calculated to measure the deviation between the predicted value and the actual life. If the loss does not reach the preset convergence condition (such as the loss value is too small or no longer decreases significantly), the model parameters are iteratively optimized based on the training data (for example, the neural network weights or decision tree weights are adjusted by gradient descent), and the loss is recalculated after each round of iteration to determine whether it has converged. When the loss finally meets the convergence condition, the training process ends. At this time, the model whose parameters no longer change significantly is the trained prediction model, which can be used for actual battery life prediction.
[0177] In this method, by obtaining training data from the training battery and inputting it into the prediction model to be trained, and then assigning differentiated weights to the training data in time series in combination with a time decay factor to calculate the first loss, the model can focus more on recent battery degradation data and effectively capture the nonlinear degradation trend of battery performance over time. Continuously iterating the training model parameters until the loss reaches convergence conditions while the loss has not converged ensures that the model fully learns the battery degradation patterns, reducing the noise interference of historical data and improving the real-time and accuracy of the battery's current state prediction. The final output of the trained model can more accurately adapt to the needs of battery life prediction, providing reliable model support for battery health management.
[0178] The key point of this application is to build a prediction framework that takes into account both accuracy and generalization capabilities by integrating feature engineering and improved machine learning algorithms. This framework uses multi-source data of the battery during actual operation, including voltage, current, temperature, historical cycle count, SOC change trend, etc., and extracts core information about battery state changes by dynamically constructing statistical features and time series features. At the algorithm level, an enhanced random forest model is introduced, combined with mechanisms such as sample weight allocation, adaptive selection of feature importance, and redundant feature pruning, which effectively improves the robustness and nonlinear modeling capabilities of the model, making it adaptable to different battery types and usage conditions.
[0179] The experimental data of this application are all collected from actual battery applications, see Figure 8 , are multiple operating condition data provided in the embodiments of the present application. By analyzing the changes in multiple characteristics of the battery under different cycle numbers, it can help analyze the performance trend of the battery during the charging and discharging process, especially the battery health status and capacity attenuation as the cycle number increases.
[0180] To verify the performance of the improved random forest algorithm, this study conducted a comprehensive evaluation of the model through feature importance heatmaps and residual analysis. Figure 9 , is a schematic diagram of the feature importance heat map provided in the embodiment of the present application. The feature importance heat map clearly shows the contribution of each feature variable to the RUL prediction. Among them, the battery capacity-related features show the highest importance score, which is highly consistent with the physical understanding of the aging mechanism of lithium-ion batteries, indicating that capacity decay is the most critical indicator of battery health. Current and voltage-related features also show a certain degree of importance, reflecting the impact of changes in electrochemical parameters during charging and discharging on battery aging.
[0181] See also Figure 10, is a schematic diagram of the relationship between the model prediction residuals and key characteristic variables provided in the examples of this application. The residual plot shows that most prediction errors are concentrated near zero and there is no obvious pattern distribution, indicating that the model maintains good prediction stability in different eigenvalue intervals. It is worth noting that in the high-capacity interval close to the new battery state, the residual fluctuation is slightly greater than that in the low-capacity interval. This may be due to the more complex nonlinear characteristics of performance degradation in the new battery stage.
[0182] MAE, RMSE and R for battery RUL prediction 2 It is a commonly used evaluation metric. MAE measures the mean absolute deviation between the predicted value and the actual value. It can intuitively reflect the size of the prediction error and has little impact on outliers.
[0183]
[0184] Among them, y i is the true value, is the predicted value, is the absolute error of each data point. RMSE calculates the square root of the error, giving higher weights to large errors. It can more sensitively reveal the performance of the model under large deviations. The improved random forest aims to minimize the prediction of RMSE:
[0185]
[0186] Among them, y i Represents the i th The true value of the target variable for each sample. Represents the predicted value. N represents the total number of samples. In addition, the model also evaluates R 2 Score to quantify the proportion of variance, R 2 It is an important indicator for evaluating the goodness of model fit. It reflects the degree to which the model explains the variability of actual data. The closer it is to 1, the better the model captures the laws of the data.
[0187]
[0188] See also Figure 11 , is a bar diagram of the prediction performance evaluation indicators provided in the embodiment of the present application. Combining these three indicators can comprehensively evaluate the accuracy and reliability of the energy storage battery RUL prediction model, helping to optimize the prediction capability of the battery management system.
[0189] See also Figure 12, is a schematic diagram comparing the training set and test set of the battery state of charge and predicted life provided in the embodiment of this application. This study integrates advanced machine learning techniques to propose an innovative hybrid modeling approach to address the challenges of predictive maintenance of lithium-ion batteries. By circumventing the limitations of traditional methods, we adopted a time-weighted random forest algorithm to significantly improve the estimation accuracy, adaptability, and efficiency of RUL and SOH. This framework not only provides a real-time intervention solution for battery health diagnosis, but also promotes sustainability and reliability in the fields of renewable energy applications and electric vehicles.
[0190] See also Figure 13 , is a schematic diagram comparing the performance of different models provided in the examples of this application. In the experiment, the TSRF algorithm significantly outperformed other methods and achieved the lowest RMSE among all models. Compared with decision tree, standard random forest and optimized random forest, the TSRF training set has an RMSE of 1.27, a MAE of 0.65, and an R 2 The value is 0.9998, the RMSE of the test set is 0.26, the MAE is 0.20, and R 2 The value is 0.9997, demonstrating its superiority in capturing the complex nonlinear relationships in battery operation. Through robust residual analysis, the TSRF algorithm successfully manages sparse and chaotic data. This study demonstrates that the TSRF algorithm is a core component of this predictive maintenance framework and provides a positive impetus for the development of battery management strategies. The results not only extend the service life of lithium-ion batteries but also ensure their safety and efficiency, addressing key challenges in sustainable energy systems. Future research will focus on optimizing computational efficiency, especially for applications in large-scale industrial deployment, and exploring the applicability of this framework to different battery chemistries.
[0191] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0192] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0193] Figure 14 This is a schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Figure 14 As shown, the terminal device 14 of this embodiment includes: at least one processor 140 ( Figure 14 Only one is shown in the figure) a processor, a memory 141, and a computer program 142 stored in the memory 141 and executable on at least one processor 140. When the processor 140 executes the computer program 142, the steps of any of the above-mentioned battery life prediction method embodiments are implemented.
[0194] The terminal device can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 14 It is merely an example of the terminal device 14 and does not constitute a limitation on the terminal device 14. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0195] The processor 140 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0196] In some embodiments, the memory 141 may be an internal storage unit of the terminal device 14, such as a hard disk or memory of the terminal device 14. In other embodiments, the memory 141 may also be an external storage device of the terminal device 14, such as a plug-in hard disk equipped on the terminal device 14, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. Furthermore, the memory 141 may include both an internal storage unit of the terminal device 14 and an external storage device. The memory 141 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of a computer program. The memory 141 may also be used to temporarily store data that has been output or is about to be output.
[0197] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0198] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0199] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable medium cannot be an electric carrier signal or a telecommunication signal.
[0200] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0201] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.
[0202] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal devices and methods can be implemented in other ways. For example, the device / terminal device embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0203] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0204] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A battery life prediction method, characterized in that: The method comprises: Acquire first time series characteristic data of the battery to be tested; the first time series characteristic data includes historical operating condition data of the battery to be tested during multiple charge and discharge processes; Calculating first degradation rate data of the battery to be tested based on the first time series characteristic data; wherein the first degradation rate data represents a rate of decrease in charge capacity of the battery to be tested at different periods; The life of the battery to be tested is predicted according to the first time series characteristic data and the first degradation rate data.
2. The life prediction method according to claim 1, characterized in that: The first time series characteristic data is the operating condition data of the battery under test within multiple backtracking cycles, where one backtracking cycle corresponds to one charge and discharge process; The calculating the first degradation rate data of the battery to be tested according to the first time series characteristic data includes: The first degradation rate data is obtained by calculating the rate of change of the charge capacity between every two adjacent traceback cycles according to the charge data in the first time series characteristic data.
3. The battery life prediction method according to claim 2, wherein: The calculating the rate of change of charge capacity between every two adjacent traceback cycles based on the charge data in the first time series characteristic data to obtain the first degradation rate data includes: If there are missing values in the first time series feature data, calculating a first statistical value of the operating condition data of an adjacent retrospective period of the first time series feature data with missing values; filling missing values in the first time series feature data according to the first statistical value to obtain the filled first time series feature data; The change rate of the charge capacity between every two adjacent traceback cycles is calculated based on the charge data in the padded first time series feature data to obtain the first degradation rate data.
4. The battery life prediction method according to claim 1, wherein: The predicting the life of the battery to be tested according to the first time series characteristic data and the first degradation rate data includes: Obtaining a first data set; wherein the first data set includes a first score corresponding to the first time series feature data and a second score corresponding to the first degradation rate data; the first score and the second score are used to represent the degree of impact of the data on battery life; Obtaining a score greater than a first preset threshold from the first data set to obtain second time series feature data; The life of the battery to be detected is predicted according to the second time series feature.
5. The battery life prediction method according to claim 4, wherein: The step of obtaining a score greater than a first preset threshold from the first data set to obtain second time series feature data includes: Filtering out scores less than a second preset threshold from the first data set to obtain a second data set; Predicting the life of the battery to be tested according to the second data set to obtain a first prediction result; determining the first preset threshold according to the first prediction result; A score greater than the first preset threshold is obtained from the second data set to obtain the second time series feature data.
6. The battery life prediction method according to claim 5, wherein: The determining the first preset threshold according to the first prediction result includes: Predicting the life of the battery to be tested according to the first data set to obtain a second prediction result; Calculating a difference between the prediction performance corresponding to the first prediction result and the prediction performance corresponding to the second prediction result; If the difference value satisfies a preset condition, determining the first preset threshold value according to the second preset threshold value; If the difference value does not meet the preset condition, a first preset threshold that meets the preset condition is set; wherein the first preset threshold is greater than the second preset threshold.
7. The battery life prediction method according to claim 6, wherein: The predicting the life of the battery to be detected according to the second time series feature includes: Obtaining a trained prediction model; wherein the prediction model includes multiple decision trees, and each decision tree has a different corresponding weight; The life of the battery to be detected is predicted according to each decision tree and the weight corresponding to each decision tree to obtain a life prediction result of the battery to be detected.
8. The battery life prediction method according to claim 7, wherein: The training steps of the prediction model include: Obtain training data for the training battery; Inputting the training data into the prediction model to be trained to obtain a first loss of the prediction model to be trained; wherein the first loss is calculated based on a time decay factor, and the time decay factor is a differentiated weight assigned to the training data based on a time series corresponding to the training data; When the first loss does not reach the convergence condition, the parameters of the prediction model to be trained are continued to be iteratively trained according to the training data until the first loss reaches the convergence condition, and the training is terminated. The prediction model to be trained with converged output parameters is the prediction model after training.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Intelligent life prediction method and system for PDS ball valve
CN121071759A