Battery life prediction model training method and apparatus, device, and storage medium

By using a battery life prediction model, which utilizes multiple sets of charge and discharge data and tag remaining lifespan, and combines expert network weights for iterative training, the problem of low accuracy in battery life prediction in existing technologies is solved, and more accurate prediction of long-term battery degradation trends is achieved.

CN122174208APending Publication Date: 2026-06-09HONG KONG UNIV OF SCI & TECH (GUANGZHOU)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONG KONG UNIV OF SCI & TECH (GUANGZHOU)
Filing Date
2026-04-29
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to capture the general aging patterns at the bottom layer in battery life prediction, resulting in low prediction accuracy, especially with unstable generalization performance across material systems and operating conditions.

Method used

A battery life prediction model is adopted. By acquiring multiple sets of charge and discharge data and tag remaining life, the number of battery degradation and aging characteristics is determined. The first and second weights of the expert network are combined for iterative training to improve prediction accuracy.

Benefits of technology

It significantly improves the accuracy of predicting long-term battery degradation trends and remaining service life, overcoming the instability of generalization performance of existing prediction algorithms across material systems and operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174208A_ABST
    Figure CN122174208A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a battery life prediction model training method, device, equipment and storage medium, and belongs to the technical field of batteries. The method comprises the following steps: determining the battery attenuation characteristics of a battery according to a plurality of charging and discharging data; determining the first weight of an expert network according to the battery attenuation characteristics, and determining the second weight of the expert network according to a preset battery attenuation rule; determining the expert weight according to the first weight and the second weight; inputting the plurality of charging and discharging data and the expert weight into a first encoding sub-model to output a first encoding feature; inputting the first encoding feature and the expert weight into a second encoding sub-model to output a second encoding feature, and determining the predicted remaining life of the battery according to the second encoding feature; determining a loss value according to the predicted remaining life and the label remaining life, and iteratively training the battery life prediction model according to the loss value to obtain the trained battery life prediction model. The application can improve the prediction accuracy of the remaining service life of the battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery technology, specifically to a training method, apparatus, device, and storage medium for a battery life prediction model. Background Technology

[0002] Early prediction of remaining battery life is crucial for accelerating battery R&D iterations and reducing lifespan testing time and resource costs. Related technologies, based on extracted battery charge / discharge data, rely on mechanistic analysis or related algorithms to calculate battery health and predict lifespan. However, battery degradation is a highly complex nonlinear process, its aging state deeply influenced by multiple factors, including the positive and negative electrode material system, physical packaging morphology, operating temperature, and different charge / discharge conditions.

[0003] Because the prediction algorithms used in these technologies are highly dependent on specific datasets, they struggle to effectively capture the general aging patterns at the underlying levels when predicting the lifespan of different batteries. This results in an inability to accurately predict the long-term degradation trend of batteries. In other words, these technologies suffer from low accuracy in predicting the remaining lifespan of batteries. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for training a battery life prediction model, which can improve the accuracy of predicting the remaining battery life.

[0005] To achieve the above objectives, this application provides, in one aspect, a method for training a battery life prediction model. The battery life prediction model includes a first encoding sub-model and a second encoding sub-model, both of which include expert networks. The method includes: Obtain multiple sets of charge and discharge data for the battery to be predicted and the remaining life of the corresponding tag for the battery under multiple sets of charge and discharge data, and determine the battery degradation characteristics based on multiple sets of charge and discharge data. The number of aging features corresponding to the preset battery degradation rule is determined based on multiple sets of charge and discharge data. The first weight of the expert network is determined based on the number of aging features and the battery degradation features. The second weight of the expert network is determined based on the battery degradation rule. The expert weights of the expert network are determined based on the first and second weights. Multiple sets of charge-discharge data and expert weights are input into the first coding sub-model, and the first coding feature is output. The first coding feature and expert weights are input into the second coding sub-model, the second coding feature is output, and the predicted remaining life of the battery is determined based on the second coding feature. The loss value is determined based on the predicted remaining lifespan and the tag remaining lifespan, and the battery lifespan prediction model is iteratively trained based on the loss value to obtain the trained battery lifespan prediction model.

[0006] In some embodiments, determining the battery degradation characteristics based on multiple sets of charge-discharge data includes: Generate prompt text based on multiple sets of charging and discharging data and preset text templates; The prompt text is input into a pre-trained large language model, which outputs the initial battery decay features of the battery. The pre-trained large language model is trained from sample text. The initial battery degradation characteristics are processed nonlinearly to obtain the battery degradation characteristics.

[0007] In some embodiments, the number of aging features corresponding to a preset battery degradation rule is determined based on multiple sets of charge-discharge data, and the first weight of the expert network is determined based on the number of aging features and the battery degradation features, including: Obtain the battery degradation rules and determine the types of multiple aging parameters that affect battery aging based on the battery degradation rules; Aging analysis was performed on multiple sets of charge-discharge data to obtain the number of aging characteristics corresponding to each aging parameter type. Based on the number of each aging feature, the number of expert networks corresponding to the aging parameter type is determined; Based on the battery degradation characteristics and the number of expert networks, the first weight of the expert network in the battery life prediction model is determined.

[0008] In some embodiments, before inputting multiple sets of charge / discharge data and expert weights into the first coding sub-model and outputting the first coding feature, the method further includes: For each set of charge and discharge data, the charge and discharge data is flattened to obtain flattened charge and discharge data; The flattened charge and discharge data are linearly processed to obtain linearly processed charge and discharge data, thus obtaining multiple sets of linearly processed charge and discharge data.

[0009] In some embodiments, the first encoding sub-model includes a first expert network and a first normalization layer; In some embodiments, multiple sets of charge / discharge data and expert weights are input into a first coding sub-model to output a first coding feature, including: Multiple sets of charge / discharge data and expert weights are input into the first expert network, and the first intermediate feature is output. Multiple sets of charge and discharge data and the first intermediate feature are input into the first normalization layer, and the first encoded feature is output.

[0010] In some embodiments, the first expert network includes a general expert network and a dedicated expert network; Multiple sets of charge / discharge data and expert weights are input into the first expert network, and the first intermediate feature is output, including: Multiple sets of charge-discharge data and expert weights are input into the first expert network. The general expert network is used to process the charge-discharge data to obtain general features. Based on the expert weights, a special expert network is used to process the charge-discharge data to obtain special features. Based on general and specific features, the first intermediate feature is determined.

[0011] In some embodiments, the second encoding sub-model includes a self-attention layer, a second normalization layer, a second expert network, and a third normalization layer; The first encoded features and expert weights are input into the second encoded sub-model, and the second encoded features are output, including: The timing information of each set of charge and discharge data is obtained, and the timing coding feature is determined based on the first coding feature and all the timing information. The timing information is characterized as the timing relationship between the corresponding charge and discharge data and other charge and discharge data. The temporally encoded features are input into the self-attention layer, and the self-attention features are output. The self-attention features and temporal encoding features are input into the second normalization layer, and the normalized features are output. The normalized features and expert weights are input into the second expert network, and the second intermediate features are output. The second intermediate feature and the normalized feature are input into the third normalization layer, and the second encoded feature is output.

[0012] To achieve the above objectives, one embodiment of this application provides a training device for a battery life prediction model. The battery life prediction model includes a first encoding sub-model and a second encoding sub-model, both of which include an expert network. The device includes: The acquisition module is used to acquire multiple sets of charge and discharge data of the battery to be predicted and the remaining life of the corresponding tag of the battery under multiple sets of charge and discharge data, and to determine the battery degradation characteristics based on multiple sets of charge and discharge data. The sub-weight determination module is used to determine the number of aging features corresponding to the preset battery degradation rules based on multiple sets of charge and discharge data, determine the first weight of the expert network based on the number of aging features and battery degradation features, and determine the second weight of the expert network based on the battery degradation rules. The expert weight determination module is used to determine the expert weights of the expert network based on the first weight and the second weight. The first encoding module is used to input multiple sets of charge and discharge data and expert weights into the first encoding sub-model and output the first encoding feature; The second encoding module is used to input the first encoding features and expert weights into the second encoding sub-model, output the second encoding features, and determine the predicted remaining life of the battery based on the second encoding features. The battery life prediction module is used to determine the loss value based on the predicted remaining life and the tag's remaining life, and to iteratively train the battery life prediction model based on the loss value to obtain the trained battery life prediction model.

[0013] To achieve the above objectives, one aspect of this application provides a computer-readable storage medium storing multiple instructions adapted for loading by a processor to execute steps in the training method for the battery life prediction model provided in this application.

[0014] To achieve the above objectives, one aspect of this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps in the training method of the battery life prediction model provided in this application.

[0015] To achieve the above objectives, one aspect of this application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the training method of the battery life prediction model provided in this application.

[0016] The battery life prediction model training method, apparatus, device, and storage medium proposed in this application acquire multiple sets of charge-discharge data of the battery to be predicted and the corresponding tag remaining life of the battery under the multiple sets of charge-discharge data, and determine the battery degradation characteristics based on the multiple sets of charge-discharge data; determine the number of aging features corresponding to the preset battery degradation rules based on the multiple sets of charge-discharge data, determine the first weight of the expert network based on the number of aging features and the battery degradation characteristics, and determine the second weight of the expert network based on the battery degradation rules; determine the expert weight of the expert network based on the first weight and the second weight; input the multiple sets of charge-discharge data and the expert weights into a first encoding sub-model, and output the first encoding feature; input the first encoding feature and the expert weights into a second encoding sub-model, and output the second encoding feature, and determine the predicted remaining life of the battery based on the second encoding feature; determine the loss value based on the predicted remaining life and the tag remaining life, and iteratively train the battery life prediction model based on the loss value to obtain the trained battery life prediction model.

[0017] This application embodiment determines the expert weights of the expert network in the battery life prediction model by combining a first weight determined based on data-driven battery degradation characteristics and a second weight determined based on pre-defined battery degradation rules based on physical priors. This allows battery-related charge and discharge data to be explicitly encoded into the expert network in a combined hardware and software approach. This mechanism enables the first and second encoding sub-models to effectively screen and constrain the expert network based on key aging factors with clear physical meaning when processing charge and discharge data. In this way, it effectively overcomes the shortcomings of existing prediction algorithms, such as high dependence on specific datasets and unstable generalization performance across material systems and operating conditions. This allows for more accurate capture of underlying general degradation and aging patterns. Consequently, this application embodiment significantly improves the accuracy of the model in predicting the long-term degradation trend and remaining service life of the battery.

[0018] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the system framework corresponding to the training method of the battery life prediction model provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the training method of the battery life prediction model provided in the embodiments of this application; Figure 3 This is a schematic diagram of the data processing flow for determining expert weights provided in an embodiment of this application; Figure 4 This is a schematic diagram of the battery life prediction model structure provided in the embodiments of this application; Figure 5 This is a schematic diagram of the module structure of the training device for the battery life prediction model provided in this application embodiment; Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0021] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] It should be noted that in all specific embodiments of this application, when it is necessary to obtain multiple sets of charge and discharge data of the battery to be predicted, permission or consent from relevant industry management personnel will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. In addition, when this application embodiment needs to obtain sensitive personal information of relevant personnel, separate permission or consent from the relevant personnel will be obtained through pop-up windows or redirection to a confirmation page. Only after obtaining the separate permission or consent of the relevant personnel will the necessary multiple sets of charge and discharge data of the battery to be predicted be obtained to enable the normal operation of this application embodiment. Other data obtained in this application embodiment are all authorized and legal data, and will not be described in detail here.

[0023] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, programmable consumer computer devices, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0024] The technical problems existing in the related technologies are as follows: Early prediction of remaining battery life is crucial for accelerating battery R&D iterations and reducing lifespan testing time and resource costs. Related technologies, based on extracted battery charge / discharge data, rely on mechanistic analysis or related algorithms to calculate battery health and predict lifespan. However, battery degradation is a highly complex nonlinear process, its aging state deeply influenced by multiple factors, including the positive and negative electrode material system, physical packaging morphology, operating temperature, and different charge / discharge conditions.

[0025] Because the prediction algorithms used in these technologies are highly dependent on specific datasets, they struggle to effectively capture the general aging patterns at the underlying levels when predicting the lifespan of different batteries. This results in an inability to accurately predict the long-term degradation trend of batteries. In other words, these technologies suffer from low accuracy in predicting the remaining lifespan of batteries.

[0026] For example, during the research and verification phase of next-generation high-nickel ternary lithium-ion batteries, researchers attempted to use early data from the first 100 cycles to predict their full lifespan, aiming to shorten the testing cycle, which can last for months. However, when the battery operates under wide temperature ranges (-20°C to 60°C) and dynamic stress testing conditions, its internal aging mechanism exhibits strong nonlinearity and multi-physics coupling characteristics: the electrolyte decomposition at high temperatures is drastically different from the lithium deposition reaction at low temperatures. Furthermore, with changes in charge / discharge depth, the volume expansion and contraction of the positive and negative electrode active materials lead to repeated rupture and regeneration of the solid electrolyte interface film. This capacity regeneration phenomenon causes the battery capacity to increase rather than decrease at certain stages. Traditional battery life prediction algorithms are typically trained on datasets under standard isothermal and constant-current conditions, relying excessively on voltage curves or explicit statistical characteristics of capacity decay, making it difficult to extract the universal degradation fingerprint resulting from the interplay of environmental stress and electrochemical mechanisms. Therefore, when this model is applied to new batteries under the above-mentioned complex operating conditions, traditional methods cannot identify early micro-fluctuations caused by changes in microstructure. They often misjudge the initial capacity fluctuations as stable characteristics, resulting in a huge deviation between the predicted remaining service life and the actual failure point, and even serious misjudgments of premature scrapping. This greatly increases the trial and error costs of battery R&D and the safety risks of end applications.

[0027] The battery life prediction model training method, apparatus, device, and storage medium proposed in this application acquire multiple sets of charge-discharge data of the battery to be predicted and the corresponding tag remaining life of the battery under the multiple sets of charge-discharge data, and determine the battery degradation characteristics based on the multiple sets of charge-discharge data; determine the number of aging features corresponding to the preset battery degradation rules based on the multiple sets of charge-discharge data, determine the first weight of the expert network based on the number of aging features and the battery degradation characteristics, and determine the second weight of the expert network based on the battery degradation rules; determine the expert weight of the expert network based on the first weight and the second weight; input the multiple sets of charge-discharge data and the expert weights into a first encoding sub-model, and output the first encoding feature; input the first encoding feature and the expert weights into a second encoding sub-model, and output the second encoding feature, and determine the predicted remaining life of the battery based on the second encoding feature; determine the loss value based on the predicted remaining life and the tag remaining life, and iteratively train the battery life prediction model based on the loss value to obtain the trained battery life prediction model.

[0028] This application embodiment determines the expert weights of the expert network in the battery life prediction model by combining a first weight determined based on data-driven battery degradation characteristics and a second weight determined based on preset degradation rules based on physical priors. This allows battery-related charge and discharge data to be explicitly encoded into the expert network in a combined hardware and software approach. This mechanism enables the first and second encoding sub-models to effectively screen and constrain the expert network based on key aging factors with clear physical meaning when processing charge and discharge data. In this way, it effectively overcomes the shortcomings of existing prediction algorithms, such as high dependence on specific datasets and unstable generalization performance across material systems and operating conditions. This allows for more accurate capture of underlying general degradation and aging patterns. Consequently, this application embodiment significantly improves the accuracy of the model in predicting the long-term degradation trend and remaining service life of the battery.

[0029] The training method, apparatus, device, and storage medium for the battery life prediction model provided in this application will be described in detail below.

[0030] Please see Figure 1 , Figure 1 This is a schematic diagram of the system framework corresponding to the training method of the battery life prediction model provided in the embodiments of this application. The training method of the battery life prediction model provided in the embodiments of this application can be applied to this system framework.

[0031] It includes terminal 140, Internet 130, gateway 120, server 110, etc.

[0032] Terminal 140 or server 110 can be a device that performs a training method for the battery life prediction model.

[0033] Terminal 140 includes, but is not limited to, mobile phones, tablets, computers, and intelligent computing centers. Terminal 140 can be a single device or a collection of multiple devices. For example, multiple computers can be interconnected via a local area network, sharing a single monitor to work collaboratively, thus forming a terminal 140. Terminal 140 can communicate with the Internet 130 via wired or wireless means to exchange data.

[0034] Server 110 refers to a computer system that can provide certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0035] Gateway 120, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are forwarded to the corresponding server 110 via gateway 120. Messages sent from server 110 to terminal 140 are also forwarded to the corresponding terminal 140 via gateway 120.

[0036] The embodiments of this application can be applied to various scenarios, such as early prediction of battery life, accelerating battery research and development and testing, optimizing battery management systems, and enabling the secondary use of batteries. Of course, the above are only illustrative examples, and the application scenarios involved in the training method of the battery life prediction model proposed in this application are far more than those shown in the examples. The specific method proposed in this application can be selected according to the actual situation.

[0037] Next, we will describe the battery life prediction model from the perspective of the training device, such as... Figure 2 As shown, Figure 2 This is a schematic flowchart illustrating the training method for the battery life prediction model provided in this application embodiment. The training method for the battery life prediction model is applied to the training device for the battery life prediction model. Figure 2 The method may include, but is not limited to, the following steps 210 to 260. When the training device for the battery life prediction model executes the training method for the battery life prediction model, the specific process is as follows. It should be noted first that this embodiment... Figure 2 The order of steps 210 to 260 is not specifically limited. The order of steps can be adjusted or some steps can be reduced or added according to actual needs.

[0038] Step 210: Obtain multiple sets of charge and discharge data of the battery to be predicted and the remaining life of the battery corresponding to the tag under the multiple sets of charge and discharge data, and determine the battery degradation characteristics based on the multiple sets of charge and discharge data. Step 220: Determine the number of aging features corresponding to the preset battery degradation rule based on multiple sets of charge and discharge data; determine the first weight of the expert network based on the number of aging features and battery degradation features; and determine the second weight of the expert network based on the battery degradation rule. Step 230: Determine the expert weights of the expert network based on the first weight and the second weight; Step 240: Input multiple sets of charging and discharging data and expert weights into the first coding sub-model and output the first coding feature; Step 250: Input the first coding features and expert weights into the second coding sub-model, output the second coding features, and determine the predicted remaining life of the battery based on the second coding features; Step 260: Determine the loss value based on the predicted remaining lifespan and the tag remaining lifespan, and iteratively train the battery lifespan prediction model based on the loss value to obtain the trained battery lifespan prediction model.

[0039] Steps 210 to 260 are described in detail below.

[0040] In step 210, multiple sets of charge-discharge data of the battery to be predicted and the remaining life of the battery corresponding to the multiple sets of charge-discharge data are obtained, and the battery degradation characteristics of the battery are determined based on the multiple sets of charge-discharge data.

[0041] In this context, the battery to be predicted refers to a specific battery entity used as the target of a lifetime prediction model in practical applications or testing and evaluation scenarios to infer its future degradation trend and lifespan. Multiple sets of charge-discharge data refer to the basic time-series records continuously collected by professional testing equipment or a Battery Management System (BMS) over multiple complete charge and discharge cycles. In practice, multiple sets of charge-discharge data typically encompass a matrix sequence of key operating parameters such as voltage, current, capacity, and time at each charge and discharge stage of the battery, objectively reflecting the dynamic changes in the battery's internal electrochemical state.

[0042] For example, in this embodiment of the application, the voltage, current, capacity / time sequence of the first N cycles (N≤100) of the battery are selected as multiple sets of charge-discharge data, and each set of charge-discharge data is the voltage, current, capacity / time data of one cycle. Of course, the specific data content included in the charge-discharge data can be selected according to the actual situation, and this embodiment of the application does not limit it in this regard.

[0043] Furthermore, after collecting multiple sets of charge-discharge data, the data can be formatted and cleaned to address data heterogeneity issues caused by different material systems, testing protocols, and ambient temperatures. Since the number of original sampling points often varies across different cycles, cleaning, denoising, and format standardization (e.g., resampling each cycle into a fixed 300 data points, including voltage, current, and capacity sequences) ensures consistent input format across batteries and datasets. Standardization not only eliminates interference from differences in underlying testing equipment and sampling frequencies on model feature extraction, providing reliable data input for subsequent battery life prediction models, but also enables the model to overcome the limitations of specific datasets, learning underlying general nonlinear aging laws more efficiently and stably. This improves the model's adaptability and life prediction generalization performance when facing new material systems or varying charge-discharge conditions.

[0044] Here, "labeled remaining lifetime" refers to the data used as a real benchmark to guide model optimization during the supervised learning training phase of the battery lifetime prediction model. In this embodiment, battery lifetime is defined as the number of cycles when the discharge capacity decays to 80% of the nominal capacity. Therefore, "labeled remaining lifetime" refers to the actual number of cycles corresponding to the irreversible decay of the battery's discharge capacity to 80% of the nominal capacity under continuous charge-discharge testing. The labeled remaining lifetime is used to compare with the predicted remaining lifetime output by the model and calculate the loss value to drive the backpropagation and iterative convergence of the neural network parameters.

[0045] It should be noted that the definition of battery life can be adjusted according to the actual situation. For example, battery life can also be defined as the number of cycles when the discharge capacity decays to 70% of the nominal capacity. This application does not impose strict limitations on this.

[0046] Battery degradation characteristics refer to a comprehensive information representation that deeply characterizes the battery's degradation state and its underlying aging mechanisms. This includes not only dynamic implicit representations extracted from multiple charge-discharge time series but also coupled with multiple static physical prior conditions affecting battery life. Battery degradation characteristics map key physical aging factors such as the battery's positive and negative electrode material systems, electrolyte formulation, physical packaging form, nominal capacity, specific charge-discharge protocols, and operating temperature. These characteristics serve as crucial prerequisites for guiding the determination of the first weights of each expert network in the BatteryMoE hybrid expert network. The expert networks are independent sub-network branches within the BatteryMoE architecture responsible for handling different data distributions or specific aging mechanisms.

[0047] In some embodiments, determining the battery degradation characteristics based on multiple sets of charge-discharge data includes: (1.1) Generate prompt text based on multiple sets of charging and discharging data and preset text templates; (1.2) Input the prompt text into the pre-trained large language model and output the initial battery decay features of the battery. The pre-trained large language model is trained from the sample text. (1.3) The initial battery degradation characteristics are processed nonlinearly to obtain the battery degradation characteristics.

[0048] The preset text template refers to a pre-defined, uniformly formatted structured description framework that can standardize the textual description of ten key aging factors that affect battery life, such as the battery's positive and negative electrodes, electrolyte, nominal capacity, battery packaging structure, manufacturer, formation conditions, charging protocol, discharging protocol, and operating temperature.

[0049] It should be noted that the embodiments of this application do not limit the specific template content included in the text template, and can also generate prompt text based on other information, such as generating prompt text based on multiple sets of charging and discharging data, preset text templates and preset guidance questions. The embodiments of this application do not limit this.

[0050] The pre-trained large language model is trained from sample texts. A pre-trained large language model refers to a deep network model with powerful semantic understanding and feature extraction capabilities. It acquires domain prior knowledge through pre-training using massive amounts of sample texts. For example, in this embodiment, the large language model used is Llama-3.1-8b-Instruct, so the sample texts are Llama-related texts, which differ from the prompt texts generated from multiple sets of charging / discharging data and preset text templates.

[0051] Furthermore, when sample text is input into a pre-trained large language model, the model can capture the inherent physical and logical relationships between various elements in the sample text, thereby achieving an understanding of battery-related information. Subsequently, the trained large language model can accurately understand complex battery physical properties and operating condition texts, and correctly map them into initial battery degradation characteristics that highly conform to the actual aging evolution logic.

[0052] Furthermore, the initial battery degradation features are subjected to nonlinear processing to obtain the battery degradation characteristics. Nonlinear processing refers to using a dedicated neural network nonlinear layer to perform feature mapping and dimensionality compression on the high-dimensional initial vector output by the large language model. This operation aims to filter out redundant linguistic information in the initial high-dimensional representation, transforming it into a more compact and efficient numerical feature vector that matches the dimensionality of downstream network architectures (such as the gating computation mechanism of expert networks). The final output after dimensionality reduction and nonlinear mapping is the battery degradation characteristic.

[0053] For example, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the data processing flow for expert weight determination provided in the embodiments of this application. The architecture mainly consists of a soft encoder ( Figure 3 (Middle red area), hard encoder () Figure 3 The BatteryMoE network, comprising the blue area in the middle, a gating network, and a system that includes various physical attribute classifications, is composed of expert networks. The expert networks within BatteryMoE further include general-purpose expert networks and specialized expert networks, such as... Figure 3 In this context, G represents a general expert network, C1...C N A1...A N F1...F N T1...T N A dedicated expert network is used. In the soft encoder part, multiple sets of charge and discharge data and preset text templates are first combined and expert knowledge is extracted and combined to generate prompt text describing the battery status. Then, the prompt text is input into the large language model for feature extraction. The output is processed by nonlinear and linear layers in sequence, and the nonlinear layer outputs the battery degradation characteristics.

[0054] For example, a unified text template is constructed based on key factors in battery aging conditions (including 10 items: battery positive electrode, negative electrode, electrolyte, nominal capacity, battery packaging structure, manufacturer, formation conditions, charging protocol, discharging protocol, and operating temperature), and the prompt text is determined based on multiple sets of charging and discharging data and the text template. The input is fed into a large language model to obtain conditional embeddings (initial battery degradation features), which are used to provide conditional priors for the gating network. The process of obtaining conditional embeddings through the language model is described as follows: .in, This represents the conditional embedding obtained through the language model. Represents the set of real numbers. It is the vector embedding dimension of the text given by the large language model. This means that the vector representation of the last valid token in the text is used as the conditional embedding. Because the LLM used in this embodiment is Llama-3.1-8b-Instruct, which uses causal coding, and the last token encapsulates the information of the entire text, the vector representation of the last token is used to represent the information of the entire text input. Then, the soft encoder uses a non-linear layer to... Dimensionality reduction was performed to obtain battery degradation characteristics. : .in, This represents the vector representation after dimensionality reduction, and .

[0055] It is understood that the embodiments of this application convert a preset text template into a structured natural language description, so as to use the powerful semantic representation capability of the pre-trained large language model to determine the high-dimensional semantic vector of the battery. Then, the battery degradation features are accurately extracted by nonlinear processing to reduce the dimensionality, so as to improve the accuracy of battery life prediction by predicting battery life based on the high accuracy of battery degradation features.

[0056] In step 220, the number of aging features corresponding to the preset battery degradation rule is determined based on multiple sets of charge and discharge data. The first weight of the expert network is determined based on the number of aging features and the battery degradation features, and the second weight of the expert network is determined based on the battery degradation rule.

[0057] In some embodiments, such as Figure 3 As shown, the battery degradation features are input into the linear layer to calculate the expert weight scores, thus obtaining the first weights of the expert network: Among them, the first weight Essentially, it is a set of weights, which includes the corresponding BatteryMoE layer. The weights of an expert network; This represents the number of dedicated expert networks, which can be a preset hyperparameter or determined heuristically when used by the hardware encoder. It is a normalized exponential function.

[0058] Furthermore, since battery charge / discharge data is sparse and aging conditions are highly diverse, and the expert weight scores output by the soft encoder are entirely learned, these learned expert weight scores may not conform to some expert intuition and may carry the risk of overfitting. Therefore, this embodiment of the application also determines a second weight through a hard encoder to screen the expert network weight set based on key factors with clear physical meaning, thereby filtering out expert networks that do not match the battery to be evaluated or reducing the influence of the corresponding expert networks.

[0059] The battery degradation rule refers to a series of logical and numerical constraints pre-set based on the prior physical knowledge of battery experts, aiming to accurately reflect the inherent aging laws of batteries under different material systems, physical forms, and operating conditions. Alternatively, the battery degradation rule may be determined based on multiple sets of charge and discharge data, and this application embodiment does not impose any limitations on this.

[0060] For example, consider hard-coding four relatively well-defined aging factors: positive electrode, negative electrode, packaging structure, and operating temperature. The specific battery degradation rules are as follows: (1) For type value aging factors (positive, negative, packaging structure), the hard encoder only retains the expert network weight score corresponding to the aging factor value, while setting the expert network weight score of other mismatched aging factors to 0 (i.e., not using the corresponding expert network). (2) For continuous aging factors (operating temperature), the hard encoder will retain the weight scores of the temperature expert network that differs from the given battery operating temperature by less than or equal to 5 degrees Celsius, while setting the weight scores of other temperature expert networks to 0.

[0061] For example, given a battery with a lithium iron phosphate cathode, a graphite anode, an 18650 cylindrical packaging structure, and an operating temperature of 25°C, then in the cathode expert network, only the weights of the lithium iron phosphate expert network are retained; in the anode expert network, only the weights of the graphite expert network are retained; in the packaging structure expert network, only the weights of the 18650 cylindrical expert network are retained; and in the operating temperature expert network, only the weights of the expert network for operating temperatures between 20°C and 30°C are retained.

[0062] In some embodiments, the number of aging features corresponding to a preset battery degradation rule is determined based on multiple sets of charge-discharge data, and the first weight of the expert network is determined based on the number of aging features and the battery degradation features, including: (2.1) Obtain the battery degradation rules and determine the types of multiple aging parameters that affect battery aging based on the battery degradation rules; (2.2) Perform aging analysis on multiple sets of charge and discharge data to obtain the number of aging characteristics corresponding to each aging parameter type; (2.3) Determine the number of expert networks for each aging feature type based on the number of features; (2.4) Based on the battery degradation characteristics and the number of expert networks, determine the first weight of the expert network in the battery life prediction model.

[0063] Here, aging parameter type refers to the specific physical and operating condition dimensions that constitute the battery degradation rules, such as positive electrode material, negative electrode material, packaging structure, or operating temperature. Aging feature quantity refers to the effective data sample size belonging to a specific aging parameter type (such as a specific positive electrode material or temperature range). By conducting statistical analysis and feature analysis on multiple sets of charge and discharge data, the distribution weight and data size of each physical parameter type in the current dataset are quantitatively evaluated.

[0064] Furthermore, based on the number of each aging feature, the number of expert networks corresponding to each aging parameter type is determined. The number of expert networks refers to the number of sub-network branches dynamically allocated for different attribute values ​​based on heuristic principles. According to the heuristic rules, the device retains at least one basic expert network for each aging parameter type value, and also increases the number of additional expert networks proportionally based on the number of aging features corresponding to each aging parameter type. This allows densely distributed sample data to be deeply fitted based on more models, while sparse data patterns maintain basic generalization ability.

[0065] For example, the number of expert networks is determined when the hard encoder is used. The heuristic principle is as follows: the hard encoder assigns at least one expert to each attribute value, and for every 100 additional charge / discharge data points belonging to a particular type in the training data, an additional expert network is added to process that type of value. If the number of training batteries for that value is not an integer of 100, it is treated as the closest integer to 100. For example, 151 is treated as 200, assigning 2 experts; 149 is treated as 100, assigning 1 expert; 99 is treated as 100, assigning 1 expert; and critical values ​​such as 150 are treated as 200, assigning 2 experts. Based on this principle, the number of expert networks corresponding to each aging parameter type can be determined, and the sum of these expert networks is the [number of expert networks]. .

[0066] Furthermore, the number of expert networks constitutes the overall network capacity and output dimension of the current hybrid expert module. The device uses specific network layers (such as dedicated linear layers) to map battery degradation characteristics and the number of expert networks, outputting the first weight. The first weight is generated purely through data and determines how multiple charge / discharge cycles will be proportionally allocated to several expert networks before hard physical filtering is superimposed.

[0067] It is understood that the embodiments of this application, through in-depth aging analysis of multiple sets of charge-discharge data, can accurately quantify the data richness of each aging parameter type, and heuristically expand or shrink the number of corresponding expert networks accordingly. This effectively avoids the problem of overfitting to a few common aging modes or underfitting to rare aging modes caused by a fixed expert network when processing highly heterogeneous battery data. By combining the dynamically matched number of expert networks with the first weight calculated based on battery degradation characteristics, the model achieves optimal parameter allocation with limited computational resources, greatly enhancing the adaptive representation ability and generalization robustness of the battery life prediction model for datasets of different sizes.

[0068] In step 230, the expert weights of the expert network are determined based on the first weight and the second weight.

[0069] In some embodiments, data-driven soft weights (first weights) and physical prior hard weights (second weights) are fused to obtain the expert weights of the expert network. The expert weights combine dynamic learning features with static physical laws, enabling them to accurately guide the activation state and information aggregation ratio of specific expert networks in the subsequent model.

[0070] Furthermore, the initial expert weights are determined using the following formula: .in, This indicates that the first weight is filtered based on the second weight determined by the battery degradation rule.

[0071] Furthermore, the initial expert weights are normalized using the following formula: in, This represents the expert weights obtained after normalization.

[0072] Furthermore, the gating network, based on expert weights generated by the soft encoder and hard encoder, transforms the information vector representation of the battery input from experts with expert weights greater than 0. The output of different expert networks is determined according to their respective expert weights and the embedded vector representation of the input. The embedded vector representation of the input is determined by the upper-level module connected to BatteryMoE, and the upper-level module connected to BatteryMoE is determined by the specific sub-models configured in BatteryMoE. Expert networks can adopt different neural network architectures depending on the actual situation.

[0073] In step 240, multiple sets of charge and discharge data and expert weights are input into the first coding sub-model, and the first coding feature is output.

[0074] In some embodiments, such as Figure 4 As shown, Figure 4 This is a schematic diagram of the battery life prediction model structure provided in this application embodiment. The battery life prediction model includes a preprocessing module (BatteryMoE-CyclePatch), a first encoding sub-model (L1X), and a second encoding sub-model (L2X). Each first encoding sub-model includes multiple ( Each of the (number) intra-cycle encoders includes a first expert network and a first normalization layer, wherein the first expert network is BatteryMoE. A first encoding sub-model is used to perform feature mapping and extraction for each set of charge / discharge data, and the first normalization layer normalizes the extracted features to obtain the first encoded features. That is, the first encoding sub-model internally utilizes expert weights that integrate multi-dimensional knowledge to dynamically call the most suitable expert network to perform feedforward processing and feature transformation on the input data, and outputs the first encoded features representing the local degradation mode or single-cycle operating state.

[0075] In some embodiments, before inputting multiple sets of charge / discharge data and expert weights into the first coding sub-model and outputting the first coding feature, the method further includes: (3.1) For each set of charge and discharge data, flatten the charge and discharge data to obtain flattened charge and discharge data; (3.2) Perform linear processing on the flattened charge and discharge data to obtain linearly processed charge and discharge data, so as to obtain multiple sets of linearly processed charge and discharge data.

[0076] In some embodiments, it is assumed that the acquired multiple sets of charge and discharge data are Where 100 indicates that the input loop data has 100 cycles, 300 indicates that the data for each cycle is transformed into 300 data points through linear interpolation (150 data points each for charging and discharging segments), and 3 indicates that each data point contains 3 variable records: voltage, current, and charging / discharging capacity at the current time in one cycle. Based on the following formula, First, it undergoes processing by the preprocessing module: .

[0077] Furthermore, in BatteryMoECyclePatch, each expert network, that is... At this point, it is a CyclePatch module, and the architecture is a linear mapping layer, as shown in the following formula: .in, Indicates the first The data of the circle This means flattening this two-dimensional matrix into a vector, i.e. A dimensional vector, to perform summation Matrix multiplication operations CyclePatch processes each lap of the input data, transforming each lap's data into a... A dimensional vector. The outputs of multiple CyclePatch modules are summarized according to the formula of the BatteryMoE-CyclePatch layer to obtain... This indicates that BatteryMoE-CyclePatch is for the first... The output after processing the circular data is then... Modeling of the encoder within the layer ring.

[0078] It is understood that by preprocessing multiple sets of charge and discharge data, the embodiments of this application not only significantly reduce the computational complexity of the subsequent hybrid expert model in feature aggregation and cross-cycle modeling, but also provide a standard, compact and highly computable input basis for the model to deeply explore the nonlinear aging law of the battery in different cycle periods.

[0079] In some embodiments, multiple sets of charge / discharge data and expert weights are input into a first coding sub-model to output a first coding feature, including: (4.1) Input multiple sets of charge and discharge data and expert weights into the first expert network, and output the first intermediate feature; (4.2) Input multiple sets of charge and discharge data and the first intermediate feature into the first normalization layer and output the first coded feature.

[0080] In some embodiments, after preprocessing multiple sets of charge-discharge data using the BatteryMoE-CyclePatch layer, the multiple sets of charge-discharge data and expert weights are input into a first expert network to output a first intermediate feature. Then, the multiple sets of charge-discharge data and the first intermediate feature are input into a first normalization layer to output a first encoded feature. In the first encoded sub-model... The data processing performed within the encoder of the layer ring is shown in the following formula: Each of them It is a feedforward neural network that uses GELU as its activation function; , It is LayerNormalization, which represents the normalization of the layer.

[0081] It is understood that the embodiments of this application utilize the aforementioned determined expert weights to guide the first expert network to process multiple sets of charge-discharge data. This dynamically activates the most suitable network branch for feature extraction based on different battery aging attributes, thereby effectively extracting the first intermediate feature. Next, a first normalization layer is introduced to smooth internal covariate shifts, and a residual connection mechanism is introduced to effectively prevent gradient vanishing or feature degradation problems during deep network training. Thus, the output first encoded feature retains the original input information while more stably and expressively integrating local degradation and aging patterns.

[0082] In some embodiments, multiple sets of charge / discharge data and expert weights are input into a first expert network to output a first intermediate feature, including: (4.1.1) Input multiple sets of charge and discharge data and expert weights into the first expert network, use the general expert network to process the charge and discharge data to obtain general features, and use the special expert network to process the charge and discharge data according to the expert weights to obtain special features; (4.1.2) Determine the first intermediate feature based on the general features and the specific features.

[0083] In some embodiments, such as Figure 4 As shown, the first expert network includes a general expert network and a dedicated expert network. The general expert network refers to the sub-network branch in BatteryMoE that is not restricted by specific physical gating conditions and remains active and participates in basic data processing for any input battery to be predicted. Its core role is to specifically mine and model the fundamental electrochemical degradation laws and general knowledge shared by all types of batteries during charge-discharge cycles. The dedicated expert network refers to the customized sub-network branch in BatteryMoE that is finely divided according to specific aging parameter types (such as cathode material, anode material, packaging structure, operating temperature, etc.) and dynamically scheduled by gating expert weights. It highly depends on the pre-built soft and hard coding routing mechanism. It is only activated for feedforward calculation when the degradation characteristics of the battery to be predicted match the physical domain of the network and the assigned expert weight is greater than zero.

[0084] That is, when BatteryMoE in the first encoding sub-model receives the input feature data, it uses a general expert network to process the charging and discharging data to obtain general features. Based on expert weights, a dedicated expert network is used to process the charge and discharge data to obtain specific features. When multiple sets of charge-discharge data are input into the first encoding sub-model, the general expert network maintains a basic activation state for all input data to uncover features related to the fundamental electrochemical degradation modes that are common among batteries and decoupled from specific materials or operating conditions. At the same time, expert weights are used as gating routing signals to dynamically activate and proportionally adjust the dedicated expert networks (such as specific positive electrode experts, negative electrode experts, or temperature experts), thereby obtaining highly accurate first intermediate features, laying the foundation for subsequent accurate assessment of battery health status.

[0085] In step 250, the first coding features and expert weights are input into the second coding sub-model, the second coding features are output, and the predicted remaining life of the battery is determined based on the second coding features.

[0086] In some embodiments, after determining the characteristics of each single-cycle charge-discharge data, the first encoded features and expert weights are input into a second encoded sub-model. The second encoded sub-model is used for modeling in a higher dimension to globally process the first encoded features under the guidance of the expert weights and output the second encoded features. Finally, through a specific prediction head or projection layer mapping, the second encoded features are directly converted into scalar values, and the predicted remaining life of the battery is output.

[0087] The predicted remaining lifespan refers to the estimated total number of remaining cycles when the battery's discharge capacity irreversibly decays to a preset failure threshold (e.g., defined as the discharge capacity decreasing to 80% of the nominal capacity) based on the currently observed aging state of the battery.

[0088] In some embodiments, the first encoded features and expert weights are input into the second encoded sub-model, and the second encoded features are output, including: (5.1) Obtain the timing information of each set of charge and discharge data, and determine the timing coding feature based on the first coding feature and all the timing information, wherein the timing information represents the timing relationship between the corresponding charge and discharge data and other charge and discharge data; (5.2) Input the temporal coding features into the self-attention layer and output the self-attention features; (5.3) Input the self-attention features and temporal coding features into the second normalization layer and output the normalized features; (5.4) Input the normalized features and expert weights into the second expert network and output the second intermediate features; (5.5) Input the second intermediate feature and the normalized feature into the third normalization layer and output the second encoded feature.

[0089] In some embodiments, each second coding sub-model includes multiple ( (Number) inter-loop encoders, each comprising a self-attention layer, a second normalization layer, a second expert network, and a third normalization layer, wherein the second expert network is BatteryMoE. For example... Figure 4 As shown, before inputting the first coding features and expert weights into the second coding sub-model, the time-series information corresponding to each set of charge and discharge data is first integrated with the first coding features to obtain the time-series coding features.

[0090] In this context, temporal information refers to the sequence of events and relative time span between charge / discharge data from a specific cycle and other cycles in multiple sets of charge / discharge cycle test data for a battery. For example, the charge / discharge data from a particular cycle might be the first cycle data among all the charge / discharge data. Temporal coding features refer to the high-dimensional composite feature vector generated by deeply fusing (e.g., adding or concatenating) the first coding feature and the temporal information.

[0091] Furthermore, such as Figure 4 As shown, the temporal encoded features are input into the second encoding sub-model and processed sequentially through each self-attention layer, the second normalization layer, the second expert network, and the third normalization layer, finally outputting the second encoded features. The data processing procedure of the inter-layer encoder is expressed by the following formula: ; Where Attention represents the self-attention module, This is a self-attention feature. Normalized features; Indicates the first [number] after splicing The loop vector representation (temporal coding feature) output by the inter-loop encoder. , , As the second intermediate feature, For the second encoded feature, in one example, after... After data processing by the inter-layer encoder, it is used Vector representation of the last non-zero filled cycle As input to the projection head, i.e., the second encoded feature.

[0092] It is understood that by introducing time-series location information, the embodiments of this application break down the information silos between independent cycles, enabling the model to capture the long-range dependence and nonlinear evolution relationship in the long-term degradation process of the battery. This allows the model to deeply and accurately map the highly coupled long-term capacity decay trend, significantly improving the accuracy and robustness of the model in predicting the remaining service life in various complex application scenarios.

[0093] Furthermore, after determining the second coding feature, the predicted remaining battery life is determined using the second coding feature through the following formula: .in, Indicates the second coding feature, , For projection head parameters, The projection head weights are assumed to have five components. The model only uses the general expert network and the two specialized expert networks with the largest weights for prediction; therefore, weights not in the top two are set to zero. Then normalize the first two weights: .

[0094] .in, To predict remaining lifespan, Indicates the first A network of experts.

[0095] In step 260, the loss value is determined based on the predicted remaining lifespan and the tag remaining lifespan, and the battery lifespan prediction model is iteratively trained based on the loss value to obtain the trained battery lifespan prediction model.

[0096] In some embodiments, the loss value S is determined by the following formula: .in, This indicates the number of training samples in each batch. Model parameter updates are implemented using gradient descent in the AdamW optimizer.

[0097] Furthermore, the overall goal of model training is: Training is terminated when the preset training epoch has been reached or the model's error on the validation set no longer decreases after 5 consecutive epochs, and the model with the best performance on the validation set is selected. As the model parameters used in the final application.

[0098] It should be noted that the stopping condition for iterative training of the battery life prediction model can be that the loss value is less than a preset loss threshold or that the number of iterations reaches a preset value, etc. The specific condition can be adjusted according to the actual situation, and this application embodiment does not impose any restrictions on it.

[0099] It is understood that the embodiments of this application use a first weight determined by charge and discharge data and a second weight determined by prior physical rules to jointly impose dual constraints and determine the expert weights of the expert network. This effectively overcomes the shortcomings of traditional methods in battery life prediction, such as overfitting to a single dataset and weak generalization ability. Furthermore, by introducing an expert network controlled by expert weights into the first and second encoding sub-models, the decoupling of battery aging state from various factors affecting battery degradation, such as the positive and negative electrode material system, physical morphology, and complex operating conditions, is achieved. This not only enhances the physical interpretability of the model prediction process but also enables the trained model to stably and keenly capture the underlying general nonlinear aging laws when facing small sample scenarios with new material systems or different charge and discharge protocols. This significantly improves the accuracy of early prediction of battery remaining life, shortens the battery R&D testing cycle, and reduces R&D resource costs.

[0100] To facilitate understanding, the following example uses lithium-ion battery life prediction (including but not limited to batteries with different positive / negative electrode material systems, different packaging forms, and different temperature and rate conditions). Based on the battery's first N charge-discharge cycles, a pre-trained Battery Transformer (PBT) is used to predict the battery's cycle life. A complete example is provided, where battery life is defined as the number of cycles required for the battery's discharge capacity to decay to 80% of its nominal capacity, and N does not exceed 100. (1) Collect raw data of the target battery cycle test, including at least the voltage-current time series of each cycle; perform capacity integration on the charge and discharge process to obtain the capacity sequence, and combine the voltage, current and capacity of each cycle to form the three-channel sequence data of that cycle; (2) Since the number of sampling points in different cycles is different, each cycle sequence is resampled to unify the length: each cycle is resampled into 300 data points, of which 150 are in the charging stage and 150 are in the discharging stage; each data point contains three types of records: voltage (V), current (expressed as a factor) and capacity (Ah) to ensure consistent input format across batteries and across datasets. (3) Select the first S cycles (S not exceeding 100) of the battery as the historical input window and represent it as follows: =[ , ,..., ], each of which It is a 300×3 matrix; when S is less than 100, the sequence is zero-padded and the effective length mask is recorded so that the model ignores the padding part; (4) For each loop CyclePatch processing is performed: Xi is flattened according to a preset method and projected onto the d-dimensional embedding space through a linear mapping to obtain the cycle embedding vector of the cycle; then, the cycle embedding is input into the BatteryMoE module for expert network weighted aggregation to obtain the i-th cycle token, resulting in the cycle token sequence. =[ , ,..., ]; (5) Input the cyclic token sequence into the intra-cycle encoder for feature extraction; the intra-cycle encoder adopts a residual connection and layer normalization structure, and replaces the traditional feedforward network with BatteryMoE to obtain the high-level representation of each cycle. (6) The output of step (5) is added to the position encoding to inject cyclic sequence information and input into the inter-cycle encoder for cross-cyclic dependency modeling. The inter-cycle encoder adopts the Transformer encoding structure and replaces the feedforward layer in the Transformer with BatteryMoE to improve the ability to represent degradation patterns under different data distributions. (7) Obtain the lifetime prediction value by passing the output of the inter-cycle encoder through the regression prediction head. , The predicted cycle life of the target battery is the number of cycles required for its capacity to decay to 80% threshold. (8) During the training phase, the PBT model (battery life prediction model) is pre-trained using battery data from multiple sources, and the life prediction value is minimized using the AdamW optimizer. Compared with the actual lifespan Differences between .make Let represent all trainable parameters in the PBT model. Then, the optimization objective for each parameter update is: .in, This indicates the number of training samples in each batch. Parameter updates are implemented using gradient descent in the AdamW optimizer. Model training terminates when the preset training epoch has been reached or the model's error on the validation set no longer decreases after 5 consecutive epochs, and the best-performing sample on the validation set is selected. As the final model parameters used; (9) In the application stage, the existing life battery data of the target application dataset (such as the electrolyte optimization scenario, the dataset will contain the battery life of different electrolyte formulations) is divided into training set and validation set. The model is fine-tuned with the training set data or fine-tuned only with the adapter by inserting some adapter layers. The best method of the validation set is selected. After transfer learning, the model can predict the life of other batteries whose life has not been measured in the target application scenario. It is used in steps (1) to (7).

[0101] like Figure 5 As shown, Figure 5 This is a schematic diagram of the module structure of a training device for a battery life prediction model provided in this application embodiment. The battery life prediction model includes a first encoding sub-model and a second encoding sub-model. The first encoding sub-model and the second encoding sub-model include an expert network. The training device 300 for the battery life prediction model may include the following modules 310 to 360: The acquisition module 310 is used to acquire multiple sets of charge and discharge data of the battery to be predicted and the remaining life of the battery corresponding to the tag under the multiple sets of charge and discharge data, and to determine the battery degradation characteristics based on the multiple sets of charge and discharge data. The sub-weight determination module 320 is used to determine the number of aging features corresponding to the preset battery degradation rule based on multiple sets of charge and discharge data, determine the first weight of the expert network based on the number of aging features and the battery degradation features, and determine the second weight of the expert network based on the battery degradation rule. The expert weight determination module 330 is used to determine the expert weights of the expert network based on the first weight and the second weight. The first encoding module 340 is used to input multiple sets of charge and discharge data and expert weights into the first encoding sub-model and output the first encoding feature; The second encoding module 350 is used to input the first encoding features and expert weights into the second encoding sub-model, output the second encoding features, and determine the predicted remaining life of the battery based on the second encoding features. The battery life prediction module 360 ​​is used to determine the loss value based on the predicted remaining life and the tag's remaining life, and to iteratively train the battery life prediction model based on the loss value to obtain the trained battery life prediction model.

[0102] In some embodiments, the acquisition module 310 is used for: Generate prompt text based on multiple sets of charging and discharging data and preset text templates; The prompt text is input into a pre-trained large language model, which outputs the initial battery decay features of the battery. The pre-trained large language model is trained from sample text. The initial battery degradation characteristics are processed nonlinearly to obtain the battery degradation characteristics.

[0103] In some embodiments, the sub-weight determination module 320 is used for: Obtain the battery degradation rules and determine the types of multiple aging parameters that affect battery aging based on the battery degradation rules; Aging analysis was performed on multiple sets of charge-discharge data to obtain the number of aging characteristics corresponding to each aging parameter type. Based on the number of each aging feature, the number of expert networks corresponding to the aging parameter type is determined; Based on the battery degradation characteristics and the number of expert networks, the first weight of the expert network in the battery life prediction model is determined.

[0104] In some embodiments, the first encoding module 340 is used for: For each set of charge and discharge data, the charge and discharge data is flattened to obtain flattened charge and discharge data; The flattened charge and discharge data are linearly processed to obtain linearly processed charge and discharge data, thus obtaining multiple sets of linearly processed charge and discharge data.

[0105] In some embodiments, the first encoding sub-model includes a first expert network and a first normalization layer; In some embodiments, the first encoding module 340 is used for: Multiple sets of charge / discharge data and expert weights are input into the first encoding sub-model, and the first encoding features are output, including: Multiple sets of charge / discharge data and expert weights are input into the first expert network, and the first intermediate feature is output. Multiple sets of charge and discharge data and the first intermediate feature are input into the first normalization layer, and the first encoded feature is output.

[0106] In some embodiments, the first expert network includes a general expert network and a dedicated expert network; In some embodiments, the first encoding module 340 is further configured to: Multiple sets of charge-discharge data and expert weights are input into the first expert network. The general expert network is used to process the charge-discharge data to obtain general features. Based on the expert weights, a special expert network is used to process the charge-discharge data to obtain special features. Based on general and specific features, the first intermediate feature is determined.

[0107] In some embodiments, the second encoding sub-model includes a self-attention layer, a second normalization layer, a second expert network, and a third normalization layer; In some embodiments, the second encoding module 350 is used for: The timing information of each set of charge and discharge data is obtained, and the timing coding feature is determined based on the first coding feature and all the timing information. The timing information is characterized as the timing relationship between the corresponding charge and discharge data and other charge and discharge data. The temporally encoded features are input into the self-attention layer, and the self-attention features are output. The self-attention features and temporal encoding features are input into the second normalization layer, and the normalized features are output. The normalized features and expert weights are input into the second expert network, and the second intermediate features are output. The second intermediate feature and the normalized feature are input into the third normalization layer, and the second encoded feature is output.

[0108] The battery life prediction model training method, apparatus, device, and storage medium proposed in this application acquire multiple sets of charge-discharge data of the battery to be predicted and the corresponding tag remaining life of the battery under the multiple sets of charge-discharge data, and determine the battery degradation characteristics based on the multiple sets of charge-discharge data; determine the number of aging features corresponding to the preset battery degradation rules based on the multiple sets of charge-discharge data, determine the first weight of the expert network based on the number of aging features and the battery degradation characteristics, and determine the second weight of the expert network based on the battery degradation rules; determine the expert weight of the expert network based on the first weight and the second weight; input the multiple sets of charge-discharge data and the expert weights into a first encoding sub-model, and output the first encoding feature; input the first encoding feature and the expert weights into a second encoding sub-model, and output the second encoding feature, and determine the predicted remaining life of the battery based on the second encoding feature; determine the loss value based on the predicted remaining life and the tag remaining life, and iteratively train the battery life prediction model based on the loss value to obtain the trained battery life prediction model.

[0109] This application embodiment determines the expert weights of the expert network in the battery life prediction model by combining a first weight determined based on data-driven battery degradation characteristics and a second weight determined based on preset degradation rules based on physical priors. This allows battery-related charge and discharge data to be explicitly encoded into the expert network in a combined hardware and software approach. This mechanism enables the first and second encoding sub-models to effectively screen and constrain the expert network based on key aging factors with clear physical meaning when processing charge and discharge data. In this way, it effectively overcomes the shortcomings of existing prediction algorithms, such as high dependence on specific datasets and unstable generalization performance across material systems and operating conditions. This allows for more accurate capture of underlying general degradation and aging patterns. Consequently, this application embodiment significantly improves the accuracy of the model in predicting the long-term degradation trend and remaining service life of the battery.

[0110] like Figure 6 As shown, Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device includes: The processor 401 can be implemented using a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 402 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401 to execute the training method of the battery life prediction model of the embodiments of this application. Input / output interface 403 is used to implement information input and output; The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404); The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.

[0111] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for training the battery life prediction model.

[0112] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0113] The battery life prediction model training method, apparatus, device, and storage medium proposed in this application acquire multiple sets of charge-discharge data of the battery to be predicted and the corresponding tag remaining life of the battery under the multiple sets of charge-discharge data, and determine the battery degradation characteristics based on the multiple sets of charge-discharge data; determine the number of aging features corresponding to the preset battery degradation rules based on the multiple sets of charge-discharge data, determine the first weight of the expert network based on the number of aging features and the battery degradation characteristics, and determine the second weight of the expert network based on the battery degradation rules; determine the expert weight of the expert network based on the first weight and the second weight; input the multiple sets of charge-discharge data and the expert weights into a first encoding sub-model, and output the first encoding feature; input the first encoding feature and the expert weights into a second encoding sub-model, and output the second encoding feature, and determine the predicted remaining life of the battery based on the second encoding feature; determine the loss value based on the predicted remaining life and the tag remaining life, and iteratively train the battery life prediction model based on the loss value to obtain the trained battery life prediction model.

[0114] This application embodiment determines the expert weights of the expert network in the battery life prediction model by combining a first weight determined based on data-driven battery degradation characteristics and a second weight determined based on preset degradation rules based on physical priors. This allows battery-related charge and discharge data to be explicitly encoded into the expert network in a combined hardware and software approach. This mechanism enables the first and second encoding sub-models to effectively screen and constrain the expert network based on key aging factors with clear physical meaning when processing charge and discharge data. In this way, it effectively overcomes the shortcomings of existing prediction algorithms, such as high dependence on specific datasets and unstable generalization performance across material systems and operating conditions. This allows for more accurate capture of underlying general degradation and aging patterns. Consequently, this application embodiment significantly improves the accuracy of the model in predicting the long-term degradation trend and remaining service life of the battery.

[0115] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0116] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0117] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0118] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0119] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0120] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0121] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0122] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0123] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0124] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0125] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A training method for a battery life prediction model, characterized in that, The battery life prediction model includes a first coded sub-model and a second coded sub-model, both of which include expert networks. The method includes: Obtain multiple sets of charge and discharge data for the battery to be predicted and the remaining lifespan of the corresponding tag for the battery under the multiple sets of charge and discharge data, and determine the battery degradation characteristics of the battery based on the multiple sets of charge and discharge data. The number of aging features corresponding to the preset battery degradation rule is determined based on multiple sets of charge and discharge data. The first weight of the expert network is determined based on the number of aging features and the battery degradation features. The second weight of the expert network is determined based on the battery degradation rule. The expert weights of the expert network are determined based on the first weight and the second weight. The multiple sets of charge-discharge data and the expert weights are input into the first encoding sub-model, and the first encoding feature is output. The first coding feature and the expert weight are input into the second coding sub-model, the second coding feature is output, and the predicted remaining life of the battery is determined based on the second coding feature. The loss value is determined based on the predicted remaining lifespan and the remaining lifespan of the tag, and the battery lifespan prediction model is iteratively trained based on the loss value to obtain the trained battery lifespan prediction model.

2. The training method for the battery life prediction model according to claim 1, characterized in that, The step of determining the battery degradation characteristics based on the multiple sets of charge and discharge data includes: Generate prompt text based on multiple sets of charging and discharging data and a preset text template; The prompt text is input into a pre-trained large language model, which outputs the initial battery decay features of the battery, wherein the pre-trained large language model is trained using sample text. The initial battery degradation characteristics are subjected to nonlinear processing to obtain the battery degradation characteristics of the battery.

3. The training method for the battery life prediction model according to claim 1, characterized in that, The step of determining the number of aging features corresponding to a preset battery degradation rule based on multiple sets of charge and discharge data, and determining the first weight of the expert network based on the number of aging features and the battery degradation features, includes: Obtain the battery degradation rules, and determine the types of multiple aging parameters that affect the aging of the battery based on the battery degradation rules; Aging analysis is performed on multiple sets of the charge and discharge data to obtain the number of aging features corresponding to each aging parameter type. Based on the number of each aging feature, the number of expert networks corresponding to the aging parameter type is determined; Based on the battery degradation characteristics and the number of expert networks, the first weight of the expert network in the battery life prediction model is determined.

4. The training method for the battery life prediction model according to claim 1, characterized in that, Before inputting the multiple sets of charge-discharge data and the expert weights into the first encoding sub-model and outputting the first encoding feature, the method further includes: For each set of charge and discharge data, the charge and discharge data is flattened to obtain flattened charge and discharge data; The flattened charge and discharge data are linearly processed to obtain linearly processed charge and discharge data, thereby obtaining multiple sets of linearly processed charge and discharge data.

5. The training method for the battery life prediction model according to claim 1, characterized in that, The first encoding sub-model includes a first expert network and a first normalization layer; The step of inputting the multiple sets of charge-discharge data and the expert weights into the first encoding sub-model and outputting the first encoding feature includes: The multiple sets of charge and discharge data and the expert weights are input into the first expert network, and the first intermediate feature is output. The multiple sets of charge and discharge data and the first intermediate feature are input into the first normalization layer, and the first encoded feature is output.

6. The training method for the battery life prediction model according to claim 5, characterized in that, The first expert network includes a general expert network and a special expert network; The step of inputting the multiple sets of charge / discharge data and the expert weights into the first expert network and outputting the first intermediate feature includes: The multiple sets of charge-discharge data and the expert weights are input into the first expert network. The general expert network is used to process the charge-discharge data to obtain general features, and the dedicated expert network is used to process the charge-discharge data to obtain dedicated features based on the expert weights. Based on the general features and the specific features, a first intermediate feature is determined.

7. The training method for the battery life prediction model according to claim 1, characterized in that, The second encoding sub-model includes a self-attention layer, a second normalization layer, a second expert network, and a third normalization layer; The step of inputting the first encoded feature and the expert weight into the second encoded sub-model and outputting the second encoded feature includes: The timing information of each group of charge and discharge data is obtained, and the timing coding feature is determined according to the first coding feature and all the timing information, wherein the timing information represents the timing relationship between the corresponding charge and discharge data and other charge and discharge data; The temporal coding features are input into the self-attention layer, and the self-attention features are output. The self-attention features and the temporal coding features are input into the second normalization layer, and the normalized features are output. The normalized features and the expert weights are input into the second expert network to output the second intermediate features; The second intermediate feature and the normalized feature are input into the third normalization layer to output the second encoded feature.

8. A training device for a battery life prediction model, characterized in that, The battery life prediction model includes a first coded sub-model and a second coded sub-model, both of which include expert networks. The device includes: The acquisition module is used to acquire multiple sets of charge and discharge data of the battery to be predicted and the remaining life of the tag corresponding to the battery under the multiple sets of charge and discharge data, and to determine the battery degradation characteristics of the battery based on the multiple sets of charge and discharge data. The sub-weight determination module is used to determine the number of aging features corresponding to a preset battery degradation rule based on multiple sets of charge and discharge data, determine the first weight of the expert network based on the number of aging features and the battery degradation features, and determine the second weight of the expert network based on the battery degradation rule. The expert weight determination module is used to determine the expert weights of the expert network based on the first weight and the second weight. The first encoding module is used to input the multiple sets of charging and discharging data and the expert weights into the first encoding sub-model and output the first encoding feature; The second encoding module is used to input the first encoding features and the expert weights into the second encoding sub-model, output the second encoding features, and determine the predicted remaining life of the battery based on the second encoding features. The battery life prediction module is used to determine a loss value based on the predicted remaining life and the remaining life of the tag, and to iteratively train the battery life prediction model based on the loss value to obtain the trained battery life prediction model.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the training method of the battery life prediction model according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the training method of the battery life prediction model according to any one of claims 1 to 7.