Battery abnormality detection method and device

CN121142319BActive Publication Date: 2026-11-03BEIJING DIDI INFINITY TECH & DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410773433.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2026-11-03
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Current technology lacks the means to accurately detect battery abnormalities, making it difficult to ensure battery safety during use.

Method used

By acquiring battery operating data, an initial feature space is constructed. A genetic algorithm is used to determine the target anomaly detection reference model from the set of anomaly detection reference models. The feature space is then updated and the target model is trained to perform anomaly detection.

Benefits of technology

It enables accurate detection of battery malfunctions, ensuring battery safety during use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121142319B_ABST
    Figure CN121142319B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a battery abnormality detection method and device. After obtaining working condition data of at least one battery, the embodiments of the present application construct an initial feature space according to the working condition data, determine target abnormality detection reference models in an abnormality detection reference model set based on a genetic algorithm, update the initial feature space according to abnormality scores corresponding to the target abnormality detection reference models, further train a target model according to the updated feature space, and perform abnormality detection on a target battery according to the target model. Thus, the embodiments of the present application can accurately detect battery abnormalities, thereby ensuring the safety of the battery during use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing, and specifically to a method and apparatus for detecting battery anomalies. Background Technology

[0002] Batteries, as power supply devices, are commonly installed in various equipment, such as vehicles or robots, to provide electrical power. However, due to internal and external factors such as manufacturing processes, mechanical abuse, electrical abuse, and thermal abuse, batteries are prone to malfunctions. Current technology lacks accurate means to detect battery malfunctions, making it difficult to ensure battery safety during use. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a battery anomaly detection method and apparatus to accurately detect battery anomalies, thereby ensuring battery safety during use.

[0004] In a first aspect, embodiments of the present invention provide a battery anomaly detection method, the method comprising:

[0005] Acquire operating condition data for at least one battery;

[0006] Determine the initial feature space based on the aforementioned operating condition data;

[0007] A target anomaly detection reference model is determined from a set of anomaly detection reference models based on a genetic algorithm. The genetic algorithm uses chromosome representation to select models from the set of anomaly detection reference models and iterates through the chromosomes to determine a target chromosome. The anomaly detection reference model selected by the target chromosome is the target anomaly detection reference model.

[0008] The initial feature space is updated according to the anomaly score corresponding to each of the target anomaly detection reference models, wherein the anomaly score is obtained by inputting the working condition data into the corresponding target anomaly detection reference model;

[0009] The target model is obtained by training based on the updated feature space;

[0010] Anomaly detection is performed on the target battery based on the target model.

[0011] Secondly, embodiments of the present invention provide a battery anomaly detection device, the device comprising:

[0012] Acquisition unit, used to acquire operating condition data of at least one battery;

[0013] A feature space construction unit is used to determine an initial feature space based on the operating condition data.

[0014] The target anomaly detection reference model determination unit is used to determine the target anomaly detection reference model from the anomaly detection reference model set based on a genetic algorithm. The genetic algorithm uses chromosome representation to select the model from the anomaly detection reference model set and iterates through the chromosome to determine the target chromosome. The anomaly detection reference model selected by the target chromosome is the target anomaly detection reference model.

[0015] The feature space update unit is used to update the initial feature space according to the anomaly score corresponding to each of the target anomaly detection reference models, wherein the anomaly score is obtained by inputting the working condition data into the corresponding target anomaly detection reference model;

[0016] The model training unit is used to train and obtain the target model based on the updated feature space.

[0017] The detection unit is used to perform anomaly detection on the target battery based on the target model.

[0018] Thirdly, embodiments of the present invention provide a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method as described in any one of the first aspects.

[0019] Fourthly, embodiments of the present invention provide an electronic device, the device comprising:

[0020] Memory is used to store one or more computer program instructions;

[0021] A processor, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of the first aspects.

[0022] Fifthly, embodiments of the present invention provide a computer program product that, when run on a computer, causes the computer to perform the method as described in any one of the first aspects.

[0023] In this embodiment of the invention, after acquiring the operating condition data of at least one battery, an initial feature space is constructed based on the operating condition data. Then, a target anomaly detection reference model is determined from the anomaly detection reference model set based on a genetic algorithm. The initial feature space is then updated based on the anomaly score corresponding to each target anomaly detection reference model. Subsequently, the target model is trained and obtained based on the updated feature space, and anomaly detection is performed on the target battery based on the target model. Thus, this embodiment of the invention can accurately detect battery anomalies, thereby ensuring the safety of the battery during use. Attached Figure Description

[0024] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0025] Figure 1 This is a flowchart of a battery anomaly detection method according to an embodiment of the present invention;

[0026] Figure 2 This is a flowchart of the feature space construction method according to an embodiment of the present invention;

[0027] Figure 3 This is a flowchart of the target anomaly detection reference model determination method according to an embodiment of the present invention;

[0028] Figure 4 This is a flowchart of the fitness value determination method according to an embodiment of the present invention;

[0029] Figure 5 This is a flowchart of the chromosome selection method according to an embodiment of the present invention;

[0030] Figure 6 This is a schematic diagram of the chromosome crossing process according to an embodiment of the present invention;

[0031] Figure 7 This is a schematic diagram of the chromosome mutation process according to an embodiment of the present invention;

[0032] Figure 8 This is a flowchart of the feature space update method according to an embodiment of the present invention;

[0033] Figure 9 This is a schematic diagram illustrating the process of obtaining the target model according to an embodiment of the present invention;

[0034] Figure 10 This is a schematic diagram of a battery anomaly detection device according to an embodiment of the present invention;

[0035] Figure 11 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0036] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0037] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0038] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".

[0039] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0040] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.

[0041] It should be understood that the battery anomaly detection method in the embodiments of the present invention can be applied to different fields to detect anomalies in batteries of different devices, and this application does not limit it.

[0042] Figure 1 This is a flowchart of a battery anomaly detection method according to an embodiment of the present invention. It should be understood that the executing entity of the battery anomaly detection method can be any type of general-purpose data processing device, such as a tablet computer, laptop computer, or desktop computer. Alternatively, in some embodiments, the executing entity of the battery anomaly detection method can also be a data processing terminal mounted within a corresponding device, such as a vehicle terminal or robot terminal, etc. This application does not impose any limitations on this. Figure 1 As shown, the battery anomaly detection method may specifically include the following steps:

[0043] Step S100: Obtain operating condition data for at least one battery.

[0044] Specifically, the data processing device can acquire operating condition data of at least one battery during different charging processes. This operating condition data can be battery-related parameters collected during battery charging, including battery voltage data, current data, temperature data, and / or other performance data (such as state of charge), etc., which are not limited in this application.

[0045] Optionally, battery operating condition data can be collected by a corresponding device equipped with the battery. Further, the data processing device can obtain operating condition data by receiving message data sent by the corresponding device. The message data may carry battery-related parameters collected by the corresponding device. Specifically, the corresponding device equipped with the battery can collect battery-related parameters at a preset frequency (e.g., every 30 seconds) during battery charging and send the collected parameters to the data processing device in the form of messages (it should be understood that the message data can be sent separately by the corresponding device after each parameter collection operation, or it can be sent uniformly by the corresponding device after the battery charging process ends; this application does not impose any limitation on this). The data processing device can receive the message data sent by the corresponding device and organize the message data according to the timestamps carried in each message data, thereby obtaining the corresponding operating condition data.

[0046] It should be understood that, in this embodiment, the operating condition data can also be organized by the corresponding equipment and then sent to the data processing equipment. Alternatively, the operating condition data can also be organized by relevant personnel and then transferred to the data processing equipment using a corresponding storage device (e.g., a portable hard drive).

[0047] It should be understood that, in order for the battery anomaly detection method to also utilize relevant data during the battery discharge process (i.e., the usage process) to detect battery anomalies, the operating condition data in this embodiment can be equivalently replaced with battery-related parameters collected during the battery discharge process.

[0048] It should be understood that, in this embodiment, the batteries being collected should include both faulty batteries exhibiting abnormal conditions (such as overheating, performance degradation, short circuits, or thermal runaway) and normal batteries without any abnormal conditions. Furthermore, the ratio of faulty to normal batteries in the total number of batteries being collected can be set and adjusted by relevant personnel according to actual needs, and this application does not impose any restrictions on this.

[0049] Step S200: Construct an initial feature space based on the operating condition data.

[0050] Specifically, after acquiring operating condition data, the data processing equipment can construct an initial feature space based on the operating condition data.

[0051] Figure 2 This is a flowchart of a feature space construction method according to an embodiment of the present invention. By executing the feature space construction method, the data processing device can construct an initial feature space based on the acquired operating condition data. Figure 2 As shown, the feature space construction method may specifically include the following steps:

[0052] Step S210: For each of the operating condition data, extract at least one aggregated feature from the operating condition data.

[0053] Specifically, each battery charging process corresponds to one operating condition data point. For each acquired operating condition data point, the data processing device can extract at least one aggregated feature from the data. This aggregated feature reflects the battery's operating status.

[0054] Optionally, in this embodiment, the battery may include multiple individual cells. The aggregated features extracted by the data processing device from the operating condition data may specifically include the highest individual cell voltage (i.e., the maximum voltage value that multiple individual cells can achieve), the lowest individual cell voltage (i.e., the lowest voltage value that multiple individual cells can achieve), the highest individual cell temperature (i.e., the highest temperature value that multiple individual cells can achieve), the lowest individual cell temperature (i.e., the lowest temperature value that multiple individual cells can achieve), the maximum value, minimum value, difference between maximum and minimum values, mean, mode, standard deviation, 50th quantile, 90th quantile, and 95th quantile of the total current and total voltage during the charging process, etc. It should be understood that in practical applications, the specific aggregated features extracted by the data processing device from the operating condition data can be set by relevant personnel according to actual needs, and this application does not impose any limitations on this.

[0055] Step S220: Construct the initial feature space based on the aggregated features in each of the operating condition data.

[0056] Specifically, after extracting the aggregated features from each operating condition data, the data processing equipment can represent each operating condition data in the corresponding space as a feature vector based on the aggregated features, thereby constructing an initial feature space. The feature space can be a space composed of multiple feature vectors (one feature vector corresponds to one operating condition data point), and each dimension of this feature space can correspond one-to-one with each aggregated feature extracted from the operating condition data.

[0057] Optionally, parameters are easily disturbed and become abnormal during the acquisition, transmission, parsing, and storage process. To avoid abnormal parameters in the operating condition data affecting subsequent model training, the data processing device can preprocess the acquired operating condition data before constructing the initial feature space based on the operating condition data. Preprocessing may include out-of-bounds value correction and / or null value filling. Specifically, for parameters in each operating condition data that exceed a reasonable range, the data processing device can replace or empty them. For parameters with null values ​​in each operating condition data, the data processing device can fill them. This filling can be forward filling or backward filling, and this application does not impose any limitations on this. Further optionally, when more than half of the parameters are null, the data processing device can also directly delete the message data corresponding to that parameter from the operating condition data.

[0058] Step S300: Determine the target anomaly detection reference model from the anomaly detection reference model set based on the genetic algorithm.

[0059] Specifically, after constructing the initial feature space, the data processing device can determine the target anomaly detection reference model from the anomaly detection reference model set based on a genetic algorithm. This set includes multiple anomaly detection reference models, which can be anomaly detection models capable of detecting battery anomalies based on battery operating data and outputting corresponding anomaly scores.

[0060] Optionally, each anomaly detection reference model in the anomaly detection reference model set can be an unsupervised anomaly detection model.

[0061] It should be understood that the number of models in the anomaly detection reference model set and the specific anomaly detection reference models included can be set by relevant personnel according to actual needs, and this application does not impose any restrictions on this.

[0062] In one alternative implementation, the set of anomaly detection reference models may include k-Nearest Neighbors (KNN), Local Outlier Factor (LOF), Isolation Forest (IForest), Cluster-Based Local Outlier Factor (CBLOF), Histogram-based Outlier Score (HBOS), Variational Auto-Encoders (VAE), Fast Angle-Based Outlier Detection (FastABOD), Copula-Based Outlier Detection (COPOD), and Principal Component Analysis (PCA).

[0063] Among them, the K-Nearest Neighbors algorithm is an instance-based learning method applicable to both classification and regression tasks. The Local Anomaly Factor (LOF) algorithm is an unsupervised anomaly detection algorithm that identifies outliers in a dataset by calculating the Local Anomaly Factor (LOF score) for each data point. The Isolation Forest algorithm is an efficient unsupervised anomaly detection method based on the idea of ​​random forests, but with the opposite goal: identifying outliers rather than performing classification or regression. The clustering-based LFOF algorithm combines clustering techniques and LFOF. Compared to the original LOF algorithm, it not only relies on density but also incorporates clustering to enhance anomaly detection capabilities, especially effective when handling datasets with varying density regions and complex structures. The Variational Autoencoder is a deep learning model combining probabilistic graphical models and deep learning techniques, primarily used for unsupervised learning tasks. The Angle-Based Fast Anomaly Detection model utilizes the angular relationships between data points for anomaly detection. The Copula-Based Anomaly Detection model is an unsupervised statistical method used to identify outliers in a dataset. Principal component analysis (PCA) is a method that simplifies data structure by reducing dimensionality. In this embodiment, PCA can reconstruct the data after dimensionality reduction, and then identify outliers based on the large errors in the reconstructed data.

[0064] In a related technique, the target anomaly detection reference model is typically specified by relevant personnel from a set of anomaly detection reference models, or randomly selected by data processing equipment from the set of anomaly detection reference models. Compared to this related technique, this embodiment determines the target anomaly detection reference model from the set of anomaly detection reference models based on a genetic algorithm, which can yield a more reasonable combination of target anomaly detection reference models, thereby improving the performance of the target model trained subsequently.

[0065] Figure 3 This is a flowchart illustrating a method for determining a target anomaly detection reference model according to an embodiment of the present invention. By executing this method, the data processing device can determine a reasonable combination of target anomaly detection reference models from a set of anomaly detection reference models for subsequent target model training. Figure 3 As shown, the method for determining the target anomaly detection reference model may specifically include the following steps:

[0066] Step S310: Generate a first preset number of chromosomes.

[0067] Specifically, the data processing device can generate a first preset number of chromosomes. Each chromosome can be used to represent a selection scheme for models in the anomaly detection reference model set. Furthermore, for each chromosome, each gene in the chromosome can correspond one-to-one with each anomaly detection reference model in the anomaly detection reference model set, and the gene can be used to represent whether the corresponding anomaly detection reference model is selected. It should be understood that the specific value of the first preset number can be set and adjusted by relevant personnel according to actual needs, and this application does not impose any limitations on this.

[0068] Optionally, in step S310, the first preset number of chromosomes can be generated by the data processing device through a corresponding random algorithm, or by relevant personnel operating the data processing device according to actual needs. This application does not impose any restrictions on this.

[0069] Optionally, in this embodiment, the chromosome can specifically be a binary string, and the gene of the chromosome can specifically be a binary character within the binary string. For example, assuming there are 10 anomaly detection reference models in the anomaly detection reference model set, the data processing device can generate a binary string with 10 binary characters. Each binary character in the binary string can correspond to a specific anomaly detection reference model in the anomaly detection reference model set, and each binary character can be used to indicate whether the corresponding anomaly detection reference model is selected. Specifically, taking the binary string 1000110001 as an example, this binary string can represent a model selection scheme. In this model selection scheme, the first, fifth, sixth, and tenth anomaly detection reference models in the anomaly detection reference model set are selected.

[0070] Step S320: For each chromosome, determine the fitness value of the chromosome.

[0071] Specifically, the data processing device can determine the fitness value of each chromosome. The fitness value is a numerical value obtained after evaluating the chromosome, and it can influence subsequent chromosome iterations. Furthermore, in subsequent chromosome iterations, genes from chromosomes with high fitness values ​​are more likely to be retained to generate a new generation of chromosomes.

[0072] It should be understood that, in this embodiment, since chromosomes are used to characterize the selection scheme of models in the set of anomaly detection reference models, the fitness value of chromosomes can be determined by evaluating the model selection scheme represented by the chromosomes.

[0073] Figure 4 This is a flowchart of a fitness value determination method according to an embodiment of the present invention. By executing the fitness value determination method, the data processing device can evaluate the model selection scheme represented by the chromosome, thereby determining the fitness value of the chromosome. Figure 4 As shown, the fitness value determination method may specifically include the following steps:

[0074] Step S321: Obtain the target model by training based on the abnormality score corresponding to the abnormality detection reference model selected for the chromosome and the initial feature space.

[0075] Specifically, the data processing device can acquire the anomaly score corresponding to the anomaly detection reference model selected for the chromosome, fuse the acquired anomaly score with the initial feature space, and then use the feature space after fusing the anomaly scores to train and obtain the target model. The anomaly score can be obtained by the data processing device by inputting operating condition data into the corresponding anomaly detection reference model. The anomaly score can be a relevant numerical value used to characterize the degree of battery anomaly after the anomaly detection reference model performs anomaly detection on the battery based on the input operating condition data.

[0076] Furthermore, in this embodiment, the target model can employ the XGBoost (Extreme Gradient Boosting) model. XGBoost is an ensemble learning algorithm based on Gradient Boosting Decision Tree (GBDT), which iteratively optimizes weak learners (i.e., decision trees) to ultimately construct a powerful prediction model.

[0077] It should be understood that in this embodiment, each feature vector in the feature space will be used as a training sample to train the target model. Furthermore, the model training process is essentially a process of comparing the model's predicted output for the samples with the actual sample values ​​to continuously update its own model parameters. To provide reliable actual sample values ​​for the training of the target model, this embodiment can also pre-annotate each operating condition data according to the abnormal conditions of the battery corresponding to each operating condition data by relevant annotators. The annotation information of each operating condition data will be used as the actual sample value of its corresponding feature vector during the model training process.

[0078] Optionally, in this embodiment, fusing the acquired anomaly scores with the initial feature space can specifically refer to expanding the vector dimensions of each feature vector in the initial feature space based on the acquired anomaly scores. It should be understood that the number of dimensions expanded in the fused feature space should be the same as the number of models selected in the model selection scheme represented by the chromosome.

[0079] Step S322: Determine the fitness value of the chromosome based on the performance index of the target model.

[0080] Specifically, since the training and acquisition process of the target model involves the anomaly score corresponding to the anomaly detection reference model selected by the model selection scheme, the performance index of the target model can be used to evaluate the model selection scheme. After training and acquiring the target model, the data processing device can determine the fitness value of the chromosome based on the performance index of the target model.

[0081] Optionally, the performance metrics of the target model may include precision and recall. The fitness value of a chromosome can be determined by the following formula:

[0082]

[0083] Where F is the fitness value of the chromosome, Precision is the precision of the target model (i.e., the proportion of samples that are actually positive among those predicted as positive by the model), Recall is the recall of the target model (i.e., the proportion of positive samples actually identified by the model out of all actual positive samples), and β is the balance score.

[0084] It should be understood that the balance score β can be used to balance the effects of precision and recall on the fitness value F. When the balance score β = 1, precision and recall have the same effect on the fitness value F. When the balance score β > 1, recall has a greater effect on the fitness value F than precision, and as the balance score β continues to increase, the effect of recall on the fitness value F also continues to increase. When the balance score β < 1, recall has a smaller effect on the fitness value F than precision, and as the balance score β continues to decrease, the effect of recall on the fitness value F also continues to decrease.

[0085] It is important to note that the greater the impact of recall on fitness F, the more the final target model will prioritize recall. Conversely, the smaller the impact of recall on fitness F, the more the final target model will prioritize precision. In this embodiment, the balance score β can be set and adjusted by the relevant personnel according to actual needs. Specifically, if the personnel want to obtain a target model with high recall, they can set the balance score β to a larger value, for example, setting it to 4. If the personnel want to obtain a target model with high precision, they can set the balance score β to a smaller value, for example, setting it to 0.4.

[0086] It should be understood that the fitness value determination formula given above is merely illustrative. In practical applications, due to different needs of the target model, the data processing device may also use other formulas to determine the fitness value under the configuration of relevant personnel, and this application does not impose any restrictions on this. Correspondingly, when using other formulas to determine the fitness value, the performance indicators of the target model considered by the data processing device are not limited to precision and recall, but may also include other parameters, such as accuracy and mean accuracy, etc., and this application does not impose any restrictions on this.

[0087] It should be understood that after determining the fitness value of each chromosome, the data processing device can also initialize the target model and feature space. Thus, this embodiment can ensure that the determination process of the fitness values ​​of different chromosomes will not interfere with each other, and at the same time, it can also ensure that the final target model will not be affected by the determination process of the target preset detection model.

[0088] Step S330: Determine whether the current iteration number meets the preset iteration number.

[0089] Specifically, after determining the fitness values ​​of each chromosome, the data processing device can determine whether the current iteration count meets the preset iteration count. If the current iteration count meets the preset iteration count, the data processing device can execute step S360 to identify the chromosome with the highest fitness value among the current chromosomes as the target chromosome and end the iteration process. If the current iteration count does not meet the preset iteration count, the data processing device can execute subsequent steps S340 and S350 to continue generating the next generation of chromosomes. The specific value of the preset iteration count can be set and adjusted by relevant personnel according to actual needs, and this application does not impose any restrictions on it.

[0090] Optionally, in this embodiment, in order to improve the training efficiency of the target model by ending the training process in a timely manner after obtaining a target model that meets the requirements, step S330 can also be equivalently replaced by determining whether there is a chromosome in the current chromosome with a fitness value greater than or equal to a preset fitness threshold. Correspondingly, step S360 can also be replaced by determining the chromosome as the target chromosome. Specifically, after determining the fitness values ​​of each chromosome, the data processing device can determine whether there is a chromosome in the current chromosome with a fitness value greater than or equal to a preset fitness threshold. If there is a chromosome with a fitness value greater than or equal to the preset fitness threshold, the data processing device can execute step S360 to determine the chromosome as the target chromosome and end the iteration process. If there is no chromosome with a fitness value greater than or equal to the preset fitness threshold, the data processing device can execute subsequent steps S340 and S350 to continue generating the next generation of chromosomes.

[0091] Step S340: Select a second preset number of chromosomes from each of the chromosomes according to the fitness value.

[0092] Specifically, the data processing device can select a second preset number of chromosomes from the current chromosomes based on their fitness values. The specific value of this second preset number can be set and adjusted by relevant personnel according to actual needs. It should be understood that the value of the second preset number can be the same as or different from the value of the first preset number; this application does not impose any restrictions on this.

[0093] Figure 5 This is a flowchart of a chromosome selection method according to an embodiment of the present invention. By executing the chromosome selection method, the data processing device can select a second preset number of chromosomes from the current chromosomes. Figure 5 As shown, the chromosome selection method may specifically include the following steps:

[0094] Step S341: Determine the selection probability of each chromosome based on the fitness value.

[0095] Specifically, the data processing device can determine the probability of each chromosome being selected based on its fitness value.

[0096] It should be understood that a higher chromosome fitness value indicates better performance metrics for the target model trained using the model selection scheme represented by the chromosome. Therefore, when determining the selection probability of each chromosome, the data processing device should ensure that the selection probability of a chromosome is proportional to its fitness value. This ensures that chromosomes with high fitness values ​​have a greater probability of being selected, thus increasing the likelihood that genes in chromosomes with high fitness values ​​will be retained during chromosome iteration to generate a new generation of chromosomes.

[0097] Optionally, when determining the selection probability of each chromosome, the data processing device may determine the selection probability of each chromosome as the ratio of the fitness value of the current chromosome to the sum of the fitness values ​​of all current chromosomes.

[0098] Step S342: Repeat the selection operation in each of the chromosomes according to the selected probability to select a second preset number of chromosomes.

[0099] Specifically, the data processing device can sort the current chromosomes according to their selection probability, determine the cumulative selection probability range of each chromosome, generate a second preset number of random numbers between zero and one, and then select the corresponding chromosome according to the cumulative selection probability range of each random number.

[0100] For example, suppose the current chromosomes are chromosomes a, b, c, and d. The probability of chromosome a being selected is 0.1, chromosome b is 0.2, chromosome c is 0.5, and chromosome d is 0.2. The generated random numbers are 0.2, 0.35, 0.15, and 0.9, respectively. When selecting chromosomes, the data processing device can first sort the current chromosomes according to their selection probabilities and determine the cumulative selection probability interval for each chromosome. That is, the cumulative selection probability interval for chromosome a is [0, 0.1), for chromosome b is [0.1, 0.3), for chromosome d is [0.3, 0.5), and for chromosome c is [0.5, 1). Then, the data processing device can sequentially select chromosomes b, d, c, and d according to the cumulative selection probability intervals of the random numbers. It should be understood that the chromosome selection examples given above are merely illustrative, and in actual applications, the chromosome selection process is not limited to these examples.

[0101] It should be understood that in practical applications, the step of sorting the current chromosomes can be omitted. In this case, the data processing device can directly determine the cumulative selection probability range of the current chromosomes based on the selection probability, and then generate a second preset number of random numbers between zero and one, and then select the corresponding chromosomes based on the cumulative selection probability range of each random number.

[0102] It should be understood that the chromosome selection methods given above are merely illustrative. In actual applications, data processing equipment may also select a second preset number of chromosomes using other methods under the configuration of relevant personnel. This application does not impose any restrictions on the chromosome selection methods.

[0103] Step S350: Perform crossover and / or mutation operations on the selected second preset number of chromosomes to obtain the first preset number of chromosomes.

[0104] Specifically, after selecting a second preset number of chromosomes, the data processing device can perform crossover and / or mutation operations on the selected second preset number of chromosomes to obtain a first preset number of chromosomes. Specifically, performing a chromosome crossover operation can refer to selecting any two chromosomes from the selected second preset number of chromosomes and exchanging genes at random gene positions on the two chromosomes. Performing a chromosome mutation operation can refer to selecting one chromosome from the selected second preset number of chromosomes and mutating the gene at a random gene position on that chromosome. It should be understood that, in this embodiment, gene mutation can specifically refer to whether the corresponding abnormality detection reference model represented by the gene is selected for mutation, that is, mutating selected to not selected or mutating unselected to selected.

[0105] Figure 6 This is a schematic diagram of the chromosome crossing process according to an embodiment of the present invention. Figure 6 As shown, the data processing device can randomly select chromosomes 61 and 62 from a second preset number of chromosomes, and place chromosomes 61 and 62 at random gene locations (the random gene locations can be as follows). Figure 6 Genes (as indicated by the dashed lines in the middle) are interchanged to obtain new chromosomes 61' and 62'.

[0106] Figure 7 This is a schematic diagram of the chromosome mutation process according to an embodiment of the present invention. Figure 7 As shown, the data processing device can randomly select chromosome 71 from a second preset number of chromosomes and place chromosome 71 at a random gene location (the random gene location can be as follows). Figure 7 The gene (shown as the location of the gene covered by the black shading in the image) is mutated to obtain a new chromosome 71'.

[0107] Optionally, the probability of the data processing device performing a crossover operation on chromosomes can be determined based on the crossover rate, which can be set and adjusted by relevant personnel according to actual needs. Correspondingly, the probability of the data processing device performing a mutation operation on chromosomes can be determined based on the mutation rate, which can be set and adjusted by relevant personnel according to actual needs. Specifically, when selecting random gene locations based on the mutation rate, the data processing device can generate random numbers for each gene location on the chromosome, compare each generated random number with the mutation rate, and then determine the gene locations corresponding to random numbers greater than the mutation rate as the gene locations to be mutated.

[0108] Therefore, by performing crossover and mutation operations on chromosomes, this embodiment can iterate on chromosomes and promote population diversity during the iteration process, thereby helping the algorithm escape local optima in order to find the global optimum.

[0109] It should be understood that in step S350, if the second preset quantity is equal to the first preset quantity, the data processing device can maintain the overall number of chromosomes unchanged during the chromosome crossover operation. If the second preset quantity is less than or greater than the first preset quantity, the data processing device can expand or reduce the number of chromosomes accordingly during the chromosome crossover operation, so that the expanded or reduced number of chromosomes is equal to the first preset quantity.

[0110] Furthermore, after obtaining the first preset number of chromosomes, the data processing device can return and execute step S320 to continue determining the fitness value of each chromosome.

[0111] Step 360: Determine the chromosome with the highest fitness value among all current chromosomes as the target chromosome.

[0112] Specifically, the data processing device can identify the chromosome with the highest fitness value among all current chromosomes as the target chromosome and end the iteration process. The anomaly detection reference model selected by the target chromosome will then be designated as the target anomaly detection reference model.

[0113] Therefore, the genetic algorithm in this embodiment uses chromosomes to represent the model selection scheme of the model in the anomaly detection reference model set, and continuously iterates the chromosomes to obtain the target chromosome. Then, the anomaly detection reference model selected by the target chromosome is determined as the target anomaly detection reference model, which can improve the rationality of the determined target anomaly detection reference model combination.

[0114] Step S400: Update the initial feature space according to the anomaly scores corresponding to each of the target anomaly detection reference models.

[0115] Specifically, after determining the target chromosome, the data processing device can acquire the anomaly score corresponding to each target anomaly detection reference model, and update the initial feature space based on the anomaly score of each target anomaly detection reference model. The anomaly score can be obtained by the data processing device by inputting operating condition data into the corresponding target anomaly detection reference model. The anomaly score can be a relevant value characterizing the degree of battery anomaly, obtained after the target anomaly detection reference model performs anomaly detection on the battery based on the input operating condition data.

[0116] Optionally, in this embodiment, in order to make full use of the heterogeneity between the target anomaly detection reference models, the data processing device can perform weighted summation of the anomaly scores corresponding to each target anomaly detection reference model according to the corresponding weights, and then fuse the obtained values ​​into the initial feature space.

[0117] Figure 8 This is a flowchart of a feature space update method according to an embodiment of the present invention. Figure 8 As shown, the feature space update method may specifically include the following steps:

[0118] Step S410: Determine the fusion weight of the anomaly score corresponding to each of the target anomaly detection reference models.

[0119] Specifically, the data processing device can determine the fusion weights of the anomaly scores corresponding to each of the target anomaly detection reference models.

[0120] Optionally, in step S410, the data processing device can determine the fusion weights of the anomaly scores corresponding to each target anomaly detection reference model based on a logistic regression algorithm. Specifically, the data processing device can construct a separate feature space using the anomaly scores corresponding to each target anomaly detection reference model, and repeatedly train the target model using this separate feature space. During the repeated training of the target model using the feature space, the data processing device can continuously adjust the influence weights of the anomaly scores corresponding to each target anomaly detection reference model in the feature space on the trained model. Thus, through multiple rounds of training, the data processing device can obtain multiple regression coefficients. Each regression coefficient can be used to reflect the degree of influence of the change in the influence weights of the anomaly scores corresponding to the corresponding target anomaly detection reference model on the performance of the trained target model. Furthermore, the data processing device can normalize the multiple regression coefficients to determine the fusion weights of the anomaly scores corresponding to each target anomaly detection reference model.

[0121] Step S420: The anomaly scores corresponding to each of the target anomaly detection reference models are weighted and summed according to the fusion weights to obtain the fusion features.

[0122] Specifically, after determining the fusion weights of the anomaly scores corresponding to each target anomaly detection reference model, the data processing device can perform a weighted summation of the anomaly scores corresponding to each target anomaly detection reference model according to the fusion weights to obtain the fusion features.

[0123] Step S430: Fuse the fused features into the initial feature space.

[0124] Specifically, the data processing device can fuse the obtained fusion features into the initial feature space. It should be understood that, in this embodiment, fusing the fusion features into the initial feature space can specifically refer to expanding the vector dimension of each feature vector in the initial feature space based on the fusion features.

[0125] In one related technique, the data processing device directly calculates a weighted average of the anomaly scores corresponding to each target anomaly detection reference model to determine the fusion feature. Compared to this technique, this embodiment determines the fusion weights of the anomaly scores corresponding to each target anomaly detection reference model based on a logistic regression algorithm, and then obtains the fusion feature by weighting and summing the anomaly scores corresponding to each target anomaly detection reference model according to the fusion weights. This approach can fully utilize the heterogeneity between the target anomaly detection reference models, thereby improving the performance of the target model obtained through subsequent training.

[0126] Furthermore, in order to avoid losing feature information that is beneficial to model training, after fusing the fused features into the initial feature space, the data processing device can also fuse the anomaly scores corresponding to each anomaly detection reference model in the anomaly detection reference model set into the feature space.

[0127] Step S500: Train and obtain the target model based on the updated feature space.

[0128] Specifically, after updating the initial feature space, the data processing device can use the updated feature space to train and obtain the target model.

[0129] Furthermore, in this embodiment, the target model can employ the XGBoost (Extreme Gradient Boosting) model. XGBoost is an ensemble learning algorithm based on Gradient Boosting Decision Tree (GBDT), which iteratively optimizes weak learners (i.e., decision trees) to ultimately construct a powerful prediction model.

[0130] It should be understood that in this embodiment, each feature vector in the feature space will be used as a training sample to train the target model. Furthermore, the model training process is essentially a process of comparing the model's predicted output for the samples with the actual sample values ​​to continuously update its own model parameters. To provide reliable actual sample values ​​for the training of the target model, in this embodiment, relevant annotators can pre-annotate each feature vector according to the abnormal conditions of the batteries corresponding to each feature vector.

[0131] Step S600: Perform anomaly detection on the target battery according to the target model.

[0132] Specifically, after training and acquiring the target model, the data processing device can use the target model to perform anomaly detection on the target battery. The target battery can be a battery that requires anomaly detection.

[0133] Furthermore, when performing anomaly detection on the target battery based on the target model, the data processing device can first acquire the operating condition data of the target battery during a single charging process, extract corresponding aggregated features from the operating condition data, and then input the operating condition data into the corresponding target preset detection model to obtain anomaly scores. Then, based on the fusion weights of each anomaly score, the anomaly scores are weighted and summed to obtain fusion features. After obtaining the aggregated features, anomaly scores, and fusion features, the data processing device can input the aggregated features, anomaly scores, and fusion features into the target model, thereby using the target model to perform anomaly detection on the target battery. It should be understood that, in this embodiment, the anomaly detection result output by the target model can be the probability that the target battery is in an abnormal condition, or it can be a judgment result on whether the target battery is in an abnormal condition; this application does not impose any limitations on this.

[0134] Figure 9 This is a schematic diagram illustrating the process of obtaining the target model according to an embodiment of the present invention. Figure 6 As shown, firstly, the data processing device can acquire operating condition data 91-94 of at least one battery. After acquiring the operating condition data 91-94, the data processing device can aggregate the features in the operating condition data 91-94 and represent the operating condition data 91-94 in the form of feature vectors in the corresponding space according to the aggregate features in the operating condition data 91-94, thereby constructing an initial feature space 95.

[0135] Furthermore, the data processing device can determine the target anomaly detection reference model (here, the target anomaly detection reference models are anomaly detection reference models 911 and 914) from the anomaly detection reference model set based on a genetic algorithm, and determine the fusion weights W1 and W4 of the anomaly scores 921 and 924 corresponding to the anomaly detection reference models 911 and 914 based on a logistic regression algorithm. Then, the anomaly scores 921 and 924 are weighted and summed according to the fusion weights W1 and W4 to obtain the fusion feature 96. The anomaly scores 921-924 corresponding to the anomaly detection reference models 911-914 can be obtained by inputting the operating condition data 91-94 into the anomaly detection reference models 911-914.

[0136] Furthermore, the data processing device can update the initial feature space 95 based on the fused feature 96 and the anomaly scores 921-924 corresponding to the anomaly detection reference models 911-914 in the anomaly detection reference model set, thereby obtaining the updated feature space 97.

[0137] Furthermore, the data processing device can use the updated feature space 97 to train and obtain the target model 98. The target model 98 can be used to detect anomalies in the target battery.

[0138] In this embodiment of the invention, after acquiring the operating condition data of at least one battery, an initial feature space is constructed based on the operating condition data. Then, a target anomaly detection reference model is determined from the anomaly detection reference model set based on a genetic algorithm. The initial feature space is then updated based on the anomaly score corresponding to each target anomaly detection reference model. Subsequently, the target model is trained and obtained based on the updated feature space, and anomaly detection is performed on the target battery based on the target model. Thus, this embodiment of the invention can accurately detect battery anomalies, thereby ensuring the safety of the battery during use.

[0139] Figure 10 This is a schematic diagram of a battery anomaly detection device according to an embodiment of the present invention. Figure 10 As shown, the battery anomaly detection device of this embodiment includes an acquisition unit 101, a feature space construction unit 102, a target anomaly detection reference model determination unit 103, a feature space update unit 104, a model training unit 105, and a detection unit 106.

[0140] Specifically, the acquisition unit 101 is used to acquire operating condition data of at least one battery;

[0141] The feature space construction unit 102 is used to determine the initial feature space based on the working condition data;

[0142] The target anomaly detection reference model determination unit 103 is used to determine a target anomaly detection reference model in the anomaly detection reference model set based on a genetic algorithm. The genetic algorithm uses chromosome representation to select a model in the anomaly detection reference model set and iterates the chromosome to determine a target chromosome. The anomaly detection reference model selected by the target chromosome is the target anomaly detection reference model.

[0143] The feature space update unit 104 is used to update the initial feature space according to the anomaly score corresponding to each of the target anomaly detection reference models, wherein the anomaly score is obtained by inputting the working condition data into the corresponding target anomaly detection reference model.

[0144] The model training unit 105 is used to train and obtain the target model based on the updated feature space;

[0145] The detection unit 106 is used to perform anomaly detection on the target battery according to the target model.

[0146] In this embodiment of the invention, after acquiring the operating condition data of at least one battery, an initial feature space is constructed based on the operating condition data. Then, a target anomaly detection reference model is determined from the anomaly detection reference model set based on a genetic algorithm. The initial feature space is then updated based on the anomaly score corresponding to each target anomaly detection reference model. Subsequently, the target model is trained and obtained based on the updated feature space, and anomaly detection is performed on the target battery based on the target model. Thus, this embodiment of the invention can accurately detect battery anomalies, thereby ensuring the safety of the battery during use.

[0147] Figure 11 This is a schematic diagram of an electronic device according to an embodiment of the present invention. (For example...) Figure 11 As shown, Figure 11 The illustrated electronic device can be a data processing device as described in the above embodiments, comprising a general computer hardware architecture, including at least a processor 111 and a memory 112. The processor 111 and memory 112 are connected via a bus 113. The memory 112 is adapted to store instructions or programs executable by the processor 111. The processor 111 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 111 executes the instructions stored in the memory 112, thereby performing the method flow of the embodiments of the present invention as described above to process data and control other devices. The bus 113 connects the aforementioned components together, and also connects the aforementioned components to a display controller 114, a display device, and an input / output (I / O) device 115. The input / output (I / O) device 115 can be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 115 is connected to the system via an input / output (I / O) controller 116.

[0148] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] This application is described with reference to flowchart illustrations of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions.

[0150] These computer program instructions may be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction means, the implementation process of which is described in the instruction means. Figure 1 The function specified in one or more processes.

[0151] These computer program instructions may also be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, produce instructions for implementing processes. Figure 1 A device for a function specified in one or more processes.

[0152] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.

[0153] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program specifying the relevant hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0154] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for detecting battery anomalies, characterized in that, The method includes: Acquire operating condition data for at least one battery; Construct an initial feature space based on the aforementioned operating condition data; A target anomaly detection reference model is determined from a set of anomaly detection reference models based on a genetic algorithm. The genetic algorithm uses chromosome representation to select models from the set of anomaly detection reference models and iterates through the chromosomes to determine a target chromosome. The anomaly detection reference model selected by the target chromosome is the target anomaly detection reference model. The initial feature space is updated according to the anomaly score corresponding to each of the target anomaly detection reference models, wherein the anomaly score is obtained by inputting the working condition data into the corresponding target anomaly detection reference model; The target model is obtained by training based on the updated feature space; Anomaly detection is performed on the target battery based on the target model; The process of updating the initial feature space based on the anomaly scores corresponding to each of the target anomaly detection reference models includes: Determine the fusion weights for the anomaly scores corresponding to each of the aforementioned target anomaly detection reference models; The anomaly scores corresponding to each of the target anomaly detection reference models are weighted and summed according to the fusion weights to obtain the fusion features; The fusion features are fused into the initial feature space; The method further includes, after fusing the fused features into the initial feature space and before training the target model based on the updated feature space: The anomaly scores corresponding to each anomaly detection reference model in the anomaly detection reference model set are fused into the feature space.

2. The method according to claim 1, characterized in that, The step of determining the target anomaly detection reference model from the anomaly detection reference model set based on a genetic algorithm includes: A first preset number of chromosomes are generated, and the following steps are performed iteratively until a target chromosome is determined. Each gene in the chromosome corresponds one-to-one with each anomaly detection reference model in the anomaly detection reference model set. The gene is used to characterize whether the corresponding anomaly detection reference model is selected. The target chromosome is either the chromosome with the highest fitness value after a preset number of iterations or a chromosome with a fitness value greater than or equal to a preset fitness threshold. For each of the chromosomes, determine the fitness value of the chromosome; Based on the fitness value, select a second preset number of chromosomes from each of the chromosomes; Perform crossover and / or mutation operations on the selected second preset number of chromosomes to obtain the first preset number of chromosomes.

3. The method according to claim 2, characterized in that, Determining the fitness value of the chromosome includes: The target model is obtained by training the anomaly detection reference model selected by the chromosome and the initial feature space, wherein the anomaly score is obtained by inputting the working condition data into the corresponding anomaly detection reference model. The fitness value of the chromosome is determined based on the performance metrics of the target model.

4. The method according to claim 3, characterized in that, The performance metrics of the target model include precision and recall. The fitness value of the chromosome is determined by the following formula: Where F is the fitness value of the chromosome, Precision is the precision of the target model, Recall is the recall of the target model, and β is the balance score.

5. The method according to claim 2, characterized in that, The step of selecting a second preset number of chromosomes from each of the chromosomes based on the fitness value includes: The probability of each chromosome being selected is determined based on the fitness value; The selection operation is repeatedly performed on each of the chromosomes according to the selected probability to select a second preset number of chromosomes.

6. The method according to any one of claims 2-5, characterized in that, The chromosome is a binary string, and the genes of the chromosome are binary characters in the binary string.

7. The method according to claim 1, characterized in that, Determining the initial feature space based on the aforementioned operating condition data includes: For each of the aforementioned operating condition data, at least one aggregated feature is extracted from the operating condition data; The initial feature space is constructed based on the aggregated features in each of the described operating condition data.

8. The method according to claim 1, characterized in that, The anomaly detection reference model is an unsupervised anomaly detection model.

9. The method according to claim 1, characterized in that, Before determining the initial feature space based on the operating condition data, the method further includes: The operating condition data is preprocessed, wherein the preprocessing includes out-of-bounds value correction and / or null value filling.

10. A battery anomaly detection device, characterized in that, The device includes: Acquisition unit, used to acquire operating condition data of at least one battery; A feature space construction unit is used to determine an initial feature space based on the operating condition data. The target anomaly detection reference model determination unit is used to determine the target anomaly detection reference model from the anomaly detection reference model set based on a genetic algorithm. The genetic algorithm uses chromosome representation to select the model from the anomaly detection reference model set and iterates through the chromosome to determine the target chromosome. The anomaly detection reference model selected by the target chromosome is the target anomaly detection reference model. The feature space update unit is used to update the initial feature space according to the anomaly score corresponding to each of the target anomaly detection reference models, wherein the anomaly score is obtained by inputting the working condition data into the corresponding target anomaly detection reference model; The model training unit is used to train and obtain the target model based on the updated feature space. The detection unit is used to perform anomaly detection on the target battery based on the target model; Specifically, the feature space update unit is used for: Determine the fusion weights for the anomaly scores corresponding to each of the aforementioned target anomaly detection reference models; The anomaly scores corresponding to each of the target anomaly detection reference models are weighted and summed according to the fusion weights to obtain the fusion features; The fusion features are fused into the initial feature space; Wherein, after fusing the fused features into the initial feature space, and before training the target model based on the updated feature space, the feature space update unit is further configured to: The anomaly scores corresponding to each anomaly detection reference model in the anomaly detection reference model set are fused into the feature space.

11. A computer-readable storage medium storing computer program instructions thereon, characterized in that, The computer program instructions, when executed by a processor, implement the method as described in any one of claims 1-9.

12. An electronic device, characterized in that, The device includes: Memory is used to store one or more computer program instructions; A processor, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-9.

13. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Energy storage battery health state identification method

    CN112327190A

  • Training method, anomaly detection method and device, equipment and storage medium

    CN113537337A