Advanced early warning method, device and equipment for battery and medium

By constructing a battery anomaly detection model and utilizing isolated forests and density-based noisy spatial clustering, the historical voltage sequences of batteries are preprocessed and features are extracted. This solves the problem that existing technologies cannot provide early warning of gradual battery failures, and achieves efficient anomaly detection and risk reduction.

CN120928201APending Publication Date: 2025-11-11NATIONAL INSTITUTE OF GUANGDONG ADVANCED ENERGY STORAGE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511156759.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing battery anomaly and safety warning methods cannot provide early warnings of hidden, gradual faults (such as internal short circuits, sudden changes in internal resistance, etc.), which increases the difficulty of handling sudden safety incidents in the system.

Method used

By constructing a battery anomaly detection model, utilizing the isolated forest algorithm and density-based noisy spatial clustering, combined with a dual-decision layer, the historical voltage sequence of batteries is preprocessed and features are extracted to screen out abnormal batteries, thereby achieving early warning of gradual battery failures.

Benefits of technology

It improves the accuracy and reliability of battery anomaly detection, reduces the risk of runaway in energy storage power stations, enables early warning of gradual battery failures, and reduces the difficulty of handling battery safety faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120928201A_ABST
    Figure CN120928201A_ABST
Patent Text Reader

Abstract

The invention discloses an advanced early warning method, device and equipment for a battery and a medium, and relates to the technical field of new energy, and the method comprises the steps: obtaining the historical operation data of a to-be-detected battery, extracting a battery voltage sequence from the historical operation data of the battery, and carrying out the preprocessing of the battery voltage sequence; the preprocessing comprises linear interpolation processing and standardization processing; inputting the preprocessed battery voltage sequence into a constructed battery anomaly detection model to obtain an anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used for indicating whether the to-be-detected battery is an abnormal battery or a normal operation battery. According to the method, the abnormal batteries in the operation of the energy storage power station are screened by using the historical operation data, the out-of-control risk of the energy storage power station is reduced, advanced early warning of gradual faults of the batteries is realized, and the processing difficulty of safety faults of the batteries is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy technology, specifically to a method, device, equipment, and medium for early warning of battery conditions. Background Technology

[0002] In new energy technologies, when energy storage batteries are connected in series to form a battery cluster, the gradual aging of the energy storage batteries will bring the risk of abnormal shutdown to the battery cluster, and severely degraded energy storage batteries may cause safety accidents.

[0003] Existing battery anomaly and safety warning methods often rely on online monitoring of battery parameters such as voltage, temperature, and current, checking whether these parameters exceed thresholds to trigger an alarm. While these methods offer high real-time performance, they are easily affected by the accuracy and stability of the aforementioned parameters, and cannot provide early warnings for hidden, gradual faults (such as internal short circuits or sudden changes in internal resistance). Consequently, they cannot implement fault pre-processing in advance, increasing the difficulty of handling sudden safety incidents in the system.

[0004] Therefore, how to provide an early warning of gradual battery failure is an important issue that the industry urgently needs to address. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, apparatus, device and medium for early warning of batteries, thereby solving the problem that existing battery anomaly and safety warning methods cannot provide early warning of hidden gradual failures.

[0006] According to a first aspect, embodiments of the present invention provide a method for early warning of battery conditions, the method comprising: The historical operating data of the battery to be tested is acquired, the battery voltage sequence is extracted from the historical operating data, and the battery voltage sequence is preprocessed; the preprocessing includes linear interpolation and standardization. The preprocessed battery voltage sequence is input into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normally operating battery; The battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. The output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer. The output terminal of the dual decision layer is used to output the anomaly detection result. The isolated forest layer is used to use the isolated forest algorithm to initially screen abnormal batteries. The clustering analysis layer is used to use density-based noisy spatial clustering and to screen abnormal batteries based on density and neighborhood relationships. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolated forest layer and the clustering analysis layer, and output the anomaly detection results.

[0007] In conjunction with the first aspect, in the first embodiment of the first aspect, the battery anomaly detection model is constructed through the following steps: The sample battery's historical operating data is obtained, historical voltage sequences are extracted from the historical operating data, and the historical voltage sequences are preprocessed; the preprocessing includes linear interpolation and standardization. The preprocessed historical voltage sequences are feature-processed according to a preset time sliding window to determine the historical time-domain features of the historical voltage sequences within each preset time sliding window. A historical voltage feature matrix is ​​then constructed based on the historical voltage sequences and historical time-domain features. The historical time-domain features include the historical moving mean, historical moving standard deviation, historical moving peak-to-peak value, and historical moving difference mean. The historical moving mean reflects the local voltage level of the sample battery within the corresponding preset time sliding window; the historical moving standard deviation quantifies the intensity of local voltage fluctuations of the sample battery within the corresponding preset time sliding window; the historical moving peak-to-peak value characterizes the voltage range of the sample battery within the corresponding preset time sliding window; and the historical moving difference mean characterizes the average rate of voltage change of the sample battery within the corresponding preset time sliding window. The historical voltage feature matrix is ​​dimensionality reduced to obtain the historical voltage dimensionality-reduced features, and historical candidate voltage features are extracted from the historical voltage dimensionality-reduced features. An isolation forest is constructed based on the historical candidate voltage characteristics. The isolated forest is used to determine the sample anomaly score of each sample battery. The first abnormal battery is selected from the sample batteries based on the sample anomaly score. Density-based noisy spatial clustering is performed on historical candidate voltage features to determine whether there are noise points in the historical candidate voltage features, and second abnormal cells are screened out from the sample cells based on the noise points. Sample batteries that belong to both the first and second abnormal batteries are identified as having abnormal batteries.

[0008] In conjunction with the first embodiment of the first aspect, in the second embodiment of the first aspect, the step of performing dimensionality reduction processing on the historical voltage feature matrix to obtain historical voltage dimensionality-reduced features, and extracting historical candidate voltage features from the historical voltage dimensionality-reduced features, specifically includes: The historical voltage feature matrix is ​​reduced to a two-dimensional feature matrix to obtain the historical voltage dimension-reduced features; Principal component analysis is performed on the dimensionality reduction features of historical voltages to obtain several principal components whose cumulative variance contribution exceeds the contribution value. These principal components are then mapped to a preset space to obtain historical candidate voltage features.

[0009] In conjunction with the first embodiment of the first aspect, in the third embodiment of the first aspect, the step of constructing an isolation forest based on historical candidate voltage characteristics, determining the sample anomaly score of each sample battery using the constructed isolation forest, and selecting the first abnormal battery from the sample batteries based on the sample anomaly score specifically includes: A predetermined number of features are selected sequentially from the historical candidate voltage features to obtain several recursive subsets; Determine the partitioning dimension of each recursive subset, and extract the historical dimension feature set belonging to the partitioning dimension from the corresponding recursive subset; Determine the split point for each historical dimension feature set, and divide the historical dimension feature set into a first subtree and a second subtree based on the split point; The first subtree and the second subtree are recursively spatially partitioned until a preset termination condition is reached, resulting in an isolated tree for each recursive subset. All isolated trees are then collected to form an isolated forest. The preset termination condition includes that there is only one divisible feature, the tree reaches a preset maximum depth, and the feature values ​​of the divisible features are all equal. Determine the average path length of each feature in the historical candidate voltage features in the isolated forest, determine the sample anomaly score of each sample battery based on the average path length, and select the first abnormal battery from the sample batteries based on the sample anomaly score.

[0010] In conjunction with the third embodiment of the first aspect, in the fourth embodiment of the first aspect, the step of determining the average path length of each feature in the historical candidate voltage features in the isolated forest, determining the sample anomaly score of each sample battery based on the average path length, and selecting the first abnormal battery from the sample batteries based on the sample anomaly score specifically includes: Determine the isolation trees that each feature in the historical candidate voltage features passes through in the isolation forest, and determine the average path length of each feature across all the isolation trees it passes through; The average path length is normalized to obtain the sample anomaly score for each feature; Based on the sample anomaly score of the features, the first abnormal battery is selected from the sample batteries.

[0011] In conjunction with the first embodiment of the first aspect, in the fifth embodiment of the first aspect, the step of performing density-based noisy spatial clustering on historical candidate voltage features to determine whether there are noise points in the historical candidate voltage features, and screening out second abnormal batteries from the sample batteries based on the noise points, specifically includes: The step of performing density-based noisy spatial clustering on historical candidate voltage features to determine whether there are noise points in the historical candidate voltage features, and then selecting the second abnormal battery from the sample batteries based on the noise points, specifically includes: Plot the sorting diagram of each feature in the historical candidate voltage features and its minimum number of points - nearest neighbor distance to obtain the k-distance curve, identify the inflection point in the k-distance curve, and use the corresponding value of the inflection point as the neighborhood radius; Traverse all historical candidate voltage features to determine all core points; the core points are those that satisfy the neighborhood radius. Features whose internal feature number is not less than the minimum number of points; Traverse all core points and perform cluster expansion on each core point to determine all features within the cluster of all core points; during the cluster expansion process, adjust the neighborhood radius of each time node according to a preset time decay coefficient. Features that are not included in any clusters are temporarily marked as temporary noise points; All temporary noise points are subjected to feature verification, and those that fail the feature verification are designated as anomaly candidate features. The feature verification includes determining the nearest core point for each temporary noise point, determining the distance between the temporary noise point and the nearest core point, obtaining the minimum distance for each temporary noise point, and determining that the minimum distance is no greater than twice the neighborhood radius. In this case, the temporary noise point is added to the cluster of the nearest core point; The local density of each cluster is determined, and the maximum value of the local density is taken as the maximum density. If the ratio of the local density to the maximum density is lower than a preset value and there are abnormal candidate features, the sample cell corresponding to the historical candidate voltage feature is taken as the second abnormal cell.

[0012] In conjunction with the fifth embodiment of the first aspect, in the sixth embodiment of the first aspect, the step of traversing all core points and performing cluster expansion on each core point to determine all features within the clusters of all core points; the adjustment of the neighborhood radius of each time node according to a preset time decay coefficient during the cluster expansion process specifically includes: Select one core point from all core points and create a cluster using the current core point; Starting from the initial time node, the search adds the features that are density-reachable from the core point within the time node to the current core point cluster until the search reaches the termination time node, thus determining all features within the current core point cluster. Iterate through all core points and perform cluster creation and density search for features at each core point to determine all features within the clusters of all core points.

[0013] According to a second aspect, embodiments of the present invention also provide a battery early warning device, the device comprising: The data processing module is used to acquire the historical operating data of the battery to be tested, extract the battery voltage sequence from the historical operating data, and preprocess the battery voltage sequence; the preprocessing includes linear interpolation and standardization. An anomaly detection module is used to input the preprocessed battery voltage sequence into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normally operating battery; The battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. The output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer. The output terminal of the dual decision layer is used to output the anomaly detection result. The isolated forest layer is used to use the isolated forest algorithm to initially screen abnormal batteries. The clustering analysis layer is used to use density-based noisy spatial clustering and to screen abnormal batteries based on density and neighborhood relationships. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolated forest layer and the clustering analysis layer, and output the anomaly detection results.

[0014] According to a third aspect, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described battery advance warning methods.

[0015] According to a fourth aspect, embodiments of the present invention also provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the battery advance warning method as described above.

[0016] The present invention provides a battery early warning method, apparatus, device, and medium. It acquires historical operating data to be detected, extracts the battery voltage sequence from it, and preprocesses the battery voltage sequence to reduce data redundancy while effectively capturing abnormal patterns and reducing interference from extreme values. The preprocessed battery voltage sequence is input into a constructed battery anomaly detection model to obtain the anomaly detection results output by the model. The isolated forest layer in the battery anomaly detection model uses the isolated forest algorithm to initially screen abnormal batteries. The isolated forest algorithm adapts to different data distributions through path length standardization and tree depth constraints. The clustering analysis layer in the battery anomaly detection model uses density-based noisy spatial clustering to screen abnormal batteries based on density and neighborhood relationships. The density-based noisy spatial clustering uses a k-distance curve to automatically determine the neighborhood radius and introduces a time decay coefficient to dynamically adjust the search range. Through the isolated forest... The adaptive parameter design of the layer and clustering analysis layer enhances the generalization ability of the battery anomaly detection model to complex battery operating conditions. These two network layers can achieve efficient anomaly identification without relying on a large amount of labeled data. At the same time, the battery anomaly detection model uses the historical voltage data of the battery under test, without using the real-time online voltage data of the battery under test or other data. The dual decision layer in the battery anomaly detection model combines the advantages of isolated forest and density-based noisy application space clustering. Through two-level dual joint decision, it significantly reduces the false alarms and false negatives that may exist in a single algorithm, and improves the accuracy and reliability of battery anomaly detection. In this way, the anomaly detection result does not depend on the real-time battery status of the battery under test. Therefore, the battery anomaly detection model can use historical operating data to screen abnormal batteries in the operation of energy storage power stations, reduce the risk of runaway of energy storage power stations, realize early warning of gradual battery failures, and reduce the difficulty of handling battery safety failures. Attached Figure Description

[0017] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings: Figure 1 A flowchart illustrating the battery early warning method provided by the present invention is shown. Figure 2 A schematic diagram of the battery anomaly model construction in the battery early warning method provided by the present invention is shown; Figure 3 A time-series diagram of the abnormal historical voltage sequence in the battery early warning method provided by the present invention is shown; Figure 4 A comparison diagram of abnormal historical voltage sequences and normal historical voltage sequences in the battery early warning method provided by the present invention is shown. Figure 5A schematic diagram of the analysis results of principal component analysis in the battery early warning method provided by the present invention is shown. Figure 6 This diagram illustrates the dual-determination process of the dual-determination layer in the battery early warning method provided by the present invention. Figure 7 A schematic diagram of the structure of the battery early warning device provided by the present invention is shown; Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] In new energy technologies, when energy storage batteries are connected in series to form a battery cluster, the gradual aging of the energy storage batteries will bring the risk of abnormal shutdown to the battery cluster, and severely degraded energy storage batteries may cause safety accidents.

[0020] Existing battery anomaly and safety warning methods often rely on online monitoring of battery parameters such as voltage, temperature, and current, checking whether these parameters exceed thresholds to trigger an alarm. While these methods offer high real-time performance, they are easily affected by the accuracy and stability of the aforementioned parameters, and cannot provide early warnings for hidden, gradual faults (such as internal short circuits or sudden changes in internal resistance). Consequently, they cannot implement fault pre-processing in advance, increasing the difficulty of handling sudden safety incidents in the system.

[0021] In conclusion, how to provide an early warning system for gradual battery failures is a crucial issue that the industry urgently needs to address.

[0022] Due to the aforementioned technical problems, this invention provides a method for early warning of batteries. This method aims to utilize historical operational data to screen for abnormal batteries in energy storage power stations, reducing the risk of runaway power stations and achieving early warning of gradual battery failures, thus simplifying the handling of battery safety faults. This method can be used in electronic devices, including but not limited to computers and mobile terminals. Figure 1 This is a schematic flowchart of a battery early warning method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method may include the following steps: S10. Obtain the historical operating data of the battery to be tested, extract the battery voltage sequence from the historical operating data, and preprocess the battery voltage sequence. The preprocessing methods include linear interpolation and standardization.

[0023] Linear interpolation in the preprocessing method can fill in missing values ​​in the voltage data and ensure the temporal continuity of the battery voltage sequence. Robust normalization of the battery voltage sequence after linear interpolation can eliminate interference caused by extreme values ​​and improve data stability, such as scaling the normalization process based on the 5%-95th percentile.

[0024] In this embodiment of the invention, the battery historical operating data can be historical data collected after the battery under test has undergone a preset number of charge cycles and tests. Voltage data is then extracted from the battery historical operating data to obtain the battery voltage sequence. Therefore, the battery voltage sequence is also the historical voltage data of the battery under test, not real-time online voltage data. No specific restrictions are placed on the form in which the battery voltage sequence is extracted from the battery historical operating data, as long as the electronic device can obtain the battery voltage sequence.

[0025] S20. Input the preprocessed battery voltage sequence into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model. The anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normal operating battery. The abnormal battery number can be screened out through the battery anomaly detection model.

[0026] In this embodiment of the invention, the battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. At the same time, the output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer, and the output terminal of the dual decision layer is used to output the anomaly detection result.

[0027] The Isolation Forest layer uses the Isolation Forest (IF) algorithm to initially screen for anomalous cells. The Isolation Forest algorithm adapts to different data distributions through path length normalization and tree depth constraints. The clustering analysis layer uses Density-Based Spatial Clustering of Applications with Noise (DBSCAN) to screen for anomalous cells based on density and neighborhood relationships. DBSCAN automatically determines the neighborhood radius using a k-distance curve (elbow rule). In this embodiment of the invention, a time decay coefficient is introduced to DBSCAN to dynamically adjust the search range; the dual decision layer combines the advantages of isolated forest (unsupervised anomaly scoring) and DBSCAN (density clustering and noise verification), and through two-level dual joint decision, it significantly reduces the false alarms and missed detections that may exist in a single algorithm, and improves the accuracy and reliability of battery anomaly detection.

[0028] The adaptive parameter design of the isolated forest layer and cluster analysis layer enhances the generalization ability of the battery anomaly detection model to complex battery operating conditions. These two network layers can achieve efficient anomaly identification without relying on a large amount of labeled data. At the same time, the battery anomaly detection model uses the historical voltage data of the battery under test when it is applied, without using the real-time online voltage data of the battery under test or other data. In this way, the anomaly detection results output by the battery anomaly detection model do not depend on the real-time battery status of the battery under test, and can provide early warning of gradual failure of the battery under test.

[0029] The detection performance of the battery anomaly detection model can be validated on real-world datasets. It's understandable that the anomaly detection results output by the model can detect not only potential gradual battery failures but also common anomalies.

[0030] Please see Figure 2 In this embodiment of the invention, the battery anomaly detection model is constructed through the following steps: S30. Obtain the historical operating data of the sample battery, extract the historical voltage sequence from the historical operating data, and preprocess the historical voltage sequence. For details on obtaining historical data, extracting voltage sequences, and preprocessing, please refer to step S10.

[0031] like Figure 3 As shown in Figure 4, Figure 3 This is an abnormal historical voltage sequence. Figure 4 This is a comparison chart of abnormal historical voltage sequences and normal historical voltage sequences.

[0032] Historical operational data of the samples, as historical datasets collected during the operation of the sample batteries, provides massive data support for the construction of subsequent battery anomaly detection models by collecting all historical operational data of the samples.

[0033] To fully account for the gradual failures of various battery types, in this embodiment of the invention, historical voltage sequences of sample batteries of multiple models are obtained, i.e. Sample battery of model number. For the first... The historical voltage sequence of each (model) sample battery was extracted from its historical operating data. ,in, Indicates the first Historical voltage sequence of a sample battery Indicates the first The first sample battery The historical voltage sequence at time point n, the nth The historical voltage sequences of each sample battery exist in total. A time point, that is Data acquisition nodes for historical operational data of each sample; all sample batteries together form a shape of... The historical voltage sequence matrix, i.e., the historical voltage data sequence, has a dimension of 1. .

[0034] S40. Perform feature processing on the preprocessed historical voltage sequence according to a preset time sliding window, determine the historical time-domain features of the historical voltage sequence within each preset time sliding window, and construct a historical voltage feature matrix based on the historical voltage sequence and the historical time-domain features. The historical time-domain features include four time-domain features: historical moving mean, historical moving standard deviation, historical moving peak-to-peak value, and historical moving difference mean. In other words, the historical time-domain features contain time-domain information such as mean, standard deviation, peak-to-peak value, and difference mean.

[0035] Historical moving averages reflect the local voltage level of a sample battery within a corresponding preset time window; historical moving standard deviations quantify the intensity of local voltage fluctuations within the same window; historical moving peak-to-peak values, calculated as the difference between the maximum and minimum voltage values ​​within the window, characterize the voltage range; and historical moving difference mean represents the average rate of voltage change within the window. These four time-domain features comprehensively characterize the dynamic voltage changes of the sample battery, providing richer, higher-quality, and more representative voltage information, thus offering high-quality training samples for subsequent battery anomaly detection models.

[0036] Specifically, the historical moving average is calculated as follows:

[0037] in, Indicates the first The sample battery in the first Historical moving average within a preset time sliding window; This indicates the size of each preset sliding window; This indicates the end time node for each preset sliding window.

[0038] The historical sliding standard deviation is calculated as follows:

[0039] in, Indicates the first The sample battery in the first Historical sliding standard deviation within a preset time sliding window.

[0040] The historical sliding peak value is calculated as follows:

[0041] in, Indicates the first The sample battery in the first The historical sliding peak value within a preset time sliding window; This indicates finding the maximum value among all terms; This indicates finding the minimum value among all terms. as well as All operations have Each item.

[0042] The historical moving difference mean is calculated as follows:

[0043] in, Indicates the first The sample battery in the first The historical moving difference mean within a preset time sliding window.

[0044] In the calculation process of the above four time series features .

[0045] The specific parameters of the preset time sliding window can be configured by the user. For example, the user can configure the parameters of the preset time sliding window as the window size. =10.

[0046] The historical voltage feature matrix is ​​of shape The feature matrix, i.e., the historical voltage feature matrix, has a dimension of . 4 indicates the number of feature dimensions. Each sample battery has a corresponding number of feature dimensions, such as the first... The feature dimensions of each sample battery are: .

[0047] S50. Perform dimensionality reduction processing on the historical voltage feature matrix to obtain the historical voltage dimensionality reduction features, and extract historical candidate voltage features from the historical voltage dimensionality reduction features.

[0048] The historical voltage feature matrix is ​​a three-dimensional feature matrix. In this step, the historical voltage feature matrix is ​​flattened into a two-dimensional feature matrix to perform dimensionality reduction processing, and the aforementioned historical voltage dimensionality-reduced features are obtained based on this method. .

[0049] In this embodiment of the invention, the historical candidate voltage features are the core features in the historical voltage dimensionality reduction features. The historical candidate voltage features determined by this feature extraction method reduce data redundancy and help the battery anomaly detection model effectively capture anomaly patterns.

[0050] Please see Figure 5 Specifically, step S50 includes the following steps: S51. Reduce the historical voltage feature matrix to a two-dimensional feature matrix to obtain the historical voltage dimension-reduced feature.

[0051] S52. Perform Principal Component Analysis (PCA) on the dimensionality-reduced features of historical voltages to obtain several principal components whose cumulative variance contribution exceeds the contribution value. Map these principal components to a preset space to obtain historical candidate voltage features. These historical candidate voltage features have also undergone dimensionality reduction processing. Specifically, the historical candidate voltage features are... , The dimension is the reduced dimension.

[0052] PCA is an unsupervised dimensionality reduction technique. Historical candidate voltage features are obtained by projecting high-dimensional historical voltage features into a low-dimensional space while retaining the maximum variance information. PCA constructs new principal components by calculating the covariance matrix and eigenvalue decomposition to achieve data compression, denoising, and visualization.

[0053] S60. Construct an Interpretive Forest (IF) based on historical candidate voltage characteristics. Use the constructed isolation forest to determine the sample anomaly score for each sample battery, and select the first abnormal battery from the sample batteries based on the sample anomaly score. This step constructs the isolation forest layer in the battery anomaly detection model, which can initially screen abnormal batteries.

[0054] IF is an unsupervised algorithm for obtaining anomaly scores. IF recursively partitions the dataset by randomly selecting features and random split values ​​on those features until each data point is isolated to its own leaf node. The path length of each data point is used as the anomaly score. Anomaly data points have shorter path lengths and are therefore easier to isolate, while normal data points require longer paths to be isolated. This method is used to initially filter out abnormal batteries.

[0055] S70. Perform DBSCAN on the historical candidate voltage features to determine if there are noise points in the historical candidate voltage features, and then filter out the second abnormal battery from the sample batteries based on the noise points. This step constructs the clustering analysis layer in the battery anomaly detection model. The clustering analysis layer can filter out abnormal batteries based on density and neighborhood relationships, such as... Figure 6As shown.

[0056] S80. Sample batteries that simultaneously belong to the first and second abnormal batteries are identified as having abnormal batteries. This step is the dual-decision layer in the battery anomaly detection model. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolation forest layer and the cluster analysis layer. Only when the battery to be detected meets the condition of being judged as the first and second abnormal battery will it be finally determined by the dual-decision layer to have an abnormal battery; otherwise, it is regarded as a normal operating battery.

[0057] The battery early warning method of this invention acquires historical operating data to be detected, extracts the battery voltage sequence from it, and then preprocesses the battery voltage sequence to reduce data redundancy while effectively capturing abnormal patterns and reducing interference from extreme values. The preprocessed battery voltage sequence is input into a constructed battery anomaly detection model to obtain the anomaly detection results output by the battery anomaly detection model. The isolated forest layer in the battery anomaly detection model uses the isolated forest algorithm to initially screen abnormal batteries. The isolated forest algorithm adapts to different data distributions through path length standardization and tree depth constraints. The clustering analysis layer in the battery anomaly detection model uses density-based noisy spatial clustering to screen abnormal batteries based on density and neighborhood relationships. The density-based noisy spatial clustering uses a k-distance curve to automatically determine the neighborhood radius and introduces a time decay coefficient to dynamically adjust the search range. Through the isolated forest layer and clustering... The adaptive parameter design of the analysis layer enhances the generalization ability of the battery anomaly detection model to complex battery operating conditions. These two network layers can achieve efficient anomaly identification without relying on a large amount of labeled data. At the same time, the battery anomaly detection model uses the historical voltage data of the battery under test, without using the real-time online voltage data of the battery under test or other data. The dual decision layer in the battery anomaly detection model combines the advantages of isolated forest and density-based noisy application space clustering. Through two-level dual joint decision, it significantly reduces the false alarms and false negatives that may exist in a single algorithm, and improves the accuracy and reliability of battery anomaly detection. In this way, the anomaly detection result does not depend on the real-time battery status of the battery under test. Therefore, the battery anomaly detection model can use historical operating data to screen abnormal batteries in the operation of energy storage power stations, reduce the risk of runaway of energy storage power stations, realize early warning of gradual battery failures, and reduce the difficulty of handling battery safety failures.

[0058] In this embodiment of the invention, step S60 includes the following steps: S61. Select a predetermined number of candidates sequentially from the historical candidate voltage characteristics. Based on the characteristics, several recursive subsets are obtained. Each recursive subset in this step The values ​​in the middle are randomly selected from historical candidate voltage features, and each recursive subset is obtained from these features. The number of features is also a preset number. .

[0059] S62. Determine each recursive subset. Dividing dimensions and from the corresponding recursive subset Extracting the partitioning dimension The historical dimension feature set. Each recursive subset... Dividing dimensions All are randomly determined, i.e., the dimensions used for partitioning. Therefore, each recursive subset Dividing dimensions They may all be different.

[0060] S63. Determine the split points for each historical dimension feature set. And based on the dividing point The historical dimension feature set is divided into the first subtree (left subtree) and the second subtree (right subtree).

[0061] Among them, the dividing point It is randomly selected from the minimum and maximum values ​​of the historical dimension feature set, i.e., the split point. Based on the feature values ​​and split points of each feature in the historical dimension feature set. The relationship between the eigenvalues ​​is used to divide the tree into two subtrees. The first subtree consists of eigenvalues ​​whose values ​​are less than the cut point. The feature set of the feature values, and correspondingly, the second subtree is the feature value of the cut point. The feature set of eigenvalues.

[0062] S64. Recursively partition the space of the first subtree and the second subtree until the preset termination condition is met, and obtain each recursive subset. The isolated trees are collected to form an isolated forest. Preset termination conditions include having only one divisible feature and the trees reaching a preset maximum depth. Spatial partitioning terminates when all the eigenvalues ​​of the divisible features are equal and any of the above conditions are met.

[0063] Each isolation tree is a binary tree structure. Each non-leaf node represents a partition based on a certain feature and split value. Each leaf node contains one or more data points. All isolation trees constitute an isolation forest.

[0064] The result of a single isolation tree is randomized; each isolation tree is a recursive subset of a random subset of historical candidate voltage features. To improve robustness and accuracy, in this embodiment of the invention, the specific values ​​of various construction parameters for the isolated forest are pre-set before construction, including a preset quantity. The total number of isolation trees and preset maximum depth .

[0065] For example, preset quantity The total number of isolation trees Preset maximum depth .

[0066] Among them, the preset quantity The settings not only improve build efficiency, but also help to better identify local outlier data points.

[0067] S45. Determine the average path length of each feature in the historical candidate voltage features in the isolated forest, determine the sample anomaly score of each sample battery based on the average path length, and select the first abnormal battery from the sample batteries based on the sample anomaly score.

[0068] The average path length can be used to determine the sample anomaly score. This score then determines whether there are any anomalous data points in the historical candidate voltage features. If an anomalous data point is found in the historical candidate voltage features of a particular sample battery, that sample battery is designated as the first anomalous battery, and a preliminary anomaly screening is performed on the sample batteries using an isolation forest.

[0069] More specifically, step S65 includes the following steps: S651. Determine the isolation trees that each feature in the historical candidate voltage features passes through in the isolation forest, and determine the average path length of each feature through all the isolation trees it passes through.

[0070] The average path length is calculated as follows:

[0071] in, Represents the first of the historical candidate voltage features One feature; Represents the first of the historical candidate voltage features Average path length of each feature; Represents the first of the historical candidate voltage features The feature in the first The path length of an isolated tree is obtained by calculating the number of edges from the root node to the leaf node.

[0072] S652. Normalize the average path length to obtain the sample anomaly score for each feature.

[0073] The sample anomaly score is calculated as follows:

[0074] in, Represents the first of the historical candidate voltage features The sample anomaly score for each feature; Indicates based on preset quantity The constructed normalization factor, Used for normalization processing , For harmonic functions, .

[0075] S453. Based on the sample anomaly score of the features, select the first abnormal battery from the sample batteries.

[0076] when Close to 1 ( When considering the historical candidate voltage characteristics, the first... If a certain feature is an outlier data point, and the historical candidate voltage features of a sodium battery sample contain... If the value is close to 1, then the sample battery is considered the first abnormal battery.

[0077] Preferred, or can be Set a preset difference, when When the difference between 1 and 0 is less than or equal to a preset difference, it is considered that... It is close to 1.

[0078] In this embodiment of the invention, step S70 includes the following steps: S71. Plot each feature in the historical candidate voltage features and its minimum number of points ( The k-distance graph is sorted to obtain the k-distance curve. Inflection points in the k-distance curve are identified, and the corresponding values ​​of the inflection points are used as the neighborhood radii. (Distance threshold).

[0079] Preferred minimum number of points Set it to 7.

[0080] S72. Traverse all historical candidate voltage features and determine all core points. The core point is to satisfy the neighborhood radius. Internal features are not less than the minimum number of points Features ( ).

[0081] S73. Traverse all (unvisited) core points, perform cluster expansion on each core point, and determine all features within the clusters of all core points. During cluster expansion, the neighborhood radius of each time node is adjusted according to a preset time decay coefficient. .

[0082] This step is called cluster expansion. It involves randomly selecting an unvisited core point and using that core point to create a new cluster. Then, it recursively determines all features that are density-reachable from that core point and adds these features (including core points and boundary points) to the current cluster. This cluster expansion is repeated until all core points have been visited.

[0083] Wherein, the boundary point is the neighborhood radius of the core point. Within, but the feature itself does not satisfy the core point condition (neighborhood radius). Internal features are not less than the minimum number of points The density can reach a point where there exists a feature chain. → →...→ Each feature density extends directly to the next feature, so that... → For example, density directly reaches the first in the historical candidate voltage characteristics. The first feature in the historical candidate voltage features Neighborhood radius of each feature Inside.

[0084] DBSCAN is a density-based clustering algorithm. Unlike the K-Means clustering algorithm, DBSCAN starts from a core point and recursively searches all density-reachable points to include them in the same cluster. Therefore, DBSCAN is more robust to noise and outliers.

[0085] S74. Features that have not been added to any cluster are temporarily marked as temporary noise points. That is, the remaining features that have not been added to any cluster are temporarily marked as temporary noise points. These temporarily marked temporary noise points are neither core points nor boundary points, and are far away from all clusters.

[0086] S75. Perform feature verification on all temporary noise points, and designate temporary noise points that fail feature verification as anomaly candidate features. Feature verification includes determining the nearest core point for each temporary noise point, determining the distance between the temporary noise point and the nearest core point, and obtaining the minimum distance for each temporary noise point. In determining the minimum distance No more than twice the neighborhood radius In the case of ( Temporary noise points are added to the cluster of the nearest core points. Feature verification is used to perform secondary verification on the temporary noise points, thereby... Temporary noise points are excluded, and the remaining temporary noise points are the final candidate features for anomalies.

[0087] S76. Determine the local density of each cluster, take the maximum value of the local density as the maximum density, and if the ratio of the local density to the maximum density is lower than the preset value and there are abnormal candidate features in the historical candidate voltage features, take the sample battery corresponding to the historical candidate voltage features as the second abnormal battery, and then select the second abnormal battery from the sample battery.

[0088] The local density is calculated as follows:

[0089] in, Indicates the first The local density of the cluster corresponding to each core point. The preset value can be configured by the user, for example, setting the preset value to 30%.

[0090] More specifically, step S73 includes the following steps: S731. Select a core point from all core points and create a cluster using the current core point.

[0091] S732, from the initial time point ( The search begins by adding features that are density-reachable from the core point within a given time node to the cluster of the current core point, until the search reaches the termination time node. ), determine all features within the cluster of the current core point.

[0092] The neighborhood radius of each time point is adjusted according to the preset time decay coefficient. Specifically:

[0093] in, This represents the adjusted neighborhood radius at the second time point. As the new neighborhood radius And it is used when searching for density-reachable features at this second time node; This represents the preset time decay coefficient. This formula can be used to determine the neighborhood radius of the previous search time node. Update the neighborhood radius of the next adjacent search time node. .

[0094] Preferred, The value is 0.01.

[0095] S733. Traverse all core points and perform cluster creation and density search for each core point. Repeat steps S731 and S732 until all core points have been visited, and determine all features within the clusters of all core points.

[0096] The battery early warning device provided in the embodiments of the present invention will be described below. The battery early warning device described below can be referred to in correspondence with the battery early warning method described above.

[0097] Due to the aforementioned technical problems, this invention also provides a battery early warning device, which aims to use historical operating data to screen abnormal batteries in the operation of energy storage power stations, reduce the risk of runaway from energy storage power stations, realize early warning of gradual battery failures, and reduce the difficulty of handling battery safety failures. Figure 7 This is a schematic diagram of the structure of a battery early warning method according to an embodiment of the present invention, as shown below. Figure 7 As shown, the device may include: The data processing module 10 is used to acquire the historical operating data of the battery to be tested, extract the battery voltage sequence from the historical operating data, and preprocess the battery voltage sequence. The preprocessing methods include linear interpolation and standardization.

[0098] Linear interpolation in the preprocessing method can fill in missing values ​​in the voltage data and ensure the temporal continuity of the battery voltage sequence. Robust normalization of the battery voltage sequence after linear interpolation can eliminate interference caused by extreme values ​​and improve data stability, such as scaling the normalization process based on the 5%-95th percentile.

[0099] In this embodiment of the invention, the battery historical operating data can be historical data collected after the battery under test has undergone a preset number of charge cycles and tests. Voltage data is then extracted from the battery historical operating data to obtain the battery voltage sequence. Therefore, the battery voltage sequence is also the historical voltage data of the battery under test, not real-time online voltage data. No specific restrictions are placed on the form in which the battery voltage sequence is extracted from the battery historical operating data, as long as the electronic device can obtain the battery voltage sequence.

[0100] The anomaly detection module 20 is used to input the preprocessed battery voltage sequence into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model. The anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normal operating battery. The abnormal battery number can be filtered out through the battery anomaly detection model.

[0101] The isolation forest layer uses the IF algorithm to initially screen for anomalous cells. The isolation forest algorithm adapts to different data distributions through path length normalization and tree depth constraints. The clustering analysis layer uses DBSCAN to screen for anomalous cells based on density and neighborhood relationships. DBSCAN automatically determines the neighborhood radius using a k-distance curve (elbow rule). In this embodiment of the invention, a time decay coefficient is introduced to DBSCAN to dynamically adjust the search range; the dual decision layer combines the advantages of isolated forest (unsupervised anomaly scoring) and DBSCAN (density clustering and noise verification), and through two-level dual joint decision, it significantly reduces the false alarms and missed detections that may exist in a single algorithm, and improves the accuracy and reliability of battery anomaly detection.

[0102] The adaptive parameter design of the isolated forest layer and cluster analysis layer enhances the generalization ability of the battery anomaly detection model to complex battery operating conditions. These two network layers can achieve efficient anomaly identification without relying on a large amount of labeled data. At the same time, the battery anomaly detection model uses the historical voltage data of the battery under test when it is applied, without using the real-time online voltage data of the battery under test or other data. In this way, the anomaly detection results output by the battery anomaly detection model do not depend on the real-time battery status of the battery under test, and can provide early warning of gradual failure of the battery under test.

[0103] The detection performance of the battery anomaly detection model can be validated on real-world datasets. It's understandable that the anomaly detection results output by the model can detect not only potential gradual battery failures but also common anomalies.

[0104] The battery early warning device of this invention acquires historical operating data to be detected, extracts the battery voltage sequence from it, and then preprocesses the battery voltage sequence to reduce data redundancy while effectively capturing abnormal patterns and reducing interference from extreme values. The preprocessed battery voltage sequence is input into a constructed battery anomaly detection model to obtain the anomaly detection results output by the battery anomaly detection model. The isolated forest layer in the battery anomaly detection model uses the isolated forest algorithm to initially screen abnormal batteries. The isolated forest algorithm adapts to different data distributions through path length standardization and tree depth constraints. The clustering analysis layer in the battery anomaly detection model uses density-based noisy spatial clustering to screen abnormal batteries based on density and neighborhood relationships. The density-based noisy spatial clustering uses a k-distance curve to automatically determine the neighborhood radius and introduces a time decay coefficient to dynamically adjust the search range. Through the isolated forest layer and clustering... The adaptive parameter design of the analysis layer enhances the generalization ability of the battery anomaly detection model to complex battery operating conditions. These two network layers can achieve efficient anomaly identification without relying on a large amount of labeled data. At the same time, the battery anomaly detection model uses the historical voltage data of the battery under test, without using the real-time online voltage data of the battery under test or other data. The dual decision layer in the battery anomaly detection model combines the advantages of isolated forest and density-based noisy application space clustering. Through two-level dual joint decision, it significantly reduces the false alarms and false negatives that may exist in a single algorithm, and improves the accuracy and reliability of battery anomaly detection. In this way, the anomaly detection result does not depend on the real-time battery status of the battery under test. Therefore, the battery anomaly detection model can use historical operating data to screen abnormal batteries in the operation of energy storage power stations, reduce the risk of runaway of energy storage power stations, realize early warning of gradual battery failures, and reduce the difficulty of handling battery safety failures.

[0105] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 930, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical commands in the memory 830 to execute a battery advance warning method, which includes: The historical operating data of the battery to be tested is acquired, the battery voltage sequence is extracted from the historical operating data, and the battery voltage sequence is preprocessed; the preprocessing includes linear interpolation and standardization. The preprocessed battery voltage sequence is input into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normally operating battery; The battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. The output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer. The output terminal of the dual decision layer is used to output the anomaly detection result. The isolated forest layer is used to use the isolated forest algorithm to initially screen abnormal batteries. The clustering analysis layer is used to use density-based noisy spatial clustering and to screen abnormal batteries based on density and neighborhood relationships. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolated forest layer and the clustering analysis layer, and output the anomaly detection results.

[0106] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0107] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the battery advance warning method provided by the above methods, the method comprising: The historical operating data of the battery to be tested is acquired, the battery voltage sequence is extracted from the historical operating data, and the battery voltage sequence is preprocessed; the preprocessing includes linear interpolation and standardization. The preprocessed battery voltage sequence is input into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normally operating battery; The battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. The output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer. The output terminal of the dual decision layer is used to output the anomaly detection result. The isolated forest layer is used to use the isolated forest algorithm to initially screen abnormal batteries. The clustering analysis layer is used to use density-based noisy spatial clustering and to screen abnormal batteries based on density and neighborhood relationships. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolated forest layer and the clustering analysis layer, and output the anomaly detection results.

[0108] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the aforementioned methods for performing advanced warning of batteries, the method comprising: The historical operating data of the battery to be tested is acquired, the battery voltage sequence is extracted from the historical operating data, and the battery voltage sequence is preprocessed; the preprocessing includes linear interpolation and standardization. The preprocessed battery voltage sequence is input into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normally operating battery; The battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. The output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer. The output terminal of the dual decision layer is used to output the anomaly detection result. The isolated forest layer is used to use the isolated forest algorithm to initially screen abnormal batteries. The clustering analysis layer is used to use density-based noisy spatial clustering and to screen abnormal batteries based on density and neighborhood relationships. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolated forest layer and the clustering analysis layer, and output the anomaly detection results.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for early warning of battery conditions, characterized in that, The method includes: The historical operating data of the battery to be tested is acquired, the battery voltage sequence is extracted from the historical operating data, and the battery voltage sequence is preprocessed; the preprocessing includes linear interpolation and standardization. The preprocessed battery voltage sequence is input into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normally operating battery; The battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. The output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer. The output terminal of the dual decision layer is used to output the anomaly detection result. The isolated forest layer is used to use the isolated forest algorithm to initially screen abnormal batteries. The clustering analysis layer is used to use density-based noisy spatial clustering and to screen abnormal batteries based on density and neighborhood relationships. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolated forest layer and the clustering analysis layer, and output the anomaly detection results.

2. The battery early warning method according to claim 1, characterized in that, The battery anomaly detection model is constructed through the following steps: The sample battery's historical operating data is obtained, historical voltage sequences are extracted from the historical operating data, and the historical voltage sequences are preprocessed; the preprocessing includes linear interpolation and standardization. The preprocessed historical voltage sequences are feature-processed according to a preset time sliding window to determine the historical time-domain features of the historical voltage sequences within each preset time sliding window. A historical voltage feature matrix is ​​then constructed based on the historical voltage sequences and historical time-domain features. The historical time-domain features include the historical moving mean, historical moving standard deviation, historical moving peak-to-peak value, and historical moving difference mean. The historical moving mean reflects the local voltage level of the sample battery within the corresponding preset time sliding window; the historical moving standard deviation quantifies the intensity of local voltage fluctuations of the sample battery within the corresponding preset time sliding window; the historical moving peak-to-peak value characterizes the voltage range of the sample battery within the corresponding preset time sliding window; and the historical moving difference mean characterizes the average rate of voltage change of the sample battery within the corresponding preset time sliding window. The historical voltage feature matrix is ​​dimensionality reduced to obtain the historical voltage dimensionality-reduced features, and historical candidate voltage features are extracted from the historical voltage dimensionality-reduced features. An isolation forest is constructed based on the historical candidate voltage characteristics. The isolated forest is used to determine the sample anomaly score of each sample battery. The first abnormal battery is selected from the sample batteries based on the sample anomaly score. Density-based noisy spatial clustering is performed on historical candidate voltage features to determine whether there are noise points in the historical candidate voltage features, and second abnormal cells are screened out from the sample cells based on the noise points. Sample batteries that belong to both the first and second abnormal batteries are identified as having abnormal batteries.

3. The battery early warning method according to claim 2, characterized in that, The process of dimensionality reduction of the historical voltage feature matrix to obtain historical voltage dimensionality-reduced features, and extraction of historical candidate voltage features from these features, specifically includes: The historical voltage feature matrix is ​​reduced to a two-dimensional feature matrix to obtain the historical voltage dimension-reduced features; Principal component analysis is performed on the dimensionality reduction features of historical voltages to obtain several principal components whose cumulative variance contribution exceeds the contribution value. These principal components are then mapped to a preset space to obtain historical candidate voltage features.

4. The battery early warning method according to claim 2, characterized in that, The process of constructing an isolation forest based on historical candidate voltage characteristics, using the constructed isolation forest to determine the sample anomaly score for each sample battery, and selecting the first abnormal battery from the sample batteries based on the sample anomaly score specifically includes: A predetermined number of features are selected sequentially from the historical candidate voltage features to obtain several recursive subsets; Determine the partitioning dimension of each recursive subset, and extract the historical dimension feature set belonging to the partitioning dimension from the corresponding recursive subset; Determine the split point for each historical dimension feature set, and divide the historical dimension feature set into a first subtree and a second subtree based on the split point; The first subtree and the second subtree are recursively spatially partitioned until a preset termination condition is reached, resulting in an isolated tree for each recursive subset. All isolated trees are then collected to form an isolated forest. The preset termination condition includes that there is only one divisible feature, the tree reaches a preset maximum depth, and the feature values ​​of the divisible features are all equal. Determine the average path length of each feature in the historical candidate voltage features in the isolated forest, determine the sample anomaly score of each sample battery based on the average path length, and select the first abnormal battery from the sample batteries based on the sample anomaly score.

5. The battery early warning method according to claim 4, characterized in that, The process of determining the average path length of each feature in the historical candidate voltage features within the isolated forest, determining the sample anomaly score for each sample battery based on the average path length, and selecting the first anomalous battery from the sample batteries based on the sample anomaly score specifically includes: Determine the isolation trees that each feature in the historical candidate voltage features passes through in the isolation forest, and determine the average path length of each feature across all the isolation trees it passes through; The average path length is normalized to obtain the sample anomaly score for each feature; Based on the sample anomaly score of the features, the first abnormal battery is selected from the sample batteries.

6. The battery early warning method according to claim 2, characterized in that, The step of performing density-based noisy spatial clustering on historical candidate voltage features to determine whether there are noise points in the historical candidate voltage features, and then selecting the second abnormal battery from the sample batteries based on the noise points, specifically includes: Plot the sorting diagram of each feature in the historical candidate voltage features and its minimum number of points - nearest neighbor distance to obtain the k-distance curve, identify the inflection point in the k-distance curve, and use the corresponding value of the inflection point as the neighborhood radius; Traverse all historical candidate voltage features to determine all core points; the core points are those that satisfy the neighborhood radius. Features whose internal feature number is not less than the minimum number of points; Traverse all core points and perform cluster expansion on each core point to determine all features within the cluster of all core points; during the cluster expansion process, adjust the neighborhood radius of each time node according to a preset time decay coefficient. Features that are not included in any clusters are temporarily marked as temporary noise points; All temporary noise points are subjected to feature verification, and those that fail the feature verification are designated as anomaly candidate features. The feature verification includes determining the nearest core point for each temporary noise point, determining the distance between the temporary noise point and the nearest core point, obtaining the minimum distance for each temporary noise point, and determining that the minimum distance is no greater than twice the neighborhood radius. In this case, the temporary noise point is added to the cluster of the nearest core point; The local density of each cluster is determined, and the maximum value of the local density is taken as the maximum density. If the ratio of the local density to the maximum density is lower than a preset value and there are abnormal candidate features in the historical candidate voltage features, the sample battery corresponding to the historical candidate voltage features is taken as the second abnormal battery.

7. The battery early warning method according to claim 6, characterized in that, The process involves traversing all core points, performing cluster expansion on each core point, and determining all features within the clusters of all core points. The cluster expansion process adjusts the neighborhood radius of each time node according to a preset time decay coefficient, specifically including: Select one core point from all core points and create a cluster using the current core point; Starting from the initial time node, the search adds the features that are density-reachable from the core point within the time node to the current core point cluster until the search reaches the termination time node, thus determining all features within the current core point cluster. Iterate through all core points and perform cluster creation and density search for features at each core point to determine all features within the clusters of all core points.

8. A battery early warning device, characterized in that, The device includes: The data processing module is used to acquire the historical operating data of the battery to be tested, extract the battery voltage sequence from the historical operating data, and preprocess the battery voltage sequence; the preprocessing includes linear interpolation and standardization. An anomaly detection module is used to input the preprocessed battery voltage sequence into the constructed battery anomaly detection model to obtain the anomaly detection result output by the battery anomaly detection model; the anomaly detection result is used to indicate whether the battery under test is an abnormal battery or a normally operating battery; The battery anomaly detection model includes an isolated forest layer, a cluster analysis layer, and a dual decision layer. The input terminals of the isolated forest layer and the cluster analysis layer are used to receive the preprocessed battery voltage sequence. The output terminals of the isolated forest layer and the cluster analysis layer are connected to the input terminal of the dual decision layer. The output terminal of the dual decision layer is used to output the anomaly detection result. The isolated forest layer is used to use the isolated forest algorithm to initially screen abnormal batteries. The clustering analysis layer is used to use density-based noisy spatial clustering and to screen abnormal batteries based on density and neighborhood relationships. The dual-decision layer is used to perform two-level dual joint anomaly determination on the results output by the isolated forest layer and the clustering analysis layer, and output the anomaly detection results.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the battery advance warning method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the battery advance warning method as described in any one of claims 1 to 7.