Battery health degree prediction method and device, computer equipment and storage medium
Through the optimal battery health prediction model, the partial charging curve of lithium-ion batteries is characterized by using the translator and frozen pre-trained language model. Combined with the physically guided test time prompt learning algorithm, the lifelong training data collection time of lithium-ion batteries is solved. The lag problem achieves rapid and accurate prediction of battery health and improves the development speed of the new generation of batteries.
Patent Information
- Application Number
- CN202411035503.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-31
AI Technical Summary
The time required to collect lifetime training data of lithium-ion batteries in the prior art cannot keep up with the development speed of new batteries, resulting in a slow development speed of the new generation of batteries.
The optimal battery health prediction model consisting of a translator, frozen pre-trained language model, output mapping layer and feature reconstruction layer is adopted to translate and reconstruct the battery electrical feature sequence words through partial charging curves, combined with physical boot tests Time prompt learning algorithm generates target prediction battery electrical characteristics sequence words to achieve prediction of battery health.
This method does not require a large amount of data, fully taps the generalization potential of the pre-trained language model, pays attention to the current battery health information, optimizes the battery charging curve, makes up for the insufficient interpretability of the pure data-driven model, and improves the development speed of the new generation of batteries.
Smart Images

Figure CN119226967A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of lithium-ion batteries, and in particular to a method, device, computer equipment and storage medium for predicting battery health. Background Art
[0002] An important direction of battery management system is battery state of health (SOH) estimation, which cannot be measured directly and can only be estimated to assess the degree of battery degradation. Accurate estimation of battery health is crucial for safe and efficient energy management and the development of new generation batteries.
[0003] At present, data-driven models are mainly used to predict battery health. The training of data-driven models requires battery life data to establish a mapping relationship for each lithium-ion battery. However, due to the extremely long life cycle of lithium-ion batteries, to obtain lifetime training data, heavy discharge aging experiments must be carried out, and these experiments often take several years. In other words, the time required to collect lifetime training data cannot keep up with the development speed of new batteries, resulting in a low development speed of the new generation of batteries. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, computer device and storage medium for predicting battery health, the main purpose of which is to solve the problem that the time required to collect lifetime training data cannot keep up with the development speed of new batteries, resulting in a low development speed of the new generation of batteries.
[0005] According to the first aspect of the present application, a method for predicting battery health is provided, comprising:
[0006] Determining an optimal battery health prediction model, wherein the optimal battery health prediction model is composed of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer;
[0007] Obtaining a partial charging curve of the current battery, and translating the partial charging curve into a battery electrical characteristic sequence word using the translator;
[0008] Inputting the battery electrical feature sequence words into the frozen pre-trained language model to obtain an intermediate predicted battery electrical feature sequence word output by the frozen pre-trained language model, and performing feature reconstruction using the feature reconstruction layer based on the intermediate predicted battery electrical feature sequence word to obtain a complete charging curve;
[0009] Based on the complete charging curve, the battery electrical characteristic sequence word is updated in time using a physical guided test time prompt learning algorithm to obtain an updated battery electrical characteristic sequence word, and the updated battery electrical characteristic sequence word is input into the frozen pre-trained language model to obtain a target predicted battery electrical characteristic sequence word output by the frozen pre-trained language model;
[0010] The output mapping layer is used to perform mapping based on the target predicted battery electrical characteristic sequence word to obtain the predicted health of the current battery.
[0011] Optionally, before determining the optimal battery health prediction model, the method further includes:
[0012] Establishing an initial battery health prediction model, wherein the initial battery health prediction model consists of an initial translator, an initial pre-trained language model, an initial output mapping layer, and an initial feature reconstruction layer;
[0013] Freezing the self-attention layer and the feedforward neural network in the initial pre-trained language model to obtain the frozen pre-trained language model;
[0014] Acquire a battery training set, wherein the battery training set includes a plurality of partial charging curves, each of which is marked with a health level, and each of which is blocked at a plurality of locations;
[0015] The initial translator, the initial output mapping layer and the initial feature reconstruction layer in the initial battery health prediction model are trained using the battery training set to obtain the optimal battery health prediction model.
[0016] Optionally, the using the translator to translate the partial charging curve into a battery electrical characteristic sequence word comprises:
[0017] normalizing the partial charging curve using the nominal capacity based on the curve embedding layer of the translator to obtain normalized curve characteristic data, and determining a curve embedding patch based on the curve embedding layer using the curve characteristic data;
[0018] Acquire prompt feature words, and obtain a text template using the prompt feature words based on the linear layer of the translator;
[0019] The battery electrical feature sequence words are obtained by using the curve embedding patch and the text template based on the multi-head attention layer of the translator.
[0020] Optionally, inputting the battery electrical characteristic sequence words into the frozen pre-trained language model to obtain an intermediate predicted battery electrical characteristic sequence word output by the frozen pre-trained language model comprises:
[0021] Processing the battery electrical feature sequence words using the multi-head attention layer in the frozen pre-trained language model to obtain a first processing result;
[0022] Inputting the first processing result and the battery electrical characteristic sequence word into the first regular layer in the frozen pre-trained language model to obtain a second processing result;
[0023] Inputting the second processing result into the forward propagation layer in the frozen pre-trained language model to obtain a third processing result;
[0024] The third processing result and the second processing result are input into the second regular layer in the frozen pre-trained language model to obtain the intermediate predicted battery electrical feature sequence word.
[0025] Optionally, the updating of the battery electrical characteristic sequence word by time based on the complete charging curve using a physical guided test time prompt learning algorithm to obtain an updated battery electrical characteristic sequence word includes:
[0026] Determine the equivalent circuit model as a physical constraint;
[0027] Determine prompt battery electrical feature sequence words using the physical guided test time prompt learning algorithm based on the physical constraint conditions, the partial charging curve of the current battery, and the complete charging curve;
[0028] The updated battery electrical characteristic sequence word is determined based on the prompt battery electrical characteristic sequence word and the battery electrical characteristic sequence word.
[0029] Optionally, after the output mapping layer is used to map the target predicted battery electrical characteristic sequence words to obtain the predicted health of the current battery, the method further includes:
[0030] Acquire the actual health of the current battery, calculate the absolute value of the difference between the actual health and the predicted health, and calculate the ratio of the absolute value of the difference to the actual health;
[0031] When the ratio exceeds a target threshold, determining that the health prediction result is unreliable;
[0032] When the ratio does not exceed the target threshold, it is determined that the health prediction result is reliable.
[0033] Optionally, after determining that the health prediction result is unreliable, the method further includes:
[0034] A battery training set is obtained, and the translator, the output mapping layer, and the feature reconstruction layer in the optimal battery health prediction model are retrained using the battery training set to update model parameters to obtain an updated battery health prediction model, wherein the updated battery health prediction model is composed of an updated translator, the frozen pre-trained language model, an updated output mapping layer, and an updated feature reconstruction layer.
[0035] According to a second aspect of the present application, a battery health prediction device is provided, comprising:
[0036] A determination module, used to determine an optimal battery health prediction model, wherein the optimal battery health prediction model is composed of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer;
[0037] An acquisition module, used for acquiring a partial charging curve of the current battery, and translating the partial charging curve into a battery electrical characteristic sequence word by using the translator;
[0038] A reconstruction module, used for inputting the battery electrical characteristic sequence words into the frozen pre-trained language model to obtain an intermediate predicted battery electrical characteristic sequence word output by the frozen pre-trained language model, and performing feature reconstruction using the feature reconstruction layer based on the intermediate predicted battery electrical characteristic sequence word to obtain a complete charging curve;
[0039] an updating module, configured to perform time updating on the battery electrical characteristic sequence words based on the complete charging curve by using a physical guided test time prompt learning algorithm to obtain updated battery electrical characteristic sequence words, and input the updated battery electrical characteristic sequence words into the frozen pre-trained language model to obtain a target predicted battery electrical characteristic sequence word output by the frozen pre-trained language model;
[0040] A mapping module is used to map the target predicted battery electrical characteristic sequence words using the output mapping layer to obtain the predicted health of the current battery.
[0041] According to a third aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0042] According to a fourth aspect of the present application, a readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of any one of the methods in the first aspect are implemented. .
[0043] By means of the above technical solution, the present application provides a method, device, computer equipment and storage medium for predicting battery health. The present application predicts battery health through an optimal battery health prediction model. The optimal battery health prediction model consists of a translator, a frozen pre-trained language model, an output mapping layer and a feature reconstruction layer. The pre-trained language model is fully exploited for its generalization potential, especially its general potential in health assessment. Its training does not require a large amount of data, and only focuses on the inherent health information in the partial charging curve of the current battery (that is, the test battery data), which reflects the latest and most realistic battery status. At the same time, the learning algorithm using physical guidance test time prompts can supplement the data and guide the pre-trained language model to generate a complete battery charging curve to optimize the prompt, which makes up for the lack of interpretability of the pure data-driven model in the prior art, thereby effectively improving the development speed of the new generation of batteries. . BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1A A flowchart of a method for predicting battery health provided by an embodiment of the present application is shown;
[0045] Figure 1B A schematic diagram showing the structure of an optimal battery health prediction model of a battery health prediction method provided in an embodiment of the present application;
[0046] Figure 2 A flowchart of another method for predicting battery health provided in an embodiment of the present application is shown;
[0047] Figure 3A A schematic diagram of the structure of a battery health prediction device provided in an embodiment of the present application is shown;
[0048] Figure 3B A schematic diagram of the structure of a battery health prediction device provided in an embodiment of the present application is shown;
[0049] Figure 3C A schematic diagram of the structure of a battery health prediction device provided in an embodiment of the present application is shown;
[0050] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0051] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0052] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0053] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0054] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0055] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0056] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0057] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0058] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0059] The present application embodiment provides a method for predicting battery health. Figure 1A As shown, including:
[0060] 101. Determine the optimal battery health prediction model.
[0061] In the embodiment of the present application, the execution subject is a prediction system that can execute the battery health prediction method. This prediction system needs to first determine the optimal battery health prediction model. This optimal battery health prediction model is pre-trained and is directly used here. It should be noted that, if Figure 1BAs shown in the figure, the optimal battery health prediction model consists of a translator, a frozen pre-trained language model, an output mapping layer and a feature reconstruction layer. In order to emphasize the inherent content calculation in the language model, some components in the pre-trained language model (PLM) need to be frozen, such as the self-attention layer and the feedforward neural network. Freezing these components can make full use of the cross-modal migration capability of the PLM.
[0062] 102. Obtain a partial charging curve of the current battery, and use a translator to translate the partial charging curve into a battery electrical characteristic sequence word.
[0063] In the embodiment of the present application, after determining the optimal battery health prediction model, the optimal battery health prediction model can be used to predict the health. Therefore, the battery whose health needs to be predicted is determined. This battery is called the current battery, and part of the characteristic curve of this battery, that is, the battery test data, is obtained. For example, the voltage sampling window ΔV is determined, and the target characteristic data T' is obtained in sequence through daily charging and discharging. The target characteristic data T' is a univariate time series data, where T'={(x1, y1), x2, ..., x N}, the purpose of this embodiment of the application is to predict each x i The corresponding health level y i , x i It is a partial charging curve with inherent health information, i.e., a partial constant current voltage-time curve with a time step of T. y1 can be regarded as a new battery with SOH=100%. During the constant current charging process, the charge of the lithium-ion battery is obtained by integrating the current at each time step. After that, the patch embedding is reprogrammed with a compressed text template by the translator to align the two modes for modal alignment, i.e., the partial charging curve is translated into a battery electrical feature sequence word by the translator. Through this process, the modalities of the time series data and natural language are effectively adjusted, so that the capabilities of LLM can be fully utilized later.
[0064] 103. Input the battery electrical feature sequence words into the frozen pre-trained language model to obtain the intermediate predicted battery electrical feature sequence words output by the frozen pre-trained language model, and perform feature reconstruction using the feature reconstruction layer based on the intermediate predicted battery electrical feature sequence words to obtain a complete charging curve, which is a complete voltage-time curve.
[0065] 104. Based on the complete charging curve, the battery electrical characteristic sequence words are updated in time using a physical guided test time prompt learning algorithm to obtain an updated battery electrical characteristic sequence word, and the updated battery electrical characteristic sequence word is input into a frozen pre-trained language model to obtain a target predicted battery electrical characteristic sequence word output by the frozen pre-trained language model.
[0066] In an embodiment of the present application, after generating the complete charging curve, a physical guided test time prompt learning algorithm is obtained. Compared with directly fine-tuning the model, prompt learning only needs to modify the context of the model input to learn outside the pre-trained model. Therefore, this algorithm will not distort the pre-trained features, nor will it lead to behaviors in specific fields, thereby losing the out-of-distribution generalization ability of LLM. At the same time, test time training was originally a strategy proposed to improve the generalization ability of the model under distribution shift. Prompt learning can be combined with test time training to improve the generalization ability of large pre-trained models. For example, by adjusting the prompts at test time, the performance of the CLIP model on visual tasks can be improved. Therefore, the generalization ability of LLM on cross-battery tasks can be improved by optimizing the prompts at test time. The specific formula is:
[0067]
[0068] Among them, p* is the optimization hint, p is the optimization target, L is the unsupervised loss function, F is the pre-trained language model, and X test is the partial charge curve of the current battery. It should be emphasized that no additional labels or data are required except for the zero-point test sample. This means it is an unsupervised learning objective.
[0069] Therefore, the battery electrical feature sequence words are time-updated using a physical guided test time prompt learning algorithm to obtain updated battery electrical feature sequence words, which are then input into a frozen pre-trained language model to obtain target predicted battery electrical feature sequence words output by the frozen pre-trained language model.
[0070] 105. Based on the target prediction, the battery electrical characteristic sequence words are mapped using the output mapping layer to obtain the predicted health of the current battery.
[0071] The method of the embodiment of the present application predicts the battery health through an optimal battery health prediction model. The optimal battery health prediction model consists of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer. It fully taps the generalization potential of the pre-trained language model, especially the general potential in health assessment. Its training does not require a large amount of data, and only focuses on the inherent health information in the partial charging curve of the current battery (that is, the test battery data), which reflects the latest and most realistic battery status; at the same time, the use of physical guidance test time prompt learning algorithm can supplement the data and guide the pre-trained language model to generate a complete battery charging curve to optimize the prompt, which makes up for the lack of interpretability of the pure data-driven model in the prior art, thereby effectively improving the development speed of the new generation of batteries.
[0072] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation of this embodiment, the embodiment of the present application provides another method for predicting battery health, such as Figure 2 As shown, including:
[0073] 201. Obtain an optimal battery health prediction model.
[0074] In an embodiment of the present application, it is necessary to first establish an initial battery health prediction model, where the initial battery health prediction model consists of an initial translator, an initial pre-trained language model, an initial output mapping layer, and an initial feature reconstruction layer. Then, the self-attention layer and the feedforward neural network in the initial pre-trained language model are frozen to obtain the frozen pre-trained language model, and then a battery training set is obtained. The battery training set here includes multiple partial charging curves, each partial charging curve is marked with a health level, and each partial charging curve is blocked in multiple places. Finally, the battery training set is used to train the initial translator, initial output mapping layer, and initial feature reconstruction layer in the initial battery health prediction model to obtain the optimal battery health prediction model.
[0075] It should be noted that the battery data can be represented by X, X∈R. This training set includes many partial constant current voltage-time curves with a time step of T, that is, many charging curves. Each charging curve is marked with health, that is, a labeled lifetime training sample can be obtained, that is, a battery training set, S'={(x1,y1),(x2,y2),...,(x M ,y M)}, it should also be noted that the battery training set covers widely used cathode active materials with capacities ranging from 0.74Ah to 27Ah, and covers many different manufacturers. It is necessary to highlight the ability of cross-battery versatility. Some charging curves in the battery training set need to be processed, that is, some charging curves are randomly masked (occluded) in multiple places, so that some charging curves used for training can be obtained.
[0076] 202. Obtain a partial charging curve of the current battery, and use a translator to translate the partial charging curve into a battery electrical characteristic sequence word.
[0077] In an embodiment of the present application, firstly, a portion of the charging curve is normalized using the nominal capacity based on the curve embedding layer of the translator to obtain normalized curve feature data, and a curve embedding patch is determined based on the curve embedding layer using the curve feature data; then, prompt feature words are obtained, and a text template is obtained based on the prompt feature words based on the linear layer of the translator; finally, the battery electrical feature sequence words are obtained based on the curve embedding patch and the text template based on the multi-head attention layer of the translator.
[0078] For example, Figure 1B As shown in the figure, after obtaining the partial charging curve of the current battery, the partial charging curve is determined to be a univariate time series data. During the constant current charging process, the charge of the lithium-ion battery is obtained by integrating the current at each time step. The current is expanded into a d-dimensional vector using the curve embedding layer and normalized with the nominal capacity of the lithium-ion battery to adapt it to different lithium-ion batteries; then, this series of data is represented as X∈R 1×T ; Next, aggregate the consecutive timestamps into a length of L p The overlapping patch markers are used to determine the total number of blocks in the input sequence:
[0079]
[0080] Where S represents the horizontal sliding step size. Given these patches And based on the pre-created dimension D, we get the patch embedding X P ∈R P×D , D can also be understood as the dimension of word embedding, which is convenient for later translation.
[0081] Furthermore, after determining the patch embedding form of the input sequence, in order to align the modality between time series data and language and activate the time series understanding ability of LLM, the patch embedding can be reprogrammed into the pre-trained word embedding space of LLM. It should be noted that for the word embedding space E∈R V×D, where V is the vocabulary size. The vocabulary size can be very large (for example, the vocabulary size of GPT2 is 50257). Directly using E will produce a huge and potentially dense reprogramming space. In order to improve computational efficiency and increase the difficulty of capturing relevant source tags, the text template is determined based on the prompt word features through a linear layer, that is, it can be linearly represented as E′∈R V′×D , where V′<<V. Then, a multi-head cross-attention layer is used to align the time series patches and the text template. In this way, the text template can learn clues in the language that can represent the relevant local patch information. Specifically, for each head k={1,...,K}, the query matrix is defined as The key matrix is The value matrix is in,
[0082] Specifically, D is the word embedding dimension of LLM,
[0083] Then, the time series fragments in each attention head are reprogrammed, and in this way, each attention head can capture different relevant features, where the time series patch reprogrammed by each attention head is:
[0084]
[0085] in,
[0086] By aggregating the time series patches reprogrammed by each attention head, the battery electrical feature sequence words can be obtained. The battery electrical feature sequence words are expressed as:
[0087] Z (i) ∈R P×D ,
[0088] That is to say, through the above process, the input battery data is re-encoded into sequence embedding, and finally the battery electrical feature sequence words are obtained, which effectively adjusts the modality of time series data and natural language, and the capabilities of LLM can be fully utilized later.
[0089] 203 : Input the battery electrical feature sequence words into the frozen pre-trained language model to obtain the intermediate predicted battery electrical feature sequence words output by the frozen pre-trained language model.
[0090] In the embodiments of the present application, Figure 1BAs shown, the battery electrical feature sequence words are first processed using the multi-head attention layer in the frozen pre-trained language model to obtain the first processing result; then the first processing result and the battery electrical feature sequence words are input into the first regular layer in the frozen pre-trained language model to obtain the second processing result; then the second processing result is input into the forward propagation layer in the frozen pre-trained language model to obtain the third processing result; finally, the third processing result and the second processing result are input into the second regular layer in the frozen pre-trained language model to obtain the intermediate predicted battery electrical feature sequence words. It should be noted that the first, second and third above do not have clear physical meanings, and are only used to distinguish the processing results.
[0091] 204. Based on the intermediate predicted battery electrical feature sequence words, feature reconstruction is performed using a feature reconstruction layer to obtain a complete charging curve.
[0092] In the embodiment of the present application, the feature reconstruction layer is essentially a linear layer for realizing the feature reconstruction function. As can be seen from the foregoing, since the intermediate predicted battery electrical feature sequence words have completed the time series patches, a complete charging curve can be generated through the feature reconstruction of the linear layer.
[0093] 205. Based on the complete charging curve, the battery electrical characteristic sequence word is updated in time using a physical guided test time prompt learning algorithm to obtain an updated battery electrical characteristic sequence word.
[0094] In an embodiment of the present application, since the label cannot be adjusted during testing, an unsupervised loss can be selected for timely adjustment. In battery research, the complete charge / discharge curve from the lower voltage limit to the upper voltage limit can describe the aging pattern of lithium-ion batteries, so the accurate health status of the battery can be determined in theory. Inspired by this, a complete battery charging curve can be generated from a partially charged curve by guiding a pre-trained language model (LLM), which can be used for test time training (TTT) for self-supervised learning.
[0095] For example, Figure 1B As shown, input a test sample X test ∈R 1×T , and then re-encoded into a labeled representation, i.e., Z∈R P×D , where a portion of the mark can be randomly shielded in advance, in the form of Mask r Z (i) . Using these masked parts, a complete battery charging curve X′∈R is generated 1×T′, where T′>T. However, without any annotation of the complete curve, it is rarely possible to generate a meaningful curve. Therefore, the physical laws in the equivalent circuit model (ECM) can be used to guide the pre-trained language model (LLM) to generate a charging curve that conforms to the physical laws. The specific form of the optimization goal here is:
[0096]
[0097] in, represents the resulting complete voltage-time curve and the known overlap, represents the complete voltage-time curve generated, θ1, θ2 and I are parameters related to the working conditions collected by the BMS system, and λ represents the weighted hyperparameter.
[0098] It should be noted that the equivalent circuit model (ECM) is a widely used model to describe the electrical behavior of batteries in terms of voltage, current, resistance and capacitance. The first-order Thevenin model is considered to be able to accurately and adequately simulate the state of the battery, and is simple and computationally efficient. In this model, the electrical behavior of the battery can be represented by a voltage source, and its internal ohmic resistance is represented by R. The parallel branch consisting of parallel and series capacitor-polarization-capacitance (PCP) is used to simulate the polarization effect of the battery. u and I represent the terminal voltage and current that can be collected during use, respectively. According to Kirchhoff's law, the electrical behavior of the battery can be characterized by a physical equation, as shown in the specific formula:
[0099]
[0100] The equivalent circuit model (ECM) has good qualities, such as easy implementation and relatively accurate description of battery characteristics, which is used as a physical constraint.
[0101] 206. Input the updated battery electrical feature sequence words into the frozen pre-trained language model to obtain the target predicted battery electrical feature sequence words output by the frozen pre-trained language model.
[0102] In the embodiment of the present application, it can be seen from step 205 that the physically guided test time prompt learning (PGTPT) algorithm is used to guide the LLM to generate a complete battery charging curve to optimize the prompt, that is, the output target predicted battery electrical feature sequence word has the ability to generate a complete battery charging curve to optimize the prompt.
[0103] 207. Based on the target prediction, the battery electrical characteristic sequence words are mapped using the output mapping layer to obtain the predicted health of the current battery.
[0104] In the embodiment of the present application, the output mapping layer is essentially a linear layer for realizing the mapping function, and the target predicted battery electrical characteristic sequence words are output to the linear layer, which can directly give the predicted health of the current battery.
[0105] It should be noted that the specific number of predicted health degrees is consistent with the number that needs to be predicted in the input test data. For example, if the input test data is X={(x1, y1), x2, x3}, then the final output is the predicted health degree corresponding to x2 and the predicted health degree corresponding to x3.
[0106] 208. Verify the reliability of health prediction results.
[0107] In an embodiment of the present application, in order to discover problems in a timely manner and facilitate timely resolution, the optimal battery health prediction model can be verified at preset time intervals, that is, the actual health of the current battery is obtained, the absolute value of the difference between the actual health and the predicted health is calculated, and the ratio of the absolute value of the difference to the actual health is calculated; when the ratio exceeds the target threshold, the health prediction result is determined to be unreliable; when the ratio does not exceed the target threshold, the health prediction result is determined to be reliable.
[0108] Furthermore, after determining that the health prediction result is unreliable, a battery training set can be obtained, and the battery training set can be used to retrain the translator, output mapping layer and feature reconstruction layer in the optimal battery health prediction model, and the model parameters are updated to obtain an updated battery health prediction model. The updated battery health prediction model consists of an updated translator, a frozen pre-trained language model, an updated output mapping layer and an updated feature reconstruction layer.
[0109] The method of the embodiment of the present application predicts the battery health through an optimal battery health prediction model. The optimal battery health prediction model consists of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer. It fully taps the generalization potential of the pre-trained language model, especially the general potential in health assessment. Its training does not require a large amount of data, and only focuses on the inherent health information in the partial charging curve of the current battery (that is, the test battery data), which reflects the latest and most realistic battery status; at the same time, the use of physical guidance test time prompt learning algorithm can supplement the data and guide the pre-trained language model to generate a complete battery charging curve to optimize the prompt, which makes up for the lack of interpretability of the pure data-driven model in the prior art, thereby effectively improving the development speed of the new generation of batteries.
[0110] Further, as a specific implementation of the method described in FIG. 1, as shown in FIG. Figure 3AAs shown, an embodiment of the present invention provides a battery health prediction device, including: a determination module 301, an acquisition module 302, a reconstruction module 303, an update module 304 and a mapping module 305.
[0111] The determination module 301 is used to determine an optimal battery health prediction model, wherein the optimal battery health prediction model is composed of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer;
[0112] The acquisition module 302 is used to acquire a partial charging curve of the current battery, and translate the partial charging curve into a battery electrical characteristic sequence word using the translator;
[0113] The reconstruction module 303 is used to input the battery electrical feature sequence words into the frozen pre-trained language model to obtain the intermediate predicted battery electrical feature sequence words output by the frozen pre-trained language model, and perform feature reconstruction using the feature reconstruction layer based on the intermediate predicted battery electrical feature sequence words to obtain a complete charging curve;
[0114] The updating module 304 is used to update the battery electrical characteristic sequence words in time based on the complete charging curve using a physical guided test time prompt learning algorithm to obtain an updated battery electrical characteristic sequence word, and input the updated battery electrical characteristic sequence word into the frozen pre-trained language model to obtain a target predicted battery electrical characteristic sequence word output by the frozen pre-trained language model;
[0115] The mapping module 305 is used to perform mapping based on the target predicted battery electrical characteristic sequence word using the output mapping layer to obtain the predicted health of the current battery.
[0116] In specific application scenarios, such as Figure 3B As shown, the device also includes: a training module 306.
[0117] The training module 306 is used to establish an initial battery health prediction model, which is composed of an initial translator, an initial pre-trained language model, an initial output mapping layer and an initial feature reconstruction layer; freeze the self-attention layer and the feedforward neural network in the initial pre-trained language model to obtain the frozen pre-trained language model; obtain a battery training set, which includes multiple partial charging curves, each partial charging curve is marked with a health level, and each partial charging curve is blocked at multiple locations; use the battery training set to train the initial translator, the initial output mapping layer and the initial feature reconstruction layer in the initial battery health prediction model to obtain the optimal battery health prediction model.
[0118] In a specific application scenario, the acquisition module 302 is also used to normalize the partial charging curve using the nominal capacity based on the curve embedding layer of the translator to obtain normalized curve feature data, and determine the curve embedding patch based on the curve embedding layer using the curve feature data; obtain prompt feature words, and obtain a text template based on the linear layer of the translator using the prompt feature words; and obtain the battery electrical feature sequence words based on the multi-head attention layer of the translator using the curve embedding patch and the text template.
[0119] In a specific application scenario, the reconstruction module 303 is also used to use the multi-head attention layer in the frozen pre-trained language model to process the battery electrical feature sequence words to obtain a first processing result; input the first processing result and the battery electrical feature sequence words into the first regular layer in the frozen pre-trained language model to obtain a second processing result; input the second processing result into the forward propagation layer in the frozen pre-trained language model to obtain a third processing result; input the third processing result and the second processing result into the second regular layer in the frozen pre-trained language model to obtain the intermediate predicted battery electrical feature sequence words.
[0120] In a specific application scenario, the update module 304 is also used to determine the equivalent circuit model as a physical constraint condition; determine the prompt battery electrical characteristic sequence word based on the physical constraint condition, the partial charging curve of the current battery, and the complete charging curve using the physical guided test time prompt learning algorithm; determine the updated battery electrical characteristic sequence word based on the prompt battery electrical characteristic sequence word and the battery electrical characteristic sequence word.
[0121] In specific application scenarios, such as Figure 3C As shown, the device also includes: a verification module 307.
[0122] The verification module 307 is used to obtain the actual health of the current battery, calculate the absolute value of the difference between the actual health and the predicted health, and calculate the ratio of the absolute value of the difference to the actual health; when the ratio exceeds a target threshold, determine that the health prediction result is unreliable;
[0123] When the ratio does not exceed the target threshold, it is determined that the health prediction result is reliable.
[0124] In a specific application scenario, the training module 306 is also used to obtain a battery training set, and use the battery training set to retrain the translator, the output mapping layer and the feature reconstruction layer in the optimal battery health prediction model, update the model parameters, and obtain an updated battery health prediction model. The updated battery health prediction model consists of an updated translator, the frozen pre-trained language model, an updated output mapping layer and an updated feature reconstruction layer.
[0125] The device provided by the embodiment of the present application predicts the battery health through the optimal battery health prediction model. The optimal battery health prediction model consists of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer. It fully taps the generalization potential of the pre-trained language model, especially the general potential in health assessment. Its training does not require a large amount of data, and only focuses on the inherent health information in the partial charging curve of the current battery (that is, the test battery data), which reflects the latest and most realistic battery status; at the same time, the learning algorithm using physical guidance test time prompts can supplement the data and guide the pre-trained language model to generate a complete battery charging curve to optimize the prompt, which makes up for the lack of interpretability of the pure data-driven model in the prior art, thereby effectively improving the development speed of the new generation of batteries. .
[0126] It should be noted that for other corresponding descriptions of the functional units involved in the battery health prediction device provided in the embodiment of the present invention, reference can be made to Figure 1A and FIG. 3A to FIG. 3C The corresponding description in will not be repeated here.
[0127] In an exemplary embodiment, see Figure 4 , a computer device is also provided, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the battery health prediction method in the above embodiment.
[0128] A readable storage medium stores a computer program, which implements the steps of the battery health prediction method when executed by a processor.
[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0130] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.
[0131] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0132] The above application serial numbers are for description only and do not represent the advantages or disadvantages of the implementation scenarios.
[0133] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A method for predicting battery health, characterized in that: include: Determining an optimal battery health prediction model, wherein the optimal battery health prediction model is composed of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer; Obtaining a partial charging curve of the current battery, and translating the partial charging curve into a battery electrical characteristic sequence word using the translator; Inputting the battery electrical feature sequence words into the frozen pre-trained language model to obtain an intermediate predicted battery electrical feature sequence word output by the frozen pre-trained language model, and performing feature reconstruction using the feature reconstruction layer based on the intermediate predicted battery electrical feature sequence word to obtain a complete charging curve; Based on the complete charging curve, the battery electrical characteristic sequence word is updated in time using a physical guided test time prompt learning algorithm to obtain an updated battery electrical characteristic sequence word, and the updated battery electrical characteristic sequence word is input into the frozen pre-trained language model to obtain a target predicted battery electrical characteristic sequence word output by the frozen pre-trained language model; The output mapping layer is used to perform mapping based on the target predicted battery electrical characteristic sequence word to obtain the predicted health of the current battery.
2. The method for predicting battery health according to claim 1, characterized in that: Before determining the optimal battery health prediction model, the method further includes: Establishing an initial battery health prediction model, wherein the initial battery health prediction model consists of an initial translator, an initial pre-trained language model, an initial output mapping layer, and an initial feature reconstruction layer; Freezing the self-attention layer and the feedforward neural network in the initial pre-trained language model to obtain the frozen pre-trained language model; Acquire a battery training set, wherein the battery training set includes a plurality of partial charging curves, each of which is marked with a health level, and each of which is blocked at a plurality of locations; The initial translator, the initial output mapping layer and the initial feature reconstruction layer in the initial battery health prediction model are trained using the battery training set to obtain the optimal battery health prediction model.
3. The method for predicting battery health according to claim 1, characterized in that: The using the translator to translate the partial charging curve into a battery electrical characteristic sequence word comprises: normalizing the partial charging curve using the nominal capacity based on the curve embedding layer of the translator to obtain normalized curve characteristic data, and determining a curve embedding patch based on the curve embedding layer using the curve characteristic data; Acquire prompt feature words, and obtain a text template using the prompt feature words based on the linear layer of the translator; The battery electrical feature sequence words are obtained by using the curve embedding patch and the text template based on the multi-head attention layer of the translator.
4. The method for predicting battery health according to claim 1, characterized in that: The step of inputting the battery electrical characteristic sequence words into the frozen pre-trained language model to obtain an intermediate predicted battery electrical characteristic sequence word output by the frozen pre-trained language model comprises: Processing the battery electrical feature sequence words using the multi-head attention layer in the frozen pre-trained language model to obtain a first processing result; Inputting the first processing result and the battery electrical characteristic sequence word into the first regular layer in the frozen pre-trained language model to obtain a second processing result; Inputting the second processing result into the forward propagation layer in the frozen pre-trained language model to obtain a third processing result; The third processing result and the second processing result are input into the second regular layer in the frozen pre-trained language model to obtain the intermediate predicted battery electrical feature sequence word.
5. The method for predicting battery health according to claim 1, characterized in that: The method of updating the battery electrical characteristic sequence word by time based on the complete charging curve using a physical guided test time prompt learning algorithm to obtain an updated battery electrical characteristic sequence word includes: Determine the equivalent circuit model as a physical constraint; Determine prompt battery electrical feature sequence words using the physical guided test time prompt learning algorithm based on the physical constraint conditions, the partial charging curve of the current battery, and the complete charging curve; The updated battery electrical characteristic sequence word is determined based on the prompt battery electrical characteristic sequence word and the battery electrical characteristic sequence word.
6. The method for predicting battery health according to claim 1, characterized in that: After the output mapping layer is used to map the target predicted battery electrical characteristic sequence words to obtain the predicted health of the current battery, the method further includes: Acquire the actual health of the current battery, calculate the absolute value of the difference between the actual health and the predicted health, and calculate the ratio of the absolute value of the difference to the actual health; When the ratio exceeds a target threshold, determining that the health prediction result is unreliable; When the ratio does not exceed the target threshold, it is determined that the health prediction result is reliable.
7. The method for predicting battery health according to claim 6, characterized in that: After determining that the health prediction result is unreliable, the method further includes: A battery training set is obtained, and the translator, the output mapping layer, and the feature reconstruction layer in the optimal battery health prediction model are retrained using the battery training set to update model parameters to obtain an updated battery health prediction model, wherein the updated battery health prediction model is composed of an updated translator, the frozen pre-trained language model, an updated output mapping layer, and an updated feature reconstruction layer.
8. A battery health prediction device, characterized in that: include: A determination module, used to determine an optimal battery health prediction model, wherein the optimal battery health prediction model is composed of a translator, a frozen pre-trained language model, an output mapping layer, and a feature reconstruction layer; An acquisition module, used for acquiring a partial charging curve of the current battery, and translating the partial charging curve into a battery electrical characteristic sequence word by using the translator; A reconstruction module, used for inputting the battery electrical characteristic sequence words into the frozen pre-trained language model to obtain an intermediate predicted battery electrical characteristic sequence word output by the frozen pre-trained language model, and performing feature reconstruction using the feature reconstruction layer based on the intermediate predicted battery electrical characteristic sequence word to obtain a complete charging curve; an updating module, configured to perform time updating on the battery electrical characteristic sequence words based on the complete charging curve by using a physical guided test time prompt learning algorithm to obtain updated battery electrical characteristic sequence words, and input the updated battery electrical characteristic sequence words into the frozen pre-trained language model to obtain a target predicted battery electrical characteristic sequence word output by the frozen pre-trained language model; A mapping module is used to map the target predicted battery electrical characteristic sequence words using the output mapping layer to obtain the predicted health of the current battery.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.