Battery charging and discharging abnormality detection method, system, electronic device and storage medium

The feature dimensionality reduction and classification of lead-carbon battery data are performed through principal component analysis and multiple clustering algorithms, combined with the voting method of the integrated learning algorithm, which solves the problem of low battery anomaly detection efficiency in the existing technology and achieves fast and accurate anomaly detection. Detection effect.

CN118294817BActive Publication Date: 2024-09-06太湖能谷(杭州)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410712501.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-09-06
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

Existing lead-carbon battery anomaly detection methods are inefficient and difficult to quickly and accurately extract features and detect abnormal phenomena from high-dimensional data, resulting in slow analysis speed and low efficiency.

Method used

A clustering-based battery charging and discharging anomaly detection method is used to reduce the feature dimension and classify the battery status through principal component analysis and multiple clustering algorithms, and combines the voting method of the integrated learning algorithm to mark abnormal data.

Benefits of technology

It improves the efficiency and accuracy of battery charge and discharge abnormality detection, can quickly identify abnormal phenomena in battery status, and enhances the reliability and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118294817B
    Figure CN118294817B
Patent Text Reader

Abstract

The present application relates to a battery charging and discharging anomaly detection method, system, electronic device and storage medium. The method comprises: obtaining the battery status of a battery pack during charging and discharging to obtain original charging and discharging data of multiple dimensions; performing feature extraction on the original charging and discharging data to obtain aggregated features; performing feature dimensionality reduction processing on the aggregated features by a principal component analysis method to obtain low-dimensional feature data of multiple different dimensions; performing clustering processing on each low-dimensional feature data by a plurality of clustering algorithms respectively to obtain a plurality of clustering results; analyzing the original charging and discharging data and the clustering results by a voting method to obtain abnormal data in the original charging and discharging data. The present application combines a plurality of unsupervised learning clustering methods with dimensionality reduction technology to avoid the problem of low accuracy of a single clustering algorithm, and can improve the accuracy and efficiency of battery charging / discharging anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of battery data analysis, and in particular to a battery charging and discharging anomaly detection method, system, electronic device and storage medium. Background Art

[0002] As an advanced energy storage device, lead-carbon batteries have been widely used in power systems, electric vehicles, uninterruptible power supplies and other fields. However, during long-term use, lead-carbon batteries are prone to abnormal charge / discharge due to factors such as the instability of internal chemical reactions, temperature changes, and increased charge and discharge cycles. This not only affects the performance of the battery, but may also shorten the battery life and even cause safety accidents. Therefore, real-time monitoring and early warning of abnormal charge / discharge of lead-carbon batteries are of great significance.

[0003] Traditional lead-carbon battery anomaly detection methods mainly rely on the monitoring of physical quantities such as voltage, current, and temperature. That is, battery charge / discharge data usually contains multiple dimensions. Due to the high dimensionality of the data, directly processing high-dimensional data will increase the computational complexity; and, without clear guidance, extracting features from a large amount of data and selecting features that are useful for anomaly detection from a large number of features takes a long time and is slow, so the existing anomaly analysis methods are inefficient.

[0004] In order to solve the above problems, the present invention provides a battery charge / discharge capacity abnormality detection solution based on clustering, which analyzes the key parameters in the battery charge / discharge process and classifies the battery status using a clustering algorithm, thereby achieving fast and accurate detection of battery charge / discharge capacity abnormalities. Summary of the invention

[0005] The embodiments of the present application provide a battery charging and discharging anomaly detection method, system, electronic device and storage medium to at least solve the problem of low analysis efficiency caused by selecting features useful for anomaly detection from a large amount of data in the related art.

[0006] In a first aspect, an embodiment of the present application provides a method for detecting abnormal charging and discharging of a battery, comprising:

[0007] Acquire the battery status of the battery pack during charging and discharging to obtain original charging and discharging data, wherein the original charging and discharging data includes sample data of multiple dimensions;

[0008] Performing feature extraction on the original charge and discharge data to obtain aggregate features;

[0009] Performing feature dimensionality reduction processing on the aggregated features by using a principal component analysis method to obtain low-dimensional feature data of different dimensions;

[0010] Performing clustering processing on each low-dimensional feature data by using two or more clustering algorithms to obtain clustering results of different dimensions, and dividing the clusters in the clustering results into normal clusters and abnormal clusters;

[0011] The votes of the clustering result that the sample data belongs to the abnormal cluster are counted by the voting method in the ensemble learning algorithm. When the votes are greater than a preset value, the sample data belonging to the abnormal cluster is marked as abnormal data.

[0012] In one embodiment, clustering is performed on each low-dimensional feature data to obtain clustering results of different dimensions, and clusters in the clustering results are divided into normal clusters and abnormal clusters, including:

[0013] traversing and calculating the silhouette coefficient in the clustering result and the sum of the squares within each cluster;

[0014] Obtaining a first preset threshold and a second preset threshold, and comparing the silhouette coefficient and the sum of squares within the cluster with the first preset threshold and the second preset threshold respectively;

[0015] When the silhouette coefficient is greater than a first preset threshold and the sum of squares within the cluster is less than a second preset threshold, the clustering result is obtained, and the clustering result includes more than two clusters;

[0016] The data characteristics of the battery when charging and discharging are normal are obtained, and the clusters that meet the data characteristics are marked as normal clusters; otherwise, they are marked as abnormal clusters.

[0017] In one embodiment, counting the number of votes for the clustering result that the sample data belongs to an abnormal cluster by a voting method in an ensemble learning algorithm includes:

[0018] Step a, obtaining clustering results and a set of pre-trained classifiers;

[0019] Step b, predicting the probability that the sample data belongs to an abnormal cluster in the current clustering result by the classifier, which is recorded as a first prediction probability; predicting the probability that the sample data belongs to a normal cluster in the current clustering result, which is recorded as a second prediction probability;

[0020] Step c, when the first predicted probability is greater than the second predicted probability, determining that the sample data belongs to an abnormal cluster in the current clustering result, and increasing the value of the vote by one;

[0021] Repeat steps ac to traverse and count all clustering results to obtain the number of votes for the clustering results that the sample data belongs to the abnormal cluster.

[0022] In one embodiment, before performing feature dimensionality reduction processing, the method further includes: normalizing the aggregated features to obtain normalized feature values, and performing feature dimensionality reduction processing on the normalized feature values.

[0023] In one embodiment, extracting features from the original charge and discharge data to obtain aggregate features includes:

[0024] Performing defect value filling processing on the original charge and discharge data to obtain first battery data;

[0025] Dividing the first battery data into a plurality of sequence data according to a preset step length;

[0026] The aggregate features of each sequence data are calculated, where the aggregate features are the maximum value, minimum value, mean value, standard deviation, covariance and mode of the sequence data.

[0027] In one embodiment, performing defect value filling processing on the original charge and discharge data to obtain the first battery data includes:

[0028] Obtaining point values ​​of two adjacent points of the defect point, performing linear fitting based on the two point values ​​to obtain a fitting formula; and calculating the defect value based on the fitting formula;

[0029] Alternatively, the value that appears most frequently in the original charge and discharge data is found and recorded as the mode; and the mode is used as the defect value.

[0030] In one embodiment, the principal component analysis method is used to perform feature dimensionality reduction processing on the aggregated features to obtain low-dimensional feature data of multiple different dimensions, including:

[0031] Standardizing the aggregated features, and calculating a correlation coefficient matrix for the standardized aggregated features to obtain a covariance matrix;

[0032] Performing eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and corresponding eigenvectors, and sorting the eigenvalues ​​in descending order;

[0033] Obtain a preset dimension, and select a corresponding number of eigenvalues ​​and corresponding eigenvectors according to the preset dimension in descending order;

[0034] A new feature space is constructed according to the selected feature vectors, and the aggregated features are spatially transformed according to the feature space to obtain the low-dimensional feature data.

[0035] In one embodiment, the clustering process is performed on each low-dimensional feature data by using multiple clustering algorithms to obtain multiple clustering results, including:

[0036] Perform clustering processing on each low-dimensional feature data by using Kmeans++ clustering algorithm to obtain multiple first clustering results;

[0037] Each low-dimensional feature data is clustered using the K-Median clustering algorithm to obtain multiple second clustering results.

[0038] In a second aspect, an embodiment of the present application provides a battery charge and discharge abnormality detection system, which implements the battery charge and discharge abnormality detection method described in any one of the above embodiments when the system is running, and the system includes:

[0039] A data acquisition module is used to obtain the battery status of the battery pack during charging and discharging, and obtain original charging and discharging data, wherein the original charging and discharging data includes sample data of multiple dimensions;

[0040] A feature extraction module, used to extract features from the original charge and discharge data to obtain aggregate features;

[0041] A dimensionality reduction processing module is used to perform feature dimensionality reduction processing on the aggregated features by using a principal component analysis method to obtain low-dimensional feature data of multiple different dimensions;

[0042] A clustering analysis module is used to perform clustering processing on each low-dimensional feature data by using two or more clustering algorithms to obtain clustering results of different dimensions, and to divide the clusters in the clustering results into normal clusters and abnormal clusters;

[0043] The result output module is used to count the votes of the clustering results that the sample data belongs to the abnormal cluster through the voting method in the integrated learning algorithm. When the votes are greater than a preset value, the sample data belonging to the abnormal cluster is marked as abnormal data.

[0044] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the battery charging and discharging abnormality detection method as described in the first aspect above is implemented.

[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the battery charging and discharging abnormality detection method as described in the first aspect above.

[0046] The battery charging and discharging abnormality detection method, system, electronic device, and storage medium provided by the embodiments of the present application have at least the following technical effects:

[0047] By first performing feature extraction on the original charge and discharge data, the aggregate features in the original charge and discharge data are obtained, unimportant noise and redundant data are filtered out, and key information in the battery charge and discharge process is more accurately captured, thereby improving the efficiency and accuracy of anomaly detection; by combining a variety of unsupervised learning clustering methods and dimensionality reduction techniques, the problem of low accuracy of using a single clustering algorithm is avoided, and the accuracy and efficiency of battery charge / discharge anomaly detection can be improved.

[0048] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0050] Figure 1 is a flow chart of a battery charging and discharging abnormality detection method in one embodiment of the present application;

[0051] Figure 2 It is a flowchart of combining multiple clustering algorithms and multiple low-dimensional data in one embodiment of the present application;

[0052] Figure 3 It is a structural block diagram of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0054] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

[0055] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0056] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0057] In a first aspect, an embodiment of the present application provides a method for detecting abnormal charging and discharging of a battery. Figure 1 is a flow chart of the method, such as Figure 1 As shown, the abnormality detection method of this embodiment includes the following steps:

[0058] Step S1, obtain the battery status of the battery pack during charging and discharging, and obtain the original charging and discharging data, which includes sample data of multiple dimensions. Before performing charging and discharging data analysis, the present application uses a variety of sensors to monitor the charging and discharging process of the battery pack in real time, thereby obtaining multi-dimensional statistical data such as current, voltage, temperature, and charge / discharge amount over a period of time, and each type of data represents a dimension. In this embodiment, it is necessary to collect the original charging data of multiple battery packs (PACKs) or electrical cabinets, encode the numbers of different PACKs and electrical cabinets, and use the LabelEncoder encoding method to convert categorical variables into numerical labels.

[0059] Step S2, extracting features from the original charge and discharge data to obtain aggregate features. Specifically, firstly, the original charge and discharge data is subjected to defect value filling processing to obtain first battery data; then the first battery data is divided into a plurality of sequence data according to a preset step length; finally, the aggregate features of each sequence data are calculated, and the aggregate features are the maximum value, minimum value, mean value, standard deviation, covariance or mode of the sequence data.

[0060] In an embodiment of the present application, after obtaining the original charge and discharge data, it is necessary to preprocess these data, such as using linear interpolation and the average value of the mode to fill in the missing values ​​in the data sequence. For the linear interpolation method, the point values ​​of two adjacent points of the defect point are obtained, and a linear fit is performed based on the two point values ​​to obtain a fitting formula; the defect value is calculated according to the fitting formula; for the average value filling of the mode, the value that appears most times in the original charge and discharge data is found and recorded as the mode; the mode is used as the defect value.

[0061] The linear interpolation method uses the linear relationship between adjacent known values ​​to estimate missing values. It mainly interpolates the nearest quadratic non-missing values ​​adjacent to the relevant missing values. It can maintain the continuity of the data to a certain extent. Combined with the mode calculation of the relevant missing dimensions, it is used to maintain the consistency of the overall distribution of the data. Therefore, this application fills in missing values ​​to provide more complete and accurate data for subsequent feature extraction and anomaly detection.

[0062] For example, the present application extracts statistical information (i.e., aggregate features) based on different time ranges of voltage, temperature, and current in the two scenarios of charging and discharging. The aggregate features of the present application can generally be the maximum value, minimum value, mean, standard deviation, covariance, and mode in the data of a time range. The time range can be the last 1 hour, 2 hours, 3 hours, one day, etc. The statistical information of the voltage and temperature in the above time range under different electrical cabinets and PACKs is counted. For each data type, about 10 groups of data are collected for each battery pack (the specific amount can be determined by the analyst).

[0063] In a preferred embodiment of the present application, since the extracted aggregated features have a high dimension and the clustering-related algorithm has a high time complexity, before performing feature dimensionality reduction processing, the aggregated features need to be normalized to obtain normalized feature values, and then the normalized feature values ​​are subjected to feature dimensionality reduction processing. Specifically, during the normalization process, the input aggregated features are processed using the Min-Max Normalization formula to scale the data between [0, 1]. The formula for Min-Max normalization is as follows:

[0064] (1)

[0065] Among them, X is the original aggregate feature, X min is the minimum value among all aggregated features, X max is the maximum value among all aggregated features, X norm is the normalized eigenvalue after normalization.

[0066] Step S3, performing feature dimensionality reduction processing on the aggregated features by using a principal component analysis method to obtain low-dimensional feature data of multiple different dimensions.

[0067] Specifically, in the process of feature dimensionality reduction, the aggregated features are first standardized, and the correlation coefficient matrix of the standardized aggregated features is calculated to obtain a covariance matrix; then the covariance matrix is ​​eigenvalue decomposition is performed to obtain eigenvalues ​​and corresponding eigenvectors, and the eigenvalues ​​are sorted in order from large to small; then the preset dimension is obtained, and the corresponding number of eigenvalues ​​and corresponding eigenvectors are selected in order from large to small and according to the preset dimension; then a new feature space is constructed according to the selected eigenvectors, and the aggregated features are spatially transformed according to the feature space to obtain the low-dimensional feature data.

[0068] In a preferred embodiment, this embodiment uses the principal component analysis method (Principal Component Analysis) to reduce the feature dimension. PCA mainly maps N-dimensional features to K dimensions. This K dimension is a new orthogonal feature also called a principal component. It is a K-dimensional feature reconstructed on the basis of the original N-dimensional feature. Combined with experiments, the final input algorithm dimension is controlled within 64 dimensions.

[0069] The principal component analysis method PCA (Principal Component Analysis) of this embodiment maps n-dimensional features to K dimensions. This K dimension is a new orthogonal feature also called a principal component. It is a K-dimensional feature reconstructed on the basis of the original n-dimensional feature. The work of PCA is to find a set of mutually orthogonal coordinate axes in sequence from the original space. The selection of new coordinate axes is closely related to the data itself. Among them, the first new coordinate axis selection is the direction with the largest variance in the original data, the second new coordinate axis selection is the plane orthogonal to the first coordinate axis that makes the variance the largest, and the third new coordinate axis is the plane orthogonal to the first and second axes. The variance is the largest, and so on, and n such coordinate axes can be obtained. In the new coordinate axes obtained in this way, we found that most of the variance is contained in the first k coordinate axes, and the variance contained in the latter coordinate axes is almost 0. Therefore, we can ignore the remaining coordinate axes and only retain the first k coordinate axes containing most of the variance. In fact, this is equivalent to retaining only the dimensional features containing most of the variance, while ignoring the feature dimensions containing almost 0 variance, thereby realizing the dimensionality reduction processing of data features.

[0070] Step S4, clustering each low-dimensional feature data by two or more clustering algorithms to obtain clustering results of different dimensions, and dividing the clusters in the clustering results into normal clusters and abnormal clusters. The clustering algorithms used in this application include but are not limited to: Kmeans++ clustering algorithm, K-Median clustering algorithm, hierarchical clustering algorithm, Gaussian mixture model, aggregation clustering algorithm or DBSCAN clustering algorithm, etc. The above clustering algorithms can be used in random combination.

[0071] In the clustering process, to obtain a clustering result containing a certain number of clusters, the following steps are implemented. Specifically, the silhouette coefficient and the sum of the squares within each cluster in the clustering result are traversed and calculated; the first preset threshold and the second preset threshold are obtained, and the silhouette coefficient and the sum of the squares within the cluster are compared with the first preset threshold and the second preset threshold respectively; when the silhouette coefficient is greater than the first preset threshold and the sum of the squares within the cluster is less than the second preset threshold, the clustering result is obtained, and the clustering result contains more than two clusters, and the clustering effect is the best. Finally, the data characteristics of the battery during normal charging and discharging are obtained, and the clusters that meet the data characteristics are marked as normal clusters; otherwise, they are marked as abnormal clusters. For example, during normal charging and discharging, the voltage is stable within a certain range, such as 5±0.2V. When the data of a cluster exceeds this range, it can be considered that the data of this cluster is abnormal, and then this cluster is marked as an abnormal cluster.

[0072] Specifically, when the Kmeans++ clustering algorithm and the K-Median clustering algorithm are used for clustering, each low-dimensional feature data is clustered by the Kmeans++ clustering algorithm to obtain multiple first clustering results; each low-dimensional feature data is clustered by the K-Median clustering algorithm to obtain multiple second clustering results, and then the first clustering results and the second clustering results are processed and analyzed to obtain the most accurate clustering result for each sample data. For details, refer to Figure 2 .

[0073] The Kmeans++ algorithm improves the selection of the initial cluster center, making the initial center point more dispersed and more representative, so that it can converge to a better clustering result faster. Specifically, a point is randomly selected from the data set as the first cluster center, and for each subsequent cluster center:

[0074] A1. Calculate the shortest distance from each data point to the selected cluster center;

[0075] B1. Select the next cluster center based on the weighted probability distribution of distance;

[0076] Repeat step B1 until K cluster centers are selected, and use the selected initial cluster centers to perform a standard iterative process of K-means clustering until convergence to obtain a first clustering result containing multiple clusters.

[0077] The K-Median clustering algorithm is similar to K-Means, but it uses the median to calculate the cluster center instead of the mean, which makes K-Median more robust to outliers because the median has less impact on outliers. The following are the basic steps of the K-Median algorithm:

[0078] A2. Randomly select the initial cluster center and randomly select K points from the data set as the initial cluster center.

[0079] B2. Assign data points to the nearest cluster center, assigning each data point to the cluster corresponding to the cluster center closest to it.

[0080] C2. Update the cluster center. For each cluster, calculate the median of all data points in the cluster and use it as the new cluster center.

[0081] Repeat step B2 and step C2 until the cluster center no longer changes or a predetermined number of iterations is reached, and obtain a second clustering result, which includes multiple clusters.

[0082] The K-Median algorithm performs similarly to K-Means, but is more robust to the presence of outliers in the data. However, the K-Median algorithm is more computationally expensive than K-Means because the median is usually more expensive to calculate than the mean.

[0083] Then the clusters in the clustering results are divided, specifically, the clusters in the clustering results are divided into normal clusters and abnormal clusters according to data characteristics, that is, all clusters are divided into two categories. In a preferred embodiment, the abnormal clusters can also be divided into overcharge clusters and over-discharge clusters, that is, the clusters are divided into three categories.

[0084] As for the evaluation of clustering effect, it can be distinguished according to the evaluation index of clustering results. For example, the evaluation index includes the silhouette coefficient and the sum of squares within the cluster. For example, when the clustering effect is poor, its cluster may have a higher WCSS value because the distance between the outlier and the cluster center is far; at the same time, it may have a lower silhouette coefficient, indicating that the density of data points within the cluster is low or the degree of separation from other clusters is not high.

[0085] In addition, this embodiment can also use the following method to determine abnormal clusters:

[0086] 1. Domain expert knowledge: Work with domain experts to understand when a data point might be considered abnormal in a specific application context. For example, in battery monitoring, overcharging or over-discharging might be considered abnormal behavior.

[0087] 2. Data labeling: If some data points in the dataset have been labeled as normal or abnormal, you can use this information as a reference to compare the unlabeled data points with the known abnormal data points.

[0088] 3. Cluster size. In some cases, the abnormal cluster may contain fewer data points because most of the data points are classified as normal clusters.

[0089] 4. Distribution analysis, analyze the distribution of data points within the cluster. Abnormal clusters may show different distribution characteristics from other clusters.

[0090] Step S5, counting the number of votes for the clustering result that the sample data belongs to the abnormal cluster by the voting method in the ensemble learning algorithm, and when the number of votes is greater than a preset value, marking the sample data belonging to the abnormal cluster as abnormal data. Specifically, counting the number of votes for the clustering result that the sample data belongs to the abnormal cluster by the voting method in the ensemble learning algorithm includes the following steps:

[0091] Step a, obtaining clustering results and a set of pre-trained classifiers;

[0092] Step b, predicting the probability that the sample data belongs to an abnormal cluster in the current clustering result by the classifier, which is recorded as a first prediction probability; predicting the probability that the sample data belongs to a normal cluster in the current clustering result, which is recorded as a second prediction probability;

[0093] Step c, when the first predicted probability is greater than the second predicted probability, determining that the sample data belongs to an abnormal cluster in the current clustering result, and increasing the value of the vote by one;

[0094] Repeat steps ac to traverse and count all clustering results to obtain the number of votes for the clustering results that the sample data belongs to the abnormal cluster.

[0095] Voting is a common ensemble learning technique in anomaly detection and pattern recognition to improve the accuracy and robustness of classification or clustering results. The following are the main steps of the voting method:

[0096] First, perform model training and prepare multiple models (which can be different types of models, or different parameter settings of the same model);

[0097] Then make independent predictions, allowing each model to independently predict or classify the data set. These predictions are made in parallel and do not affect each other.

[0098] Then, the corresponding voting rules are applied to vote. The voting rules include: for hard voting, the number of votes for each category is counted, and the category with the most votes is selected; for soft voting, the average or weighted average of the predicted probability of each category is calculated, and the category with the highest probability is selected;

[0099] Finally, according to the voting rules, the final prediction result is obtained and output.

[0100] If there is a tie, where multiple classes have the same number of votes and none of them exceeds the threshold, you can do one of the following: randomly select one of the classes; mark the sample as unclassified or uncertain; use additional models or information to resolve the tie.

[0101] In the anomaly detection method of this application, the voting method is used to combine the results of different clustering algorithms. By counting the frequency of each sample in the clusters of different clustering results, the samples of the abnormal label cluster with more than half of the total votes are selected as the final anomaly results. This method utilizes the collective prediction of multiple models to improve the accuracy and reliability of anomaly detection.

[0102] In a preferred embodiment of the present invention, in order to more clearly illustrate the implementation process of the present application, refer to Figure 2This embodiment integrates two clustering algorithms and combines low-dimensional feature data of three different dimensions to improve the final abnormality detection effect. The collected original charging and discharging data is subjected to data preprocessing and feature extraction. The extracted features are input into different dimensionality reduction data models respectively. The dimensionality reduction data models include PCA24 model, PCA36 model, and PCA64 model. The aggregated features are reduced to 24 dimensions, 36 dimensions, and 64 dimensions respectively to improve the difference between the features after dimensionality reduction. The number of dimensionality reduction is determined by experimental experience and relevant detection effects.

[0103] Then, the low-dimensional feature data is clustered using Kmeans++ and K-median clustering algorithms respectively. The evaluation index of clustering results is determined by the within-cluster sum of squares (WCSS) and the silhouette coefficient. The within-cluster sum of squares measures the sum of the square distances between each data point in each cluster and its cluster center. It is equal to the sum of the squares of the distances from each point in each cluster to the cluster center. Usually, the smaller the value, the better. The mathematical formula is:

[0104] (2)

[0105] Where k is the number of clusters, C i is the ith cluster, x belongs to cluster C i Data points, μ i It is cluster C i center.

[0106] The silhouette coefficient is an indicator used to measure the quality of clustering, which can reflect the density of data points within a cluster and the degree of separation of data points between clusters. The value range of the silhouette coefficient is between -1 and 1. The closer the value is to 1, the better the clustering effect is. Its mathematical formula is expressed as:

[0107] (3)

[0108] Where N is the number of data points, a(i) is the average distance from data point i to other points in the same cluster (intra-cluster average distance), and b(i) is the average distance from data point i to all points in the nearest different cluster (inter-cluster average distance).

[0109] According to the above evaluation indicators, the number of cluster centers is screened by the WCSS indicator value being small and the SC indicator value being close to 1, and the clusters are divided into three categories, namely overcharge, overdischarge, and normal. Among them, the overcharge and overdischarge clusters are marked as abnormal clusters, and the normal clusters are marked as normal clusters.

[0110] In this embodiment, the three low-dimensional feature data PCA24, PCA36, and PCA64 are respectively clustered by Kmeans++ and K-median to obtain 6 clustering results. Finally, the voting method is used to count the frequency of the cluster to which each sample belongs in each clustering result, and the samples of the abnormal label cluster with more than half of the total votes are selected as the final abnormal results. When the three clustering algorithms are used to cluster the data in the above three dimensions, 9 clustering results are obtained. At the same time, the 9 clustering results are analyzed with reference to the above voting method to obtain abnormal data. The analysis process of other different numbers of clustering algorithms and different dimensional feature data can refer to the above embodiment, and this application will not be repeated here.

[0111] The present invention discloses a method for detecting abnormal battery charge / discharge. The method comprises extracting data of a lead-carbon battery in a charge / discharge state, and then clustering the relevant data using a variety of unsupervised learning methods to minimize the intra-class distance and maximize the inter-class distance as much as possible, giving abnormal labels of the battery in the charge / discharge process according to the clustering results, and detecting abnormal charge / discharge behavior of the lead-carbon battery according to the abnormal labels. Through this method, the present embodiment can quickly detect abnormal behavior in the charge / discharge process, and further improve the safety of the lead-carbon battery system.

[0112] In summary, the battery charge and discharge anomaly detection method provided by the embodiment of the present application first extracts features from the original charge and discharge data to obtain aggregate features in the original charge and discharge data, filters out unimportant noise and redundant data, and more accurately captures key information in the battery charge and discharge process, thereby improving the efficiency and accuracy of anomaly detection; the aggregate features are subjected to feature dimensionality reduction processing by the principal component analysis method to obtain low-dimensional feature data of multiple different dimensions, which can reduce the dimension of the original data set while containing useful information of the original data, thereby simplifying the model and reducing the computational cost, and helping to improve the efficiency of the subsequent clustering algorithm; each low-dimensional feature data is clustered by multiple clustering algorithms, and the problem of low accuracy of a single clustering algorithm is avoided by combining multiple unsupervised learning clustering methods and dimensionality reduction techniques, thereby improving the accuracy and efficiency of battery charge / discharge anomaly detection; the voting method can help to synthesize a more robust anomaly detection result from multiple clustering results, and by considering the consensus of multiple clustering algorithms, the voting method can reduce the false positives or negatives that may be generated by a single algorithm, thereby improving the accuracy and reliability of anomaly detection.

[0113] In the second aspect, an embodiment of the present application provides a battery charging and discharging abnormality detection system, characterized in that when the system is running, the battery charging and discharging abnormality detection method described in any of the above embodiments is implemented, and the system includes a data acquisition module, a feature extraction module, a dimensionality reduction processing module, a clustering analysis module and a result output module.

[0114] Among them, the data acquisition module is used to obtain the battery status of the battery pack during charging and discharging, and obtain original charging and discharging data, which includes sample data of multiple dimensions; the feature extraction module is used to extract features from the original charging and discharging data to obtain aggregated features; the dimensionality reduction processing module is used to perform feature dimensionality reduction processing on the aggregated features through a principal component analysis method to obtain low-dimensional feature data of multiple different dimensions; the clustering analysis module is used to perform clustering processing on each low-dimensional feature data through more than two clustering algorithms to obtain clustering results of different dimensions, and divide the clusters in the clustering results into normal clusters and abnormal clusters; the result output module is used to count the votes of the clustering results of the sample data belonging to the abnormal cluster through the voting method in the integrated learning algorithm. When the votes are greater than a preset value, the sample data belonging to the abnormal cluster is marked as abnormal data.

[0115] In summary, the battery charge and discharge anomaly detection system provided by the present application performs feature extraction and dimensionality reduction through the feature extraction module and the dimensionality reduction processing module, which reduces the computational complexity of the model, while retaining important information of the data, and can quickly identify abnormal behaviors of lead-carbon batteries during the charge and discharge process, which is crucial for timely response and handling of battery problems; through the clustering processing of the clustering analysis module, the charge and discharge status of the battery can be divided into normal, overcharged, over-discharged and other categories, and a combination of multiple clustering algorithms and different dimensionality reduction features improves the accuracy and robustness of anomaly detection. In summary, the monitoring system provided by the present application, this method can not only improve the efficiency of battery monitoring, but also enhance the accuracy of battery detection.

[0116] It should be noted that the battery charge and discharge abnormality detection system provided in this embodiment is used to implement the above-mentioned implementation mode, and the descriptions that have been made will not be repeated. As used above, the terms "module", "unit", "subunit", etc. can implement a combination of software and / or hardware for a predetermined function. Although the device described in the above embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0117] In a third aspect, an embodiment of the present application provides an electronic device, Figure 3 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 3 As shown, the electronic device may include a processor 11 and a memory 12 storing computer program instructions.

[0118] Specifically, the processor 11 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0119] Among them, the memory 12 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 12 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 12 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 12 may be inside or outside the data processing device. In a specific embodiment, the memory 12 is a non-volatile memory. In a specific embodiment, the memory 12 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0120] The memory 12 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 11 .

[0121] The processor 11 implements any one of the battery charging and discharging abnormality detection methods in the above embodiments by reading and executing computer program instructions stored in the memory 12 .

[0122] In one embodiment, the electronic device may further include a communication interface 13 and a bus 10. Figure 3 As shown, the processor 11, the memory 12, and the communication interface 13 are connected via a bus 10 and communicate with each other.

[0123] The communication interface 13 is used to realize the communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 13 can also realize data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage and image / data processing workstations.

[0124] The bus 10 includes hardware, software or both, and couples the components of the electronic device to each other. The bus 10 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 10 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 10 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0125] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the battery charging and discharging abnormality detection method provided in the first aspect is implemented.

[0126] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0127] In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the battery charging and discharging abnormality detection method provided in the first aspect.

[0128] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0129] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0130] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for detecting abnormal battery charging and discharging, characterized in that: include: Acquire the battery status of the battery pack during charging and discharging to obtain original charging and discharging data, wherein the original charging and discharging data includes sample data of multiple dimensions; Performing feature extraction on the original charge and discharge data to obtain aggregate features; Performing feature dimensionality reduction processing on the aggregated features by using a principal component analysis method to obtain low-dimensional feature data of different dimensions; Performing clustering processing on each low-dimensional feature data by using two or more clustering algorithms to obtain clustering results of different dimensions, and dividing the clusters in the clustering results into normal clusters and abnormal clusters; The votes of the clustering result that the sample data belongs to the abnormal cluster are counted by the voting method in the ensemble learning algorithm, and when the votes are greater than a preset value, the sample data belonging to the abnormal cluster is marked as abnormal data; The counting of votes for the clustering result that the sample data belongs to an abnormal cluster by a voting method includes: Step a, obtaining clustering results and a set of pre-trained classifiers; Step b, predicting the probability that the sample data belongs to an abnormal cluster in the current clustering result by the classifier, which is recorded as a first prediction probability; predicting the probability that the sample data belongs to a normal cluster in the current clustering result, which is recorded as a second prediction probability; Step c, when the first predicted probability is greater than the second predicted probability, determining that the sample data belongs to an abnormal cluster in the current clustering result, and increasing the value of the vote by one; Repeat steps ac to traverse and count all clustering results to obtain the number of votes for the clustering results that the sample data belongs to the abnormal cluster.

2. The method according to claim 1, characterized in that The clustering process is performed on each low-dimensional feature data to obtain clustering results of different dimensions, and the clusters in the clustering results are divided into normal clusters and abnormal clusters, including: traversing and calculating the silhouette coefficient in the clustering result and the sum of the squares within each cluster; Obtaining a first preset threshold and a second preset threshold, and comparing the silhouette coefficient and the sum of squares within the cluster with the first preset threshold and the second preset threshold respectively; When the silhouette coefficient is greater than a first preset threshold and the sum of the squares within the cluster is less than a second preset threshold, the clustering result is obtained, and the clustering result includes more than two clusters; The data characteristics of the battery when charging and discharging are normal are obtained, and the clusters that meet the data characteristics are marked as normal clusters; otherwise, they are marked as abnormal clusters.

3. The method according to claim 1, characterized in that The extracting features of the original charge and discharge data to obtain aggregate features includes: Performing defect value filling processing on the original charge and discharge data to obtain first battery data; Dividing the first battery data into a plurality of sequence data according to a preset step length; The aggregate features of each sequence data are calculated, where the aggregate features are the maximum value, minimum value, mean value, standard deviation, covariance and mode of the sequence data.

4. The method according to claim 3, characterized in that The performing defect value filling processing on the original charge and discharge data to obtain first battery data includes: Obtaining point values ​​of two adjacent points of the defect point, performing linear fitting based on the two point values ​​to obtain a fitting formula; and calculating the defect value based on the fitting formula; Alternatively, the value that appears most frequently in the original charge and discharge data is found and recorded as the mode; and the mode is used as the defect value.

5. The method according to claim 1, characterized in that: The principal component analysis method is used to perform feature dimensionality reduction processing on the aggregated features to obtain low-dimensional feature data of multiple different dimensions, including: Standardizing the aggregated features, and calculating a correlation coefficient matrix for the standardized aggregated features to obtain a covariance matrix; Performing eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and corresponding eigenvectors, and sorting the eigenvalues ​​in descending order; Obtain a preset dimension, and select a corresponding number of eigenvalues ​​and corresponding eigenvectors according to the preset dimension in descending order; A new feature space is constructed according to the selected feature vectors, and the aggregated features are spatially transformed according to the feature space to obtain the low-dimensional feature data.

6. The method according to claim 1, characterized in that Before performing feature dimensionality reduction processing, the method further includes: performing normalization processing on the aggregated features to obtain normalized feature values, and performing feature dimensionality reduction processing on the normalized feature values.

7. A battery charging and discharging abnormality detection system, characterized in that: When the system is running, the method for detecting abnormal battery charging and discharging according to any one of claims 1 to 6 is implemented, and the system comprises: A data acquisition module is used to obtain the battery status of the battery pack during charging and discharging, and obtain original charging and discharging data, wherein the original charging and discharging data includes sample data of multiple dimensions; A feature extraction module, used to extract features from the original charge and discharge data to obtain aggregate features; A dimensionality reduction processing module is used to perform feature dimensionality reduction processing on the aggregated features by using a principal component analysis method to obtain low-dimensional feature data of multiple different dimensions; A clustering analysis module is used to perform clustering processing on each low-dimensional feature data by using two or more clustering algorithms to obtain clustering results of different dimensions, and to divide the clusters in the clustering results into normal clusters and abnormal clusters; The result output module is used to count the votes of the clustering results that the sample data belongs to the abnormal cluster through the voting method in the integrated learning algorithm. When the votes are greater than a preset value, the sample data belonging to the abnormal cluster is marked as abnormal data.

8. An electronic device, characterized in that: The invention comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the battery charging and discharging abnormality detection method as claimed in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the battery charging and discharging abnormality detection method according to any one of claims 1 to 6 is implemented.