An Automatic Battery Health Status Assessment System and Method Based on a Large Language Model

By combining a large language model with an evolutionary controller, an automatic evaluation system is developed, which solves the problems of high R&D threshold, high cost and strong limitations of manual design in existing SOH estimation algorithms. It realizes fully automated and efficient battery health status evaluation and is applicable to SOH estimation and other complex algorithm engineering problems.

CN121210985BActive Publication Date: 2026-05-26SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI UNIVERSITY OF ELECTRIC POWER
Filing Date
2025-11-28
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies for battery state of health (SOH) estimation algorithms suffer from high R&D barriers, high costs, strong limitations of manual design, and a lack of closed-loop optimization mechanisms, making it difficult to achieve high-precision automated assessment.

Method used

An automated evaluation system employing a large language model combined with an evolutionary controller and an evaluation sandbox achieves fully automated SOH estimation through a program knowledge base, data processing module, understanding and reasoning unit, generation and modification unit, structured output unit, secure isolation environment, automated evaluation unit, and comprehensive performance scoring unit.

Benefits of technology

It achieves fully automated evaluation without manual tuning, shortens the R&D cycle, improves efficiency by at least an order of magnitude, and generates highly efficient algorithms that surpass human thinking. It is applicable to SOH estimation and other complex algorithmic engineering problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121210985B_ABST
    Figure CN121210985B_ABST
Patent Text Reader

Abstract

This invention relates to a large language model-based automatic battery health status assessment system and method. The system includes: a program knowledge base for storing State of Health (SOH) estimation algorithms; a data processing module for acquiring battery data, preprocessing it, and extracting features highly sensitive to SOH changes to form a feature set; a large language model module for receiving dynamic prompts, retrieving corresponding code segments from the program knowledge base based on the prompts, and generating a new SOH estimation algorithm using the large language model or modifying a parent SOH estimation algorithm in the program knowledge base; an evaluation sandbox for receiving the feature set and calling the new or modified parent SOH estimation algorithm for SOH estimation and evaluation; and an evolutionary controller module for controlling the evolutionary cycle of the SOH estimation algorithm and generating dynamic prompts. Compared with existing technologies, this invention has advantages such as automatic algorithm iteration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery management systems, and in particular to an automatic assessment system and method for the health status of batteries using large language models. Background Technology

[0002] Currently, battery state of health (SOH) estimation algorithms are mainly divided into two categories: model-driven and data-driven. Among them, data-driven methods, represented by deep learning such as Long Short-Term Memory (LSTM) networks, have become a research hotspot and achieved significant results due to their powerful nonlinear fitting capabilities. Meanwhile, the rise of large language models (LLMs) has brought new possibilities for automated code generation, but their application in the field of automated discovery and optimization of complex scientific computing algorithms (such as SOH estimation) is still in its early stages of exploration.

[0003] However, existing technologies, especially the design and optimization processes of data-driven algorithms, have significant drawbacks. First, algorithm design heavily relies on experts' domain knowledge and tuning experience, resulting in high development barriers and a strong degree of subjectivity. Second, the development process involves a large amount of tedious manual trial and error, leading to long development cycles and high costs. Furthermore, manual design is prone to being limited to known model structures, making it difficult to break through established mindsets to discover innovative algorithms. Finally, while existing general-purpose LLMs can generate code, they lack closed-loop, iterative optimization mechanisms for specific engineering problems, cannot self-improve based on quantitative evaluation results, and are difficult to directly use to discover high-precision SOH estimation algorithms. Summary of the Invention

[0004] The purpose of this invention is to provide an automatic assessment system and method for the health status of large language models that achieves fully automated assessment without the need for manual tuning.

[0005] The objective of this invention can be achieved through the following technical solutions:

[0006] An automatic battery health status assessment system based on a large language model includes a program knowledge base, a large language model module, an evolutionary controller module, an assessment sandbox, and a data processing module connected in sequence. The large language model module is also connected to the assessment sandbox.

[0007] Program knowledge base: used to store verified and diverse SOH estimation algorithms, each consisting of multiple code segments;

[0008] Data processing module: used to acquire battery data, perform preprocessing, extract features that are highly sensitive to changes in SOH, form a feature set, and input it into the evaluation sandbox;

[0009] Large Language Model Module: Used to receive dynamic prompts from the Evolution Controller Module, retrieve corresponding code segments from the program knowledge base based on the dynamic prompts, and use the large language model to generate a new SOH estimation algorithm or modify the parent SOH estimation algorithm in the program knowledge base;

[0010] Evaluation Sandbox: Used to receive feature sets, call the new SOH estimation algorithm or the modified parent SOH estimation algorithm to perform SOH estimation and evaluation, and obtain the battery health status;

[0011] Evolutionary Controller Module: Used to control the evolutionary loop of the SOH estimation algorithm and generate dynamic prompt words.

[0012] Furthermore, each piece of code is accompanied by metadata, including the algorithm name, key parameters, applicable battery types, advantages and disadvantages.

[0013] Furthermore, the data processing module includes a preprocessing unit and a feature engineering unit connected in sequence.

[0014] Preprocessing unit: used to preprocess the battery data, wherein the battery data includes voltage, current, temperature, and cycle number;

[0015] Feature Engineering Unit: Used to extract features that are highly sensitive to changes in SOH from preprocessed battery data, including changes in constant current / constant voltage charging time, capacity changes, and internal resistance increments.

[0016] Furthermore, the preprocessing unit includes a bad value removal subunit and a normalization subunit connected in sequence.

[0017] Bad Value Removal Subunit: Used to identify and remove bad pixels in the battery data;

[0018] Standardized sub-unit: Used to standardize the results of the sub-unit processing based on the bad value elimination.

[0019] Furthermore, the large language model module includes a comprehension and reasoning unit, a generation and modification unit, and a structured output unit connected in sequence.

[0020] Understanding and Reasoning Unit: Used to receive dynamic prompts from the Evolution Controller Module, and to understand and reason out the specific instructions contained therein;

[0021] The generation and modification unit is used to understand and reason about the dynamic prompt words, retrieve the corresponding code from the program knowledge base for knowledge learning, and generate a brand-new SOH estimation algorithm using a large language model or modify the parent SOH estimation algorithm in the program knowledge base. The modification includes modifying coefficients, replacing mathematical operations, and adding new logical branches.

[0022] Structured output unit: Used to output the new SOH estimation algorithm or the modified parent SOH estimation algorithm, and follows the predefined function signature and interface specification.

[0023] Furthermore, the evaluation sandbox includes a secure isolation environment unit, an automated evaluation unit, an index calculation unit, and a comprehensive performance scoring unit.

[0024] Secure and isolated environment unit: used to provide a secure and isolated environment;

[0025] Automated evaluation unit: In the provided environment, it loads the feature set, a new SOH estimation algorithm or a modified parent SOH estimation algorithm, runs the code, realizes automated SOH estimation, and compares the estimated SOH value with the true SOH value.

[0026] The performance index calculation unit is used to calculate the multi-dimensional performance indexes of the SOH estimation algorithm executed in the automated evaluation unit. These multi-dimensional performance indexes include mean absolute error, root mean square error, and coefficient of determination, and their calculation expressions are as follows:

[0027] ,

[0028] ,

[0029] ,

[0030] In the formula, The mean absolute error, For the sample size, This represents the true SOH value. For the estimated SOH value, The root mean square error, The coefficient of determination;

[0031] Comprehensive performance scoring unit: used to aggregate the multi-dimensional performance indicators into a single comprehensive performance score according to preset weights.

[0032] Furthermore, the evolution controller module includes a driving evolution loop unit, a population management and selection unit, and a dynamic prompt word generation unit.

[0033] Evolutionary loop drive unit: used to control the evolutionary loop of the SOH estimation algorithm, wherein the evolutionary loop is the generation of the SOH estimation algorithm, SOH evaluation and algorithm selection;

[0034] Population management and selection unit: For the SOH estimation algorithm population, after the evaluation of each generation of SOH estimation algorithm, the corresponding comprehensive performance score output by the evaluation sandbox is used as the fitness function of the evolutionary process. Based on the fitness function, the SOH estimation algorithm with excellent performance is selected from the population as the elite algorithm. Only the elite algorithm is allowed to enter the next generation, wherein the elite algorithm is used as the starting point of the subsequent iteration or the SOH estimation algorithm of the parent generation.

[0035] Dynamic prompt word generation unit: used to generate dynamic prompt words based on the evaluation results of the previous generation SOH estimation algorithm and preset performance targets.

[0036] Furthermore, the dynamic prompt word generation unit includes a structure optimization subunit and a parameter optimization subunit.

[0037] Structural optimization subunit: When multiple performance indicators fail to meet the target, it is determined that there is a fundamental defect in the overall structure of the current SOH estimation algorithm. Then, it generates dynamic prompt words based on instruction-driven approach to guide the large language model to modify the algorithm structure.

[0038] The parameter optimization subunit is used to determine that the overall structure of the current SOH estimation algorithm is basically reasonable when a few or a single performance index fails to meet the target and the gap with the target is less than a set threshold. Then, it generates dynamic prompt words based on fine-tuning to guide the large language model to make detailed adjustments at the level of algorithm parameters or hyperparameters.

[0039] This invention also provides an automatic assessment method based on the above-described large language model battery health status automatic assessment system, comprising the following steps:

[0040] The data processing module acquires battery data, performs preprocessing, extracts features that are highly sensitive to changes in SOH, forms a feature set, and inputs it into the evaluation sandbox;

[0041] The evaluation sandbox acquires a novel SOH estimation algorithm or a modified parent SOH estimation algorithm generated from the large language model module, performs SOH estimation on the feature set, and obtains the estimated SOH as the battery health state.

[0042] Furthermore, the SOH estimation algorithm evolves through iterative loops, and the specific steps include the following:

[0043] Initialization: The population is initialized using an initial skeleton program containing the function to be evolved, which defines the complete process of data loading and algorithm execution;

[0044] Selection and Analysis: The evolutionary controller module selects one or more elite algorithms from the program knowledge base as the SOH estimation algorithm for the parent generation, and analyzes their latest multi-dimensional performance indicators;

[0045] Constructing dynamic prompt words: The dynamic prompt word generation unit in the evolution controller module generates dynamic prompt words based on the gap between the latest multi-dimensional performance index corresponding to the SOH estimation algorithm of the parent generation and the preset performance target;

[0046] Generate a new algorithm: The large language model module receives the dynamic prompt words, retrieves the corresponding code segments in the program knowledge base based on the dynamic prompt words, and uses the large language model to generate a brand new SOH estimation algorithm or a modified parent SOH estimation algorithm;

[0047] Training and Validation: The evaluation sandbox embeds the new SOH estimation algorithm or the modified parent SOH estimation algorithm into the skeleton program, divides the feature set formed by the data processing module into training set and test set, performs training and testing, and obtains the corresponding multi-dimensional performance indicators and comprehensive performance score.

[0048] Update and Loop: Based on the comprehensive performance score, determine whether the new SOH estimation algorithm or the modified parent SOH estimation algorithm is effective. If not, use the original parent SOH estimation algorithm to start the next iteration. If so, replace the original parent SOH estimation algorithm with the new SOH estimation algorithm or the modified parent SOH estimation algorithm with a higher comprehensive performance score as the parent program for the next iteration, and return to the above step of building dynamic prompt words to start the next iteration until the termination condition is reached. When the comprehensive performance score exceeds the set threshold, store it and the comprehensive performance score in the program knowledge base.

[0049] Output: After the iteration cycle ends, the SOH estimation algorithm with the highest comprehensive performance score is output as the final optimization result, which is used for battery health status assessment.

[0050] Compared with the prior art, the present invention has the following beneficial effects:

[0051] (1) This invention uses the program knowledge base as a function space, explores within the function space, and combines the evaluation performance of the evaluation sandbox evaluation algorithm with the automatic iterative evolution of the evaluation algorithm controlled by the evolution controller module to ensure the optimal SOH evaluation algorithm is obtained. This achieves fully automated evaluation without relying on manual tuning.

[0052] (2) The evolutionary controller module of the present invention can “diagnose” the shortcomings of the current algorithm like a domain expert. By designing a dynamic prompt word generation mechanism, it analyzes the gap between the performance index and the target, dynamically decides whether to perform structural optimization or parameter tuning, and generates corresponding prompt words for LLM. This gives the evolutionary search process a clear direction and greatly improves efficiency.

[0053] (3) This invention scores the performance of the current algorithm and uses an evolutionary controller module to iteratively evolve the algorithm, shortening the manual design and optimization process that used to take weeks or even months to the time of automatic system operation. According to experimental verification, this invention can discover SOH algorithms that outperform the benchmark model in a short time, improving R&D efficiency by at least one order of magnitude.

[0054] (4) The present invention provides a complete and modular automated evaluation system, including a professional program knowledge base to ensure diversity, a sandbox for secure code execution, and a core evolution controller, which constitutes an end-to-end solution.

[0055] (5) This invention explores the function space, and the system can discover novel and efficient algorithmic structures that transcend traditional human thinking. For example, it may discover an atypical layer connection method or activation function combination that is difficult for human engineers to conceive of.

[0056] (6) Through systematic search and optimization, the algorithm generated by this invention generally outperforms the benchmark model designed manually in various performance indicators. The intelligent search strategy ensures that the system can converge to the global or near-global optimal solution with a higher probability.

[0057] (7) This invention has strong universality and broad application prospects. This invention has good versatility and is not only applicable to SOH estimation, but can also be easily transferred to other engineering and scientific computing problems that require the design of complex algorithms, such as remaining useful life (RUL) prediction and fault diagnosis. Attached Figure Description

[0058] Figure 1 This is a schematic diagram of the system structure of the present invention;

[0059] Figure 2 This is a schematic diagram of the iterative loop process of the present invention. Detailed Implementation

[0060] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0061] This embodiment provides an automatic battery health status assessment system for large language models, such as... Figure 1As shown, the system mainly includes five core modules: program knowledge base 1, data processing module 2, large language model module 3, evaluation sandbox 4, and evolutionary controller module 5. The program knowledge base 1, large language model module 3, evolutionary controller module 5, evaluation sandbox 4, and data processing module 2 are connected in sequence, and the large language model module 3 is also connected to the evaluation sandbox 4.

[0062] 1. Program Knowledge Base 1: A structured "algorithm gene bank" with the following functions:

[0063] 1) Algorithm Diversity and Structured Storage: The program's knowledge base 1 contains a large number of validated and diverse SOH estimation algorithms. These algorithms may be based on different principles, such as empirical models, equivalent circuit models, and data-driven methods (such as machine learning and deep learning). Each code snippet is accompanied by metadata, such as algorithm name, key parameters, applicable battery types, advantages and disadvantages, etc., to facilitate understanding and use by LLM (Large Language Model).

[0064] 2) Large Language Model Context Source: When the LLM needs to generate a new algorithm, it retrieves and learns from this program knowledge base 1. This existing code provides the LLM with rich context, allowing it to understand what constitutes an effective SOH estimation code structure, which features are critical, and what the commonly used mathematical operations and logic are. This greatly improves the quality and relevance of the generated code, avoiding blind exploration from scratch.

[0065] 3) Version Control and Iteration Foundation: The program's knowledge base 1 also records "elite" algorithm versions that performed well during the evolution process. These successful cases can serve as the starting point or "parent generation" for subsequent iterations, and can be modified and optimized by LLM.

[0066] 2. Data Processing Module 2: Performs preprocessing and feature extraction of battery data, mainly including a preprocessing unit and a feature engineering unit connected in sequence:

[0067] Preprocessing unit: Used to preprocess raw battery data, including the following sub-units:

[0068] 1) Outlier Removal Subunit: During the acquisition process, raw battery data (such as voltage, current, temperature, and cycle count) often produces outliers or missing values ​​due to sensor malfunctions or transmission errors. This subunit identifies and removes these outliers to prevent them from interfering with algorithm evaluation.

[0069] 2) Standardized sub-units: Different physical quantities have vastly different units and dimensions. Normalization or standardization can scale all features to a comparable range, which is crucial for many distance- or gradient-dependent algorithms, accelerating the convergence of the algorithm model and improving accuracy.

[0070] Feature Engineering Unit: This unit extracts features from the preprocessed battery data to form a feature set. This is the most crucial step, directly determining the upper limit of the SOH estimation algorithm. This unit extracts features highly sensitive to changes in SOH from the battery data. For example, it calculates constant current charging time, area under the charging curve, voltage plateau period, and internal resistance increment. These carefully designed features more intuitively reflect the battery's aging state, reducing the learning difficulty for subsequent algorithms. The feature set data is directly used for battery SOH estimation or divided into training and testing sets for use in an evaluation sandbox.

[0071] 3. Large Language Model Module 3: As the code generation engine, it is responsible for receiving external dynamic prompts and generating new or modified SOH estimation function code (also known as the SOH estimation algorithm) based on them. This module includes a sequentially connected understanding and reasoning unit, a generation and modification unit, and a structured output unit.

[0072] Understanding and Reasoning Unit: The LLM receives dynamic prompts from the Evolutionary Controller Module 5. These prompts are not simply "Give a SOH estimation algorithm"; they contain specific instructions, such as: "Use 'Algorithm A' and 'Algorithm B' from the program knowledge base to create a new, more innovative algorithm that combines the advantages of both."

[0073] Generation and Modification Unit: Based on the understanding and reasoning of dynamic prompt words, as well as the knowledge learned from the program knowledge base 1, LLM will generate a brand new SOH estimation function code, or mutate an existing "parent" algorithm code, such as modifying a coefficient, replacing a mathematical operation, adding a new logical branch, etc., and finally obtain a brand new SOH estimation algorithm or a modified parent SOH estimation algorithm.

[0074] Structured output unit: The algorithm code generated by LLM follows predefined function signatures and interface specifications, ensuring that it can be seamlessly loaded and executed by the "evaluation sandbox".

[0075] 4. Evaluation Sandbox 4: Provides a secure and isolated code execution and evaluation environment for receiving algorithm programs to be evaluated, executing them on a pre-defined battery dataset processed by data processing module 2, and calculating multiple performance metrics (MAE, RMSE, R...). 2 The evaluation sandbox 4 mainly includes the following units: and a comprehensive performance score.

[0076] Secure Isolation Environment Unit: Evaluation Sandbox 4 provides an isolated environment to execute unknown code generated by LLM (including the newly generated SOH estimation algorithm or the modified parent's SOH estimation algorithm). This prevents malicious or defective code from affecting the main system.

[0077] Automated Evaluation Unit: After receiving an algorithm program, the evaluation sandbox 4 automatically loads the feature set prepared by the data processing module 2. It calls the algorithm function, performs SOH estimation using the test data, and compares the estimation result with the true SOH value.

[0078] Metrics Calculation Unit: To comprehensively evaluate the algorithm, this unit calculates several industry-recognized performance metrics, such as:

[0079] Mean Absolute Error (MAE): It intuitively reflects the average magnitude of the prediction error, among which For the sample size, This represents the true SOH value. This is the estimated SOH value.

[0080] Root Mean Square Error (RMSE): The penalty for large errors is heavier.

[0081] Coefficient of determination (R) 2 R-squared): This measures how well the model explains changes in the data; the closer it is to 1, the better.

[0082] Comprehensive Performance Score Unit: This unit aggregates the above-mentioned performance indicators into a single comprehensive performance score according to preset weights. This comprehensive performance score serves as the "fitness function" in the evolutionary process and is the final quantitative standard for evaluating the algorithm's performance.

[0083] 5. Evolutionary Controller Module 5: As the core scheduling unit of the system, it is responsible for driving the entire evolutionary cycle and mainly includes the following units:

[0084] The driving evolutionary loop unit: This unit controls and manages the evolutionary loop of the SOH estimation algorithm, that is, the entire "generate-evaluate-select" loop. It determines hyperparameters such as the number of generations of evolution and the population size in each generation (i.e., how many algorithms are evaluated simultaneously).

[0085] Population Management and Selection Unit: This unit maintains an "algorithm population." After each generation of evaluation, it selects high-performing elite algorithms from the current population based on the comprehensive performance score returned by Evaluation Sandbox 4, allowing them to enter the next generation. Simultaneously, it eliminates poorly performing algorithms.

[0086] Dynamic Prompt Generation Unit: This unit is the core intelligence of the Evolutionary Controller Module 5. It does not simply repeat "generate a better algorithm", but dynamically adjusts the prompts based on the evaluation results of the previous generation.

[0087] The dynamic prompt generation unit includes a structure optimization subunit and a parameter optimization subunit:

[0088] Structural optimization subunit: When multiple performance indicators fail to meet the target, it is determined that there is a fundamental defect in the overall structure of the current SOH estimation algorithm. Then, it generates dynamic prompt words based on instruction-driven approach to guide the large language model to modify the algorithm structure.

[0089] The parameter optimization subunit is used to determine that the overall structure of the current SOH estimation algorithm is basically reasonable when a few or a single performance index fails to meet the target and the gap with the target is less than a set threshold. Then, it generates dynamic prompt words based on fine-tuning to guide the large language model to make detailed adjustments at the level of algorithm parameters or hyperparameters.

[0090] The relationships between the above five modules:

[0091] The above five modules together constitute a closed-loop, adaptive, optimized system for automatically assessing battery health status:

[0092] 1. Evolutionary Controller Module 5 and Large Language Model Module 3

[0093] Nature: Command and execution.

[0094] Function Description: As the "commander-in-chief," the evolutionary controller module 5's core function is to issue instructions to the downstream large language model module 3. These instructions are not static but rather "dynamic prompts," meaning that the evolutionary controller module 5 intelligently generates new, more targeted instructions based on the evaluation results of the previous algorithm. This is a strategic guidance that determines the direction of code generation.

[0095] 2. Program Knowledge Base 1 and Large Language Model Module 3

[0096] Nature: Reference and support.

[0097] Function Description: Program Knowledge Base 1, acting as an "algorithm gene bank," provides "algorithm context" for Large Language Model Module 3. When generating code, LLM queries and references existing successful algorithm examples and code structures within Program Knowledge Base 1. This ensures that the code generated by LLM has domain relevance and high initial quality, supporting code generation.

[0098] 3. Large Language Model Module 3 and Evaluation Sandbox 4

[0099] Nature: Submission and verification.

[0100] Function Description: The core function of the Large Language Model Module 3 is "code generation." Based on instructions and context, it generates specific "SOH algorithms." The generated algorithms are then directly submitted to the Evaluation Sandbox 4. The Evaluation Sandbox 4 acts as the "verifier," receiving and executing the code to be evaluated.

[0101] 4. Data Processing Module 2 and Evaluation Sandbox 4

[0102] Nature: Dependence and supply.

[0103] Function Description: To ensure fair and accurate algorithm testing, Evaluation Sandbox 4 relies on standardized input. Data Processing Module 2's role is to "prepare data," supplying the sandbox with cleaned, standardized, and feature-engineered battery data. The entire evaluation process of Evaluation Sandbox 4 is built upon this high-quality data foundation, a crucial underlying support relationship.

[0104] 5. Evaluation of Sandbox 4 and Evolution Controller Module 5

[0105] Nature: Feedback and decision-making.

[0106] Function Description: This is a crucial step in forming a closed-loop system. After evaluating the algorithm, the evaluation sandbox 4 outputs quantified performance metrics. These objective evaluation results are fed back to the evolutionary controller module 5. The evolutionary controller module 5 then makes decisions based on this feedback data, judging the algorithm's merits and generating "dynamic prompts" for the next round to guide the next round of evolution.

[0107] According to the aforementioned automatic assessment system, the process for automatically assessing battery health status includes:

[0108] Data processing module 2 acquires battery data, performs preprocessing, extracts features that are highly sensitive to changes in SOH, forms a feature set, and inputs it into evaluation sandbox 4;

[0109] The evaluation sandbox 4 obtains a new SOH estimation algorithm or a modified parent SOH estimation algorithm generated from the large language model module 3, performs SOH estimation and evaluation on the feature set, and obtains the battery health status.

[0110] The novel SOH estimation algorithm or the modified parent SOH estimation algorithm relied upon in the above evaluation process needs to be obtained through the iterative loop of this system to evolve the algorithm. Specifically, combined with Figure 2 The iterative loop steps in this embodiment are as follows:

[0111] Step 1: Initialization. The population database is initialized using an initial "skeleton" procedure containing the functions to be evolved. This skeleton procedure defines the complete process of data loading and algorithm model evaluation.

[0112] Step 2: Selection and Analysis. The evolutionary controller module 5 selects one or more high-scoring algorithms (elite algorithms) from the program knowledge base 1 as parents and analyzes their latest performance metrics.

[0113] Step 3: Constructing Dynamic Prompts. This is the core step in this embodiment, giving the system "diagnostic" capabilities like a domain expert. The dynamic prompt generation unit within the evolution controller module 5 generates prompts based on the parent program's performance metrics and preset performance targets (e.g., MAE < 2.0, RMSE < 3.0, R...). 2 A difference of >0.95) generates dynamic prompts to dynamically determine the focus of optimization.

[0114] Detailed Description: This dynamic prompt generation unit first obtains the latest performance metrics of the current algorithm from the evaluation sandbox 4. Then, based on the comparison of these metrics with preset targets, it accurately determines the shortcomings of the algorithm and generates dynamic prompts with clear optimization directions based on this.

[0115] Scenario 1: Structural Optimization. When multiple core performance indicators (such as MAE and R...) are... 2 If none of the above methods achieve the target, the system determines that the current algorithm's model structure has a fundamental flaw. At this point, a type of "instruction-driven" prompt is generated to explicitly guide the LLM to modify the structure. The prompt includes specific optimization suggestions, such as "add or remove network layers," "change the LSTM layer to a GRU layer," or "introduce a new feature fusion mechanism," thereby guiding the LLM to explore entirely new model architectures. This prompt design aims to solve the algorithm's fundamental problems, rather than being limited to parameter fine-tuning.

[0116] Scenario 2: Parameter Optimization. When only a few or a single performance metric fails to meet the target, and the difference from the target is less than a set threshold, the system determines that the current algorithm structure is basically reasonable. At this point, a "fine-tuning" prompt is generated to guide the LLM to make detailed adjustments at the parameter or hyperparameter level. The prompt suggests that the LLM focus on adjusting the learning rate, Dropout rate, number of neurons, batch size, etc., to find the optimal solution within the existing structure. This strategy avoids unnecessary structural changes and improves iteration efficiency.

[0117] In addition, the dynamic prompts include references from external program knowledge base 1, providing high-quality reference examples for LLM, effectively constraining the generation space of LLM, and enabling it to generate domain-relevant, high-quality code more quickly.

[0118] Step 4: Generate a new algorithm: The large language model module 3 receives the constructed dynamic prompt words, generates new candidate SOH estimation function code, and forms a brand new SOH estimation algorithm or a modified parent SOH estimation algorithm.

[0119] Step 5: Training and Validation: After the newly generated function is embedded into the program skeleton, it is executed and trained and tested on the battery dataset. Finally, multiple performance metrics and a comprehensive score of the new function are calculated.

[0120] Detailed Description: Evaluation Sandbox 4 provides a secure and isolated runtime environment, ensuring that generated code does not affect the system. It performs a complete evaluation process:

[0121] Code loading: Dynamically embed the SOH estimation function generated by LLM into a predefined program skeleton.

[0122] Data execution: Run this function on the processed training and test sets to obtain the prediction results.

[0123] Indicator Calculation: Calculate MAE, RMSE, R 2 Key performance indicators, etc.

[0124] Result verification: Verify the validity of the returned results, ensuring that all necessary metrics and data exist and are valid.

[0125] Objective function calculation: Based on the preset objective function (e.g., MAE+RMSE-R) 2 A comprehensive score is calculated and used for subsequent evolutionary selection.

[0126] Step 6: Update and Loop. Determine the effectiveness of the new program based on its overall performance score. If effective, replace the original parent program with it and use it as the parent program for the next iteration. Return to Step 3 to begin the next iteration until the termination condition is met. When the algorithm's overall performance score exceeds a set threshold, it indicates excellent performance and has reference value for generating subsequent algorithms. The algorithm and its overall performance score are then stored in the population database. If ineffective, the original parent's SOH estimation algorithm is used to begin the next iteration.

[0127] Step 7: Output. After the loop ends, the SOH estimation algorithm with the highest overall performance score is output as the final optimization result, which is directly used for battery health status assessment.

[0128] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0129] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An automatic battery health status assessment system for large language models, characterized in that, It includes a program knowledge base (1), a large language model module (3), an evolutionary controller module (5), an evaluation sandbox (4), and a data processing module (2) connected in sequence. The large language model module (3) is also connected to the evaluation sandbox (4). Program knowledge base (1): used to store verified and diverse SOH estimation algorithms, each of which consists of multiple code segments; Data processing module (2): used to acquire battery data, perform preprocessing, extract features sensitive to SOH changes, form a feature set, and input it into the evaluation sandbox (4); Large Language Model Module (3): Used to receive dynamic prompts from the Evolution Controller Module (5), retrieve the corresponding code segment in the program knowledge base (1) based on the dynamic prompts, and use the large language model to generate a new SOH estimation algorithm or modify the parent SOH estimation algorithm in the program knowledge base (1); Evaluation Sandbox (4): Used to receive feature sets, call the new SOH estimation algorithm or the modified parent SOH estimation algorithm to perform SOH estimation and evaluation, and obtain the battery health status; Evolutionary Controller Module (5): Used to control the evolutionary loop of the SOH estimation algorithm and generate dynamic prompt words.

2. The automatic assessment system for battery health status of a large language model according to claim 1, characterized in that, Each piece of code is accompanied by metadata, including the algorithm name, key parameters, applicable battery types, advantages and disadvantages.

3. The automatic assessment system for battery health status of a large language model according to claim 1, characterized in that, The data processing module (2) includes a preprocessing unit and a feature engineering unit connected in sequence. Preprocessing unit: used to preprocess the battery data, wherein the battery data includes voltage, current, temperature, and cycle number; Feature Engineering Unit: Used to extract features that are highly sensitive to changes in SOH from preprocessed battery data, including changes in constant current / constant voltage charging time, capacity changes, and internal resistance increments.

4. The automatic assessment system for battery health status of a large language model according to claim 3, characterized in that, The preprocessing unit includes a bad value removal subunit and a normalization subunit connected in sequence. Bad Value Removal Subunit: Used to identify and remove bad pixels in the battery data; Standardized sub-unit: Used to standardize the results of the sub-unit processing based on the bad value elimination.

5. The automatic battery health status assessment system for a large language model according to claim 1, characterized in that, The large language model module (3) includes a comprehension and reasoning unit, a generation and modification unit, and a structured output unit connected in sequence. Understanding and reasoning unit: used to receive dynamic prompts from the evolution controller module (5) and understand and reason out the specific instructions contained therein; The generation and modification unit is used to understand and reason about the dynamic prompt words, retrieve the corresponding code from the program knowledge base (1) for knowledge learning, and use a large language model to generate a brand new SOH estimation algorithm or modify the parent SOH estimation algorithm in the program knowledge base (1). The modification includes modifying coefficients, replacing mathematical operations, and adding new logical branches. Structured output unit: Used to output the new SOH estimation algorithm or the modified parent SOH estimation algorithm, and follows the predefined function signature and interface specification.

6. The automatic battery health status assessment system for a large language model according to claim 1, characterized in that, The evaluation sandbox (4) includes a secure isolation environment unit, an automated evaluation unit, an index calculation unit, and a comprehensive performance scoring unit. Secure and isolated environment unit: used to provide a secure and isolated environment; Automated evaluation unit: In the provided environment, it loads the feature set, a new SOH estimation algorithm or a modified parent SOH estimation algorithm, runs the code, realizes automated SOH estimation, and compares the estimated SOH value with the true SOH value. The performance index calculation unit is used to calculate the multi-dimensional performance indexes of the SOH estimation algorithm executed in the automated evaluation unit. These multi-dimensional performance indexes include mean absolute error, root mean square error, and coefficient of determination, and their calculation expressions are as follows: , , , In the formula, The mean absolute error, For the sample size, This represents the true SOH value. For the estimated SOH value, The root mean square error, The coefficient of determination; Comprehensive performance scoring unit: used to aggregate the multi-dimensional performance indicators into a single comprehensive performance score according to preset weights.

7. The automatic battery health status assessment system for a large language model according to claim 6, characterized in that, The evolution controller module (5) includes a driving evolution cycle unit, a population management and selection unit, and a dynamic prompt word generation unit. Evolutionary loop drive unit: used to control the evolutionary loop of the SOH estimation algorithm, wherein the evolutionary loop is the generation of the SOH estimation algorithm, SOH evaluation and algorithm selection; Population management and selection unit: For the population of SOH estimation algorithms, after the evaluation of each generation of SOH estimation algorithms, the corresponding comprehensive performance score output by the evaluation sandbox (4) is used as the fitness function of the evolution process. Based on the fitness function, the SOH estimation algorithms with excellent performance are selected from the population as elite algorithms. Only the elite algorithms are allowed to enter the next generation, wherein the elite algorithms are used as the starting point of subsequent iterations or the SOH estimation algorithms of the parent generation. Dynamic prompt word generation unit: used to generate dynamic prompt words based on the evaluation results of the previous generation SOH estimation algorithm and preset performance targets.

8. The automatic battery health status assessment system for a large language model according to claim 7, characterized in that, The dynamic prompt word generation unit includes a structure optimization subunit and a parameter optimization subunit. Structural optimization subunit: When multiple performance indicators fail to meet the target, it is determined that the overall structure of the current SOH estimation algorithm has a fundamental defect. Then, it generates instruction-driven dynamic prompt words to guide the large language model to modify the algorithm structure. The parameter optimization subunit is used to determine that the overall structure of the current SOH estimation algorithm is basically reasonable when a few or a single performance index fails to meet the target and the gap with the target is less than a set threshold. Then, it generates dynamic prompt words based on fine-tuning to guide the large language model to make detailed adjustments at the level of algorithm parameters or hyperparameters.

9. An automatic assessment method for an automatic assessment system for the battery health status of a large language model according to any one of claims 1-8, characterized in that, Includes the following steps: The data processing module (2) acquires battery data, performs preprocessing, extracts features that are highly sensitive to changes in SOH, forms a feature set, and inputs it into the evaluation sandbox (4); The evaluation sandbox (4) obtains a new SOH estimation algorithm or a modified parent SOH estimation algorithm generated from the large language model module (3), performs SOH estimation on the feature set, and obtains the estimated SOH as the battery health state.

10. The automatic evaluation method according to claim 9, characterized in that, The SOH estimation algorithm evolves through iterative loops, and the specific steps include the following: Initialization: The population is initialized using an initial skeleton program containing the function to be evolved, which defines the complete process of data loading and algorithm execution; Selection and Analysis: The evolutionary controller module (5) selects one or more elite algorithms from the program knowledge base (1) as the SOH estimation algorithm of the parent generation, and analyzes its latest multi-dimensional performance indicators; Constructing dynamic prompt words: The dynamic prompt word generation unit in the evolution controller module (5) generates dynamic prompt words based on the gap between the latest multi-dimensional performance index corresponding to the SOH estimation algorithm of the parent generation and the preset performance target; Generate a new algorithm: The large language model module (3) receives the dynamic prompt word, retrieves the corresponding code segment in the program knowledge base (1) based on the dynamic prompt word, and uses the large language model to generate a brand new SOH estimation algorithm or a modified parent SOH estimation algorithm; Training and Validation: Evaluation Sandbox (4) The new SOH estimation algorithm or the modified parent SOH estimation algorithm is embedded into the skeleton program. The feature set formed by the data processing module (2) is divided into training set and test set. Training and testing are carried out to obtain the corresponding multi-dimensional performance indicators and comprehensive performance scores. Update and loop: Based on the comprehensive performance score, determine whether the new SOH estimation algorithm or the modified parent SOH estimation algorithm is effective. If not, the original parent SOH estimation algorithm is still used to start the next iteration. If yes, the original parent SOH estimation algorithm is replaced with a new SOH estimation algorithm or a modified parent SOH estimation algorithm with a higher comprehensive performance score as the parent program for the next iteration. Then return to the above steps of building dynamic prompt words and start the next iteration until the termination condition is reached. When the comprehensive performance score exceeds the set threshold, it and the comprehensive performance score are stored in the program knowledge base (1). Output: After the iteration cycle ends, the SOH estimation algorithm with the highest comprehensive performance score is output as the final optimization result, which is used for battery health status assessment.