Battery health state estimation method and system based on bidirectional attention fusion
By employing a bidirectional attention fusion battery health state estimation method, combining battery charging time series data and prior information, a natural language description is constructed. Utilizing explicit alignment and bidirectional attention modules, the problem of imperfect modal alignment and insufficient robustness in existing technologies is solved, achieving high-precision and stable SOH estimation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN XINGYUN SOFTWARE TECH CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-12
Smart Images

Figure CN122017575A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery management and state estimation technology, and in particular to a battery health state estimation method and system based on bidirectional attention fusion. Background Technology
[0002] With the widespread application of electric vehicles and energy storage systems, the safety and reliability of lithium batteries have increasingly become key issues in the industry. Battery State of Health (SOH), as a core indicator for measuring the degree of battery performance degradation, is of great value for accurate estimation in battery life prediction, operation and maintenance strategy optimization, and safety early warning. Currently, SOH estimation methods can be mainly categorized into two types: traditional modeling methods based on time-series data, and semantic analysis methods based on Large Language Models (LLMs).
[0003] The first type of method mainly relies on time-series signals such as voltage, current, temperature, and state of charge (SOC) collected during battery charging and discharging, and uses models such as recurrent neural networks (RNN), long short-term memory networks (LSTM), or Transformers to construct estimation models. This method can effectively capture the dynamic changes in battery operation, such as the evolution of charging and discharging curves, but it usually does not fully consider static background information such as rated parameters (such as nominal capacity and rated voltage), user charging habits, and ambient temperature, resulting in certain limitations in the comprehensiveness of the estimation results.
[0004] The second type of method is the semantic modeling approach based on large language models, which has emerged in recent years. This type of method transforms the battery's rated parameters, usage habits, and statistical features of the charging process into natural language descriptions, and then uses LLM to generate semantic embedding vectors to integrate unstructured prior knowledge. For example, the battery's rated capacity, cycle count, and typical charging modes can be input into the LLM as text prompts to extract high-level semantic features. Although this method can introduce rich contextual information, it often fails to fully integrate with temporal features, resulting in significant modal differences between the two types of features, thus limiting the accuracy of SOH prediction and its practical application effectiveness.
[0005] Existing methods still face several key challenges in achieving multimodal information fusion. First, the modality alignment mechanism is imperfect: traditional fusion methods, such as unidirectional cross-attention mechanisms, typically use temporal features as query vectors and LLM semantic features as key-value pairs, lacking explicit alignment constraints. This leads to differences in the semantic space distribution of different modalities, affecting the consistency and effectiveness of feature fusion. Second, the fusion mechanism is relatively simple: existing methods mostly rely on unidirectional attention mechanisms, making it difficult to achieve bidirectional interaction between temporal and semantic information and to fully explore the complementary relationship between them. For example, they cannot simultaneously model the dependence of temporal dynamics on semantic background and its reverse influence. Furthermore, the system robustness is insufficient: when some modal data is missing or of poor quality (such as sensor failure or incomplete user input), existing methods often struggle to maintain reliable SOH estimation capabilities, limiting their applicability in real-world complex scenarios.
[0006] Therefore, how to provide a battery health state estimation method and system based on bidirectional attention fusion to improve the accuracy, robustness and practicality of SOH estimation has become an urgent technical problem to be solved. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a battery health state estimation method and system based on bidirectional attention fusion, so as to improve the accuracy, robustness and practicality of SOH estimation.
[0008] In a first aspect, the present invention provides a battery health state estimation method based on bidirectional attention fusion, comprising the following steps: Step S1: Collect a large amount of charging time sequence data of the battery during charging at different rates and the prior information of the battery. Divide and statistically analyze each charging time sequence data step by step, and extract local features and global features. Step S2: Construct a natural language description based on the prior information, local features, and global features, and build a dataset based on the natural language description and charging time series data; Step S3: Create a battery health state estimation model based on the semantic embedding module, temporal embedding module, explicit alignment module, bidirectional attention fusion module and prediction module, and set the loss function of the battery health state estimation model; Step S4: Train the battery health status estimation model using the dataset and loss function; Step S5: Estimate the battery health status using the trained battery health status estimation model.
[0009] Furthermore, in step S1, the charging timing data includes at least the charging voltage, charging current, charging temperature, and SOC. The prior information includes at least the battery rated capacity, battery rated voltage, battery cycle count, depth of charge / discharge, and ambient temperature. Both the local and global features include charging time, voltage range, temperature range, and SOC range.
[0010] Furthermore, in step S3, the semantic embedding module is used to extract semantic embedding vectors from the natural language description through a large language model; The timing embedding module is used to extract timing embedding vectors from charge-discharge timing data through a timing model; The explicit alignment module is used to explicitly align the semantic embedding vector and the temporal embedding vector in the latent space using a contrastive learning algorithm. The bidirectional attention fusion module is used to perform bidirectional cross-modal attention fusion on the explicitly aligned semantic embedding vector and temporal embedding vector to obtain a comprehensive embedding vector; The prediction module is used to output battery health status estimation results based on the comprehensive embedding vector.
[0011] Furthermore, in step S3, the formula for the loss function is: ; ; in, This represents the total loss value of the loss function; Indicates alignment loss; Indicates SOH monitoring loss; The hyperparameters are used to balance the alignment loss and the SOH supervision loss; D() represents the cosine similarity function; stopgrad() represents the stopping gradient. This represents the feature representation of the temporal embedding vector after passing through the predictor; This represents the feature representation of the semantic embedding vector after passing through the predictor; This represents the feature representation of the temporal embedding vector after projection by the projector. This represents the feature representation of the semantic embedding vector after it has been projected by the projector.
[0012] Furthermore, in step S3, the fusion process of the bidirectional attention fusion module is as follows: The explicitly aligned semantic embedding vector is used as Query1, and the temporal embedding vector is used as Key1 and Value1. Query1, Key1 and Value1 are fused to obtain the fused representation h1. The explicitly aligned temporal embedding vector is used as Query2, and the semantic embedding vector is used as Key2 and Value2. Query2, Key2 and Value2 are fused to obtain the fused representation h2. By setting a learnable parameter α as a dynamic weight, the fused representations h1 and h2 are fused to obtain a comprehensive embedding vector: The overall embedding vector is calculated as α*h1 + (1-α)*h2.
[0013] Secondly, the present invention provides a battery health state estimation system based on bidirectional attention fusion, comprising the following modules: The data acquisition module is used to collect a large amount of charging time sequence data of the battery during charging at different rates and the prior information of the battery. The charging time sequence data is divided into steps and statistically analyzed to extract local and global features. The dataset construction module is used to construct natural language descriptions based on the aforementioned prior information, local features, and global features, and to construct datasets based on the aforementioned natural language descriptions and charging time-series data. A battery health state estimation model creation module is used to create a battery health state estimation model based on a semantic embedding module, a temporal embedding module, an explicit alignment module, a bidirectional attention fusion module, and a prediction module, and to set the loss function of the battery health state estimation model. A battery health state estimation model training module is used to train the battery health state estimation model using the dataset and loss function. The battery health state estimation module is used to estimate the battery health state using the trained battery health state estimation model.
[0014] Furthermore, in the data acquisition module, the charging timing data includes at least charging voltage, charging current, charging temperature, and SOC; The prior information includes at least the battery rated capacity, battery rated voltage, battery cycle count, depth of charge / discharge, and ambient temperature. Both the local and global features include charging time, voltage range, temperature range, and SOC range.
[0015] Furthermore, in the battery health state estimation model creation module, the semantic embedding module is used to extract semantic embedding vectors from natural language descriptions through a large language model; The timing embedding module is used to extract timing embedding vectors from charge-discharge timing data through a timing model; The explicit alignment module is used to explicitly align the semantic embedding vector and the temporal embedding vector in the latent space using a contrastive learning algorithm. The bidirectional attention fusion module is used to perform bidirectional cross-modal attention fusion on the explicitly aligned semantic embedding vector and temporal embedding vector to obtain a comprehensive embedding vector; The prediction module is used to output battery health status estimation results based on the comprehensive embedding vector.
[0016] Furthermore, in the battery health state estimation model creation module, the formula for the loss function is: ; ; in, This represents the total loss value of the loss function; Indicates alignment loss; Indicates SOH monitoring loss; The hyperparameters are used to balance the alignment loss and the SOH supervision loss; D() represents the cosine similarity function; stopgrad() represents the stopping gradient. This represents the feature representation of the temporal embedding vector after passing through the predictor; This represents the feature representation of the semantic embedding vector after passing through the predictor; This represents the feature representation of the temporal embedding vector after projection by the projector. This represents the feature representation of the semantic embedding vector after it has been projected by the projector.
[0017] Furthermore, in the battery health state estimation model creation module, the fusion process of the bidirectional attention fusion module is as follows: The explicitly aligned semantic embedding vector is used as Query1, and the temporal embedding vector is used as Key1 and Value1. Query1, Key1 and Value1 are fused to obtain the fused representation h1. The explicitly aligned temporal embedding vector is used as Query2, and the semantic embedding vector is used as Key2 and Value2. Query2, Key2 and Value2 are fused to obtain the fused representation h2. By setting a learnable parameter α as a dynamic weight, the fused representations h1 and h2 are fused to obtain a comprehensive embedding vector: The overall embedding vector is calculated as α*h1 + (1-α)*h2.
[0018] The advantages of this invention are: 1. By collecting a large amount of charging time-series data of batteries during different charging rates and prior information of the batteries, the charging time-series data is divided and statistically analyzed step by step to extract local and global features. Then, natural language descriptions are constructed based on the prior information, local features, and global features, and a dataset is built based on the natural language descriptions and charging time-series data. Next, a battery health state estimation model is created based on semantic embedding, temporal embedding, explicit alignment, bidirectional attention fusion, and prediction modules. A loss function for the battery health state estimation model is set, and the model is trained using the dataset and the loss function. The trained battery health state estimation model is then used to estimate the battery health state. That is, by introducing an explicit alignment module and a contrastive learning loss function... First, the feature representations of battery time-series data and natural language descriptions are forcibly aligned in the latent space, effectively eliminating modal differences and laying a unified foundation for accurate fusion. Second, the bidirectional attention fusion module achieves deep interaction and complementarity between the two modalities through a bidirectional cross-attention mechanism from temporal to semantic and from semantic to temporal, fully exploring the intrinsic relationship between dynamic temporal behavior and static prior knowledge, significantly improving the accuracy of estimation. Simultaneously, this bidirectional architecture and its learnable dynamic weights endow the model with adaptive capabilities, dynamically adjusting its dependence on different modalities when faced with situations where some data is missing or of poor quality, thus ensuring the robustness and practicality of the system. Through the synergistic effect of these three elements, the accuracy, robustness, and practicality of SOH estimation are ultimately greatly improved.
[0019] 2. By combining battery charging time-series data (such as voltage, current, and temperature) and prior information (such as battery rated capacity and cycle count), and extracting local and global features, a rich dataset was constructed. Based on this, a bidirectional attention fusion module was used to perform bidirectional interaction between semantic embedding and temporal embedding, which can more comprehensively capture battery degradation patterns and reduce the limitations of a single data source. Compared with traditional methods, this multimodal fusion approach significantly improves the accuracy and stability of SOH estimation and is suitable for practical battery management scenarios.
[0020] 3. By introducing an explicit alignment module, semantic embedding vectors and temporal embedding vectors are aligned in the latent space through a contrastive learning algorithm, ensuring the consistency of data from different modalities. This helps the model adapt to changes in different battery types, charging rates, or environmental conditions, and avoids overfitting. The bidirectional attention mechanism further allows the model to dynamically adjust attention weights, thereby maintaining robustness when dealing with unseen data and improving the practical value of the technology in diverse application scenarios.
[0021] 4. By converting prior information into natural language descriptions and combining it with time-series data, the model can understand battery status in a more human-like way. The semantic embedding module uses a large language model to extract features, and the time-series embedding module processes sequence data. This design not only improves data utilization but also enhances the interpretability of the model. Users can intuitively understand the estimation results through natural language descriptions, which facilitates integration and debugging in battery monitoring systems.
[0022] 5. The bidirectional attention fusion module adopts bidirectional cross-modal attention, using semantic and temporal embeddings as queries and keys respectively, and dynamically weights the fusion results through learnable parameters. This mechanism avoids simple concatenation or average fusion, and can capture complex relationships between modalities more efficiently and reduce computational redundancy. At the same time, the loss function combines alignment loss and SOH supervision loss, which balances representation learning and task-specific optimization, accelerates model convergence, and reduces training costs.
[0023] 6. By integrating battery charging timing data and prior information, and utilizing a bidirectional attention fusion module and explicit alignment mechanism, the accuracy, reliability, and generalization ability of battery health state estimation are significantly improved, while data utilization efficiency and model interpretability are optimized. The innovative multimodal fusion design and dynamic weighting strategy further improve computational efficiency and endow the solution with good flexibility and scalability, making it suitable for diverse real-world scenarios. Attached Figure Description
[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0025] Figure 1 This is a flowchart of a battery health state estimation method based on bidirectional attention fusion according to the present invention.
[0026] Figure 2 This is a schematic diagram of the structure of a battery health state estimation system based on bidirectional attention fusion according to the present invention.
[0027] Figure 3 This is a flowchart illustrating the present invention. Detailed Implementation
[0028] The overall approach of the technical solution in this application is as follows: By introducing an explicit alignment module and a contrastive learning loss function, the feature representations of battery time-series data and natural language descriptions are first forcibly aligned in the latent space, effectively eliminating modal differences and laying a unified foundation for accurate fusion. Furthermore, the bidirectional attention fusion module achieves deep interaction and complementarity between the two modalities through a bidirectional cross-attention mechanism from temporal to semantic and from semantic to temporal, fully exploring the intrinsic relationship between dynamic temporal behavior and static prior knowledge, significantly improving the accuracy of estimation. Simultaneously, this bidirectional architecture and its learnable dynamic weights endow the model with adaptive capabilities, enabling dynamic adjustment of dependence on different modalities when faced with situations where some data is missing or of poor quality, thereby ensuring the robustness and practicality of the system. Through the synergistic effect of these three components, the accuracy, robustness, and practicality of SOH estimation are improved.
[0029] Please refer to Figures 1 to 3 As shown, a preferred embodiment of the battery health state estimation method based on bidirectional attention fusion of the present invention includes the following steps: Step S1: Collect a large amount of charging time sequence data of the battery during charging at different rates and the prior information of the battery. Divide and statistically analyze each charging time sequence data step by step, and extract local features and global features. Step S2: Construct a natural language description based on the prior information, local features, and global features, and build a dataset based on the natural language description and charging time series data; The extracted features are combined with prior information to construct a structured natural language description. For example: "This battery has a rated capacity of 50Ah, a rated voltage of 3.7V, and has been cycled 150 times. This charge is performed at a 1C rate at an ambient temperature of 25℃. The constant current charging phase lasts for 45 minutes, during which the voltage increases from 3.5V to 4.2V and the temperature increases from 24℃ to 28℃; the constant voltage charging phase lasts for 10 minutes, during which the current gradually decreases. The total charging time is 55 minutes, and the SOC increases from 15% to 95%." A large number of such natural language descriptions are paired with the corresponding original charging time-series data and their actual SOH labels (which can be calibrated through capacity decay experiments) to construct a dataset for model training, which is then divided into training, validation, and test sets in a 7:2:1 ratio.
[0030] Step S3: Create a battery health state estimation model based on the semantic embedding module, temporal embedding module, explicit alignment module, bidirectional attention fusion module and prediction module, and set the loss function of the battery health state estimation model; Step S4: Train the battery health status estimation model using the dataset and loss function; Step S5: Estimate the battery health status using the trained battery health status estimation model.
[0031] In step S1, the charging timing data includes at least the charging voltage, charging current, charging temperature, and SOC. The prior information includes at least the battery rated capacity, battery rated voltage, battery cycle count, depth of charge / discharge, and ambient temperature. Both the local and global features include charging time, voltage range, temperature range, and SOC range.
[0032] In practical applications, timing data during the charging process can be collected through a battery testing platform or an onboard BMS. For example, charging voltage, charging current, battery surface temperature, and estimated SOC value can be recorded at a sampling frequency of 1Hz. Simultaneously, prior information can be obtained from the battery management system or user manual, such as: rated capacity of 50Ah, rated voltage of 3.7V, current cycle count of 150, average depth of discharge of 80%, and typical operating ambient temperature of 25℃.
[0033] Subsequently, the continuous charging time-series data is divided into steps. For example, a complete constant current-constant voltage charging process is divided into constant current charging steps and constant voltage charging steps. Statistical analysis is performed on each step to extract local features (such as the duration of the constant current step, average current, voltage rise slope, and temperature variation range) and global features (such as the total duration of the entire charging cycle, maximum voltage, average temperature, and the time required to charge from 10% to 90% SOC).
[0034] In step S3, the semantic embedding module is used to extract semantic embedding vectors (representing the battery's rated parameters, environmental and charging behavior, etc.) from natural language descriptions (e.g., "A certain battery has a rated capacity of X Ah, a rated voltage of Y V, and has been cycled N times; during this charging process, it is charged at a 1C rate for Δt1 minutes, the voltage rises from V1 to V2, the temperature rises from T1 to T2, and the SOC increases from S1 to S2...") using a large language model (LLM). In practice, pre-trained BERT or GPT series models can be used as the basic large language model. The natural language description described above is input into the model, and the vector corresponding to the [CLS] label in the last hidden layer is extracted as the semantic embedding vector. The timing embedding module is used to extract timing embedding vectors from charge-discharge timing data through a timing model; In practical implementation, a one-dimensional convolutional neural network, LSTM, or Transformer encoder can be selected as the timing model. The standardized charging timing data (voltage, current, temperature, SOC) is input into the model, and a fixed-dimensional timing embedding vector is output. The explicit alignment module is used to explicitly align the semantic embedding vectors and temporal embedding vectors in the latent space using a contrastive learning algorithm, thereby reducing modal differences. Specifically, drawing inspiration from the Simsiam model, it defines a projector g and a predictor p. After passing through the projector and predictor, the semantic and temporal embedding vectors output... , , , Cosine similarity is used to measure the spatial projection distance of features, and the alignment loss is... The alignment loss function aligns the features of two modalities in the projection space. The bidirectional attention fusion module is used to perform bidirectional cross-modal attention fusion on the explicitly aligned semantic embedding vector and temporal embedding vector to obtain a comprehensive embedding vector; The prediction module is used to output battery health status estimation results based on the comprehensive embedding vector.
[0035] In practice, the prediction module uses a fully connected layer to map the integrated embedding vector into a scalar output, namely the estimated SOH value.
[0036] In step S3, the formula for the loss function is: ; ; in, This represents the total loss value of the loss function; Indicates alignment loss; Indicates SOH monitoring loss; The hyperparameters are used to balance the alignment loss and the SOH supervision loss; D() represents the cosine similarity function; stopgrad() represents the stopping gradient. This represents the feature representation of the temporal embedding vector after passing through the predictor; This shows the feature representation of the semantic embedding vector after passing through the predictor; This represents the feature representation of the temporal embedding vector after projection by the projector. This represents the feature representation of the semantic embedding vector after projection by the projector. The alignment loss and SOH supervision loss are then jointly trained end-to-end with weighted averages.
[0037] In step S3, the fusion process of the bidirectional attention fusion module is as follows: The explicitly aligned semantic embedding vector is used as Query1, and the temporal embedding vector is used as Key1 and Value1. Query1, Key1 and Value1 are fused to obtain the fused representation h1. The explicitly aligned temporal embedding vector is used as Query2, and the semantic embedding vector is used as Key2 and Value2. Query2, Key2 and Value2 are fused to obtain the fused representation h2. By setting a learnable parameter α as a dynamic weight, the fused representations h1 and h2 are fused to obtain a comprehensive embedding vector: The overall embedding vector is calculated as α*h1 + (1-α)*h2.
[0038] A preferred embodiment of the battery health state estimation system based on bidirectional attention fusion of the present invention includes the following modules: The data acquisition module is used to collect a large amount of charging time sequence data of the battery during charging at different rates and the prior information of the battery. The charging time sequence data is divided into steps and statistically analyzed to extract local and global features. The dataset construction module is used to construct natural language descriptions based on the aforementioned prior information, local features, and global features, and to construct datasets based on the aforementioned natural language descriptions and charging time-series data. The extracted features are combined with prior information to construct a structured natural language description. For example: "This battery has a rated capacity of 50Ah, a rated voltage of 3.7V, and has been cycled 150 times. This charge is performed at a 1C rate at an ambient temperature of 25℃. The constant current charging phase lasts for 45 minutes, during which the voltage increases from 3.5V to 4.2V and the temperature increases from 24℃ to 28℃; the constant voltage charging phase lasts for 10 minutes, during which the current gradually decreases. The total charging time is 55 minutes, and the SOC increases from 15% to 95%." A large number of such natural language descriptions are paired with the corresponding original charging time-series data and their actual SOH labels (which can be calibrated through capacity decay experiments) to construct a dataset for model training, which is then divided into training, validation, and test sets in a 7:2:1 ratio.
[0039] A battery health state estimation model creation module is used to create a battery health state estimation model based on a semantic embedding module, a temporal embedding module, an explicit alignment module, a bidirectional attention fusion module, and a prediction module, and to set the loss function of the battery health state estimation model. A battery health state estimation model training module is used to train the battery health state estimation model using the dataset and loss function. The battery health state estimation module is used to estimate the battery health state using the trained battery health state estimation model.
[0040] In the data acquisition module, the charging timing data includes at least charging voltage, charging current, charging temperature, and SOC; The prior information includes at least the battery rated capacity, battery rated voltage, battery cycle count, depth of charge / discharge, and ambient temperature. Both the local and global features include charging time, voltage range, temperature range, and SOC range.
[0041] In practical applications, timing data during the charging process can be collected through a battery testing platform or an onboard BMS. For example, charging voltage, charging current, battery surface temperature, and estimated SOC value can be recorded at a sampling frequency of 1Hz. Simultaneously, prior information can be obtained from the battery management system or user manual, such as: rated capacity of 50Ah, rated voltage of 3.7V, current cycle count of 150, average depth of discharge of 80%, and typical operating ambient temperature of 25℃.
[0042] Subsequently, the continuous charging time-series data is divided into steps. For example, a complete constant current-constant voltage charging process is divided into constant current charging steps and constant voltage charging steps. Statistical analysis is performed on each step to extract local features (such as the duration of the constant current step, average current, voltage rise slope, and temperature variation range) and global features (such as the total duration of the entire charging cycle, maximum voltage, average temperature, and the time required to charge from 10% to 90% SOC).
[0043] In the battery health state estimation model creation module, the semantic embedding module is used to extract semantic embedding vectors (representing the battery's rated parameters, environmental and charging behavior, etc.) from natural language descriptions (e.g., "A certain battery has a rated capacity of X Ah, a rated voltage of Y V, and has been cycled N times; during this charging process, it is charged at a 1C rate for Δt1 minutes, the voltage rises from V1 to V2, the temperature rises from T1 to T2, and the SOC increases from S1 to S2...") through a large language model (LLM). In practice, pre-trained BERT or GPT series models can be used as the basic large language model. The natural language description described above is input into the model, and the vector corresponding to the [CLS] label in the last hidden layer is extracted as the semantic embedding vector. The timing embedding module is used to extract timing embedding vectors from charge-discharge timing data through a timing model; In practical implementation, a one-dimensional convolutional neural network, LSTM, or Transformer encoder can be selected as the timing model. The standardized charging timing data (voltage, current, temperature, SOC) is input into the model, and a fixed-dimensional timing embedding vector is output. The explicit alignment module is used to explicitly align the semantic embedding vectors and temporal embedding vectors in the latent space using a contrastive learning algorithm, thereby reducing modal differences. Specifically, drawing inspiration from the Simsiam model, it defines a projector g and a predictor p. After passing through the projector and predictor, the semantic and temporal embedding vectors output... , , , Cosine similarity is used to measure the spatial projection distance of features, and the alignment loss is... The alignment loss function aligns the features of two modalities in the projection space. The bidirectional attention fusion module is used to perform bidirectional cross-modal attention fusion on the explicitly aligned semantic embedding vector and temporal embedding vector to obtain a comprehensive embedding vector; The prediction module is used to output battery health status estimation results based on the comprehensive embedding vector.
[0044] In practice, the prediction module uses a fully connected layer to map the integrated embedding vector into a scalar output, namely the estimated SOH value.
[0045] In the battery health state estimation model creation module, the formula for the loss function is: ; ; in, This represents the total loss value of the loss function; Indicates alignment loss; Indicates SOH monitoring loss; The hyperparameters are used to balance the alignment loss and the SOH supervision loss; D() represents the cosine similarity function; stopgrad() represents the stopping gradient. This represents the feature representation of the temporal embedding vector after passing through the predictor; This represents the feature representation of the semantic embedding vector after passing through the predictor; This represents the feature representation of the temporal embedding vector after projection by the projector. This represents the feature representation of the semantic embedding vector after projection by the projector. The alignment loss and SOH supervision loss are then jointly trained end-to-end with weighted averages.
[0046] In the battery health state estimation model creation module, the fusion process of the bidirectional attention fusion module is as follows: The explicitly aligned semantic embedding vector is used as Query1, and the temporal embedding vector is used as Key1 and Value1. Query1, Key1 and Value1 are fused to obtain the fused representation h1. The explicitly aligned temporal embedding vector is used as Query2, and the semantic embedding vector is used as Key2 and Value2. Query2, Key2 and Value2 are fused to obtain the fused representation h2. By setting a learnable parameter α as a dynamic weight, the fused representations h1 and h2 are fused to obtain a comprehensive embedding vector: The overall embedding vector is calculated as α*h1 + (1-α)*h2.
[0047] In summary, the advantages of this invention are as follows: 1. By collecting a large amount of charging time-series data of batteries during different charging rates and prior information of the batteries, the charging time-series data is divided and statistically analyzed step by step to extract local and global features. Then, natural language descriptions are constructed based on the prior information, local features, and global features, and a dataset is built based on the natural language descriptions and charging time-series data. Next, a battery health state estimation model is created based on semantic embedding, temporal embedding, explicit alignment, bidirectional attention fusion, and prediction modules. A loss function for the battery health state estimation model is set, and the model is trained using the dataset and the loss function. The trained battery health state estimation model is then used to estimate the battery health state. That is, by introducing an explicit alignment module and a contrastive learning loss function... First, the feature representations of battery time-series data and natural language descriptions are forcibly aligned in the latent space, effectively eliminating modal differences and laying a unified foundation for accurate fusion. Second, the bidirectional attention fusion module achieves deep interaction and complementarity between the two modalities through a bidirectional cross-attention mechanism from temporal to semantic and from semantic to temporal, fully exploring the intrinsic relationship between dynamic temporal behavior and static prior knowledge, significantly improving the accuracy of estimation. Simultaneously, this bidirectional architecture and its learnable dynamic weights endow the model with adaptive capabilities, dynamically adjusting its dependence on different modalities when faced with situations where some data is missing or of poor quality, thus ensuring the robustness and practicality of the system. Through the synergistic effect of these three elements, the accuracy, robustness, and practicality of SOH estimation are ultimately greatly improved.
[0048] 2. By combining battery charging time-series data (such as voltage, current, and temperature) and prior information (such as battery rated capacity and cycle count), and extracting local and global features, a rich dataset was constructed. Based on this, a bidirectional attention fusion module was used to perform bidirectional interaction between semantic embedding and temporal embedding, which can more comprehensively capture battery degradation patterns and reduce the limitations of a single data source. Compared with traditional methods, this multimodal fusion approach significantly improves the accuracy and stability of SOH estimation and is suitable for practical battery management scenarios.
[0049] 3. By introducing an explicit alignment module, semantic embedding vectors and temporal embedding vectors are aligned in the latent space through a contrastive learning algorithm, ensuring the consistency of data from different modalities. This helps the model adapt to changes in different battery types, charging rates, or environmental conditions, and avoids overfitting. The bidirectional attention mechanism further allows the model to dynamically adjust attention weights, thereby maintaining robustness when dealing with unseen data and improving the practical value of the technology in diverse application scenarios.
[0050] 4. By converting prior information into natural language descriptions and combining it with time-series data, the model can understand battery status in a more human-like way. The semantic embedding module uses a large language model to extract features, and the time-series embedding module processes sequence data. This design not only improves data utilization but also enhances the interpretability of the model. Users can intuitively understand the estimation results through natural language descriptions, which facilitates integration and debugging in battery monitoring systems.
[0051] 5. The bidirectional attention fusion module adopts bidirectional cross-modal attention, using semantic and temporal embeddings as queries and keys respectively, and dynamically weights the fusion results through learnable parameters. This mechanism avoids simple concatenation or average fusion, and can capture complex relationships between modalities more efficiently and reduce computational redundancy. At the same time, the loss function combines alignment loss and SOH supervision loss, which balances representation learning and task-specific optimization, accelerates model convergence, and reduces training costs.
[0052] 6. By integrating battery charging timing data and prior information, and utilizing a bidirectional attention fusion module and explicit alignment mechanism, the accuracy, reliability, and generalization ability of battery health state estimation are significantly improved, while data utilization efficiency and model interpretability are optimized. The innovative multimodal fusion design and dynamic weighting strategy further improve computational efficiency and endow the solution with good flexibility and scalability, making it suitable for diverse real-world scenarios.
[0053] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A battery health state estimation method based on bidirectional attention fusion, characterized in that: Includes the following steps: Step S1: Collect a large amount of charging time sequence data of the battery during charging at different rates and the prior information of the battery. Divide and statistically analyze each charging time sequence data step by step, and extract local features and global features. Step S2: Construct a natural language description based on the prior information, local features, and global features, and build a dataset based on the natural language description and charging time series data; Step S3: Create a battery health state estimation model based on the semantic embedding module, temporal embedding module, explicit alignment module, bidirectional attention fusion module and prediction module, and set the loss function of the battery health state estimation model; Step S4: Train the battery health status estimation model using the dataset and loss function; Step S5: Estimate the battery health status using the trained battery health status estimation model.
2. The battery health state estimation method based on bidirectional attention fusion as described in claim 1, characterized in that: In step S1, the charging timing data includes at least the charging voltage, charging current, charging temperature, and SOC. The prior information includes at least the battery rated capacity, battery rated voltage, battery cycle count, depth of charge / discharge, and ambient temperature. Both the local and global features include charging time, voltage range, temperature range, and SOC range.
3. The battery health state estimation method based on bidirectional attention fusion as described in claim 1, characterized in that: In step S3, the semantic embedding module is used to extract semantic embedding vectors from natural language descriptions through a large language model; The timing embedding module is used to extract timing embedding vectors from charge-discharge timing data through a timing model; The explicit alignment module is used to explicitly align the semantic embedding vector and the temporal embedding vector in the latent space using a contrastive learning algorithm. The bidirectional attention fusion module is used to perform bidirectional cross-modal attention fusion on the explicitly aligned semantic embedding vector and temporal embedding vector to obtain a comprehensive embedding vector; The prediction module is used to output battery health status estimation results based on the comprehensive embedding vector.
4. The battery health state estimation method based on bidirectional attention fusion as described in claim 1, characterized in that: In step S3, the formula for the loss function is: ; ; in, This represents the total loss value of the loss function; Indicates alignment loss; Indicates SOH monitoring loss; The hyperparameters are used to balance the alignment loss and the SOH supervision loss; D() represents the cosine similarity function; stopgrad() represents the stopping gradient. This represents the feature representation of the temporal embedding vector after passing through the predictor; This represents the feature representation of the semantic embedding vector after passing through the predictor; This represents the feature representation of the temporal embedding vector after projection by the projector. This represents the feature representation of the semantic embedding vector after it has been projected by the projector.
5. The battery health state estimation method based on bidirectional attention fusion as described in claim 1, characterized in that: In step S3, the fusion process of the bidirectional attention fusion module is as follows: The explicitly aligned semantic embedding vector is used as Query1, and the temporal embedding vector is used as Key1 and Value1. Query1, Key1 and Value1 are fused to obtain the fused representation h1. The explicitly aligned temporal embedding vector is used as Query2, and the semantic embedding vector is used as Key2 and Value2. Query2, Key2 and Value2 are fused to obtain the fused representation h2. By setting a learnable parameter α as a dynamic weight, the fused representations h1 and h2 are fused to obtain a comprehensive embedding vector: The overall embedding vector is calculated as α*h1 + (1-α)*h2.
6. A battery health state estimation system based on bidirectional attention fusion, characterized in that: Includes the following modules: The data acquisition module is used to collect a large amount of charging time sequence data of the battery during charging at different rates and the prior information of the battery. The charging time sequence data is divided into steps and statistically analyzed to extract local and global features. The dataset construction module is used to construct natural language descriptions based on the aforementioned prior information, local features, and global features, and to construct datasets based on the aforementioned natural language descriptions and charging time-series data. A battery health state estimation model creation module is used to create a battery health state estimation model based on a semantic embedding module, a temporal embedding module, an explicit alignment module, a bidirectional attention fusion module, and a prediction module, and to set the loss function of the battery health state estimation model. A battery health state estimation model training module is used to train the battery health state estimation model using the dataset and loss function. The battery health state estimation module is used to estimate the battery health state using the trained battery health state estimation model.
7. The battery health state estimation system based on bidirectional attention fusion as described in claim 6, characterized in that: In the data acquisition module, the charging timing data includes at least charging voltage, charging current, charging temperature, and SOC; The prior information includes at least the battery rated capacity, battery rated voltage, battery cycle count, depth of charge / discharge, and ambient temperature. Both the local and global features include charging time, voltage range, temperature range, and SOC range.
8. The battery health state estimation system based on bidirectional attention fusion as described in claim 6, characterized in that: In the battery health state estimation model creation module, the semantic embedding module is used to extract semantic embedding vectors from natural language descriptions through a large language model; The timing embedding module is used to extract timing embedding vectors from charge-discharge timing data through a timing model; The explicit alignment module is used to explicitly align the semantic embedding vector and the temporal embedding vector in the latent space using a contrastive learning algorithm. The bidirectional attention fusion module is used to perform bidirectional cross-modal attention fusion on the explicitly aligned semantic embedding vector and temporal embedding vector to obtain a comprehensive embedding vector; The prediction module is used to output battery health status estimation results based on the comprehensive embedding vector.
9. A battery health state estimation system based on bidirectional attention fusion as described in claim 6, characterized in that: In the battery health state estimation model creation module, the formula for the loss function is: ; ; in, This represents the total loss value of the loss function; Indicates alignment loss; Indicates SOH monitoring loss; The hyperparameters are used to balance the alignment loss and the SOH supervision loss; D() represents the cosine similarity function; stopgrad() represents the stopping gradient. This represents the feature representation of the temporal embedding vector after passing through the predictor; This represents the feature representation of the semantic embedding vector after passing through the predictor; This represents the feature representation of the temporal embedding vector after projection by the projector. This represents the feature representation of the semantic embedding vector after it has been projected by the projector.
10. A battery health state estimation system based on bidirectional attention fusion as described in claim 6, characterized in that: In the battery health state estimation model creation module, the fusion process of the bidirectional attention fusion module is as follows: The explicitly aligned semantic embedding vector is used as Query1, and the temporal embedding vector is used as Key1 and Value1. Query1, Key1 and Value1 are fused to obtain the fused representation h1. The explicitly aligned temporal embedding vector is used as Query2, and the semantic embedding vector is used as Key2 and Value2. Query2, Key2 and Value2 are fused to obtain the fused representation h2. By setting a learnable parameter α as a dynamic weight, the fused representations h1 and h2 are fused to obtain a comprehensive embedding vector: The overall embedding vector is calculated as α*h1 + (1-α)*h2.