Battery health state estimation and recovery method of domain knowledge-guided large language model
By combining cross-attention encoding and sparse perception adapter, the problem of insufficient generalization ability in battery health status assessment is solved, the accuracy and adaptability of battery health status estimation are achieved, and the development of battery recycling and reuse is promoted.
Patent Information
- Application Number
- CN202510740338.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-16
AI Technical Summary
Existing battery health status assessment methods have insufficient generalization capabilities when the internal state of the battery cannot be directly observed, the operating conditions are complex and changeable, and the data noise is large. They are difficult to adapt to different battery types and usage environments, and have high computing resource requirements, which affects the deployment and application of the model.
By collecting battery charge and discharge measurement data and relaxation voltage data, cross-attention joint encoding is used to generate a sequence embedding matrix, domain knowledge prompt text is constructed to generate a degraded knowledge embedding matrix, and a sparse perception adapter is established to optimize the output matrix, thereby improving the adaptability and computational efficiency of the model.
It achieves adaptive estimation of battery health status, improves the accuracy and generalization ability of SOH prediction, and promotes the development of battery recycling and reuse.
Smart Images

Figure CN120654210A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery health status assessment and industrial large language models, and in particular to a battery health status estimation and recovery method using a domain knowledge-guided large language model. Background Art
[0002] The development of new energy storage technologies has effectively alleviated the severe situation of energy crisis and environmental pollution. As a key energy storage unit, power batteries have been widely used in electric vehicles, drones and other fields, promoting green transportation and sustainable development. Power batteries will gradually degrade during use. Improper use may lead to thermal runaway, which may cause spontaneous combustion or explosion, seriously threatening the safety of users' lives and property. However, the accuracy of battery state of health (SOH) estimation is limited due to the inability to directly observe the internal state of the battery, the complex and changeable operating conditions, and the high noise of the data. At the same time, the generalization ability of existing methods is insufficient and it is difficult to adapt to different battery types and usage environments. Therefore, battery health state assessment methods guided by domain knowledge have important research value.
[0003] At present, the battery health status assessment methods at home and abroad mainly include three categories: physical model methods, data-driven methods and deep learning methods. The physical model method relies on equivalent circuit models or electrochemical models to estimate SOH, but this method has high requirements on the internal mechanism of the battery, is difficult to adapt to complex working conditions, and has high computational complexity. The data-driven method uses machine learning algorithms such as K-nearest neighbor and decision tree to estimate SOH, which has certain practicality, but it has difficulty in dealing with complex nonlinear problems when processing high-dimensional and dynamically changing battery health data. Deep learning methods can autonomously learn complex relationships from large-scale data. For example, convolutional neural networks (CNN) can extract local features, and long short-term memory networks (LSTM) can model time dependencies. However, the existing deep learning methods have limited generalization capabilities when dealing with different battery materials and operating conditions, and are difficult to meet the needs of battery health status prediction in complex industrial environments.
[0004] In recent years, large model technology has made breakthroughs in multiple tasks and has been widely used in fields such as natural language processing and computer vision. Industrial large models (ILMs) learn a wide range of domain knowledge through pre-training and are fine-tuned for specific tasks, demonstrating strong generalization capabilities. In battery health assessment, ILMs can improve the accuracy of SOH predictions by embedding sensor time series data. However, existing methods still face many challenges in terms of battery data embedding methods, domain knowledge fusion, and model adaptability: First, industrial time series data are usually unevenly sampled and have different change rates. Numerical embedding may ignore key information, while prompt-based embedding methods may lead to information redundancy, affecting model training efficiency; second, existing ILMs often ignore the material properties and operating conditions of batteries, lack a deep understanding of degradation patterns, resulting in the model's inability to accurately capture the complex dynamic evolution of batteries; third, ILM parameters are large in scale, prone to overfitting on irrelevant features, and require high computing resources, affecting model deployment and application. Therefore, there is an urgent need to design a battery state of health estimation and recycling method based on domain knowledge-guided large language models to improve the accuracy and generalization ability of SOH prediction and promote the development of battery recycling and reuse. Summary of the Invention
[0005] In order to address the shortcomings and deficiencies in the existing technology, the present invention aims to propose a battery health status estimation and recycling method guided by a large language model based on domain knowledge;
[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] S1. Collect battery charge and discharge measurement data and relaxation voltage data, and pre-process the data;
[0008] S2. Use cross-attention to jointly encode relaxation voltage and measurement data, design a sequence reprogramming embedding method to generate a sequence embedding matrix;
[0009] S3. Construct domain knowledge prompt text for large models and generate degenerate knowledge embedding matrix;
[0010] S4. The two types of matrices obtained in steps S2 and S3 are fused and embedded into the pre-trained large model to establish a sparse sensing adapter optimization output matrix to achieve adaptive estimation of the target battery health.
[0011] In step S1, various battery types were tested using various charge and discharge protocols under different temperature conditions. The current, voltage, and ambient temperature during the charge and discharge process were recorded, and the relaxation voltage was measured to complete data preprocessing. Subsequently, training and test sets were created for each battery type.
[0012] In step S2 above, the relaxation voltage and the measurement data are jointly encoded using cross-attention, and a sequence reprogramming embedding method is designed to generate a sequence embedding matrix, specifically including:
[0013] S21, using cosine position encoding to enhance the information retention capability of the relaxation voltage sequence, and generating a relaxation voltage encoding matrix through a linear layer;
[0014] S22, structurally encode the voltage, current, and temperature in the measurement sequence, and obtain a discharge measurement matrix using a one-dimensional convolution and linear layer;
[0015] S23. Map the relaxation voltage feature matrix as the query vector and the discharge measurement data feature matrix as the key vector and value vector, and jointly encode the relaxation voltage and discharge measurement by designing cross attention.
[0016] In the above step S3, domain knowledge prompt text for the large model is constructed to generate a degenerate knowledge embedding matrix, which mainly includes:
[0017] The domain knowledge prompt text mainly includes three parts: domain knowledge, task instructions, and data statistics. The degraded knowledge is input into the pre-trained embedder, and the word segmentation text is mapped to a specific degradation pattern space to obtain the degraded knowledge embedding matrix.
[0018] In the above step S4, the two types of matrices obtained in steps S2 and S3 are fused and embedded into the pre-trained large model to establish a sparse sensing adapter optimized output matrix to achieve adaptive estimation of the target battery health, which mainly includes:
[0019] S41, concatenate the sequence embedding and degradation knowledge embedding obtained in S2 and S3, and send them to the main part of the large model for training, and output a high-dimensional matrix for inference prediction;
[0020] S42. Establish a sparse-aware adapter to improve computing efficiency, avoid parameter redundancy, and improve adaptability to target batteries. The sparse-aware adapter consists of three parts: sparse pattern design, sparse calculation, and aggregate update.
[0021] S43. Model training method:
[0022] Specifically, during the parameter backpropagation process, the parameters of the pre-trained large model embedder and main body are frozen, and only the training parameters of the relevant components are propagated to learn personalized parameters related to downstream tasks, so that it can better learn the degradation pattern of the target battery.
[0023] The beneficial effects of the present invention are: a battery health status estimation and recycling method guided by domain knowledge and a large language model. To address the problems that the internal state of the battery cannot be directly observed, the operating conditions are complex and changeable, the data is noisy, and the generalization ability of traditional methods is insufficient, the present invention integrates the joint encoding of relaxation voltage and discharge measurement, integrates domain knowledge to optimize model design, and establishes a sparse perception adapter to optimize feature attention, thereby realizing adaptive estimation of battery health status, which has significant application value in promoting battery health assessment and industrial battery recycling. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A flowchart of the battery health status estimation and recycling method based on a large language model guided by domain knowledge of the present invention.
[0026] Figure 2 Schematic diagram of the domain knowledge-guided large language model framework of the present invention. DETAILED DESCRIPTION
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0028] Since battery data embedding into large models is inefficient and has poor model adaptability, the present invention addresses the problems of weak generalization and low accuracy of battery health estimation by proposing a battery health status estimation and recovery method using a large language model guided by domain knowledge. The main steps include: collecting battery charge and discharge measurement data and relaxation voltage data, and pre-processing the data: using cross-attention to jointly encode relaxation voltage and measurement data, designing a sequence reprogramming embedding method to generate a sequence embedding matrix; constructing domain knowledge prompt text for the large model to generate a degraded knowledge embedding matrix; fusing the two types of matrices and embedding them into the pre-trained large model, establishing a sparse perception adapter to optimize the output matrix, and realizing adaptive estimation of the target battery health.
[0029] A battery health status estimation and recycling method guided by domain knowledge and large language model. The specific process is as follows Figure 1 As shown, the implementation steps are as follows:
[0030] S1. Collect battery charge and discharge measurement data and relaxation voltage data, and pre-process the data;
[0031] S2. Use cross-attention to jointly encode relaxation voltage and measurement data, design a sequence reprogramming embedding method to generate a sequence embedding matrix;
[0032] S3. Construct domain knowledge prompt text for large models and generate degenerate knowledge embedding matrix;
[0033] S4, fuse the two types of matrices obtained in steps S2 and S3 and embed them into the pre-trained large model to establish the sparse perception adapter optimization output matrix to achieve adaptive estimation of the target battery health, such as Figure 2 shown.
[0034] In the above step S1, the battery charge and discharge measurement data and relaxation voltage data are collected and pre-processed, specifically including:
[0035] S11, different temperatures:
[0036] Specifically, based on actual needs, common temperature points in industrial environments are selected as much as possible, and the three temperature levels are initially determined to be -25℃, 0℃, and 25℃;
[0037] S12, different discharge protocols:
[0038] Specifically, we set multiple discharge rates based on the battery type and usage scenario, collected performance data at different rates, and selected discharge rates of 0.25C, 0.5C, and 1C to simulate different working conditions of the battery in actual use.
[0039] S13. Record measurement data:
[0040] Specifically, according to actual requirements and relevant literature, the changes in voltage, current, and temperature during charge and discharge are monitored, and the relaxation voltage characteristics are extracted based on the voltage recovery curve;
[0041] S14. Data preprocessing:
[0042] Specifically, the relaxation voltage sequence and battery discharge measurement data are normalized to have a mean of zero and a standard deviation of one, and are divided into multiple continuous subsequences.
[0043] In step S2 above, the relaxation voltage and the measurement data are jointly encoded using cross-attention, and a sequence reprogramming embedding method is designed to generate a sequence embedding matrix, specifically including:
[0044] S21, cosine position encoding of relaxation voltage
[0045] Specifically, the relaxation voltage is encoded by adding the relaxation voltage sequence to a cosine function based on the position index to ensure that the data has unique representation at different positions and has different characteristics at different positions. The specific encoding formula is as follows:
[0046]
[0047] Among them, pos represents the position index in the sequence, k is the embedding dimension index, and d is the total embedding dimension. After this processing, the data can maintain a certain relative position information at different time steps while avoiding the loss of sequence information. The encoded relaxation voltage data is divided into multiple continuous subsequences and input into the linear layer for transformation to obtain the final relaxation voltage feature matrix M rv :
[0048] M rv =Linear(RV PE )
[0049] This feature matrix serves as the query vector in the subsequent attention mechanism to measure the correlation between the relaxation voltage features and the discharge measurement data.
[0050] S22, structural coding of charge and discharge measurement sequence:
[0051] The measurement sequence consists of the voltage U, current I, and temperature T of the battery discharge, which is divided into multiple continuous sequences x, which can be expressed as:
[0052]
[0053] Where l represents the sample length. Use one-bit convolution and linear layer to extract features and get the discharge measurement matrix M dm , which can be expressed as:
[0054] M dm =Linear(Conv(x))
[0055] S23, Joint Encoding Based on Cross Attention:
[0056] Specifically, the mapping relaxation voltage characteristic matrix M rv is the query vector Q, the discharge measurement feature matrix M dm They are mapped into key vector K and value vector V respectively, and the mapping is as follows:
[0057] Q=M rv W Q , K=M dm W K , V=M dm W V
[0058] Where WQ 、W K 、W V is a learnable weight matrix. The query vector Q and the key vector K are calculated by dot product to obtain the attention score matrix (A), which is used to measure the correlation between different positions. In order to make the attention weight distribution reasonable, the soffmax function is used for normalization, and the final attention output (h) is calculated:
[0059] h=softmax(QK T )V
[0060] The normalized attention matrix (A) and the value matrix (V) are weighted and summed to obtain the single-head attention output (h), which represents the weighted measurement feature. The multi-head attention output is concatenated to form the attention fusion matrix, which is then mapped to the final measurement embedding matrix through a linear transformation.
[0061] In the above step S3, domain knowledge prompt text for the large model is constructed to generate a degenerate knowledge embedding matrix, which specifically includes:
[0062] S31. Domain knowledge description:
[0063] Specifically, the domain knowledge component describes the impact of temperature and discharge patterns on battery degradation, providing knowledge background to improve the prediction performance of large models;
[0064] S32, Task Instructions:
[0065] Specifically, the task instruction component defines battery health status prediction as a regression task, allowing the model to focus on the continuous changes of the target variable during training, thereby improving prediction accuracy.
[0066] S33. Statistics:
[0067] Specifically, data statistics gradually capture trends and other features of battery monitoring curves to enhance the information representation of time series data.
[0068] S34, embedded coding
[0069] According to the text prompts designed in steps S31, S32, and S33, the encoding end of the pre-trained model is input to obtain the degraded knowledge embedding matrix.
[0070] In the above step S4, the two types of matrices obtained in steps S2 and S3 are fused and embedded into the pre-trained large model to establish a sparse sensing adapter optimized output matrix to achieve adaptive estimation of the target battery health, specifically including:
[0071] S41. Matrix fusion embedding large model:
[0072] Specifically, the sequence embedding and degradation knowledge embedding obtained by S2 and S3 are concatenated and fed into the main part of the large model for training, outputting a high-dimensional matrix for inference prediction;
[0073] S42. Establish a sparse-aware adapter:
[0074] The sparse attention mechanism improves computational efficiency while avoiding parameter redundancy and improving adaptability to target batteries. The sparse-aware adapter consists of three parts: sparse pattern design, sparse computation, and aggregate updates.
[0075] S421, sparse pattern design: By designing a learnable sparse attention mechanism, the attention calculation can dynamically adjust the focus according to the model learning process. For each query-key pair (Q u , K v ), calculate its correlation score (a uv ), and generate a sparse coding matrix (S) through sigmoid normalization to determine which attention calculations need to be retained. The specific formula is as follows:
[0076] a uv =sigmoid(f(Q u , K v ))
[0077]
[0078] S422, sparse calculation: When performing attention calculation, use the sparse coding matrix (S) as a mask and perform attention calculation only on the selected query-key pairs. For the query-key pairs that meet the conditions, calculate their attention scores and normalize them through Softmax to finally obtain the adjusted attention matrix The specific formula is as follows:
[0079]
[0080] in, The final sparse attention matrix ensures that only highly relevant positions are calculated, effectively reducing computational complexity and improving model adaptability and reasoning efficiency.
[0081] S423, aggregation update: Specifically, after the sparse calculation is completed, the sparse attention matrix (A * ) performs weighted summation on the value matrix (V) to generate the final representation vector (Z), then uses a bidirectional gated recurrent unit (BiGRU) to further extract sequence features, and finally maps the battery health status through a linear layer to output the prediction result;
[0082] S43. Model training method:
[0083] Specifically, during the parameter backpropagation process, the parameters of the pre-trained large model embedder and main body are frozen, and only the training parameters of the relevant components are propagated to learn personalized parameters related to downstream tasks, so that it can better learn the degradation pattern of the target battery.
[0084] In response to the problems that the internal state of the battery cannot be directly observed, the operating conditions are complex and changeable, the data is noisy, and the traditional methods have insufficient generalization capabilities, the present invention integrates the joint encoding of relaxation voltage and discharge measurement, fuses domain knowledge to optimize model design, and establishes a sparse sensing adapter to optimize feature attention, thereby realizing adaptive estimation of the battery health state, which has significant application value in promoting battery health assessment and industrial battery recycling.
[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A battery health status estimation and recycling method based on a domain knowledge-guided large language model, characterized by: The specific steps are as follows: S1. Collect battery charge and discharge measurement data and relaxation voltage data, and pre-process the data; S2. Use cross-attention to jointly encode relaxation voltage and measurement data, design a sequence reprogramming embedding method to generate a sequence embedding matrix; S3. Construct domain knowledge prompt text for large models and generate degenerate knowledge embedding matrix; S4. The two types of matrices obtained in steps S2 and S3 are fused and embedded into the pre-trained large model to establish a sparse perception adapter optimization output matrix to achieve adaptive estimation of the target battery health.
2. The method for battery health status estimation and recycling based on a domain knowledge-guided large language model according to claim 1, characterized in that: In step S2, the relaxation voltage and measurement data are jointly encoded using cross-attention, and a sequence reprogramming embedding method is designed to generate a sequence embedding matrix, which mainly includes: S21, cosine position encoding of relaxation voltage: Since the relaxation voltage can further reflect the battery recovery ability, in order to capture the time evolution pattern of the relaxation voltage, the cosine position index is used to guide the encoding so that the model pays attention to long-term dependencies. The specific formula is as follows: Where pos is the position index, k is the embedding dimension index, d is the embedding dimension, and the relaxation voltage encoding matrix is generated by linear mapping; S22, structural coding of charge and discharge measurement sequence: The measurement sequence consists of the voltage U, current I, and temperature T of the battery discharge, which is divided into multiple continuous sequences x, which can be expressed as: Where l represents the sample length. A one-bit convolution and linear layer are used to extract features and obtain the discharge measurement matrix. S23, Joint Encoding Based on Cross Attention: Specifically, the relaxation voltage matrix is mapped to a query vector (Q), and the discharge measurement matrix is mapped to a key vector (K) and a value vector (V). By calculating the correlation between Q and K, the attention score matrix (A) is obtained and normalized using the Softmax function to ensure that the sum of the attention weights of each row is 1, thus forming an attention distribution matrix that measures the relevance of different positions in the measurement sequence. The normalized A is weighted summed with V to calculate the single-head attention output (h). The multi-head outputs are then concatenated into an attention fusion matrix and mapped to a measurement embedding matrix through a linear transformation.
3. The method for battery health status estimation and recycling based on a domain knowledge-guided large language model according to claim 1, characterized in that: In step S3, domain knowledge prompt text for the large model is constructed to generate a degenerate knowledge embedding matrix, which mainly includes: S31. Domain knowledge description: Specifically, the domain knowledge component describes the impact of temperature and discharge patterns on battery degradation, providing knowledge background to improve the prediction performance of large models; S32, Task Instructions: Specifically, the task instruction component defines battery health status prediction as a regression task, allowing the model to focus on the continuous changes of the target variable during training, thereby improving prediction accuracy. S33. Statistics: Specifically, data statistics gradually capture trends and other features of battery monitoring curves to enhance the information representation of time series data. S34, embedded coding According to the text prompts designed in steps S31, S32, and S33, the encoding end of the pre-trained model is input to obtain the degraded knowledge embedding matrix.
4. The method for battery health status estimation and recycling based on a domain knowledge-guided large language model according to claim 1, characterized in that: In step S4, the two matrices obtained in steps S2 and S3 are fused and embedded into the pre-trained large model to establish a sparse sensing adapter optimized output matrix to achieve adaptive estimation of the target battery health, which mainly includes: S41. Matrix fusion embedding large model: Specifically, the sequence embedding and degradation knowledge embedding obtained by S2 and S3 are concatenated and fed into the main part of the large model for training, outputting a high-dimensional matrix for inference prediction; S42. Establish a sparse-aware adapter: The sparse attention mechanism improves computational efficiency while avoiding parameter redundancy and improving adaptability to target batteries. The sparse-aware adapter consists of three parts: sparse pattern design, sparse computation, and aggregate updates. S421, sparse pattern design: By designing a learnable sparse attention mechanism, the attention calculation can dynamically adjust the focus according to the model learning process. For each query-key pair (Q u , K v ), calculate its correlation score (a uv ), and generate a sparse coding matrix (S) through sigmoid normalization to determine which attention calculations need to be retained. The specific formula is as follows: and uv =sigmoid(f(Qu,Kv)) S422, sparse calculation: When performing attention calculation, use the sparse coding matrix (S) as a mask and perform attention calculation only on the selected query-key pairs. For the query-key pairs that meet the conditions, calculate their attention scores and normalize them through Softmax to finally obtain the adjusted attention matrix The specific formula is as follows: in, The final sparse attention matrix ensures that only highly relevant positions are calculated, effectively reducing computational complexity and improving model adaptability and reasoning efficiency. S423, aggregation update: Specifically, after the sparse calculation is completed, the sparse attention matrix (A * ) performs weighted summation on the value matrix (V) to generate the final representation vector (Z), then uses a bidirectional gated recurrent unit (BiGRU) to further extract sequence features, and finally maps the battery health status through a linear layer to output the prediction result; S43. Model training method: Specifically, during the parameter backpropagation process, the parameters of the pre-trained large model embedder and main body are frozen, and only the training parameters of the relevant components are propagated to learn personalized parameters related to downstream tasks, so that it can better learn the degradation pattern of the target battery.
Citation Information
Cited By
Thermal runaway prediction method and device of power battery, storage medium and electronic equipment
CN121276357A