Multi-mode battery detection method and device, electronic equipment and storage medium
By constructing a dual-path encoder joint model based on a variational autoencoder framework and combining temporal and feature dependency extraction, the problem of insufficient anomaly analysis in existing battery detection methods is solved, achieving accurate detection and root cause localization of battery anomalies, and is applicable to multimodal battery detection devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 深圳织算科技有限公司
- Filing Date
- 2026-03-24
- Publication Date
- 2026-04-21
AI Technical Summary
Existing battery detection technologies struggle to capture complex anomaly patterns involving multiple coupled parameters, leading to missed detections or false alarms. Furthermore, they lack the ability to pinpoint the root cause of anomalies, failing to meet the real-time monitoring requirements of large-scale energy storage power stations.
A dataset is constructed using K-Means clustering combined with diversity sampling. A dual-path encoder joint model is built using a single-layer LSTM network and a graph neural network to extract temporal dependent features and inter-feature dependencies. The reconstruction error is calculated by combining mean squared error and regularization term, and a visualization report is generated.
It enables accurate detection and root cause localization of battery anomalies, improves the intelligence level and operation and maintenance efficiency of battery management, and supports edge deployment.
Smart Images

Figure CN121899666A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery management technology, and in particular to a multimodal battery detection method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the widespread application of energy storage technology and the continuous expansion of battery system scale, the demand for safety monitoring and fault early warning of energy storage batteries is becoming increasingly urgent.
[0003] Currently, the failure modes of mainstream energy storage batteries such as lithium iron phosphate batteries are mostly manifested as coordinated anomalies of multiple parameters such as temperature, voltage, current and SOC (state of charge). Traditional anomaly detection technologies mainly rely on single-variable threshold judgment (such as monitoring only voltage), which makes it difficult to capture complex anomaly modes coupled with multiple parameters, and is very likely to lead to missed detections or false alarms.
[0004] Meanwhile, existing methods are insufficient in modeling long-term dependencies in time series, making it difficult to identify slow-developing anomalies caused by battery aging or internal short circuits, and lacking the ability to locate the root cause of the anomaly, requiring maintenance personnel to spend a lot of time troubleshooting the cause of the fault.
[0005] Furthermore, the deployment of complex deep learning models on edge devices faces the dual challenges of computational efficiency and real-time performance, making it difficult to meet the real-time monitoring requirements of large-scale energy storage power plants.
[0006] Therefore, there is an urgent need for a multi-modal battery detection method that can simultaneously monitor multiple parameters, has high accuracy and strong interpretability, and supports edge deployment. Summary of the Invention
[0007] The present invention provides a multimodal battery detection method to address the problems of easy missed detection in single-variable detection, abnormal multi-parameter coordination, slow identification, and poor result interpretability leading to inefficient operation and maintenance troubleshooting in existing technologies. The technical solution is as follows: According to one aspect of the present invention, a multimodal battery detection method includes: acquiring multidimensional raw data of the battery; constructing a dataset by screening samples using K-Means clustering combined with diversity sampling; standardizing the dataset and constructing a time-series dataset using a sliding window; the raw data includes temperature, voltage, current, and SOC; constructing a time-domain encoder using a single-layer LSTM network, constructing a graph encoder based on a graph neural network, constructing a dual-path encoder joint model based on a variational autoencoder framework according to the time-domain encoder and the graph encoder, and training the dual-path encoder joint model using the time-series dataset; acquiring test data; extracting the time-series dependency features and inter-feature dependencies of the test data using the time-domain encoder and the graph encoder respectively, and concatenating and compressing them to obtain joint features; using a three-layer fully connected network to restore the joint features to a reconstructed sequence; calculating the reconstruction error of the reconstructed sequence using mean squared error (MSE) and a regularization term; calculating the feature contribution of each feature to the reconstruction error when the reconstruction error exceeds a set threshold, and analyzing the anomaly causes using the feature contribution to obtain a visualization report.
[0008] In one embodiment, acquiring multi-dimensional raw battery data, constructing a dataset by using K-Means clustering combined with diversity sampling, and standardizing and constructing a sliding window to obtain a time-series dataset are achieved through the following steps: collecting multi-dimensional raw battery data, handling missing values and cleaning outliers in the raw data, dividing the raw data into multiple sample clusters according to the working state mode using K-Means clustering; the working state mode includes charging and discharging; extracting representative samples from each sample cluster to construct a dataset by combining diversity sampling and a set sampling ratio, and standardizing the dataset using Standard Scaler with Z-score; the diversity sampling includes random sampling, diversity sampling, time-stratified sampling, and difficulty-aware sampling; constructing a sliding window according to a set window size and step size, and segmenting the dataset into independent samples according to the sliding window to form a structured time-series dataset.
[0009] In one embodiment, a temporal encoder is constructed using a single-layer LSTM network, and a graph encoder is constructed based on a graph neural network. A joint model of a dual-path encoder based on a variational autoencoder framework is then constructed using the temporal encoder and the graph encoder through the following steps: the temporal encoder is constructed using a single-layer LSTM network with 64 hidden layers; the temporal encoder and the graph encoder are concatenated into a joint model of a dual-path encoder; the temporal encoder is used to extract dynamic dependency features of the time series; and the graph encoder is used to explicitly model the correlation between features using a learnable adjacency matrix.
[0010] In one embodiment, training the dual-path encoder joint model using the time-series dataset is achieved through the following steps: data obtained through a multi-pack joint training strategy is combined with the time-series dataset as the training set; the dual-path encoder joint model is trained using an Adam optimizer with a learning rate of 0.001 and a batch size of 32; the parameters of the dual-path encoder joint model are optimized using a backpropagation optimization algorithm; the dual-path encoder joint model is trained for a set number of epochs until the model converges, so that the data feature distribution extracted by the dual-path encoder joint model meets the set requirements.
[0011] In one embodiment, the temporal dependency features and inter-feature dependencies of the test data are extracted using the temporal encoder and graph encoder, respectively, and then concatenated and compressed to obtain joint features. This is achieved through the following steps: a sliding window is constructed according to a set window size and step size; the test data is divided into multiple sliding windows according to the sliding window; for each sliding window, temporal features are extracted using the temporal encoder, and inter-feature dependencies are extracted using the graph encoder; the temporal features and inter-feature dependencies are concatenated into a joint feature vector; and the joint feature vector is compressed into the latent space through a fully connected layer to obtain a low-dimensional feature representation as the joint feature.
[0012] In one embodiment, a three-layer fully connected network is used to restore the joint features into a reconstructed sequence. The reconstruction error of the reconstructed sequence is calculated using the mean squared error (MSE) and a regularization term through the following steps: taking 16-dimensional joint features as input, the joint features are gradually restored into a reconstructed sequence through a three-layer fully connected network; the three-layer fully connected network includes an input layer, a 128-dimensional hidden layer, a 64-dimensional hidden layer, and an output layer; the mean squared error between the reconstructed sequence and the true sequence of the test data is calculated, and temporal KL divergence and feature KL divergence are added to obtain the reconstruction error; the weights of the temporal KL divergence and feature KL divergence are 0.0005 and 0.0001, respectively; the reconstruction error is used to reflect the degree of data anomaly.
[0013] In one embodiment, when the reconstruction error exceeds a set threshold, the feature contribution of each feature to the reconstruction error is calculated, and the cause of the anomaly is analyzed through the feature contribution to obtain a visualization report. This is achieved through the following steps: a dynamic threshold is set based on the 98th percentile of the training set; if the reconstruction error exceeds the dynamic threshold, it is determined to be an anomaly; the feature contribution of each feature to the anomaly is calculated by calculating the gradient weight of each feature to the reconstruction error, and a visualization report is generated based on the feature contribution; the visualization includes anomaly time point location, feature contribution heatmap, and labels.
[0014] According to one aspect of the present invention, a multimodal battery detection device includes: a multimodal data sampling module for acquiring multi-dimensional raw data of the battery, constructing a dataset by screening samples using K-Means clustering combined with diversity sampling, and performing standardization processing and sliding window construction on the dataset to obtain a time-series dataset; the raw data includes temperature, voltage, current, and SOC; and a dual encoder construction module for constructing a time-domain encoder using a single-layer LSTM network, constructing a graph encoder based on a graph neural network, constructing a dual-path encoder joint model based on a variational autoencoder framework according to the time-domain encoder and the graph encoder, and using the... The dual-path encoder joint model is trained using the time-series dataset. A joint feature reconstruction module is used to acquire the test data, extract the temporal dependency features and inter-feature dependencies of the test data using the temporal encoder and graph encoder respectively, and then concatenate and compress them to obtain joint features. A three-layer fully connected network is used to restore the joint features into a reconstructed sequence. An error analysis and visualization module is used to calculate the reconstruction error of the reconstructed sequence using mean squared error (MSE) and regularization terms. When the reconstruction error exceeds a set threshold, the feature contribution of each feature to the reconstruction error is calculated, and the anomaly is analyzed using the feature contribution to obtain a visualization report.
[0015] According to one aspect of the present invention, an electronic device includes at least one processor and at least one memory, wherein computer-readable instructions are stored on the memory; the computer-readable instructions are executed by one or more of the processors to cause the electronic device to implement the multimodal battery detection method as described above.
[0016] According to one aspect of the present invention, a storage medium has computer-readable instructions stored thereon, which are executed by one or more processors to implement the multimodal battery detection method as described above.
[0017] The beneficial effects of the technical solution provided by this invention are: In the above technical solution, this invention first acquires multi-dimensional raw data such as battery temperature and voltage. After handling missing values and cleaning outliers, K-Means clustering is used to divide the data according to working state modes such as charging and discharging. A dataset is constructed by combining diversity sampling, and then standardized and a sliding window is built to obtain a time-series dataset. Next, a single-layer LSTM network is used to construct a temporal encoder to extract dynamic dependency features. A graph encoder based on a graph neural network is constructed to model the correlation between features. The two are concatenated to construct a dual-path encoder joint model based on a variational autoencoder framework. The model is trained using data obtained through a multi-pack joint training strategy and the time-series dataset. After acquiring the data to be tested, a sliding window is used to segment the data, extracting temporal dependency features and inter-feature dependencies separately, and concatenating and compressing them to obtain joint features. A three-layer fully connected network is used to restore the reconstructed sequence, and the mean squared error and regularization term are calculated to obtain the reconstruction error. A dynamic threshold is set; if the error exceeds the threshold, an anomaly is determined. The feature contribution is calculated and a visual report is generated. This method can accurately detect battery anomalies, providing strong support for battery fault analysis and effectively solving the problem of insufficient anomaly analysis in existing battery detection methods. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a multimodal battery detection method according to an exemplary embodiment; Figure 2 This is a flowchart illustrating a multimodal battery detection method used in an application scenario. Figure 3 This is a block diagram illustrating a multimodal battery detection device according to an exemplary embodiment; Figure 4 This is a hardware structure diagram of an electronic device according to an exemplary embodiment; Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0020] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0021] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this disclosure means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0022] This invention provides a multimodal battery detection method. By constructing a dual-path encoder joint model based on a variational autoencoder framework and combining temporal and feature dependency extraction, it achieves accurate analysis of battery data and generates a visual report on the contribution of abnormal features. This effectively solves the problems of existing battery detection methods, such as insufficient anomaly analysis and difficulty in locating the cause of anomalies. This multimodal battery detection method is applicable to multimodal battery detection devices, which can be electronic devices. The multimodal battery detection method in this invention can be applied to various scenarios, such as chip multimodal battery detection, etc.
[0023] Please see Figure 1 This invention provides a multi-mode battery detection method, which is applicable to electronic devices.
[0024] In the following method embodiments, for ease of description, the execution subject of each step of the method is an electronic device, but this does not constitute a specific limitation.
[0025] like Figure 1 As shown, the method may include the following steps: Step 110: Obtain multi-dimensional raw data of the battery, use K-Means clustering combined with diversity sampling to filter samples to construct a dataset, and perform standardization and sliding window construction on the dataset to obtain a time series dataset.
[0026] In one possible implementation, multi-dimensional raw data of the battery is collected, missing values are handled and outliers are cleaned, and the raw data is divided into multiple sample clusters according to the working state mode by K-Means clustering. Representative samples are extracted from each sample cluster by combining diversity sampling and setting a sampling ratio to construct a dataset, and the dataset is standardized by Z-score using Standard Scaler.
[0027] Furthermore, a sliding window is constructed according to the set window size and step size, and the dataset is segmented into independent samples based on the sliding window to form a structured time-series dataset.
[0028] The raw data includes temperature, voltage, current, SOC, etc.; the operating state modes include charging and discharging, etc.; the diverse sampling includes random sampling, diverse sampling, time-layered sampling, difficulty-aware sampling, etc., none of which are specified here.
[0029] Specifically, raw data from multiple dimensions, including battery temperature, voltage, current, and SOC, are collected at a sampling frequency of 10 seconds per sampling to ensure data coverage of the battery's entire lifecycle. Obvious erroneous data (such as outliers like -999 and 1000) are filtered out, and data exceeding limits are removed based on reasonable ranges (temperature: -20~80℃, voltage: 2.5~4.2V, SOC: 0~1.0) to avoid noise interference. Z-score standardization (StandardScaler) is used to eliminate the influence of dimensions, ensuring a uniform distribution of different feature data and improving model training stability. A window size of 30 time points (5 minutes) and a step size of 6 time points (1 minute) are set to segment the data into independent samples, forming a structured time-series dataset to capture local time-series patterns.
[0030] In this embodiment of the invention, K-Means clustering and diversity sampling (random sampling, time-stratified sampling, and difficulty-aware sampling) are combined to adaptively determine the number of clusters, covering different working state modes such as charging and discharging, and ensuring the representativeness of the samples. Through standardization and sliding window construction, unstructured time-series data are transformed into a format that the model can process, while retaining the temporal dependencies, laying the foundation for subsequent feature extraction.
[0031] In the above process, the embodiments of the present invention ensure data quality and temporal structure integrity through multi-dimensional data collection, outlier cleaning, standardization and sliding window construction, providing highly representative samples for model training, and achieving high efficiency and accuracy in data preprocessing.
[0032] Step 120: Construct a temporal encoder using a single-layer LSTM network, construct a graph encoder based on a graph neural network, construct a dual-path encoder joint model based on a variational autoencoder framework using the temporal encoder and the graph encoder, and train the dual-path encoder joint model using a time-series dataset.
[0033] In one possible implementation, a temporal encoder is constructed using a single-layer LSTM network with 64-dimensional hidden layers, and the temporal encoder and graph encoder are concatenated into a dual-path encoder joint model.
[0034] Among them, the temporal encoder is used to extract the dynamic dependency features of the time series; the graph encoder is used to explicitly model the correlation between features through a learnable adjacency matrix; the dual-path encoder joint model uses the temporal encoder (LSTM) and the feature encoder (graph neural network) to extract spatiotemporal features respectively, and performs joint variational inference within the VAE framework to learn the multimodal potential distribution of the battery's normal state.
[0035] In one possible implementation, the data obtained through a multi-pack joint training strategy is combined with a time-series dataset as the training set. The dual-path encoder joint model is trained using an Adam optimizer with a learning rate of 0.001 and a batch size of 32. The parameters of the dual-path encoder joint model are optimized using a backpropagation optimization algorithm. The dual-path encoder joint model is trained for a set number of epochs until the model converges, so that the data feature distribution extracted by the dual-path encoder joint model meets the set requirements.
[0036] Specifically, a single-layer LSTM network (64-dimensional hidden layers) is used with an input dimension of 4 features × 30 time steps to extract temporally dependent features. The feature encoder, based on a graph neural network, explicitly models the dependencies between features (such as temperature-voltage, SOC-current) through a learnable adjacency matrix, capturing multi-parameter collaborative anomaly patterns. The temporal encoder and feature encoder are concatenated into a dual-path encoder joint model, fusing temporal and feature relationships to improve anomaly detection accuracy.
[0037] Furthermore, multi-pack joint training: Representative cell data are extracted from multiple packs within the same cluster and combined with time-series datasets as the training set to enhance the model's generalization ability. Parameter optimization: The Adam optimizer (learning rate 0.001), batch size 32, and training for 30 epochs are employed. Model parameters are optimized through backpropagation until convergence.
[0038] In the above process, this embodiment of the invention captures temporal dependencies and feature relationships separately through a dual-encoder architecture, solving the problem of missed detections in univariate detection and improving the ability to identify complex anomaly patterns. A multi-pack joint training strategy combined with intelligent sampling reduces data redundancy, accelerates model convergence, and maintains detection performance. Through the dual-path encoder joint model design and the multi-pack joint training strategy, collaborative modeling of temporal and feature relationships is achieved, improving the model's ability to detect complex anomaly patterns while optimizing training efficiency.
[0039] Step 130: Obtain the test data, use a temporal encoder and a graph encoder to extract the temporal dependency features and inter-feature dependencies of the test data respectively, and concatenate and compress them to obtain joint features. Use a three-layer fully connected network to restore the joint features into a reconstructed sequence.
[0040] In one possible implementation, a sliding window is constructed according to a set window size and step size. The test data is divided into multiple sliding windows based on the sliding window. For each sliding window, temporal features are extracted by a temporal encoder, and the dependencies between features are extracted by a graph encoder. The temporal features and the dependencies between features are concatenated into a joint feature vector. The joint feature vector is compressed into the latent space through a fully connected layer to obtain a low-dimensional feature representation as the joint feature.
[0041] In one possible implementation, 16-dimensional joint features are taken as input, and the joint features are gradually restored into a reconstructed sequence through a three-layer fully connected network.
[0042] The three fully connected layers include an input layer, a 128-dimensional hidden layer, a 64-dimensional hidden layer, and an output layer.
[0043] Specifically, the test data is divided into multiple sliding windows according to the window size (30 time points) and step size (6 time points) to ensure the integrity of the local temporal pattern. Temporal features: 64-dimensional temporal features are extracted using a temporal encoder. Graph features: 16-dimensional graph features are extracted using a feature encoder to model the dependencies between features. Feature fusion: The 64-dimensional temporal features and 16-dimensional graph features are concatenated into an 80-dimensional joint feature vector, which is then compressed into a 16-dimensional latent space through a fully connected layer to reduce computational complexity. Sequence reconstruction: Using the 16-dimensional joint features as input, the original sequence is gradually reconstructed through a three-layer fully connected network (input layer, 128-dimensional hidden layer, 64-dimensional hidden layer, and output layer). In the above process, this embodiment of the invention compresses the joint features through a fully connected layer, reducing redundant information and improving reconstruction efficiency. The three-layer fully connected network achieves lossless conversion from joint features to the original sequence, providing a reliable basis for anomaly detection. By employing sliding window segmentation, dual encoder feature extraction, and fully connected layer reconstruction, we achieved dimensionality reduction and sequence reconstruction from raw data to joint features, providing efficient and accurate feature representation for anomaly detection.
[0044] Step 140: Calculate the reconstruction error of the reconstructed sequence using mean squared error (MSE) and regularization term. When the reconstruction error exceeds a set threshold, calculate the feature contribution of each feature reconstruction error and obtain a visualization report by analyzing the anomaly through feature contribution analysis.
[0045] In one possible implementation, the mean square error between the reconstructed sequence and the true sequence of the test data is calculated, and the temporal KL divergence and feature KL divergence are added to obtain the reconstruction error.
[0046] The weights of temporal KL divergence and feature KL divergence are 0.0005 and 0.0001, respectively. The specific weights can be set according to the actual application scenario, and no limit is imposed here. The reconstruction error is used to reflect the degree of data anomaly.
[0047] In one possible implementation, a dynamic threshold is set based on the 98th percentile of the training set. If the reconstruction error exceeds the dynamic threshold, it is judged as an anomaly. By calculating the gradient weight of each feature with respect to the reconstruction error, the feature contribution of each feature to the anomaly is calculated, and a visualization report is generated based on the feature contribution.
[0048] The visualization includes anomaly point location, feature contribution heatmap and labels, etc., which are not limited here.
[0049] Specifically, the mean squared error (MSE) between the reconstructed sequence and the true sequence is calculated, and the temporal KL divergence (weight 0.0005) and feature KL divergence (weight 0.0001) are added to obtain the comprehensive reconstruction error, reflecting the degree of data anomaly. A dynamic threshold is set based on the 98th quantile of the reconstruction error distribution in the training set; if the reconstruction error exceeds the threshold, it is judged as an anomaly. By calculating the gradient weight of each feature with respect to the reconstruction error, the feature contribution is obtained, and the root cause of the anomaly is located. A visual report is generated, including the location of the anomaly time point, a heatmap of feature contribution, and labels, to guide maintenance personnel in quickly troubleshooting.
[0050] In the above process, the embodiments of the present invention set thresholds based on the training set distribution to adapt to the anomaly detection needs under different operating conditions and reduce false alarms. Feature contribution analysis clarifies the causes of anomalies and improves operational efficiency. Through reconstruction error calculation, dynamic threshold setting, and feature contribution analysis, accurate anomaly detection and root cause localization are achieved, and intuitive operational guidance is provided through visual reports, significantly improving the efficiency and reliability of battery safety management.
[0051] Through the above process, this invention proposes a multi-dimensional anomaly detection method for energy storage batteries based on the InterFusion deep learning architecture. By acquiring and preprocessing data, building and training models, extracting and reconstructing features, and detecting and visualizing anomalies, it achieves collaborative analysis of multi-dimensional parameters such as battery temperature, voltage, current, and SOC. This is the first time the InterFusion architecture has been applied to the battery field. Combined with a dual-encoder architecture and intelligent sampling strategy, it solves problems such as missed detections in single-variable detection, neglect of temporal dependencies, and poor interpretability in existing technologies. It boasts advantages such as high detection accuracy, strong interpretability (feature contribution analysis), and efficient deployment (support for edge computing), and can be widely used in large-scale energy storage power stations and electric vehicle battery management systems, demonstrating significant industrial application value.
[0052] In one application scenario, namely monitoring batteries in an energy storage power station, the multi-modal battery detection method proposed in this invention is used for multi-modal battery detection.
[0053] like Figure 2 As shown, the specific steps may include: Step S1, multi-variable input: temperature / voltage / current / SOC.
[0054] Specifically, in the battery system of an energy storage power station, various sensors collect real-time data on battery temperature, voltage, current, and SOC. For example, a temperature sensor collects the battery surface temperature every 10 seconds, a voltage sensor simultaneously acquires the voltage across the battery terminals, a current sensor measures the charging and discharging current, and the BMS system calculates and outputs the SOC value. This multi-source data is transmitted to a data processing center to provide a basis for subsequent analysis.
[0055] In the above process, the embodiments of the present invention comprehensively acquire battery operating status information through multi-sensor collaborative acquisition, laying the foundation for accurate detection.
[0056] Step S2, Data Preprocessing: Standardization / Window Partitioning.
[0057] Specifically, the collected raw data is standardized, converting data with different dimensions such as temperature and voltage into a unified standard to eliminate the influence of dimensions. Simultaneously, a sliding window technique is employed, setting the window size to 30 time points and the step size to 6 time points, to segment the continuous data stream into independent samples. The processed data is more standardized and analyzable. This embodiment of the invention, through standardization and window segmentation, adapts the data to the model input requirements, improving data processing efficiency.
[0058] Step S3, Temporal encoder: LSTM network, 64-dimensional temporal features.
[0059] Specifically, the preprocessed data is input into a time-domain encoder, and a single-layer LSTM network is used for feature extraction. Leveraging its memory units, the LSTM network can effectively capture the dynamic changes in battery data over time, outputting 64-dimensional temporal features. These temporal features reflect the changing trends of battery state over time.
[0060] This invention utilizes an LSTM network to mine temporal dependencies, providing crucial temporal information for subsequent analysis.
[0061] Step S4, Feature Encoder: Graph Neural Network, 16-dimensional Graph Features.
[0062] Specifically, a feature encoder is constructed using a graph neural network. Multiple battery parameters are treated as nodes in a graph, and the relationships between parameters are represented as edges. A learnable adjacency matrix is used to explicitly model the relationships between features, extracting 16-dimensional graph features. These graph features reveal the intrinsic connections between battery parameters. This embodiment of the invention supplements the shortcomings of time-series analysis by modeling the dependencies between features using graph neural networks.
[0063] Step S5, feature fusion.
[0064] Specifically, the 64-dimensional temporal features output by the temporal encoder and the 16-dimensional graph features output by the feature encoder are fused. These two different types of features are integrated together through methods such as concatenation to form a more comprehensive feature representation. The fused features contain information on both temporal sequence and feature relationships. This embodiment of the invention enhances feature representation capabilities by integrating multi-dimensional information through feature fusion.
[0065] Step S6, Latent Space: 16-dimensional compressed representation.
[0066] Specifically, the fused features are compressed and mapped into a 16-dimensional latent space. Dimensionality reduction techniques remove redundant information while retaining key features. The compressed feature representation is more concise and efficient, facilitating subsequent processing. This embodiment of the invention reduces computational complexity and improves model efficiency through latent space compression.
[0067] Step S7, Decoder: Fully connected network, reconstruct sequence 30×4 output.
[0068] Specifically, the 16-dimensional latent space representation is input into the decoder and reconstructed using a fully connected network. Through learning and transformation by multiple layers of neurons, the fully connected network progressively restores the compressed features to a sequence similar to the original input, ultimately outputting a 30×4 reconstructed sequence. This reconstructed sequence is used for comparative analysis with the original data. This embodiment of the invention provides a comparative basis for anomaly detection by using the decoder to reconstruct the sequence.
[0069] Step S8, error analysis.
[0070] Specifically, the mean squared error (MSE) between the reconstructed sequence and the original true sequence is calculated, and the temporal KL divergence (weight 0.0005) and the feature KL divergence (weight 0.0001) are added to obtain the comprehensive reconstruction error.
[0071] The specific calculation formula is as follows: .
[0072] in, This refers to the time series KL divergence. This refers to the feature KL divergence. Reconstruction error reflects the degree of difference between the data and the model prediction. This invention quantifies the degree of data anomaly through error analysis, providing indicators for anomaly detection.
[0073] Step S9, anomaly detection.
[0074] Specifically, a dynamic threshold is set based on the 98th percentile of the reconstruction error distribution in the training set. If the calculated reconstruction error exceeds this dynamic threshold, it is determined to be an anomaly. The dynamic threshold can adapt to the anomaly detection requirements under different working conditions. This embodiment of the invention improves the accuracy and adaptability of anomaly detection through dynamic threshold setting.
[0075] Step S10, anomaly classification.
[0076] Specifically, once an anomaly is identified, the feature contribution is obtained by calculating the gradient weight of each feature to the reconstruction error. The cause of the anomaly is analyzed based on the feature contribution, and the anomaly is classified. For example, if the temperature feature has a high contribution, it may be classified as a temperature anomaly. Anomaly classification helps to take targeted solutions. This embodiment of the invention achieves anomaly classification through feature contribution analysis, thereby improving operational efficiency.
[0077] Through the above process, this embodiment of the invention starts with multivariate data acquisition, proceeds through preprocessing, feature extraction and fusion, sequence reconstruction, error analysis, and anomaly detection and classification. Through the synergistic effect of each step, battery anomalies are accurately detected, and the anomaly type is clearly identified, providing strong support for the safe and stable operation of energy storage power stations and effectively improving the level of intelligence in battery management.
[0078] The following are embodiments of the apparatus of the present invention, which can be used to execute the multimodal battery detection method involved in the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the method embodiments of the multimodal battery detection method involved in the present invention.
[0079] Please see Figure 3 This invention provides a multi-mode battery detection device 800.
[0080] The multimodal battery detection device 800 includes, but is not limited to: a multimodal data sampling module 810, a dual encoder construction module 830, a joint feature reconstruction module 850, and an error analysis and visualization module 870.
[0081] Among them, the multimodal data sampling module 810 is used to acquire multi-dimensional raw data of the battery. It uses K-Means clustering combined with diversity sampling to filter samples to construct a dataset. The dataset is then standardized and a sliding window is used to construct a time series dataset. The raw data includes temperature, voltage, current, and SOC.
[0082] The dual encoder construction module 830 is used to construct a temporal encoder using a single-layer LSTM network, construct a graph encoder based on a graph neural network, construct a dual-path encoder joint model based on a variational autoencoder framework according to the temporal encoder and the graph encoder, and train the dual-path encoder joint model using a time-series dataset.
[0083] The joint feature reconstruction module 850 is used to acquire the test data. It uses a temporal encoder and a graph encoder to extract the temporal dependency features and inter-feature dependencies of the test data, respectively, and then splices and compresses them to obtain joint features. A three-layer fully connected network is used to restore the joint features into a reconstructed sequence.
[0084] The error analysis and visualization module 870 is used to calculate the reconstruction error of the reconstructed sequence through mean square error (MSE) and regularization term. When the reconstruction error exceeds a set threshold, the feature contribution of each feature to the reconstruction error is calculated, and the abnormality is analyzed through feature contribution analysis to obtain a visualization report.
[0085] It should be noted that the multimodal battery detection provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the multimodal battery detection device will be divided into different functional modules to complete all or part of the functions described above.
[0086] Furthermore, the embodiments of the multimodal battery detection device and the multimodal battery detection method provided in the above embodiments belong to the same concept, and the specific way in which each module performs its operation has been described in detail in the method embodiments, and will not be repeated here.
[0087] Figure 4 A schematic diagram of the structure of an electronic device according to an exemplary embodiment is shown.
[0088] It should be noted that this electronic device is merely an example adapted to the present invention and should not be construed as providing any limitation on the scope of use of the present invention. Furthermore, this electronic device should not be interpreted as requiring or depending on any particular feature. Figure 4 One or more components of the exemplary electronic device 2000 shown.
[0089] The hardware structure of electronic devices 2000 can vary significantly due to differences in configuration or performance, such as... Figure 4 As shown, the electronic device 2000 includes: a power supply 210, an interface 230, at least one memory 250, and at least one central processing unit (CPU) 270.
[0090] Specifically, power supply 210 is used to provide operating voltage for various hardware devices on electronic device 2000.
[0091] Interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Of course, in other examples adapted to this invention, interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one USB interface 237, etc. Figure 4 As shown, this does not constitute a specific limitation.
[0092] The memory 250 serves as a carrier for resource storage and can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include the operating system 251, application programs 253, and data 255, etc., and the storage method can be temporary storage or permanent storage.
[0093] The operating system 251 is used to manage and control the various hardware devices and application programs 253 on the electronic device 2000, so as to enable the central processing unit 270 to perform calculations and processing on the massive data 255 in the memory 250. It can be Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0094] Application 253 is a computer-readable instruction based on operating system 251 that performs at least one specific task, and may include at least one module ( Figure 4 (Not shown), each module may contain computer-readable instructions for electronic device 2000. For example, the multimodal battery detection device can be considered as application program 253 deployed on electronic device 2000.
[0095] Data 255 may be signal information, etc., and is stored in memory 250.
[0096] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 via at least one communication bus to read computer-readable instructions stored in the memory 250, thereby performing operations and processing on massive amounts of data 255 stored in the memory 250. For example, a multimodal battery detection method may be implemented by the central processing unit 270 reading a series of computer-readable instructions stored in the memory 250.
[0097] Furthermore, the present invention can also be implemented through hardware circuits or a combination of hardware circuits and software. Therefore, the implementation of the present invention is not limited to any specific hardware circuit, software, or combination thereof.
[0098] Please see Figure 5 This invention provides an electronic device 4000, which may include: a desktop computer, a laptop computer, a server, etc., with sensor recognition capabilities.
[0099] exist Figure 5 In this context, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.
[0100] The data interaction between the processor 4001 and the memory 4003 can be achieved through at least one communication bus 4002. This communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0101] Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0102] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0103] The memory 4003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program instructions or code in the form of instructions or data structures and accessible by the electronic device 4000, but not limited thereto.
[0104] The memory 4003 stores computer-readable instructions, and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002.
[0105] The computer-readable instructions are executed by one or more processors 4001 to implement the multimodal battery detection methods in the above embodiments.
[0106] Furthermore, this embodiment of the invention provides a storage medium storing computer-readable instructions, which are executed by one or more processors to implement the multimodal battery detection method described above.
[0107] This invention provides a computer program product, which includes computer-readable instructions stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, thereby enabling the electronic device to implement the multi-mode battery detection method as described above.
[0108] Compared with related technologies, the beneficial effects of the present invention are: 1. This invention can accurately detect abnormal battery states; it acquires multi-dimensional data such as temperature, voltage, current, and SOC through multi-variable input, and extracts time-dependent features and inter-feature dependencies by combining a dual-path encoder joint model, comprehensively capturing battery operating information. Then, through reconstruction error analysis, it accurately judges abnormalities, effectively avoiding the problem of missed detection by single-dimensional detection.
[0109] 2. This invention has efficient data processing capabilities; through standardization and windowing operations in data preprocessing, the raw data is transformed into structured time-series data suitable for model input. At the same time, the design of the dual-path encoder joint model and the reasonable training strategy accelerate the model's data analysis and feature extraction process, thereby improving the overall detection efficiency.
[0110] 3. This invention can achieve accurate analysis of the causes of anomalies; by calculating the feature contribution of features to the reconstruction error, it clarifies the degree of influence of each feature in the occurrence of anomalies, thereby classifying anomalies and locating root causes, providing detailed anomaly information for operation and maintenance personnel, and facilitating the rapid implementation of targeted measures to solve problems.
[0111] 4. This invention has dynamic adaptability; by setting a dynamic threshold based on the error distribution reconstructed from the training set, it can automatically adjust the anomaly judgment criteria according to different battery working states and actual operating conditions, thereby improving the accuracy and adaptability of anomaly detection in different scenarios.
[0112] 5. This invention helps to improve the intelligence level of battery management systems; through a complete detection process and detailed result analysis, it provides reliable protection for the safe operation of batteries and can be widely used in electric vehicles, energy storage power stations and other fields to realize real-time monitoring and intelligent management of battery status.
[0113] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0114] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for detecting multimodal batteries, characterized in that, The method includes: The battery's multi-dimensional raw data was obtained, and a dataset was constructed by using K-Means clustering combined with diversity sampling to filter samples. The dataset was then standardized and a sliding window was used to construct a time-series dataset. The raw data included temperature, voltage, current, and SOC. A temporal encoder is constructed using a single-layer LSTM network, and a graph encoder is constructed based on a graph neural network. A dual-path encoder joint model based on a variational autoencoder framework is constructed based on the temporal encoder and the graph encoder, and the dual-path encoder joint model is trained using the temporal dataset. The test data is obtained, and the temporal dependency features and inter-feature dependencies of the test data are extracted by the temporal encoder and graph encoder respectively. The features are then concatenated and compressed to obtain joint features. The joint features are then restored into a reconstructed sequence by a three-layer fully connected network. The reconstruction error of the reconstructed sequence is calculated using mean squared error (MSE) and regularization term. When the reconstruction error exceeds a set threshold, the feature contribution of each feature to the reconstruction error is calculated, and the cause of the anomaly is analyzed through the feature contribution to obtain a visualization report.
2. The multimodal battery detection method as described in claim 1, characterized in that, The process involves acquiring multi-dimensional raw battery data, using K-Means clustering combined with diversity sampling to select samples and construct a dataset, and then standardizing and constructing a sliding window to obtain a time-series dataset, including: Collect multi-dimensional raw data of the battery, process missing values and clean up outliers in the raw data, and divide the raw data into multiple sample clusters according to the working state mode using K-Means clustering; the working state mode includes charging and discharging. A dataset is constructed by extracting representative samples from each of the sample clusters by combining diversity sampling and setting a sampling ratio. The dataset is then standardized using Z-score using Standard Scaler. The diversity sampling includes random sampling, diversity sampling, time-stratified sampling, and difficulty-aware sampling. A sliding window is constructed according to the set window size and step size, and the dataset is divided into independent samples to form a structured time series dataset based on the sliding window.
3. The multimodal battery detection method as described in claim 1, characterized in that, The method involves constructing a temporal encoder using a single-layer LSTM network, building a graph encoder based on a graph neural network, and constructing a joint dual-path encoder model based on a variational autoencoder framework using the temporal encoder and the graph encoder, including: The temporal encoder is constructed using a single-layer LSTM network with 64-dimensional hidden layers. The temporal encoder and the graph encoder are then concatenated into a dual-path encoder joint model. The temporal encoder is used to extract dynamic dependency features of the time series. The graph encoder is used to explicitly model the correlation between features through a learnable adjacency matrix.
4. The multimodal battery detection method as described in claim 1, characterized in that, The step of training the joint model of the dual-path encoder using the time-series dataset includes: The data obtained through the multi-pack joint training strategy is combined with the time series dataset as the training set, and the dual-path encoder joint model is trained using the Adam optimizer with a learning rate of 0.001 and a batch training parameter with a batch size of 32. The parameters of the dual-path encoder joint model are optimized using the backpropagation optimization algorithm. The dual-path encoder joint model is trained for a set number of epochs until the model converges, so that the data feature distribution extracted by the dual-path encoder joint model meets the set requirements.
5. The multimodal battery detection method as described in claim 1, characterized in that, The process involves using the temporal encoder and graph encoder to extract the temporal dependency features and inter-feature dependencies of the test data, and then concatenating and compressing them to obtain joint features, including: A sliding window is constructed according to the set window size and step size, and the data to be tested is divided into multiple sliding windows according to the sliding window. For each of the sliding windows, temporal features are extracted by the temporal encoder, and the dependencies between features are extracted by the graph encoder. The temporal features and the dependencies between the features are concatenated into a joint feature vector. The joint feature vector is then compressed into the latent space through a fully connected layer to obtain a low-dimensional feature representation as the joint feature.
6. The multimodal battery detection method as described in claim 1, characterized in that, The method employs a three-layer fully connected network to reconstruct the joint features into a reconstructed sequence, and calculates the reconstruction error of the reconstructed sequence using mean squared error (MSE) and a regularization term, including: Using 16-dimensional joint features as input, the joint features are gradually restored into a reconstructed sequence through a three-layer fully connected network; the three-layer fully connected network includes an input layer, a 128-dimensional hidden layer, a 64-dimensional hidden layer, and an output layer; The mean square error between the reconstructed sequence and the true sequence of the data to be tested is calculated, and the temporal KL divergence and feature KL divergence are added to obtain the reconstruction error; the weights of the temporal KL divergence and feature KL divergence are 0.0005 and 0.0001, respectively; the reconstruction error is used to reflect the degree of data anomaly.
7. The multimodal battery detection method as described in claim 4, characterized in that, When the reconstruction error exceeds a set threshold, the feature contribution of each feature to the reconstruction error is calculated, and the cause of the anomaly is analyzed through the feature contribution to obtain a visual report, including: A dynamic threshold is set based on the 98th percentile value of the training set. If the reconstruction error exceeds the dynamic threshold, it is determined to be abnormal. By calculating the gradient weights of each feature to the reconstruction error, the feature contribution of each feature to the anomaly is calculated, and a visualization report is generated based on the feature contribution. The visualization includes anomaly time point location, feature contribution heatmap, and labels.
8. A multimodal battery detection device, characterized in that, The device includes: The multimodal data sampling module is used to acquire multi-dimensional raw data of the battery. It uses K-Means clustering combined with diversity sampling to filter samples and construct a dataset. The dataset is then standardized and a sliding window is used to construct a time-series dataset. The raw data includes temperature, voltage, current, and SOC. A dual encoder construction module is used to construct a temporal encoder using a single-layer LSTM network, construct a graph encoder based on a graph neural network, construct a dual-path encoder joint model based on a variational autoencoder framework according to the temporal encoder and the graph encoder, and train the dual-path encoder joint model using the time series dataset. The joint feature reconstruction module is used to acquire the test data, extract the temporal dependency features and inter-feature dependencies of the test data using the temporal encoder and graph encoder respectively, and concatenate and compress them to obtain joint features. A three-layer fully connected network is used to restore the joint features into a reconstructed sequence. The error analysis and visualization module is used to calculate the reconstruction error of the reconstructed sequence using mean squared error (MSE) and regularization term. When the reconstruction error exceeds a set threshold, the module calculates the feature contribution of each feature to the reconstruction error and analyzes the cause of the anomaly using the feature contribution to obtain a visualization report.
9. An electronic device, characterized in that, include: At least one processor and at least one memory, wherein, The memory stores computer-readable instructions; The computer-readable instructions are executed by one or more of the processors, causing the electronic device to implement the multimodal battery detection method as described in any one of claims 1 to 7.
10. A storage medium having computer-readable instructions stored thereon, characterized in that, The computer-readable instructions are executed by one or more processors to implement the multimodal battery detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Lithium battery anomaly detection method integrating variational auto-encoder and dynamic normalization
CN115469227A
Battery fault diagnosis method and system based on improved automatic encoder
CN118169562A
Unsupervised anomaly detection method for energy storage battery sensor system
CN120011991A
Early anomaly detection method for sedimentary flow battery based on LSTM-AE and interpretability analysis
CN120802042A
Lithium ion battery early life prediction method oriented to annotation data scarcity scene
CN121051570A