Battery life prediction method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202610929415.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-09-29
AI Technical Summary
[0008]本申请提供了一种电池寿命预测方法和装置、电子设备和存储介质,以至少解决相关技术中存在无法适应于不同化学体系与运行工况的电池寿命预测的技术问题
[0019]在本申请实施例中,采用获取电池寿命预测请求,其中,所述寿命预测请求用于请求确定目标电池在目标周期点的容量,目标周期点为所述目标电池所要预测容量的充放电周期;获取所述目标电池的多个循环运行数据;通过目标模型,将所述多个循环运行数据映射至SOC域,并通过注意力机制进行跨周期信息交互生成所述目标电池的电池健康状态向量,其中,每个所述循环运行数据包括所述目标电池在一个完整充放电周期中的电池信息,所述电池健康状态向量用于表征所述目标电池的寿命退化趋势;通过所述目标模型,将所述目标周期点的目标周期索引与所述电池健康状态向量进行拼接,生成拼接向量,并基于所述拼接向量确定出所述目标电池在所述目标周期点的目标容量的方式。由于通过将所述多个循环运行数据映射至SOC域,并通过注意力机制进行跨周期信息交互生成所述目标电池的电池健康状态向量,并基于目标周期索引与所述电池健康状态向量,生成拼接向量,最后通过拼接向量预测得到目标周期点的目标容量,从而可以实现基于部分历史循环前缀(即,循环运行数据)即可输出未来多个周期点的完整容量退化轨迹,从而能够在加速退化拐点出现之前提供丰富的未来演化信息,为目标电池更换时机决策、运维计划制定及使用策略优化提供了更具前瞻性的数据支撑的技术效果,进而解决了相关技术中存在的无法适应于不同化学体系与运行工况的电池寿命预测的问题。
Smart Images

Figure CN122836610A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery technology, and in particular to a battery life prediction method and apparatus, electronic device and storage medium. Background Technology
[0002] With the rapid development of electric vehicles, energy storage systems, and aerospace, lithium-ion batteries and novel sodium-ion batteries have become core energy storage devices. During long-term charge-discharge cycles, the usable capacity of a battery gradually decreases, reaching its end-of-life when the capacity falls below the rated threshold. Accurately predicting the remaining battery life is crucial for avoiding sudden failures, optimizing maintenance strategies, and reducing total lifespan costs, and has become one of the key functions of battery management systems.
[0003] Existing battery life prediction methods can be mainly divided into physical model-based methods, data-driven methods, and hybrid methods: Physical model-based methods describe the internal aging mechanism of batteries by establishing electrochemical models or equivalent circuit models. Although they have a certain degree of physical interpretability, the model parameters are highly dependent on the specific chemical system and operating conditions. When faced with heterogeneous battery clusters that span temperature, rate, and chemical systems, parameter identification is difficult and the generalization ability is limited, making it difficult to meet the needs of actual engineering deployment.
[0004] Data-driven approaches learn degradation mappings directly from historical operational data, avoiding complex physical parameter identification. Early studies employed traditional machine learning methods such as support vector machines and Gaussian process regression, relying on manually designed health indicators. While performing well on datasets with consistent distributions, prediction accuracy significantly decreased when operating conditions or chemical systems changed due to distribution shifts. With the development of deep learning, models such as recurrent neural networks, long short-term memory networks, convolutional neural networks, and Transformers have been widely applied to battery degradation modeling, automatically extracting high-dimensional time-series features. However, deep models trained on single datasets tend to overfit to the data's unique distribution patterns, exhibiting insufficient generalization ability when faced with unfamiliar operating conditions or chemical systems.
[0005] To address the domain offset problem, researchers have introduced transfer learning and domain adaptation techniques, extracting cross-domain invariant features through adversarial training and domain adaptive modules. However, most existing methods only evaluate domain offsets in a single dimension, such as across temperature or chemical systems, lacking systematic solutions for scenarios where operating conditions and chemical systems change simultaneously and where full-lifetime labeled data for the target domain is extremely scarce. Furthermore, existing technologies often focus on numerical prediction of a single lifetime endpoint, neglecting to model the entire trajectory of future capacity degradation, making it difficult to capture early turning points in accelerated degradation stages and providing insufficient effective information for proactive maintenance decisions.
[0006] In practical engineering applications, battery management systems (BMS) often need to manage heterogeneous battery clusters simultaneously, encompassing multiple chemical systems, temperatures, and rate conditions. Batteries with different chemical systems exhibit drastically different aging mechanisms and degradation trajectories; even within the same chemical system, the growth of the solid electrolyte interfacial film, lithium deposition, and cathode structure evolution show significant differences at different temperatures and rates. Current technologies have failed to establish a unified cross-domain prediction framework, resulting in the need for independent training and maintenance of prediction models for each chemical system or operating condition. This leads to high deployment costs and difficulty in adapting to the dynamic expansion of battery clusters.
[0007] Therefore, there is a problem with the related technologies in predicting battery life that cannot be adapted to different chemical systems and operating conditions. Summary of the Invention
[0008] This application provides a battery life prediction method and apparatus, electronic device and storage medium, to at least solve the technical problem in the related art that battery life prediction cannot be adapted to different chemical systems and operating conditions.
[0009] According to one aspect of the embodiments of this application, a battery life prediction method is provided, comprising: Obtain a battery life prediction request, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge-discharge cycle of the target battery to be predicted capacity. Acquire multiple cycles of operating data for the target battery; The target model maps the multiple cyclic running data to the SOC domain, and generates the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism. Each cyclic running data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery. Using the target model, the target cycle index of the target cycle point is concatenated with the battery health state vector to generate a concatenated vector, and the target capacity of the target battery at the target cycle point is determined based on the concatenated vector.
[0010] Optionally, as described above, the step of mapping the multiple cyclic running data to the SOC domain through the target model and generating the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism includes: The target model is used to preprocess the multiple cyclic running data to obtain the SOC grid feature token sequence of each cyclic running data in the SOC domain, wherein the SOC grid feature token sequence includes the original features and derived features of the corresponding cyclic running data. The target model uses the underlying periodic Transformer encoder to perform self-attention calculation and feature extraction on each SOC grid feature token sequence, and generates the periodic embedding vector corresponding to each SOC grid feature token sequence through attention pooling. The battery health state vector is generated by performing cross-cycle long-term degradation dynamic modeling on the periodic embedding vector through the upper-level cross-cycle Transformer sequence encoder in the target model.
[0011] Optionally, as described above, the preprocessing of the plurality of cyclic running data, wherein each cyclic running data has a SOC grid feature token sequence in the SOC domain, includes: For each cycle of running data, the charging segment data and the discharging segment data in each cycle of running data are converted from time domain data to SOC domain data to obtain a first sub-data corresponding to the charging segment data and a second sub-data corresponding to the discharging segment data, and a multi-dimensional feature matrix corresponding to each cycle of running data is obtained based on the first sub-data and the second sub-data. Derivative features are constructed for each multidimensional feature matrix to obtain the derived features of each multidimensional feature matrix; Based on the original features and the derived features of each multidimensional feature matrix, a high-dimensional feature token sequence corresponding to each multidimensional feature matrix is obtained; The multiple high-dimensional feature token sequences of the target battery are arranged in chronological order and encapsulated to obtain an initial four-dimensional input tensor; By normalizing each feature data in the initial four-dimensional input tensor, the SOC grid feature token sequence corresponding to each of the high-dimensional feature token sequences is obtained, as well as the target four-dimensional input tensor corresponding to the initial four-dimensional input tensor.
[0012] Optionally, as described above, the step of performing self-attention computation and feature extraction on each SOC grid feature token sequence through the underlying intra-periodic Transformer encoder in the target model, and generating a periodic embedding vector corresponding to each SOC grid feature token sequence through attention pooling, includes: For each SOC grid feature token sequence, the underlying intra-period Transformer encoder maps each SOC grid feature token in each SOC grid feature token sequence to the latent space to obtain the token embedding vector corresponding to each SOC grid feature token. By superimposing position encoding on each of the token embedding vectors, a position-aware token vector sequence is obtained; Self-attention computation is performed on the location-aware token vector sequence to obtain a token context representation sequence that incorporates global context information; Each token context representation in the token context representation sequence is processed by a feedforward network to perform a nonlinear transformation, thereby obtaining a deep representation of each SOC grid feature token in each SOC grid feature token sequence. The attention weight of each SOC grid feature token is determined by the attention pooling module, and the deep representations of all SOC grid feature tokens in each SOC grid feature token sequence are weighted and summed according to the attention weight to obtain the periodic embedding vector corresponding to each SOC grid feature token sequence.
[0013] Optionally, as described above, the step of performing cross-cycle long-term degradation dynamic modeling on the SOC grid feature token sequence through the upper-layer cross-cycle Transformer sequence encoder in the target model to generate a battery health state vector representing the battery health state includes: The temporal information of each periodic embedding vector is determined by the upper-layer cross-period Transformer sequence encoder according to the temporal order of each SOC grid feature token sequence. By employing a self-attention mechanism, interactive calculations are performed on all the periodic embedding vectors according to the temporal information of each periodic embedding vector to achieve cross-cycle long-term degradation dynamic modeling, thereby obtaining the battery health state vector.
[0014] Optionally, as described above, the method further includes: Obtain the original model and adjust its structure to obtain the model to be trained; The variance regularization module divides all training samples into multiple subgroups according to preset classification conditions. The average regression loss of each subgroup is calculated, as well as the global average regression loss of all training samples. The subgroup loss variance penalty term is then added to the global average regression loss to obtain the total loss. Each subgroup includes multiple training samples, and the subgroup loss variance penalty term is the variance between the average regression losses of each subgroup. The global average regression loss, the subgroup loss variance penalty term, and the domain adversarial loss are used as the training objectives of the model to be trained, and the model to be trained is trained using the training samples to obtain the target model, wherein the domain adversarial loss is the loss of the domain labels of the training samples.
[0015] Optionally, as described above, the structural adjustment of the original model to obtain the model to be trained includes: After the feature extractor of the original model, a domain classifier is connected, wherein the feature extractor includes: the lower-level intra-period Transformer encoder, the attention pooling module, and the upper-level cross-period Transformer sequence encoder, and the domain classifier is used to predict the domain label to which the training sample belongs; A gradient inversion layer is inserted between the feature extractor and the domain classifier to obtain the model to be trained. The gradient inversion layer is used to multiply the gradient passed to the feature extractor by a negative coefficient during backpropagation, so that the feature extractor updates in a direction that makes the domain classifier unable to distinguish the source of the data. The negative coefficient decreases as the number of training iterations of the model to be trained increases.
[0016] According to another aspect of the embodiments of this application, a battery life prediction device is also provided, comprising: The request acquisition module is used to acquire a battery life prediction request, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge-discharge cycle of the target battery to be predicted capacity. The data acquisition module is used to acquire multiple cycles of operating data of the target battery; The vector generation module is used to map the multiple cyclic running data to the SOC domain through the target model, and generate the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism. Each cyclic running data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery. The determination module is used to concatenate the target cycle index of the target cycle point with the battery health state vector through the target model to generate a concatenated vector, and determine the target capacity of the target battery at the target cycle point based on the concatenated vector.
[0017] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps of any of the above embodiments by running the computer program stored in the memory.
[0018] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the method steps of any of the above embodiments when running.
[0019] In this embodiment, a battery life prediction request is used, wherein the life prediction request is used to request the determination of the capacity of a target battery at a target cycle point, and the target cycle point is the charge-discharge cycle at which the capacity of the target battery is to be predicted; multiple cycle operation data of the target battery are acquired; through a target model, the multiple cycle operation data are mapped to the SOC domain, and a battery health state vector of the target battery is generated through cross-cycle information interaction using an attention mechanism, wherein each cycle operation data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery; through the target model, the target cycle index of the target cycle point is concatenated with the battery health state vector to generate a concatenated vector, and the target capacity of the target battery at the target cycle point is determined based on the concatenated vector. By mapping the multiple cyclic operation data to the SOC domain and generating the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism, and generating a spliced vector based on the target cycle index and the battery health state vector, and finally predicting the target capacity at the target cycle point through the spliced vector, it is possible to output the complete capacity degradation trajectory of multiple future cycle points based on a portion of the historical cycle prefix (i.e., cyclic operation data). This provides rich future evolution information before the accelerated degradation inflection point appears, providing more forward-looking data support for target battery replacement timing decisions, operation and maintenance plan formulation, and usage strategy optimization. This solves the problem in related technologies that cannot adapt to different chemical systems and operating conditions for battery life prediction. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the hardware environment for an optional battery life prediction method according to an embodiment of this application; Figure 2 This is a flowchart illustrating an optional battery life prediction method according to an embodiment of this application. Figure 3 This is a structural block diagram of an optional battery life prediction device according to an embodiment of this application; Figure 4 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, 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.
[0025] According to one aspect of the embodiments of this application, a battery life prediction method is provided. Optionally, in this embodiment, the above-described battery life prediction method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal 1402 and server 1404. For example... Figure 1 As shown, server 1404 is connected to terminal 1402 via a network and can be used to provide services (such as data analysis services, application services, etc.) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 1404.
[0026] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal may not be limited to PC, mobile phone, tablet computer, etc.
[0027] The battery life prediction method of this application embodiment can be executed by a server, a terminal, or both. Alternatively, the execution of the battery life prediction method of this application embodiment by a terminal can be performed by a client installed on it.
[0028] Taking the battery life prediction method in this embodiment as an example, which is executed by the terminal, Figure 2 A battery life prediction method provided in this application includes the following steps: Step S202: Obtain a battery life prediction request, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge-discharge cycle at which the capacity of the target battery is to be predicted.
[0029] The battery life prediction method in this embodiment can be applied to scenarios requiring prediction of battery capacity at any point in time, such as predicting the capacity of a battery pack in an electric vehicle, predicting the battery capacity of an embodied intelligent agent, or predicting the battery capacity of other devices (e.g., aerospace equipment, medical devices, and energy storage systems). This embodiment uses the prediction of the battery pack capacity of an electric vehicle as an example to illustrate the above-described battery life prediction method. For other types of devices, the above-described battery life prediction method is equally applicable, provided there is no contradiction.
[0030] Specifically, when it is necessary to provide key information for vehicle energy management, battery replacement warnings, used car valuation, and tiered utilization decisions to improve the efficiency and safety of the battery throughout its entire life cycle, a battery life prediction request can be received in the Battery Management System (BMS) or cloud-based battery health assessment platform. This battery life prediction request is typically initiated by the vehicle control system, user terminal, or operation and maintenance platform, and its core purpose is to estimate the available capacity of the target battery at a specific future usage node. Optionally, this target cycle point is the specific charge-discharge cycle at which the predicted capacity of the target battery is to be determined throughout its entire life cycle; that is, the target cycle point (e.g., the 1000th cycle), rather than a time dimension (e.g., usage year, month, day, e.g., week 58). The battery life prediction request generally includes the target battery's unique identifier, the current number of charge-discharge cycles already completed, historical charge-discharge data (e.g., voltage, current, temperature profiles), usage condition information, and the specified target cycle point.
[0031] Step S204: Obtain multiple cycle operation data of the target battery.
[0032] In other words, during the inference phase, in order to predict the target capacity of the target battery at the target cycle point, it is necessary to acquire multiple cycle operation data of the target battery. Each cycle operation data can include: charging segment data and discharging segment data of the target battery. The charging segment data is the sub-data corresponding to the target battery in the charging stage of the cycle operation data, and similarly, the discharging segment data is the sub-data corresponding to the target battery in the discharging stage of the cycle operation data.
[0033] Step S206: Through the target model, multiple cyclic running data are mapped to the SOC domain, and cross-cycle information interaction is performed through the attention mechanism to generate the battery health state vector of the target battery. Each cyclic running data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery.
[0034] In other words, in this embodiment, the target model normalizes the SOC (State of Charge, 0%-100%) coordinates of the charging and discharging segments of each cycle of operational data based on the measured discharge capacity of that cycle, replacing the time coordinates with SOC coordinates to map them to the SOC domain. Furthermore, an attention mechanism is used to perform cross-cycle information interaction on multiple cycles of operational data to generate a battery health vector characterizing the lifespan degradation trend of the target battery.
[0035] Step S208: Using the target model, the target cycle index of the target cycle point is concatenated with the battery health state vector to generate a concatenated vector, and the target capacity of the target battery at the target cycle point is determined based on the concatenated vector.
[0036] Specifically, the target condition prediction head in the target model can receive the embedded representation of the battery health state vector and the target cycle index to be predicted. After concatenating the two, a lightweight mapping network is used to output the capacity prediction value (i.e., the target capacity) for the corresponding target cycle. By predicting the capacity values of multiple future cycle points at once, a complete future capacity degradation trajectory is formed. This future capacity degradation trajectory can provide continuous predictive information for subsequent life assessment and operation and maintenance decisions.
[0037] In this embodiment, a battery life prediction request is obtained, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge-discharge cycle at which the capacity of the target battery is to be predicted; multiple cycle operation data of the target battery are obtained; through the target model, the multiple cycle operation data are mapped to the SOC domain, and a battery health state vector of the target battery is generated by cross-cycle information interaction through an attention mechanism, wherein each cycle operation data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery; through the target model, the target cycle index of the target cycle point is concatenated with the battery health state vector to generate a concatenated vector, and the target capacity of the target battery at the target cycle point is determined based on the concatenated vector. By mapping multiple cyclic operation data to the SOC domain and generating a battery health state vector for the target battery through cross-cycle information interaction via an attention mechanism, and generating a spliced vector based on the target cycle index and the battery health state vector, the target capacity at the target cycle point can be predicted using the spliced vector. This allows the output of the complete capacity degradation trajectory for multiple future cycle points based on a portion of the historical cycle prefix (i.e., cyclic operation data). This provides rich future evolution information before the accelerated degradation inflection point appears, offering more forward-looking data support for target battery replacement timing decisions, operation and maintenance plan formulation, and usage strategy optimization. This solves the problem in related technologies that cannot adapt to different chemical systems and operating conditions in battery life prediction.
[0038] As an optional embodiment, the method described above maps multiple cyclic running data to the SOC domain through a target model, and generates a battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism, including: By using the target model, multiple cyclic running data are preprocessed to obtain the SOC grid feature token sequence for each cyclic running data in the SOC domain. The SOC grid feature token sequence includes the original features and derived features of the corresponding cyclic running data.
[0039] Specifically, the target model can preprocess the data for each cycle to obtain the original features in the SOC domain, then obtain one or more derived features based on the original features, and obtain the SOC grid feature token sequence for each cycle of data in the SOC domain based on the original features and the derived features.
[0040] As an optional embodiment, the method described above can be used to preprocess multiple cyclic running data to obtain a SOC grid feature token sequence for each cyclic running data in the SOC domain through the following steps: For each cycle of running data, the charging segment data and discharging segment data in each cycle of running data are converted from time domain data to SOC domain data, respectively, to obtain the first sub-data corresponding to the charging segment data and the second sub-data corresponding to the discharging segment data, and the multi-dimensional feature matrix corresponding to each cycle of running data is obtained based on the first sub-data and the second sub-data.
[0041] In other words, to minimize dataset-specific sampling artifacts and achieve cross-dataset learning, the raw time-series measurements within each loop are converted to a SOC-aligned representation. For each loop's run data, it can be split into charging segment data and discharging segment data. Let... The measured discharge capacity for cycle t (i.e., the period corresponding to the cyclic operation data, for example, when t is 1, it is the first cycle) is obtained by integrating the current over the entire discharge segment. The state of charge (SOC, i.e., the state of charge during the charging segment) is also considered. Discharge segment charge state ) is defined as: ; ; in, It is the charge accumulated during the charging phase. This refers to the charge accumulated during the discharge phase. Therefore, this definition allows the SOC axis of each cycle to be anchored to its own measured discharge capacity, avoiding system drift that may be caused by using nominal or cross-cycle capacities, and preserving physically comparable SOC coordinates between cycles and batteries with different aging levels. Furthermore, the maximum accumulated charge for each cycle is 100, so for each cycle, each charging or discharging phase can be interpolated to a fixed SOC grid using index-based interpolation. The charging phase grid is interpolated across 0 to 99 to obtain the first sub-data (i.e., the first SOC alignment matrix), and the discharging phase grid is interpolated across 99 to 0 to obtain the second sub-data (i.e., the second SOC alignment matrix). The two SOC alignment matrices for the same cycle are then concatenated to form the matrix representation of each cycle. Furthermore, temperature channels may be missing or partially observed in heterogeneous sources; therefore, temperature completion is performed during interpolation: if all temperature values in the charging / discharging segment are missing, they are filled using the nominal temperature provided by a conditional graph (e.g., a preset correspondence between charging / discharging stages and temperature values) (defaulting to 25°C if unavailable); otherwise, missing entries are filled with the median of the charging / discharging segment. It is worth noting that, to remove incomplete steps and broken cycles, this embodiment employs a conservative cycle quality rule: when the maximum charging capacity is less than 0.8... The data from that cycle is discarded. During the training phase, batteries with too much incomplete cycle data are also excluded in advance to avoid unreliable degradation trajectories.
[0042] Derivative features are constructed for each multidimensional feature matrix to obtain the derived features of each multidimensional feature matrix.
[0043] In other words, in addition to the original features in the multidimensional feature matrix, it is also necessary to construct derived features for each multidimensional feature matrix to obtain the derived features of each multidimensional feature matrix.
[0044] In addition to the original measurements, the SOC domain derivative is calculated to expose aging-sensitive curve shape changes. Besides current I, voltage V, (segment) capacity Q, temperature T, time increment Δt, and SOC coordinates, the following derived features can be calculated using numerical gradients: dV / dSOC, dT / dSOC, and dV / dQ, with protection for denominators close to zero. Based on the original and derived features of each multidimensional feature matrix, a high-dimensional feature token sequence corresponding to each multidimensional feature matrix is obtained; specifically, after the original and derived features of each multidimensional feature matrix, the high-dimensional feature token sequence (i.e., original and derived features) corresponding to each multidimensional feature matrix is: X t (s)=
[0045] The multiple high-dimensional feature token sequences of the target battery are arranged in chronological order and encapsulated to obtain an initial four-dimensional input tensor.
[0046] Specifically, multiple high-dimensional feature token sequences from all high-dimensional feature token sequences of the target battery can be arranged in chronological order. : ; In other words, the aforementioned multiple high-dimensional feature token sequences are obtained from a portion of the target battery's cyclic running data. The initial four-dimensional input tensor contains: a batch dimension (i.e., the number of batteries) B, a prefix length dimension (i.e., the number of cycles) T, a SOC grid length dimension (i.e., the number of SOC points) L, and a feature dimension (i.e., the number of features) F. Furthermore, during the prediction phase, the target battery is a single battery, therefore B is 1. Thus, the prefix of a single battery forms a 4D tensor as follows: , where T=n is the (padded) prefix length.
[0047] By normalizing each feature data in the initial four-dimensional input tensor, we obtain the SOC grid feature token sequence corresponding to each high-dimensional feature token sequence, and the target four-dimensional input tensor corresponding to the initial four-dimensional input tensor.
[0048] Specifically, to stabilize optimization on datasets with different scales and temporal resolutions, feature normalization is applied, and robust handling is performed for heavy-tailed and non-finite values. Particularly, due to the time increment... It is usually long-tailed, and it is first transformed in the following way: ; Then, for any given feature data, the estimator estimates the global mean μ and standard deviation σ from a pool of sampled data (such as a cache composed of multiple looped data sets). (To balance efficiency and memory constraints, this estimator employs a fast approximation strategy: loading only a finite number of files and sampling a fixed number of data points for each file, thus avoiding a full traversal.) During statistical estimation, non-finite values are excluded, and cleanup is performed during application. Each feature is standardized as follows: ; Furthermore, for multi-step output tasks such as trajectory prediction, to avoid scale mismatch across prediction ranges, μ and σ can be independently calculated for each output dimension at each prediction time step and normalized separately. This dimensional and temporal range-based normalization method can effectively alleviate the scale drift problem across time steps and improve the stability and accuracy of long-term predictions.
[0049] The target model uses a low-level intra-periodic Transformer encoder to perform self-attention computation and feature extraction on each SOC grid feature token sequence, and generates a periodic embedding vector corresponding to each SOC grid feature token sequence through attention pooling.
[0050] In other words, the SOC grid feature tokens are first formed into an ordered sequence. This sequence is then input into the lowest-level intra-cycle Transformer encoder at the bottom of the model. This encoder dynamically models the dependencies between different SOC regions using a multi-head self-attention mechanism. During this process, the encoder not only extracts local features from each SOC grid but also integrates global contextual information. Finally, through attention pooling (i.e., weighting and aggregating all SOC grid feature tokens with a learnable query vector), the entire sequence is compressed into a fixed-dimensional periodic embedding vector. This periodic embedding vector highly condenses the comprehensive aging characteristics and electrochemical behavior of different SOC regions within the charge-discharge cycle, serving as a high-quality input representation for subsequent lifetime prediction, health status assessment, or anomaly detection tasks.
[0051] By using the upper-level cross-cycle Transformer sequence encoder in the target model, the long-term degradation dynamic model of the periodic-level embedded vector is performed to generate the battery health state vector.
[0052] After obtaining the periodic-level embedding vector corresponding to each charge-discharge cycle, the target model further utilizes an upper-level cross-cycle Transformer sequence encoder to process these vectors sequentially over time, capturing the long-term degradation dynamics of the target battery across multiple cycles throughout its lifespan. Due to the slow, non-linear evolution and cumulative influence of historical usage conditions inherent in aging phenomena such as battery capacity decay and internal resistance growth, the upper-level cross-cycle Transformer sequence encoder, with its self-attention mechanism, can flexibly associate any two historical cycles (e.g., the 10th cycle and the 800th cycle) to identify key turning points, accelerated aging stages, or restorative behaviors in the degradation trend. Through the upper-level cross-cycle Transformer sequence encoder, a high-order semantic representation reflecting the current health level of the battery is gradually extracted. The final output battery health state vector not only contains the current capacity / power degradation level but also implicitly encodes information such as aging path, usage history, and remaining lifespan potential. This can be directly used for downstream tasks such as remaining capacity prediction, remaining lifespan estimation, or maintenance decisions, achieving end-to-end intelligent battery health management.
[0053] As an optional embodiment, the method described above can be implemented by performing self-attention calculation and feature extraction on each SOC grid feature token sequence through the underlying intra-periodic Transformer encoder in the target model, and generating a periodic embedding vector corresponding to each SOC grid feature token sequence through attention pooling: For each SOC grid feature token sequence, the underlying intra-period Transformer encoder maps each SOC grid feature token in each SOC grid feature token sequence to the latent space, obtaining the token embedding vector corresponding to each SOC grid feature token.
[0054] Specifically, for cycle t, the SOC grid matrix These are considered as SOC grid feature token sequences. Within the underlying cycle, the Transformer encoder generates token embedding vectors mapped to the latent space according to the following formula: ; Where d is the cyclic embedding dimension (in one optional implementation, it can be 128). Within this underlying cycle, the Transformer encoder learns transferable curve shape semantics (e.g., voltage-SOC and derivative signatures) without manual feature engineering.
[0055] By superimposing position encoding on each token embedding vector, a position-aware token vector sequence is obtained.
[0056] In other words, position encoding is superimposed on each token embedding vector to preserve the order information of different token embedding vectors in the SOC dimension and obtain position-aware token vectors. Finally, all position-aware token vectors are concatenated based on this position encoding to obtain a position-aware token vector sequence.
[0057] Self-attention computation is performed on the position-aware token vector sequence to obtain a token context representation sequence that incorporates global context information.
[0058] Specifically, after obtaining the position-aware token vector sequence, it is fed into the self-attention layer of the underlying Transformer encoder. During this process, each position-aware token vector interacts with all other position-aware token vectors in the sequence (including itself) through a query, key, and value mechanism, dynamically calculating its correlation weights with other position-aware token vectors. This mechanism allows each position-aware token vector to not only express local features but also adaptively aggregate semantic information from the global context. The final output token context representation sequence, where each element is an enhanced representation of the original token after fusing information from the entire sequence, retains position specificity while also containing global structure and evolutionary patterns, providing a high-dimensional, context-rich feature foundation for subsequent pooling, prediction, or classification tasks.
[0059] Each token context representation in the token context representation sequence is processed by a feedforward network through a nonlinear transformation to obtain a deep representation of each SOC grid feature token in each SOC grid feature token sequence.
[0060] After completing the self-attention computation, the resulting token context representation sequence, although incorporating global context information, still needs further token-by-token nonlinear transformation via a Feed-Forward Network (FFN) to enhance its expressive power. Optionally, the context representation of each token in the token context representation sequence (i.e., the context-aware vector corresponding to each SOC grid) can be independently input into a two-layer fully connected network with identical structure and shared parameters. This typically includes an upscaling layer (e.g., mapping from d-dimensional to 4d-dimensional) and an activation function (e.g., GELU or ReLU), and then restored to the original dimension through a downscaling layer. This process introduces strong nonlinearity, enabling the model to learn more complex feature interaction patterns, such as the voltage-temperature-current coupled aging effect within the SOC range. After FFN processing, each SOC grid feature token is mapped to a more discriminative deep representation, which not only preserves position and context information but also contains higher-order electrochemical degradation features. These deep representations form the high-quality input foundation for subsequent periodic pooling or health state inference, significantly improving the model's ability to perceive and model subtle changes in the battery's internal state.
[0061] The attention pooling module determines the attention weight of each SOC grid feature token, and then performs a weighted summation of the deep representations of all SOC grid feature tokens in each SOC grid feature token sequence according to the attention weight, to obtain the periodic embedding vector corresponding to each SOC grid feature token sequence.
[0062] Specifically, the attention pooling module adaptively aggregates the feature token sequence of each SOC grid to generate the corresponding periodic embedding vector. Specifically, after obtaining the deep representation of all SOC grid feature tokens in each charge / discharge cycle (t), it is denoted as the sequence. , where (L) is the number of SOC grids, and represents the deep representation of the feature token of the (i)th SOC grid in period (t). The attention pooling module first passes through a small multilayer perceptron function Calculate its importance score; and obtain the attention weights by Softmax normalization:
[0063] Subsequently, the deep representations of all SOC grid feature tokens in the sequence are weighted and summed according to this attention weight to obtain a fixed-dimensional periodic embedding vector: ; This mechanism can dynamically emphasize SOC regions that are more sensitive to the degradation of the target battery (such as high SOC or low SOC intervals) while suppressing SOC segments with redundant information or high noise. In particular, when dealing with different battery chemistry systems (such as ternary lithium and lithium iron phosphate), their aging-sensitive regions differ significantly. Attention pooling can adaptively capture these patterns, thereby improving the physical interpretability and generalization ability of cycle-level characterization.
[0064] As an optional embodiment, the method described above, through the upper-layer cross-cycle Transformer sequence encoder in the target model, performs cross-cycle long-term degradation dynamic modeling on the SOC grid feature token sequence to generate a battery health state vector characterizing the battery health state, including: The temporal information of each periodic embedding vector is determined by the upper-layer cross-period Transformer sequence encoder according to the temporal order of each SOC grid feature token sequence. By employing a self-attention mechanism, all periodic embedding vectors are interactively computed according to the temporal information of each periodic embedding vector to achieve dynamic modeling of long-term degradation across periods, thereby obtaining the battery health state vector.
[0065] By using the upper-layer cross-cycle Transformer sequence encoder, the temporal information of each cycle-level embedding vector is determined according to the temporal order of the feature token sequence of each SOC grid. Based on this, through a self-attention mechanism, all cycle-level embedding vectors are interactively calculated according to the temporal information of each cycle-level embedding vector to achieve cross-cycle long-term degradation dynamic modeling and obtain a vector used to indicate the battery health status.
[0066] Specifically, given the cyclic operation data of a target battery for T charge-discharge cycles observed continuously in time, the corresponding periodic embedding vectors constitute a sequence. ; among them, each It is generated from the SOC grid feature token sequence through attention pooling. To preserve the sequential order between cycles, the system encodes the sinusoidal positions. By incorporating the embedded sequence, a position-aware input representation is obtained:
[0067] This sequence is then fed into the upper-level cross-cycle Transformer sequence encoder. The upper-level cross-cycle Transformer sequence encoder uses a multi-head self-attention mechanism to dynamically interact with the periodic-level embedding vectors of each historical period (including itself), thereby modeling long-term degradation dynamics across cycles, such as battery capacity decay and internal resistance growth. For input sequences of variable length, the system introduces a padding mask to ensure that the self-attention calculation only applies to valid periods, eliminating interference from padding terms. Finally, the encoder output sequence is: ; Among them, the last bit output Here, It is the final battery health state vector (state dimension) For variable-length prefixes, a padding mask is applied to make self-attention exclude padding cycles.
[0068] Furthermore, the target model also includes a target conditional prediction head. Long-term prediction is conditional on the requested target cycle index. That is, the target cycle index of the target cycle point can be concatenated with the battery health state vector to generate a concatenated vector through the following steps: Before generating the concatenated vector, the target cycle index is first embedded and aggregated. Specifically, let the normalized target cycle index of the K target cycle points to be predicted be... For each target periodic index t k Through a multilayer perceptron (i.e., MLP) φ( Map it to an embedding vector e k ,Right now , where the embedding dimension d t = 16. Subsequently, average pooling is performed on these K embedding vectors to obtain an aggregated target periodic index embedding representation. .
[0069] After completing the above embedding and aggregation, the generated battery health state vector s T The aggregated target periodic index embedding representation e is concatenated to generate a concatenated vector [s]. T ; e).
[0070] Meanwhile, the target capacity of the target battery at the target cycle point can be determined based on the splicing vector using the following method: [s] T Input to a lightweight mapping network r ψ The mapping network outputs the predicted target capacity of the target battery at the K target cycle points. ,Right now In the main configuration, the mapping network is implemented using a lightweight linear head to reduce inference costs, while relying on a hierarchical Transformer to complete representation learning.
[0071] The main configuration uses a lightweight linear head to reduce inference costs, while relying on a hierarchical Transformer for representation learning.
[0072] As an optional embodiment, the method described above further includes: Obtain the original model and adjust its structure to obtain the model to be trained. Optionally, in this embodiment, the original model is a prediction framework based on a hierarchical Transformer, and the model to be trained is obtained by adjusting the original model.
[0073] As an optional embodiment, the method described above can be implemented by the following steps to obtain the original model and adjust its structure to obtain the model to be trained: After the feature extractor of the original model, a domain classifier is connected, wherein the feature extractor includes: a bottom-level intra-period Transformer encoder, an attention pooling module, and an upper-level cross-period Transformer sequence encoder, and the domain classifier is used to predict the domain label to which the training samples belong; between the feature extractor and the domain classifier, a gradient reversal layer is inserted to obtain the model to be trained, wherein the gradient reversal layer is used to multiply the gradient passed to the feature extractor by a negative coefficient during backpropagation, so that the feature extractor updates in a direction that makes the domain classifier unable to distinguish the source of the data, and the negative coefficient decreases as the number of training iterations of the model to be trained increases.
[0074] In other words, after the feature extractor, the domain classifier d is connected. w The domain classifier is a multi-layer mapping network whose input is the battery health state vector s output by the feature extractor. T The output is a probability vector predicting the domain label of the sample. ,Right now = d w (s T Domain classifiers are used to predict the domain labels to which training samples belong.
[0075] Let the true domain label be u, and the domain classification loss be L. dom Defined as a prediction probability vector Cross-entropy loss between the real domain label u and the actual domain label u: ; Where C represents the total number of domain categories. This domain classification loss is also known as the domain adversarial loss. DANN performs this loss by applying the domain classifier to s before the domain classifier. TThis is achieved by applying the gradient inversion operator, which forces the feature extractor to reduce neighborhood discriminative information while preserving predictive utility.
[0076] A gradient inversion layer is inserted between the feature extractor and the domain classifier to obtain the model to be trained. The gradient inversion layer represents an identity mapping during forward propagation. During backpropagation, the gradient inversion layer multiplies the gradient passed to the feature extractor by a negative coefficient, i.e. Where the negative coefficient α is the reversal coefficient. This mechanism forms a minimax game: domain classifier d w Attempting to minimize the domain classification loss L dom The feature extractor is trained to implicitly maximize L through gradient inversion. dom This forces the feature extractor to reduce domain discriminative information and learn a domain-invariant degenerate representation. The negative coefficient α is dynamically adjusted using standard domain adversarial neural network scheduling as training progresses p ∈ [0,1]. Optionally, a warm-up phase can be set up in the early stage of training, with the negative coefficient α = 0, to ensure that the model to be trained first learns the basic degenerate representation, and then gradually introduces domain adversarial pressure. After that, the adversarial pressure increases steadily, thereby improving the training stability and final convergence effect.
[0077] The variance regularization module divides all training samples into multiple subgroups according to preset classification conditions. The subgroup average regression loss of each subgroup and the global average regression loss of all training samples are calculated. The subgroup loss variance penalty term is then added to the global average regression loss to obtain the total loss. Each subgroup includes multiple training samples, and the subgroup loss variance penalty term is the variance between the average regression losses of each subgroup.
[0078] Specifically, the variance regularization module divides all training samples into multiple subgroups according to preset classification conditions. These preset classification conditions can be: constructing operating condition-chemical system subgroups based on preset temperature and charge / discharge rate intervals, as well as chemical system identifiers. The grouping definition of the subgroups can be: [Definition details omitted for brevity]. g = ( T / ΔT , r ch / Δ r , r dch / Δ r , chem_id); This grouping captures heterogeneous stress factors and chemically dependent behavior, enabling explicit regularization of cross-group reliability.
[0079] The subgroup average regression loss and the global average regression loss can be calculated as follows: Let l_i be the regression loss for each training sample. For each subgroup g obtained from the partitioning, define the subgroup average regression loss L for that subgroup. g This is the average regression loss of all training samples within the subgroup. Simultaneously, the global average regression loss L for all training samples is calculated. reg .
[0080] VREx objective: This is achieved by adding a subgroup loss variance penalty term to the global average regression loss. ; Among them, the subgroup loss variance penalty term The variance is calculated based on the average regression loss between each subgroup. λ is a weight controlling the robustness of subgroups across the working condition-chemical system. By minimizing this VREx objective, the model to be trained can be prevented from being applicable only to the dominant subgroup in the training data, thus improving the prediction stability under the bias of a few subgroups. The global average regression loss, the subgroup loss variance penalty term, and the domain adversarial loss are used as the training objectives of the model to be trained, and the model to be trained is trained using training samples to obtain the target model, where the domain adversarial loss is the loss of the domain labels of the training samples.
[0081] Specifically, the global average regression loss L reg Subgroup loss variance penalty term and domain adversarial losses L dom This serves as the training objective for the model to be trained. The overall training objective integrates the above three aspects, and the complete expression for the total loss is: ; Among them, L reg This corresponds to the global average regression loss (i.e., trajectory regression loss). The corresponding subgroup loss variance penalty term (i.e., variance regularization loss), L dom Corresponding domain adversarial loss. λ is used to control the robustness of subgroups across operating conditions and chemistry systems, and γ is used for weighted domain adversarial loss.
[0082] The target model is obtained by training the model to be trained using training samples. During training, the optimizer uses AdamW with gradient pruning, and the variable-length history prefix is handled by padding masks to ensure correct attention behavior during training.
[0083] As can be seen from the above, the main configuration of the target model in this embodiment includes: a Transformer token encoder for intra-cycle representation learning (i.e., the bottom-level intra-cycle Transformer encoder); an attention pooling module for forming each cycle embedding (i.e., a module for generating the cycle-level embedding vector corresponding to each SOC grid feature token sequence through attention pooling); a Transformer sequence encoder for capturing long-term degradation dynamics (i.e., the upper-level cross-cycle Transformer sequence encoder); a linear target conditional head for efficient long-term prediction; a VREx for cross-condition-chemical system subgroup variance regularization; and a DANN with a scheduling gradient inversion layer for domain invariance.
[0084] For comparison, a standard empirical risk minimization framework baseline version can also be used. In the empirical risk minimization baseline, the training objective is simplified to include only the global average regression loss, i.e., L = L reg The domainless adversarial loss term and variance regularization term.
[0085] The predictive performance metrics of the trained model can be determined by determining the mean absolute percentage error (MAPE) of the trajectory, which measures the overall deviation between the model's predicted future capacity trajectory and the actual capacity trajectory.
[0086] For M test samples, each predicting K future capacity steps, the trajectory-level MAPE is defined as: ; in, It is a small positive number (e.g., 10) -8 This is to prevent division by zero. In other words, for each test battery and each predicted future cycle point, the predicted value is calculated first. The absolute error between the true value y and the actual value y. Divide this absolute error by the absolute value of the true value to obtain a percentage error. The denominator is... This is to prevent division errors when the actual capacity is close to zero. The percentage errors of all test batteries and all predicted points are summed, divided by the total number of points (M×K), and then multiplied by 100% to obtain the trajectory-level mean absolute percentage error. The smaller the value, the closer the predicted capacity decay curve is to the actual situation, indicating better performance of the trained model.
[0087] Predicted EOF cycle Determined from the predicted capacity trajectory, EOF serves as a cycle index for the first time the predicted capacity falls below 80% of the nominal capacity. EOF is used to measure the accuracy of the model's prediction of the battery's end-of-life. .
[0088] Specifically, if the predicted capacity does not fall below this threshold in all K prediction steps, then the maximum prediction cycle index is used as the predicted end-of-life cycle. The actual end-of-life cycle is determined as follows: using the same rule, find the cycle index from the battery's actual capacity sequence where the capacity first falls below 80% of the nominal capacity, denoted as N. EOF .
[0089] The mean absolute percentage error of the lifespan end-of-life period is calculated as follows: .
[0090] In other words, for each test battery, the absolute error (the difference in number of cycles) between the predicted end-of-life period and the actual end-of-life period is calculated. This absolute error is divided by the actual end-of-life period to obtain the percentage error. The average percentage error of all test batteries is the mean absolute percentage error of the end-of-life period. The smaller the value, the more accurate the model's prediction of how much longer the battery can be used. It should be noted that, for the foregoing method embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0091] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0092] According to another aspect of the embodiments of this application, a battery life prediction apparatus for implementing the above-described battery life prediction method is also provided. Figure 3 This is a structural block diagram of an optional battery life prediction device according to an embodiment of this application, such as... Figure 3 As shown, the device may include: The request acquisition module 31 is used to acquire a battery life prediction request, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge and discharge cycle of the target battery to be predicted capacity. The data acquisition module 32 is used to acquire multiple cycles of operating data of the target battery; The vector generation module 33 is used to map multiple cyclic running data to the SOC domain through the target model, and generate the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism. Each cyclic running data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery. The determination module 34 is used to concatenate the target cycle index of the target cycle point with the battery health state vector through the target model to generate a concatenated vector, and determine the target capacity of the target battery at the target cycle point based on the concatenated vector.
[0093] It should be noted that the request acquisition module 31 in this embodiment can be used to perform the above step S202, the data acquisition module 32 in this embodiment can be used to perform the above step S204, the vector generation module 33 in this embodiment can be used to perform the above step S206, and the determination module 34 in this embodiment can be used to perform the above step S208.
[0094] In addition to the modules described above, the apparatus in this embodiment may also include modules that perform any method as described in any of the aforementioned battery life prediction apparatus methods.
[0095] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented through software or hardware, and the hardware environment includes the network environment.
[0096] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described battery life prediction device method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0097] According to another embodiment of this application, an electronic device is also provided, comprising: Figure 4 As shown, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.
[0098] Memory 1503 is used to store computer programs; When processor 1501 executes the program stored in memory 1503, it performs the following steps: Step S202: Obtain a battery life prediction request, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge-discharge cycle at which the capacity of the target battery is to be predicted.
[0099] Step S204: Obtain multiple cycle operation data of the target battery.
[0100] Step S206: Through the target model, multiple cyclic running data are mapped to the SOC domain, and cross-cycle information interaction is performed through the attention mechanism to generate the battery health state vector of the target battery. Each cyclic running data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery.
[0101] Step S208: Using the target model, the target cycle index of the target cycle point is concatenated with the battery health state vector to generate a concatenated vector, and the target capacity of the target battery at the target cycle point is determined based on the concatenated vector.
[0102] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic device and other devices.
[0103] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0104] As an example, the memory 1503 described above may include, but is not limited to, the request acquisition module 31, data acquisition module 32, vector generation module 33, and determination module 34 from the battery life prediction device described above. Furthermore, it may include, but is not limited to, other module units from the battery life prediction device described above, which will not be elaborated upon in this example.
[0105] The processor mentioned above can be a general-purpose processor, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0106] This application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the method steps of the above method embodiments when it runs.
[0107] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0108] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0109] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned 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 several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0110] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units 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, indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0112] The units described 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 the solution provided in this embodiment, depending on actual needs.
[0113] 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.
[0114] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for predicting battery life, characterized in that, include: Obtain a battery life prediction request, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge-discharge cycle of the target battery to be predicted capacity. Acquire multiple cycles of operating data for the target battery; The target model maps the multiple cyclic running data to the SOC domain, and generates the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism. Each cyclic running data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery. Using the target model, the target cycle index of the target cycle point is concatenated with the battery health state vector to generate a concatenated vector, and the target capacity of the target battery at the target cycle point is determined based on the concatenated vector.
2. The method according to claim 1, characterized in that, The process of mapping the multiple cyclic running data to the SOC domain through the target model and generating the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism includes: The target model is used to preprocess the multiple cyclic running data to obtain the SOC grid feature token sequence of each cyclic running data in the SOC domain, wherein the SOC grid feature token sequence includes the original features and derived features of the corresponding cyclic running data. The target model uses the underlying periodic Transformer encoder to perform self-attention calculation and feature extraction on each SOC grid feature token sequence, and generates the periodic embedding vector corresponding to each SOC grid feature token sequence through attention pooling. The battery health state vector is generated by performing cross-cycle long-term degradation dynamic modeling on the periodic embedding vector through the upper-level cross-cycle Transformer sequence encoder in the target model.
3. The method according to claim 2, characterized in that, The preprocessing of the multiple cyclic running data to obtain the SOC grid feature token sequence for each cyclic running data in the SOC domain includes: For each cycle of running data, the charging segment data and the discharging segment data in each cycle of running data are converted from time domain data to SOC domain data to obtain a first sub-data corresponding to the charging segment data and a second sub-data corresponding to the discharging segment data, and a multi-dimensional feature matrix corresponding to each cycle of running data is obtained based on the first sub-data and the second sub-data. Derivative features are constructed for each multidimensional feature matrix to obtain the derived features of each multidimensional feature matrix; Based on the original features and the derived features of each multidimensional feature matrix, a high-dimensional feature token sequence corresponding to each multidimensional feature matrix is obtained; The multiple high-dimensional feature token sequences of the target battery are arranged in chronological order and encapsulated to obtain an initial four-dimensional input tensor; By normalizing each feature data in the initial four-dimensional input tensor, the SOC grid feature token sequence corresponding to each of the high-dimensional feature token sequences is obtained, as well as the target four-dimensional input tensor corresponding to the initial four-dimensional input tensor.
4. The method according to claim 2, characterized in that, The process involves performing self-attention computation and feature extraction on each SOC grid feature token sequence using the underlying intra-periodic Transformer encoder in the target model, and generating a periodic embedding vector corresponding to each SOC grid feature token sequence through attention pooling, including: For each SOC grid feature token sequence, the underlying intra-period Transformer encoder maps each SOC grid feature token in each SOC grid feature token sequence to the latent space to obtain the token embedding vector corresponding to each SOC grid feature token. By superimposing position encoding on each of the token embedding vectors, a position-aware token vector sequence is obtained; Self-attention computation is performed on the location-aware token vector sequence to obtain a token context representation sequence that incorporates global context information; Each token context representation in the token context representation sequence is processed by a feedforward network to perform a nonlinear transformation, thereby obtaining a deep representation of each SOC grid feature token in each SOC grid feature token sequence. The attention weight of each SOC grid feature token is determined by the attention pooling module, and the deep representations of all SOC grid feature tokens in each SOC grid feature token sequence are weighted and summed according to the attention weight to obtain the periodic embedding vector corresponding to each SOC grid feature token sequence.
5. The method according to claim 2, characterized in that, The step of performing cross-cycle long-term degradation dynamic modeling on the SOC grid feature token sequence through the upper-layer cross-cycle Transformer sequence encoder in the target model to generate a battery health state vector representing the battery health state includes: The temporal information of each periodic embedding vector is determined by the upper-layer cross-period Transformer sequence encoder according to the temporal order of each SOC grid feature token sequence. By employing a self-attention mechanism, interactive calculations are performed on all the periodic embedding vectors according to the temporal information of each periodic embedding vector to achieve cross-cycle long-term degradation dynamic modeling, thereby obtaining the battery health state vector.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the original model and adjust its structure to obtain the model to be trained; The variance regularization module divides all training samples into multiple subgroups according to preset classification conditions. The average regression loss of each subgroup is calculated, as well as the global average regression loss of all training samples. The subgroup loss variance penalty term is then added to the global average regression loss to obtain the total loss. Each subgroup includes multiple training samples, and the subgroup loss variance penalty term is the variance between the average regression losses of each subgroup. The global average regression loss, the subgroup loss variance penalty term, and the domain adversarial loss are used as the training objectives of the model to be trained, and the model to be trained is trained using the training samples to obtain the target model, wherein the domain adversarial loss is the loss of the domain labels of the training samples.
7. The method according to claim 6, characterized in that, The structural adjustment of the original model to obtain the model to be trained includes: After the feature extractor of the original model, a domain classifier is connected, wherein the feature extractor includes: the lower-level intra-period Transformer encoder, the attention pooling module, and the upper-level cross-period Transformer sequence encoder, and the domain classifier is used to predict the domain label to which the training sample belongs; A gradient inversion layer is inserted between the feature extractor and the domain classifier to obtain the model to be trained. The gradient inversion layer is used to multiply the gradient passed to the feature extractor by a negative coefficient during backpropagation, so that the feature extractor updates in a direction that makes the domain classifier unable to distinguish the source of the data. The negative coefficient decreases as the number of training iterations of the model to be trained increases.
8. A battery life prediction device, characterized in that, include: The request acquisition module is used to acquire a battery life prediction request, wherein the life prediction request is used to request the determination of the capacity of the target battery at a target cycle point, and the target cycle point is the charge-discharge cycle of the target battery to be predicted capacity. The data acquisition module is used to acquire multiple cycles of operating data of the target battery; The vector generation module is used to map the multiple cyclic running data to the SOC domain through the target model, and generate the battery health state vector of the target battery through cross-cycle information interaction via an attention mechanism. Each cyclic running data includes battery information of the target battery in a complete charge-discharge cycle, and the battery health state vector is used to characterize the life degradation trend of the target battery. The determination module is used to concatenate the target cycle index of the target cycle point with the battery health state vector through the target model to generate a concatenated vector, and determine the target capacity of the target battery at the target cycle point based on the concatenated vector.
9. An electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, the communication interface, and the memory communicate with each other via the communication bus, characterized in that... The memory is used to store computer programs; The processor is configured to perform the method of any one of claims 1 to 7 by running the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when run on a processor.