Battery life prediction method based on pre-training model guided genetic programming

By using a pre-trained Transformer model to guide genetic programming, a battery life prediction model is generated, which solves the problems of insufficient accuracy and interpretability in existing methods, achieves efficient and low-cost battery life prediction, and provides a clear physical interpretation.

CN121389835AActive Publication Date: 2026-01-23SOUTH CHINA UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511971259.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-01-23
Estimated Expiration
2045-12-25

AI Technical Summary

Technical Problem

Existing battery life prediction methods suffer from insufficient accuracy and poor interpretability, especially in scenarios with few samples. Furthermore, data-driven methods rely on high data costs and black-box models, making it difficult to provide clear physical explanations.

Method used

A genetic programming method based on a pre-trained Transformer model is adopted. By combining the generated guide population with random subpopulations, iterative evolution is carried out. Semantic backpropagation and semantic guidance of the pre-trained model are used to perform mutation operations to generate mathematical expressions with clear physical meaning, thereby realizing battery life prediction.

Benefits of technology

Achieving high-precision battery life prediction with limited data reduces data acquisition costs, improves prediction efficiency and interpretability, and can identify key characteristics affecting battery life, providing a scientific basis for battery R&D and maintenance decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121389835A_ABST
    Figure CN121389835A_ABST
Patent Text Reader

Abstract

The invention discloses a pre-training model guided genetic programming-based battery life prediction method. The method comprises the steps of defining a battery life prediction target and battery cycle characteristics; the method comprises the following steps: generating a data point pair set by using a mathematical expression containing battery cycle characteristics, constructing a training data set, and pre-training a Transform model; collecting battery data, and constructing a battery data set; inputting the battery data set into a Transform model, generating a guide sub-population by using the Transform model, and combining the guide sub-population with the generated random sub-population to construct a hybrid initial population of genetic programming; iterative evolution is carried out on the mixed initial population, mutation operation is carried out, and the mutation operation is executed based on semantic back propagation and semantic guidance of a Transform model; and judging whether the evolution reaches a termination condition, if the evolution is terminated, outputting a mathematical expression, and inputting the battery cycle characteristics of the to-be-tested battery into the mathematical expression to obtain a battery life prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of battery life prediction, in particular, especially relates to a battery life prediction method based on pre-training model guided genetic programming. BACKGROUND

[0002] As the mainstream energy storage device, the accurate prediction of lithium-ion battery life is crucial for guiding safe use and stepwise utilization. Currently, battery life prediction methods mainly fall into two categories: one is the traditional method based on physical models, and the other is the data-driven method using machine learning models such as Support Vector Regression (SVR) and Extreme Gradient Boosting (XGBoost). However, these existing methods have significant limitations. The physical model method is prone to long-term prediction accuracy decline due to error accumulation; the data-driven method is generally limited by high data costs and lacks generalization ability in few-sample scenarios.

[0003] More critically, the mainstream data-driven methods represented by SVR and XGBoost are essentially "black box" models. Although they can achieve high accuracy on specific data sets, their prediction process is not transparent, and they cannot provide a simple and mathematically meaningful expression. This inherent lack of interpretability makes it difficult for researchers and engineers to understand the key physical characteristics that affect battery degradation and their underlying mechanisms, severely hindering scientific decision-making in battery material optimization, manufacturing process improvement, and operation strategies.

[0004] To overcome the limitations of "black box" models, symbolic regression technology has emerged, aiming to directly discover the mathematical formula behind the data. For example, Chinese patent application CN119066985A discloses a method that uses reinforcement learning to gradually select nodes from a symbol library under pre-defined logical constraints to construct a mathematical expression for predicting the fatigue life of turbine blades.

[0005] However, existing symbolic regression methods also have inherent bottlenecks. First, they rely heavily on reinforcement learning for random exploration from scratch, which is inefficient and slow in converging in a vast expression search space. Second, their performance is highly dependent on human-defined expert rules, but for complex battery systems, these rules are not only difficult to complete, but also may limit the model's ability to discover better rules. Therefore, developing a new model that can guarantee high prediction accuracy and interpretability while overcoming the core defects of existing symbolic regression methods such as low exploration efficiency and dependence on expert rules has become a technical bottleneck that needs to be solved in this field. SUMMARY

[0006] The present application aims to overcome the defects and deficiencies of the prior art, and provides a battery life prediction method based on pre-training model guided genetic programming, which aims to improve the accuracy and efficiency of battery life prediction in a small sample scenario by guiding the process of genetic programming through a pre-trained Transformer model, while reducing data acquisition costs and enhancing the interpretability of the prediction results.

[0007] In order to achieve the above-mentioned purpose, the technical scheme adopted by the present application is as follows: A battery life prediction method based on pre-training model guided genetic programming, comprising the following steps: Defining battery life prediction target and battery cycle characteristics; Using a mathematical expression containing battery cycle characteristics, generating a set of data points, constructing a training data set, pre-training a Transformer model, and learning the mapping of battery cycle characteristics to the mathematical expression; Collecting battery cycle charge and discharge data, constructing a battery data set containing battery cycle characteristics, and preprocessing the battery data set containing battery cycle characteristics; Input the battery data set into the pre-trained Transformer model, use the Transformer model to generate a guided sub-population, and combine it with a random sub-population to construct a hybrid initial population for genetic programming; Iterative evolution of the hybrid initial population, selection, crossover and mutation operations, mutation operation based on semantic backpropagation and semantic guidance of pre-trained Transformer model; Determine whether the evolution has reached the termination condition, if the evolution is terminated, output the mathematical expression, input the battery cycle characteristics of the battery to be tested into the mathematical expression, and after calculation, obtain the battery life prediction result.

[0008] Further, the battery life prediction target and the battery cycle characteristics are defined as follows: The battery life prediction target is the logarithmic value of the cycle number when the battery capacity decays to a preset threshold, and the battery cycle characteristics are numerical features extracted based on current, voltage and temperature data collected in the battery sample cycle charge and discharge test; The battery cycle characteristics include: mean value of battery cycle discharge voltage curve difference, variance of battery cycle discharge voltage curve difference, minimum value of battery cycle discharge voltage curve difference, slope of battery cycle capacity decay curve, battery charge rate, battery discharge rate, average charging time of battery cycle, integral value of battery cycle temperature, and internal resistance value of battery cycle.

[0009] Furthermore, using mathematical expressions containing battery cycling features, a set of data point pairs is generated to construct a training dataset. A Transformer model is pre-trained to learn the mapping from battery cycling features to mathematical expressions, specifically: Build a containing m Training dataset of group data The i-th set of data is generated by a randomly generated mathematical expression that includes battery cycle characteristics. and based on The generated set of data point pairs Composition; among which This is the set of input points for battery cycle characteristics. for The corresponding calculation result for this mathematical expression; Data point set As the input sequence, corresponding to the mathematical expression skeleton As the target output, a Transformer model with an encoder-decoder architecture is trained through an autoregressive generation task; The Transformer model generates well-structured mathematical expressions from battery cycling feature data by minimizing the cross-entropy loss between the predicted skeleton and the true skeleton and by optimizing autoregressive modeling capabilities through batch gradient updates. The final output expression skeleton is an abstract representation of the original mathematical expression, in which all numerical constants are replaced with a uniform placeholder symbol.

[0010] Furthermore, battery cycle charge-discharge data are collected to construct a battery dataset containing battery cycle characteristics, specifically: Multiple battery samples were subjected to cyclic charge-discharge tests, and various signal data were recorded during the test. Taking the data acquisition of a single battery as an example, the process is as follows: In one complete charge-discharge cycle, the current I at each moment is recorded in time sequence. j (t), voltage V j (t) and temperature T j (t); and these signals are stored in cyclic order to form a dataset: ; Where j is the loop number and a is the total number of loops; When the battery capacity decays to the number of cycles corresponding to a preset threshold, based on the dataset S Based on the definition of battery cycle characteristics, a battery dataset containing battery cycle characteristics is extracted through corresponding calculations.

[0011] Furthermore, the battery dataset containing battery cycling features is preprocessed, specifically as follows: The battery dataset containing battery cycle characteristics is standardized to eliminate the dimensional differences between the features and transform it into a normal distribution with a mean of 0 and a standard deviation of 1. Standard value of the cycle characteristic of the qth battery in the p-th battery sample The calculation formula is: ; in, This represents the original data value of the cycle feature of the qth battery in the p-th battery sample. Let q be the mean of the q-th battery cycle feature across all battery samples. Let be the standard deviation of the q-th battery cycle characteristic across all battery samples.

[0012] Furthermore, the battery dataset is input into a pre-trained Transformer model, which generates a bootstrap subpopulation. This bootstrap subpopulation is then combined with the generated random subpopulation to construct a hybrid initial population based on genetic programming. Specifically: The standardized battery dataset containing battery cycle features is input into a pre-trained Transformer model. The Transformer model generates a well-structured expression skeleton and converts it into a symbolic regression program tree, where constants are represented by placeholders. Copy the program tree SP One, of which SP Total population size NP The preset percentage is used to slightly randomize the constant placeholders in each copy, forming a bootstrap subpopulation; To ensure the diversity of the initial population, the classic population initialization method, the ramped half-and-half method, is adopted, generating a population of [number missing]. NP-SP A randomized program tree is generated to initialize random individuals, specifically including: Using any feature or constant in the battery cycle characteristics, generate a quantity of The program tree is constructed by continuously adding operators from the root node until a preset maximum depth is reached, where the leaf nodes are selected from any feature or constant in the battery cycle features. Generate another Each program tree, during its construction, has the opportunity at each node to terminate the growth of a branch with any feature or constant in the battery cycle characteristics, thus forming a tree with greater depth and more flexible structure. The two sets of program trees are merged to form a random subpopulation; The pilot subpopulation and the random subpopulation are merged to form a complete mixed initial population.

[0013] Furthermore, the root mean square error (RMSE) is used as a fitness index to evaluate the fitness of each individual in the initial mixed population. The formula for calculating the root mean square error (RMSE) is as follows: ; Where n is the number of battery samples; For the first o The true value of a battery sample, that is, the logarithm of the number of cycles when the battery capacity decays to a preset threshold; For the first o The predicted values ​​for each battery sample are based on the battery cycling characteristics.

[0014] Furthermore, the selection operation employs a tournament selection strategy to screen for high-quality individuals, while the crossover operation achieves parental gene exchange through a single-point crossover strategy, specifically as follows: A specified number of individuals are randomly selected from the current population to form a candidate set. The individual with the best fitness is selected from this candidate set and added to the new generation population. This process is repeated until the new generation population reaches a certain size. NP ; After selecting individuals in the population, they are randomly paired. For each pair of parent procedural trees, a non-root node is randomly selected as the intersection point. The corresponding subtrees of the two parents at the intersection point are swapped to generate new offspring. The height of the offspring procedural tree is controlled to not exceed a preset threshold, while ensuring that the subtree still contains effective combinations of battery cycle characteristics.

[0015] Furthermore, the mutation operation is executed based on semantic backpropagation and semantic guidance from a pre-trained Transformer model, specifically as follows: Mutation is a hybrid mutation operation that is executed based on a preset semantic mutation probability. In each mutation operation, the program generates a random number. When the random number is less than the preset semantic mutation probability, a semantically guided mutation operation is triggered, specifically including: Randomly select a node N from the program tree of the individual to be mutated, and calculate the target semantics of node N through semantic backpropagation technology. The calculation starts from the target output of the root node, and is deduced from top to bottom. Semantic propagation is carried out in combination with the actual value of the battery cycle characteristics. The target output is the logarithm of the number of cycles when the battery capacity decays to a preset threshold. The calculated target semantic vector, i.e. the set of target semantics, and the corresponding input data of battery cycle features are input together into the pre-trained Transformer model. The Transformer model generates a symbol sequence that matches the target semantics. This symbol sequence is then parsed into a new subtree, called the Transformer semantic mutation subtree. The original subtree at node N to be mutated is replaced by the new subtree, thus completing a semantically guided mutation operation. When the random number is greater than or equal to the preset semantic mutation probability, the traditional random mutation operation is performed: a new subtree with a preset height constraint is randomly generated, where the leaf nodes are battery cycle features or constants, and the random subtree in the individual to be mutated is replaced by it.

[0016] Furthermore, it determines whether the evolution has reached the termination condition. If the evolution terminates, a mathematical expression is output. The battery cycle characteristics of the battery under test are input into the mathematical expression, and after calculation, the battery life prediction result is obtained, specifically: Determine whether the preset evolutionary generation or running time threshold termination condition has been reached; if so, select the individual with the best fitness from all evolutionary generations of the population, and the mathematical expression corresponding to this individual is used for battery life prediction. The battery cycle characteristics of the battery to be predicted are input into the mathematical expression, which outputs the logarithm of the number of cycles required for the battery capacity to decay to a preset threshold. After exponential transformation, the final battery life prediction result, i.e., the number of battery cycles, is obtained.

[0017] Compared to existing technologies, this invention reduces reliance on large amounts of labeled data through pre-training, achieving high-precision predictions with only a small amount of battery testing data, significantly reducing the time and economic costs of battery testing. The mutation process, combining semantic-oriented optimization and random exploration, can quickly converge to the optimal solution, significantly improving prediction accuracy compared to traditional methods. Random mutation operations ensure the population's exploratory capabilities, helping it escape local optima and are crucial for maintaining the population's long-term evolutionary vitality.

[0018] The pre-trained Transformer model of this invention plays a key role in semantically guided mutation operations: when it is necessary to generate a new subtree that satisfies a specific target semantic for a node in the program tree, the target semantic and the corresponding battery cycle feature data are input into the pre-trained model; the model uses its ability to map from the set of data point pairs to the expression skeleton learned in the pre-training stage to generate an expression skeleton that matches the target semantic. After constant optimization, the skeleton is parsed into a new subtree, thereby achieving semantically driven precise mutation and improving evolutionary efficiency. The prediction model output by this invention is a mathematical expression with clear physical meaning, which not only enhances the interpretability of the model, but also identifies key features that affect battery life, thereby providing interpretable decision-making basis for battery research and development, manufacturing and operation and maintenance, and overcoming the limitations of black box models such as neural networks in terms of interpretability. Attached Figure Description

[0019] Figure 1This is a flowchart of a battery lifetime prediction method based on pre-trained model-guided genetic programming.

[0020] Figure 2 This is a schematic diagram of a battery lifetime prediction method based on pre-trained model-guided genetic programming.

[0021] Figure 3 A schematic diagram of a genetic programming method guided by a pre-trained model.

[0022] Figure 4 This is a flowchart of semantic mutation based on the Transformer model. Detailed Implementation

[0023] The battery life prediction method based on pre-trained model-guided genetic programming of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0024] Please see Figure 1 and Figure 2 This invention discloses a battery lifetime prediction method based on pre-trained model-guided genetic programming, comprising the following steps: S1: Define battery life prediction targets and battery cycle characteristics; S2: Using mathematical expressions containing battery cycle features, generate a set of data point pairs, build a training dataset, pre-train the Transformer model, and learn the mapping from battery cycle features to mathematical expressions; S3: Collect battery cycle charge and discharge data, construct a battery dataset containing battery cycle characteristics, and preprocess the battery dataset containing battery cycle characteristics. S4: Input the battery dataset into the pre-trained Transformer model, use the Transformer model to generate a pilot subpopulation, and combine it with the generated random subpopulation to construct a hybrid initial population based on genetic programming. S5: Iteratively evolve the mixed initial population, performing selection, crossover, and mutation operations. The mutation operation is executed based on semantic backpropagation and semantic guidance of the pre-trained Transformer model. S6: Determine whether the evolution has reached the termination condition. If the evolution terminates, output a mathematical expression. Input the battery cycle characteristics of the battery under test into the mathematical expression, and after calculation, obtain the battery life prediction result.

[0025] Step S1: Define the battery life prediction target and battery cycle characteristics.

[0026] Specifically, the battery life prediction target is the logarithm of the number of cycles required to reduce battery capacity to 80%. The battery cycle characteristic C is a set of numerical characteristics calculated based on current, voltage, and temperature data collected during battery cycle charge-discharge tests. Specifically, it includes: C1: The average difference between the discharge voltage curves of the battery at the 100th cycle and the 10th cycle; C2: Variance of the difference between the discharge voltage curves of the battery at the 100th cycle and the 10th cycle; C3: The minimum difference between the discharge voltage curves of the battery at the 100th cycle and the 10th cycle; C4: The slope of the battery's capacity decay curve from the 2nd to the 100th cycle; C5: The slope of the battery's capacity decay curve from the 90th to the 100th cycle; C6: Battery charging rate; C7: Battery discharge rate; C8: Average charging time for the first 5 battery cycles; C9: The integral value of the battery temperature from the 2nd to the 100th cycle; C10: The internal resistance of the battery during the second cycle.

[0027] Step S2: Using mathematical expressions containing battery cycle features, generate a set of data point pairs, construct a training dataset, pre-train the Transformer model, and learn the mapping from battery cycle features to mathematical expressions.

[0028] Specifically, construct a containing m Training dataset of group data The i-th set of data is generated by a randomly generated mathematical expression containing the battery cycle characteristics C. and based on The generated set of data point pairs Composition, in which This is the set of input points for battery cycle characteristics. for The corresponding calculation result on this mathematical expression is output.

[0029] Data point set As the input sequence, corresponding to the mathematical expression skeleton As the target output (the "skeleton" refers to the form after replacing specific constants in the expression with placeholders), a Transformer model with an encoder-decoder architecture is trained through an autoregressive generation task. The encoder outputs the corresponding data for each mathematical expression. Mapping to a latent space yields a latent representation z of a fixed size, which is the encoded latent vector z.

[0030] use Represents skeleton The k-th symbol or element in Represents skeleton The first k symbols or elements. Given previously generated symbols. Given the encoded latent vector z, the Transformer model outputs the conditional probability distribution function of the next symbol. The training objective of the Transformer model is to maximize the true next symbol. The probability value in this conditional probability distribution function. Specifically, the Transformer model minimizes the predicted skeleton. With real skeleton The cross-entropy loss L between (i.e., the skeleton of the original mathematical expression) is used, and the autoregressive modeling capability is optimized by batch gradient updates, so that the Transformer model can generate well-structured mathematical expressions from the data of battery cycling features C.

[0031] The formula for calculating the cross-entropy loss L is: ; The final output expression skeleton It is the original mathematical expression e An abstract representation in which all numerical constants are replaced with a uniform placeholder symbol "*".

[0032] Considering the set of data point pairs used as the input sequence in this invention Essentially, it is a set of data point pairs with variable size and no order. The positional encoding is removed from the standard Transformer architecture, thus ensuring the permutation invariance of the Transformer model to the order of input data points, making it more suitable for symbolic regression tasks.

[0033] This invention reduces the reliance on large amounts of labeled data by using a pre-trained Transformer model, and can achieve high-precision prediction with only a small amount of battery test data, which significantly reduces the time and economic cost of battery testing.

[0034] Step S3: Collect battery cycle charge and discharge data, construct a battery dataset containing battery cycle characteristics, and preprocess the battery dataset containing battery cycle characteristics.

[0035] Specifically, taking the data acquisition of a single battery sample as an example, the process is as follows: In one complete charge-discharge cycle (from fully discharged to fully charged, and then discharged to the cutoff voltage), the current I at each moment is recorded in time sequence. j (t), voltage V j (t) and temperature T j (t); Store these signals in cyclic order to form a dataset: ; Where j is the cycle number and a is the total number of cycles, that is, the number of cycles that the battery capacity has experienced when it drops to a preset threshold (such as 80%). This value a will be used as the life label of the battery.

[0036] When the battery capacity decays to 80%, based on the above dataset S Based on the definition of battery cycle feature C, a battery dataset containing battery cycle feature C is extracted through corresponding calculations.

[0037] The battery dataset containing the battery cycle feature C is standardized to eliminate the dimensional differences between the features and make it follow a standard normal distribution with a mean of 0 and a standard deviation of 1.

[0038] The standardized value of the q-th cycle feature in the p-th battery sample The calculation formula is: ; in, The original data values ​​of the cycle characteristics of the qth battery in the pth battery sample (q=1,2,...,10); Let q be the mean of the q-th battery cycle feature across all battery samples; Let be the standard deviation of the q-th battery cycle characteristic across all battery samples.

[0039] Please see Figure 3 In step S4, the battery dataset is input into the pre-trained Transformer model, the Transformer model is used to generate a guide subpopulation, and it is combined with the generated random subpopulation to construct a hybrid initial population based on genetic programming.

[0040] Specifically, the standardized battery dataset containing battery cycle features C is input into a pre-trained Transformer model, which generates a well-structured expression skeleton and converts it into a symbolic regression program tree, with constants in the tree represented by placeholders.

[0041] Copy the program tree SP One, of which SP Set as the total population size NP (here) NP= 10% of (200), i.e., 20 individuals. Small-scale random initialization is performed on the constant placeholders in each replica program tree, thus forming the bootstrap subpopulation.

[0042] To ensure the diversity of the initial population, the classic population initialization method, the Ramped Half-and-Half method (mixed method), is used to generate a population of [number missing]. NP-SP(i.e., 180) randomized program trees. The method specifically includes: First, using any feature or constant from C1 to C10 as nodes, 90 program trees are generated. The construction process starts from the root node and continuously adds operators until a preset maximum depth (between 2 and 6) is reached. Leaf nodes can use any feature or constant from C1 to C10. Second, another 90 program trees are generated. During the construction process, each node has the opportunity to directly terminate the growth of the current branch using any feature or constant from C1 to C10 as a leaf node, thus forming a tree with more flexible depth and structure. The two sets of program trees are then merged to form a random subpopulation.

[0043] The guide subpopulation and the random subpopulation are merged to form a complete hybrid initial population. Combining the high-quality guide subpopulation generated by the Transformer model with the random subpopulation effectively mitigates the inherent blindness of completely randomizing mathematical expressions containing battery cycle characteristics. This strategy for generating the hybrid initial population can be repeatedly executed for a range of different target depths to ensure that the final generated random subpopulation exhibits broad diversity in tree height and topology.

[0044] The root mean square error (RMSE) was used as a fitness metric to evaluate the fitness of each individual in the initial mixed population. The formula for calculating the RMSE is as follows: ; Where n is the number of battery samples; For the first o The true value of a battery sample, that is, the logarithm of the number of cycles when the battery capacity decays to a preset threshold; For the first o The predicted value of each battery sample is calculated based on the C1-C10 features through the current individual (program tree).

[0045] Please see Figure 3 Step S5 involves iteratively evolving the initial mixed population, performing selection, crossover, and mutation operations. The mutation operation is executed based on semantic backpropagation and semantic guidance from the pre-trained Transformer model.

[0046] Specifically, five individuals are randomly selected from the current population to form a candidate set. The individual with the best fitness among these individuals is then selected to enter the new generation population. This process is repeated until the size of the new generation population reaches a certain level. NP The tournament selection strategy formula is: ; in, Let M be the candidate set of the winning individuals in a single tournament. The set of all individuals T that minimize the RMSE.

[0047] After selecting individuals in the population, randomly pair them up. For each pair of parent program trees, randomly select a non-root node as the intersection point and swap the corresponding subtrees of the two parents at the intersection point to generate new offspring. At the same time, control the height of the offspring program tree to not exceed a preset threshold and ensure that the subtree still contains an effective combination of battery cycle features C1-C10.

[0048] The formula for the single-point crossover strategy is expressed as: ; ; in, , For the two child trees generated by the crossover, , These are two paired father trees from the parent population. , These are the intersection points of non-root nodes on parent tree 1 and parent tree 2, respectively. This represents the subtree rooted at node c. This indicates that the subtree in individual T is... A Replace with subtree B .

[0049] Mutation is a hybrid mutation operation, executed based on a preset semantic mutation probability d. In each mutation operation, the program generates a random number r.

[0050] When the random number r is less than 0.025, a semantically guided mutation operation is triggered, which specifically includes: A node N is randomly selected from the program tree of the individual to be mutated, and the target semantics of node N are calculated using semantic backpropagation. This calculation starts with the target output of the root node (i.e., the logarithm of the number of cycles when the battery capacity decays to a preset threshold) and proceeds backward from top to bottom, combining the actual values ​​of features C1-C10 for semantic propagation.

[0051] like Figure 4 As shown, the root node (i.e., node 0) represents the battery life prediction target, and there is still a discrepancy between its original semantics and the target semantics. The semantics propagate backward from top to bottom along the computation path, with the arrow indicating the direction of propagation. Taking the calculation of the target semantics of node 3 as an example: First, the inverse function operation of parent node 2 and its sibling nodes are combined. dot The output of node 4 is used to derive the target semantics of node 2; then, based on the target semantics of node 2 and the output of the sibling node of node 3, the target value that node 3 needs to satisfy is calculated.

[0052] The specific formula for calculating the target semantics is as follows: ; in, For the parent node function, Let it be its inverse function. Output a set for sibling nodes. Represents the parent node The target semantics.

[0053] The calculated target semantic vector (i.e., the set of target semantics) and the corresponding battery cycle feature C are input together into a pre-trained Transformer model. The model generates a symbol sequence that matches the target semantics, which is then parsed into a new subtree, namely the Transformer semantic mutation subtree.

[0054] The original subtree at node N to be mutated is replaced by the new subtree, thus completing a semantically guided mutation operation.

[0055] When the random number r is greater than or equal to 0.025, the traditional random mutation operation is performed: a new subtree with a height of 0 to 2 is randomly generated, where the leaf nodes can be C1-C10 features or constants, and the random subtree in the individual to be mutated is replaced with it, so as to maintain the population's exploration ability and avoid getting trapped in local optima.

[0056] Step S6: Determine whether the evolution has reached the termination condition. If the evolution terminates, output a mathematical expression. Input the battery cycle characteristics of the battery under test into the mathematical expression, and after calculation, obtain the battery life prediction result.

[0057] Specifically, it determines whether a preset evolutionary generation (e.g., 300) or a running time threshold or other termination condition has been reached; if so, the individual with the best fitness is selected from the population of all generations, and its corresponding mathematical expression will be used for battery life prediction.

[0058] Input the battery cycle characteristics C of the battery to be predicted for the first 100 cycles into the mathematical expression, and output the logarithmic value of the number of cycles required for the battery capacity to decay to 80%. After exponential transformation (i.e., inverse logarithmic transformation), the final battery life prediction result (number of battery cycles) is obtained.

[0059] The above description is a detailed description of the preferred embodiments of the present invention. However, the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modifications made under the technical spirit disclosed in the present invention should fall within the patent scope covered by the present invention.

Claims

1. A battery lifetime prediction method based on pre-trained model-guided genetic programming, characterized in that, Includes the following steps; Define battery life prediction targets and battery cycle characteristics; By using mathematical expressions containing battery cycle features, a set of data point pairs is generated, a training dataset is constructed, a Transformer model is pre-trained, and the mapping from battery cycle features to mathematical expressions is learned. Collect battery cycle charge and discharge data, construct a battery dataset containing battery cycle characteristics, and preprocess the battery dataset containing battery cycle characteristics. The battery dataset is input into a pre-trained Transformer model, which generates a pilot subpopulation and combines it with a randomly generated subpopulation to construct a hybrid initial population based on genetic programming. The initial mixed population is iteratively evolved, with selection, crossover, and mutation operations performed. The mutation operation is executed based on semantic backpropagation and semantic guidance of the pre-trained Transformer model. Determine whether the evolution has reached the termination condition. If the evolution terminates, output a mathematical expression. Input the battery cycle characteristics of the battery under test into the mathematical expression, and after calculation, obtain the battery life prediction result.

2. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 1, characterized in that, Define the battery life prediction target and battery cycle characteristics as follows: The battery life prediction target is the logarithm of the number of cycles when the battery capacity decays to a preset threshold. The battery cycle characteristics are numerical features extracted based on the current, voltage, and temperature data collected in the battery sample cyclic charge and discharge test. Battery cycle characteristics include: the mean of the difference between the battery cycle discharge voltage curves, the variance of the difference between the battery cycle discharge voltage curves, the minimum of the difference between the battery cycle discharge voltage curves, the slope of the battery cycle capacity decay curve, the battery charging rate, the battery discharging rate, the average charging time of the battery cycle, the integral value of the battery cycle temperature, and the internal resistance value of the battery cycle.

3. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 1, characterized in that, Using mathematical expressions containing battery cycling features, a set of data point pairs is generated to construct a training dataset. A Transformer model is pre-trained to learn the mapping from battery cycling features to mathematical expressions, specifically: Build a containing m Training dataset of group data The i-th set of data is generated by a randomly generated mathematical expression that includes battery cycle characteristics. and based on The generated set of data point pairs Composition; among which This is the set of input points for battery cycle characteristics. for The corresponding calculation result for this mathematical expression; Data point set As the input sequence, corresponding to the mathematical expression skeleton As the target output, a Transformer model with an encoder-decoder architecture is trained through an autoregressive generation task; The Transformer model generates well-structured mathematical expressions from battery cycling feature data by minimizing the cross-entropy loss between the predicted skeleton and the true skeleton and by optimizing autoregressive modeling capabilities through batch gradient updates. The final output expression skeleton is an abstract representation of the original mathematical expression, in which all numerical constants are replaced with a uniform placeholder symbol.

4. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 1, characterized in that, Collect battery cycle charge-discharge data to construct a battery dataset containing battery cycle characteristics, specifically: Multiple battery samples were subjected to cyclic charge-discharge tests, and various signal data were recorded during the test. Taking the data acquisition of a single battery as an example, the process is as follows: In one complete charge-discharge cycle, the current I at each moment is recorded in time sequence. j (t), voltage V j (t) and temperature T j (t); and these signals are stored in cyclic order to form a dataset: ; Where j is the loop number and a is the total number of loops; When the battery capacity decays to the number of cycles corresponding to a preset threshold, based on the dataset S Based on the definition of battery cycle characteristics, a battery dataset containing battery cycle characteristics is extracted through corresponding calculations.

5. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 1, characterized in that, The battery dataset containing battery cycling features is preprocessed as follows: The battery dataset containing battery cycle characteristics is standardized to eliminate the dimensional differences between the features and transform it into a normal distribution with a mean of 0 and a standard deviation of 1. Standard value of the cycle characteristic of the qth battery in the p-th battery sample The calculation formula is: ; in, This represents the original data value of the cycle feature of the qth battery in the p-th battery sample. Let q be the mean of the q-th battery cycle feature across all battery samples. Let be the standard deviation of the q-th battery cycle characteristic across all battery samples.

6. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 1, characterized in that, The battery dataset is input into a pre-trained Transformer model, which generates a bootstrap subpopulation. This bootstrap subpopulation is then combined with a randomly generated subpopulation to construct a hybrid initial population based on genetic programming. The standardized battery dataset containing battery cycle features is input into a pre-trained Transformer model. The Transformer model generates a well-structured expression skeleton and converts it into a symbolic regression program tree, where constants are represented by placeholders. Copy the program tree SP One, of which SP Total population size NP The preset percentage is used to slightly randomize the constant placeholders in each copy, forming a bootstrap subpopulation; To ensure the diversity of the initial population, the classic population initialization method, the ramped half-and-half method, is adopted, generating a population of [number missing]. NP-SP A randomized program tree is generated to initialize random individuals, specifically including: Using any feature or constant in the battery cycle characteristics, generate a quantity of The program tree is constructed by continuously adding operators from the root node until a preset maximum depth is reached, where the leaf nodes are selected from any feature or constant in the battery cycle features. Generate another Each program tree, during its construction, has the opportunity at each node to terminate the growth of a branch with any feature or constant in the battery cycle characteristics, thus forming a tree with greater depth and more flexible structure. The two sets of program trees are merged to form a random subpopulation; The pilot subpopulation and the random subpopulation are merged to form a complete mixed initial population.

7. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 6, characterized in that, The root mean square error (RMSE) is used as a fitness index to evaluate the fitness of each individual in the initial mixed population. The formula for calculating the RMSE is as follows: ; Where n is the number of battery samples; For the first o The true value of a battery sample, that is, the logarithm of the number of cycles when the battery capacity decays to a preset threshold; For the first o The predicted values ​​for each battery sample are based on the battery cycling characteristics.

8. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 7, characterized in that, The selection operation employs a tournament selection strategy to screen for high-quality individuals, while the crossover operation utilizes a single-point crossover strategy to achieve parental gene exchange. Specifically: A specified number of individuals are randomly selected from the current population to form a candidate set. The individual with the best fitness is selected from this candidate set and added to the new generation population. This process is repeated until the new generation population reaches a certain size. NP ; After selecting individuals in the population, they are randomly paired. For each pair of parent procedural trees, a non-root node is randomly selected as the intersection point. The corresponding subtrees of the two parents at the intersection point are swapped to generate new offspring. The height of the offspring procedural tree is controlled to not exceed a preset threshold, while ensuring that the subtree still contains effective combinations of battery cycle characteristics.

9. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 8, characterized in that, The mutation operation is executed based on semantic backpropagation and semantic guidance from a pre-trained Transformer model, specifically as follows: Mutation is a hybrid mutation operation that is executed based on a preset semantic mutation probability. In each mutation operation, the program generates a random number. When the random number is less than the preset semantic mutation probability, a semantically guided mutation operation is triggered, specifically including: Randomly select a node N from the program tree of the individual to be mutated, and calculate the target semantics of node N through semantic backpropagation technology. The calculation starts from the target output of the root node, and is deduced from top to bottom. Semantic propagation is carried out in combination with the actual value of the battery cycle characteristics. The target output is the logarithm of the number of cycles when the battery capacity decays to a preset threshold. The calculated target semantic vector, i.e. the set of target semantics, and the corresponding input data of battery cycle features are input together into the pre-trained Transformer model. The Transformer model generates a symbol sequence that matches the target semantics. This symbol sequence is then parsed into a new subtree, called the Transformer semantic mutation subtree. The original subtree at node N to be mutated is replaced by the new subtree, thus completing a semantically guided mutation operation. When the random number is greater than or equal to the preset semantic mutation probability, the traditional random mutation operation is performed: a new subtree with a preset height constraint is randomly generated, where the leaf nodes are battery cycle features or constants, and the random subtree in the individual to be mutated is replaced by it.

10. The battery lifetime prediction method based on pre-trained model-guided genetic programming according to claim 1, characterized in that, Determine if the evolution has reached the termination condition. If evolution terminates, output a mathematical expression. Input the battery cycle characteristics of the battery under test into the mathematical expression, and after calculation, obtain the battery life prediction result, specifically: Determine whether the preset evolutionary generation or running time threshold termination condition has been reached; if so, select the individual with the best fitness from all evolutionary generations of the population, and the mathematical expression corresponding to this individual is used for battery life prediction. The battery cycle characteristics of the battery to be predicted are input into the mathematical expression, which outputs the logarithm of the number of cycles required for the battery capacity to decay to a preset threshold. After exponential transformation, the final battery life prediction result, i.e., the number of battery cycles, is obtained.

Citation Information

Patent Citations

  • Turbine blade fatigue life prediction method based on logic constraint enhanced sign regression

    CN119066985A

  • Energy storage battery health state prediction method, device, equipment and medium

    CN119644177A

  • Transform-based lithium battery health state estimation method

    CN119846485A