Abnormality detection method and device, electronic equipment, vehicle and storage medium

The power battery abnormality detection model is constructed through a robust random cutting forest algorithm, and the node location is dynamically updated to identify battery abnormalities, solving the problems of poor detection accuracy and insufficient threshold adaptability in the prior art, and achieving efficient and accurate battery abnormality detection.

CN120396684APending Publication Date: 2025-08-01BYD CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510063511.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing power battery abnormality detection methods fail to effectively consider the dynamic changes of the battery in actual working conditions, resulting in poor detection accuracy, and relying on artificially set thresholds to adapt to individual differences and dynamic changes of the battery, making false alarms or missed alarms.

Method used

The abnormality detection model is constructed using the robust random cutting forest (RRCF) algorithm. By obtaining battery operation data from multiple nodes, the model is dynamically updated to identify battery abnormalities, and avoiding the use of fixed thresholds for judgment.

Benefits of technology

It improves the accuracy and real-timeness of abnormality detection of power batteries, can accurately identify abnormalities under various working conditions and battery characteristics, reduces the probability of false alarms and missed alarms, and improves battery safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120396684A_ABST
    Figure CN120396684A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an anomaly detection method and device, electronic equipment, a vehicle and a storage medium. An anomaly detection model is obtained, the anomaly detection model comprises a plurality of nodes, and each node corresponds to a group of operation data of a battery; adding nodes corresponding to a group of operation data of a to-be-detected target battery in the batteries into the anomaly detection model to obtain a target anomaly detection model; and performing anomaly detection on the target battery based on the position of each node in the target anomaly detection model to obtain a detection result of the target battery. Therefore, the battery abnormity detection accuracy can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular to an anomaly detection method, apparatus, electronic device, vehicle, and storage medium. Background Art

[0002] With the continuous expansion of the new energy vehicle market, as the core component of the vehicle, the safety and stability of power batteries have attracted increasing attention. Abnormal current in power batteries not only may affect the normal operation of the vehicle, but also may trigger serious safety accidents, posing a threat to the safety of passengers and the vehicle. In existing battery anomaly detection methods, usually a maximum threshold and a minimum threshold of current are artificially specified, and when the battery current is higher than the maximum threshold or lower than the minimum threshold, it is determined that the battery is abnormal.

[0003] In the research and practice of existing technologies, it is found that the existing anomaly detection methods do not consider the dynamic changes of the battery under actual working conditions, resulting in poor accuracy of battery anomaly detection. Summary of the Invention

[0004] Embodiments of this application provide an anomaly detection method, apparatus, electronic device, vehicle, and storage medium, which can effectively improve the accuracy of battery anomaly detection.

[0005] To achieve the above object, according to the first aspect of this application, there is provided an anomaly detection method, the method including:

[0006] Obtain an anomaly detection model, where the anomaly detection model includes a plurality of nodes, and each node corresponds to a set of operating data of a battery;

[0007] Add a node corresponding to a set of operating data of a target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model;

[0008] Based on the positions of the nodes in the target anomaly detection model, perform anomaly detection on the target battery to obtain a detection result of the target battery.

[0009] According to the second aspect of this application, there is provided an anomaly detection apparatus, the apparatus including:

[0010] An obtaining module, configured to obtain an anomaly detection model, where the anomaly detection model includes a plurality of nodes, and each node corresponds to a set of operating data of a battery;

[0011] An updating module, configured to add a node corresponding to a set of operating data of a target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model;

[0012] A detection module, configured to perform anomaly detection on the target battery based on the positions of the nodes in the target anomaly detection model, and obtain a detection result of the target battery.

[0013] According to a third aspect of the present application, there is provided an electronic device, including a processor and a memory. The memory stores an application program, and the processor is configured to run the application program in the memory to implement the anomaly detection method provided in the embodiments of the present application.

[0014] According to a fourth aspect of the present application, there is provided a vehicle, where the vehicle includes the battery provided in the first aspect of the present application.

[0015] According to a fifth aspect of the present application, there is provided a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded by a processor to execute the steps in any one of the anomaly detection methods provided in the embodiments of the present application.

[0016] According to a sixth aspect of the present application, there is provided a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium; when the processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps in the anomaly detection method provided in the embodiments of the present application.

[0017] In the anomaly detection method, device, electronic device, vehicle, and storage medium according to the embodiments of the present application, by obtaining an anomaly detection model, the anomaly detection model includes a plurality of nodes, and each node corresponds to a set of operating data of a battery; adding a node corresponding to a set of operating data of the target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model; performing anomaly detection on the target battery based on the positions of the nodes in the target anomaly detection model to obtain a detection result of the target battery. In this way, by constructing an anomaly detection model based on the operating data of multiple batteries and adding the operating data of the battery to be detected as a node to the anomaly detection model, the target battery can be anomalously detected based on the positions of the nodes in the updated target anomaly detection model, without using a manually specified threshold to determine battery anomalies, which is beneficial to accurately identifying abnormal batteries under various working conditions and battery characteristics and effectively improving the accuracy of battery anomaly detection. Description of the Drawings

[0018] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0019] Figure 1 It is a schematic diagram of the implementation scenario of an anomaly detection method provided by an embodiment of the present application;

[0020] Figure 2 It is a schematic flowchart of an anomaly detection method provided by an embodiment of the present application;

[0021] Figure 3a It is a schematic diagram of data preprocessing of an anomaly detection method provided by an embodiment of the present application;

[0022] Figure 3b It is a schematic diagram of model construction of an anomaly detection method provided by an embodiment of the present application;

[0023] Figure 4a It is a schematic flowchart of the specific process of an anomaly detection method provided by an embodiment of the present application;

[0024] Figure 4b It is a schematic flowchart of another specific process of an anomaly detection method provided by an embodiment of the present application;

[0025] Figure 4c It is a schematic flowchart of the overall process of an anomaly detection method provided by an embodiment of the present application;

[0026] Figure 5 It is a schematic diagram of the structure of an anomaly detection device provided by an embodiment of the present application;

[0027] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Specific Embodiments

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.

[0029] In the description of this application, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, "a plurality of" means two or more, unless otherwise specifically defined.

[0030] An embodiment of this application provides an anomaly detection method, apparatus, electronic device, vehicle, and storage medium. Among them, the anomaly detection apparatus may be integrated in the electronic device, and the electronic device may be a server or a device such as a terminal.

[0031] Among them, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal may include, but is not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication methods, and this application does not make any restrictions here.

[0032] Among them, the electronic device may be integrated in the vehicle or may establish a communication connection with the vehicle. The vehicle may be a fuel vehicle, a plug-in hybrid vehicle, or a new energy vehicle, etc., and this application does not make specific limitations on this.

[0033] Please refer to Figure 1 , taking the anomaly detection apparatus integrated in the electronic device as an example, Figure 1 is a schematic diagram of the implementation scenario of the anomaly detection method provided by the embodiment of this application. Among them, the electronic device may obtain an anomaly detection model. The anomaly detection model includes multiple nodes, and each node corresponds to a set of operation data of a battery; a node corresponding to a set of operation data of the target battery to be detected in the battery is added to the anomaly detection model to obtain a target anomaly detection model; based on the positions of the nodes in the target anomaly detection model, the target battery is subjected to anomaly detection to obtain the detection result of the target battery.

[0034] It should be noted that Figure 1The schematic diagram of the implementation environment scenario of the abnormal detection method shown is only an example. The implementation environment scenario of the abnormal detection method described in the embodiments of the present application is for more clearly explaining the technical solutions of the embodiments of the present application, and does not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art know that with the evolution of abnormal detection and the emergence of new business scenarios, the technical solutions provided by the present application are equally applicable to similar technical problems.

[0035] The solution provided by the embodiments of the present application will be specifically described through the following embodiments. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0036] This embodiment will be described from the perspective of the abnormal detection device, which can be specifically integrated in an electronic device.

[0037] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of the abnormal detection method provided by the embodiments of the present application. The abnormal detection method includes:

[0038] Step S101, obtaining an abnormal detection model.

[0039] Among them, the abnormal detection model can include multiple nodes, and each node can correspond to a set of operating data of a battery.

[0040] Among them, the abnormal detection model can be a robust random cut forest model, and the robust random cut forest model can be implemented based on the robust random cut forest (RRCF) algorithm. The RRCF algorithm has good effects on the abnormal detection of high-dimensional and multi-variable data sets, has strong robustness against data sets with noise and outliers, and at the same time, can process large-scale data sets in parallel, with high efficiency and scalability. The node can be a node of the tree in the abnormal detection model, and the operating data can be the data collected during the operation of the battery. For example, it can include data such as current, voltage, temperature, and power.

[0041] Optionally, the abnormal detection model can include at least one tree structure, the tree structure can include at least one node, and the positions of the nodes in the abnormal detection model can include the positions of the nodes relative to the root node of the tree structure to which they belong. The tree structure can be a tree-form data structure, that is, the tree in the abnormal detection model.

[0042] Optionally, the battery can be a power battery, for example, it can be a power battery in a vehicle.

[0043] Optionally, the operating data may include the total electrical parameter value of the battery and the electrical parameter values of each single battery in the battery, and the electrical parameter value may include at least one of a current value, a voltage value, and a power value.

[0044] Among them, there are various ways to obtain the anomaly detection model. For example, a battery data set corresponding to the batteries of at least one device can be obtained; a random cut tree is constructed based on multiple sets of operating data in the battery data set to obtain the anomaly detection model.

[0045] Among them, the device may be a vehicle, a ship, an aircraft, etc., and the battery data set may be data generated based on the batteries of the device, and may include multiple sets of operating data of the batteries.

[0046] In one embodiment, taking the device as a vehicle, the battery as a power battery, and the operating data as current data as an example, the message data of at least one vehicle can be collected, and the message data can be parsed according to the terminal protocol, so that the data related to the current of the power battery can be extracted from the parsed message data, including the total current of the battery pack, the current of the single battery, and the corresponding message timestamp. The extracted current-related data can be divided into two parts. One part can be the current-related data of the power battery within the past three days, as the historical data set D, and the other part can be the current-related data of the power battery parsed and uploaded by the vehicle in real time, as the real-time data stream F. Among them, the current-related data of the power battery of each vehicle is an array, and the array stores the total current of the battery pack of the battery of the vehicle and the currents of all single batteries.

[0047] These current-related data can be subjected to data cleaning. For example, please refer to Figure 3a , Figure 3a is a schematic diagram of data preprocessing of an anomaly detection method provided by an embodiment of the present application. It can perform preliminary data preprocessing on data with missing values and outliers, and can also perform data standardization processing and redundant data processing on the current-related data. The processed historical data set D can be expressed as

[0048] D = {I i , T i , i = 1,..., d}

[0049] Among them, d can represent the number of vehicles in the historical data set, and (I i , T i ) can represent the current-related data of the i-th vehicle at the message timestamp T iThe current data collected at that time. The structure of the real-time data stream F can be consistent with the historical data set D. Using the real-time data stream F, the anomaly detection model can be updated, specifically including two operations. One is to delete nodes according to the maximum number of nodes of each tree and the data validity time, and the other is to insert nodes into the data of the real-time data stream F.

[0050] Then, the historical data set D, that is, the battery data set, can be used for the initialization operation of the anomaly detection model. For example, please refer to Figure 3b , Figure 3b FIG. is a schematic diagram of model construction of an anomaly detection method provided by an embodiment of the present application. Data subsets can be drawn from the input data set D without replacement, and the data subsets are divided. Each division will randomly select a specific feature q from the subset, and then randomly select a division value p from the feature. The p value can be between the maximum and minimum values of the feature values of the feature q. Then, the current sample subset is divided. Samples less than the value p are used as the left child of the current node, and samples greater than the p value are used as the current right child. When all leaf nodes in the constructed tree only contain one data (a set of operation data), the initialization of the anomaly detection model is completed.

[0051] Among them, a set of operation data can correspond to a node, and each data item in a set of operation data can correspond to the feature of the node. For example, when a set of operation data includes {total battery pack current, first section current value, second section current value,...}, the total battery pack current, the first section current, the second section current, etc. can be expressed as the features of the node, and the corresponding current values can be expressed as the feature values corresponding to the features. For example, a certain node {150.6A, 2.12A, 2.34A}, where the included features are the total battery pack current, the first section current, and the second section current. The feature value corresponding to the feature of the total battery pack current is 150.6A.

[0052] Step S102, add a node corresponding to a set of operation data of the target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model.

[0053] Among them, the target battery can be the battery to which the set of operation data to be detected belongs. The target anomaly detection model can be an anomaly detection model added with a node corresponding to a set of operation data of the target battery. The set of operation data of the target battery to be detected can be the data in the real-time data stream F.

[0054] Among them, there are various ways to obtain the target anomaly detection model by adding a node corresponding to a set of operating data of the target battery to be detected in the battery to the anomaly detection model. For example, a set of operating data of the target battery to be detected in the battery can be obtained as the target node in the target tree structure to be inserted into the anomaly detection model; based on the operating data of the target node and each node in the target tree structure, the maximum value and the minimum value in each set of operating data in the target tree structure are statistically calculated; according to the maximum value and the minimum value, the insertion position of the target node in the target tree structure is determined, and the target node is inserted into the target tree structure in the anomaly detection model according to the insertion position to obtain the target anomaly detection model.

[0055] Among them, the target node can be a node corresponding to a set of operating data to be detected of the target battery. The target tree structure can be the tree structure into which the target node is to be inserted, and the insertion position can be the position where the target node is inserted into the target tree structure. The maximum value and the minimum value in each set of operating data can be the maximum value and the minimum value of the feature values of each feature in the target tree structure. For example, assuming that a set of operating data includes the total current value of the battery pack and the current value of each single battery, the maximum value and the minimum value in each set of operating data can include the maximum value and the minimum value of the current value of the total current in the target tree structure, and the maximum value and the minimum value of the current value of each single battery.

[0056] Among them, there are various ways to determine the insertion position of the target node in the target tree structure according to the maximum value and the minimum value. For example, a first difference value can be determined according to the maximum value and the minimum value; according to the first difference value, a splitting feature and a splitting value are determined; based on the splitting feature and the splitting value, the insertion position of the target node in the target tree structure is determined.

[0057] Among them, the first difference value can be information for measuring the value range of the feature value of each feature in the nodes of the target tree structure, and the splitting feature and the splitting value can be information for splitting.

[0058] Among them, there are various ways to determine the insertion position of the target node in the target tree structure based on the splitting feature and the splitting value. For example, if the splitting value is not within the range of the maximum value and the minimum value of the operating data corresponding to the splitting feature, a parent node can be created based on the splitting value, and the insertion position of the target node in the target tree structure is determined according to the size relationship between the operating data corresponding to the splitting feature in the target node and the operating data corresponding to the splitting feature in the parent node; if the splitting value is within the range of the maximum value and the minimum value of the operating data corresponding to the splitting feature, the insertion position of the target node in the target tree structure can be determined according to the size relationship between the operating data corresponding to the splitting feature in the target node and the operating data corresponding to the splitting feature in the root node of the target tree structure.

[0059] In one embodiment, please refer to Figure 4a , Figure 4a which is a schematic diagram of the specific process of an anomaly detection method provided by an embodiment of the present application. Assume that it is necessary to insert a node p (target node) into a tree T (target tree structure). Assume that the root node of the tree T is Q. The maximum and minimum values of the eigenvalues of each feature including all nodes in T and node p can be calculated. For example, let

[0060] max_new(i) = max(p, xmin(i), xmax(i))

[0061] min_new(i) = min(p, xmin(i), xmax(i))

[0062] where xmin(i) can be the minimum value of the eigenvalue of the i-th feature in the node, and xmax(i) can be the maximum value of the eigenvalue of the i-th feature in the node.

[0063] Then, the maximum value of the eigenvalue of each feature minus the minimum value can be calculated to obtain the maximum-minimum difference of each feature. The sum of these maximum-minimum differences is calculated, and a number is randomly selected between the sum of the maximum-minimum differences and 0 to obtain a first difference value, denoted as r here. Specifically, it can be randomly selected from

[0064] [0, ∑i(max_new(i) - min_new(i))]

[0065] to obtain a first anomaly value. Then, a minimum number of features can be found such that the sum of the maximum-minimum differences of these features is not less than r. This minimum number of features can be denoted as j.

[0066] J = argmin{j|Σi(max_new(i) - min_new(i)) >= r}

[0067] Thus, the sum of the maximum-minimum differences of these j features can be calculated, and the minimum value of the eigenvalue of the j-th feature is added, and then r is subtracted to obtain a splitting value, denoted as c, and the j-th feature is the splitting feature. c can be expressed as

[0068] C = min_new(j) + Σ(i, j)(max_new(i) - min_new(i)) - r

[0069] Among them, for the splitting value c, if it is not within the minimum and maximum value interval [min_new(j), max_new(j)] of the j-th feature (i.e., the splitting feature), a new parent node C can be created for c. If the root node Q of the tree T has a parent node, then Q can be replaced with C. Then, if the feature value of the j-th feature of node p is less than C, node p can be inserted into the left child node of C, and node Q can be used as the right child node of C. If the feature value of the j-th feature of node p is not less than C, node p can be inserted into the right child node of C, and node Q can be used as the left child node of C.

[0070] If the splitting value C is within the minimum and maximum value interval of the feature values of the j-th feature, and the feature value of the j-th feature of node p is less than the feature value of the j-th feature of the root node Q, then node P is inserted into the left subtree of T, otherwise node p is inserted into the right subtree of T.

[0071] Optionally, if the splitting value C is within the minimum and maximum value interval of the feature values of the j-th feature, T1 can be set as the left subtree of the root node Q, and T2 can be set as the right subtree of the root node Q. At the same time, determine that the dimension of Q is k, and re-determine a splitting value as q. If the value of node p(k) is less than or equal to q, then node p can be inserted into the left subtree of C, otherwise, node p can be inserted into the right subtree of C.

[0072] Optionally, nodes in the target anomaly detection model can also be deleted to update the target anomaly detection model. For example, the timestamp information of the running data corresponding to each node in the target anomaly detection model can be obtained; based on the timestamp information, the first node to be deleted is determined in the target anomaly detection model; and the first node is deleted.

[0073] Among them, the timestamp information can be information including the generation time of the running data. For example, it can be used to record the time when the running data is collected or created. For instance, it can be the message timestamp corresponding to the running data. The first node can be the node to be deleted in the target anomaly detection model.

[0074] Among them, there are various ways to determine the first node to be deleted in the target anomaly detection model based on the timestamp information. For example, if there is a tree structure to be updated in the target anomaly detection model with the number of nodes greater than the preset node number threshold, based on the timestamp information corresponding to each node in the tree structure to be updated, the first node to be deleted is screened out from the nodes in the tree structure to be updated; the node with the timestamp information exceeding the data valid time is used as the first node to be deleted.

[0075] Among them, the preset node quantity threshold can be a preset node quantity threshold, which can be the maximum quantity of nodes included in the tree structure. The tree structure to be updated can be a tree structure with the number of nodes greater than the preset node quantity threshold. The data validity period can be the time used to measure whether the running data is valid. For example, when the data validity period is June 15, 20xx, the timestamp information of the running data corresponding to the nodes in the tree structure that is before June 15, 20xx can be invalid data, and the corresponding nodes can be determined as the nodes to be deleted.

[0076] Among them, based on the timestamp information corresponding to each node in the tree structure to be updated, there can be various ways to screen out the first nodes to be deleted among the nodes of the tree structure to be updated. For example, the nodes with relatively earlier timestamp information can be determined as the first nodes to be deleted.

[0077] In an embodiment, if there is a second node at the same level as the first node, the parent node corresponding to the first node can be replaced by the second node at the same level. For example, please refer to Figure 4b , Figure 4b is another specific process schematic diagram of an anomaly detection method provided by an embodiment of the present application. After finding the node u (i.e., the first node) to be deleted in the tree, if there is a node v (i.e., the second node) at the same level as the first node, the parent node of v can be deleted, and u can be used to replace the parent node, so that the minimum-maximum value interval of the feature value that can be taken by the features of each node can be updated upward from u.

[0078] Step S103, based on the positions of the nodes in the target anomaly detection model, perform anomaly detection on the target battery to obtain the detection result of the target battery.

[0079] Among them, the positions of the nodes in the target anomaly detection model can include the positions of the nodes relative to the root node of the tree structure to which they belong. The detection result can be the result of performing anomaly detection on the target battery, and can include results such as normal and abnormal.

[0080] Among them, based on the positions of the nodes in the target anomaly detection model, there can be various ways to perform anomaly detection on the target battery to obtain the detection result of the target battery. For example, based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, calculate the target anomaly information of the target node corresponding to the target battery; based on the target anomaly information, perform anomaly detection on the target battery to obtain the detection result of the target battery.

[0081] Among them, the target anomaly information can be information indicating the degree of anomaly of the target node, and the target node can be the node corresponding to a set of running data of the target battery to be detected in the target tree structure.

[0082] Among them, there are various ways to calculate the target anomaly information of the target node corresponding to the target battery based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong. For example, based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, the first complexity of the target tree structure to which the target node corresponding to the target battery belongs can be calculated; the second complexity of the target tree structure before inserting the target node is obtained; based on the first complexity and the second complexity, the target anomaly information corresponding to the target node in the target tree structure is calculated.

[0083] Among them, the target tree structure can be the tree structure into which the target node is inserted. The first complexity can be the complexity of the target tree structure after inserting the target node, and the second complexity can be the complexity of the target tree structure before inserting the target node. If a new node is inserted into the tree, the greater the change in the complexity of the tree, the greater the degree of anomaly. And the complexity of the tree is equal to the sum of the depths of all nodes, and the depth of a node is defined as the number of steps from the root node to the leaf node where the node is located.

[0084] Among them, there are various ways to calculate the first complexity of the target tree structure to which the target node corresponding to the target battery belongs based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong. For example, based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, the distances of the nodes in the target tree structure relative to the root node of the target tree structure are statistically obtained to get the depth values of the nodes; the depth values of the nodes are accumulated to obtain the first complexity of the target tree structure.

[0085] Among them, the depth value can be the number of steps from the node to the root node of the tree structure where it is located.

[0086] Among them, there are various ways to calculate the target anomaly information corresponding to the target node in the target tree structure based on the first complexity and the second complexity. For example, the first complexity can be subtracted from the second complexity to obtain the target anomaly information corresponding to the target node in the target tree structure.

[0087] After calculating the target anomaly information of the target node corresponding to the target battery based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, the target battery can be anomalously detected based on the target anomaly information to obtain the detection result of the target battery. Among them, there are various ways to anomalously detect the target battery based on the target anomaly information to obtain the detection result of the target battery. For example, the anomaly information corresponding to other nodes in the target tree structure to which the target node belongs can be obtained; based on the target anomaly information and the anomaly information, the anomaly information distribution characteristics are calculated; based on the anomaly information distribution characteristics, the target battery is anomalously detected to obtain the detection result of the target battery.

[0088] Among them, the abnormal information may be information indicating the degree of abnormality of other nodes in the target tree structure, and the other nodes may be nodes different from the target node in the target tree structure. The abnormal information distribution feature may be information for measuring the distribution of the degrees of abnormality of each node in the target tree structure.

[0089] Optionally, the abnormal information distribution feature may include a mean value and a standard deviation.

[0090] Optionally, the abnormal information corresponding to other nodes may also be determined by the change in the complexity of the target tree structure before and after node insertion.

[0091] Among them, there are various ways to perform abnormal detection on the target battery based on the abnormal information distribution feature to obtain the detection result of the target battery. For example, when the abnormal information distribution feature includes a mean value and a standard deviation, a target feature interval corresponding to the target tree structure may be determined based on the mean value and the standard deviation; based on the target feature interval and the target abnormal information, the detection result of the abnormal detection of the target battery is determined.

[0092] Among them, the target feature interval may be an interval for measuring whether there is an abnormality in the operation data corresponding to the node. For example, the 3σ criterion can be used to calculate the target feature interval corresponding to the target tree structure based on the mean value and the standard deviation. The target feature interval can be expressed as [u - 3σ, u + 3σ], where u represents the mean value and σ represents the standard deviation. The 3σ criterion (Three Sigma Rule), also known as the 3σ criterion, is a commonly used statistical method that can be used to identify outliers or extreme points in a dataset. In statistics, σ can represent the standard deviation. The basic principle of the 3σ criterion is: in a dataset following a normal distribution, approximately 68% of the data points fall within one standard deviation of the mean (i.e., mean ± 1σ), approximately 95% of the data points fall within two standard deviations (mean ± 2σ), and approximately 99.7% of the data points fall within three standard deviations (mean ± 3σ). Therefore, according to the 3σ criterion, if the distance between the value of a data point and the mean exceeds 3 standard deviations, then this data point can be regarded as an outlier or extreme point.

[0093] Among them, there are various ways to determine the detection result of the abnormal detection of the target battery based on the target feature interval and the target abnormal information. For example, when the target abnormal information is within the target feature interval, it can be determined that the detection result of the target battery is normal; when the target abnormal information is not within the target feature interval, it can be determined that the detection result of the target battery is abnormal.

[0094] Optionally, the tree structure in the anomaly detection model may include multiple ones. When adding a target node to the anomaly detection model, the target node can be added to each tree structure of the anomaly detection model. Therefore, there can be multiple target tree structures. Correspondingly, there can be multiple ways to determine the detection result of anomaly detection for the target battery based on the target feature interval and the target anomaly information. For example, the sub-detection result of the target battery for the target tree structure can be determined based on the target feature interval and the target anomaly information; and the detection result of anomaly detection for the target battery can be determined based on the sub-detection result.

[0095] Among them, there can be multiple ways to determine the sub-detection result of the target battery for the target tree structure based on the target feature interval and the target anomaly information. For example, if the target anomaly information corresponding to the target tree structure is not within the target feature interval, it can be determined that the sub-detection result of the target battery for the target tree structure is an abnormal result; if the target anomaly information corresponding to the target tree structure is within the target feature interval, it can be determined that the sub-detection result of the target battery for the target tree structure is a normal result.

[0096] Among them, there can be multiple ways to determine the detection result of anomaly detection for the target battery based on the sub-detection result. For example, the total number of target tree structures and a preset anomaly ratio can be obtained. When the ratio of the number indicating that the target battery has an anomaly in the sub-detection result to the total number of target tree structures is greater than the preset anomaly ratio, it can be determined that the target battery has an anomaly. When the ratio of the number indicating that the target battery has an anomaly in the sub-detection result to the total number of target tree structures is not greater than the preset anomaly ratio, it can be determined that the target battery is normal.

[0097] Optionally, if the detection result indicates that the target battery has an anomaly, an anomaly warning process is performed on the target device to which the target battery belongs.

[0098] Among them, the target device can be the device to which the target battery belongs.

[0099] Optionally, for the target battery after warning, the corresponding node can be deleted.

[0100] With the continuous expansion of the new energy vehicle market, as the core component of it, the safety and stability of power batteries have attracted increasing attention. Abnormal current in power batteries not only may affect the normal operation of vehicles, but also may trigger serious safety accidents, posing a threat to the safety of occupants and vehicles. In the monitoring of abnormal current in power batteries, currently, usually a maximum threshold and a minimum threshold of current are artificially specified. When the current of the battery is higher than the maximum threshold or lower than the minimum threshold, a warning message is issued. However, there are the following disadvantages in using fixed thresholds for analyzing abnormal current in power batteries:

[0101] 1. Lack of adaptability. Battery current is affected by factors such as temperature and load changes. Fixed thresholds cannot be dynamically adjusted to accommodate these variables, potentially leading to failure to identify truly abnormal currents under extreme conditions.

[0102] 2. Ignoring individual battery differences. Batteries from different batches and manufacturers, even with the same specifications, may have subtle differences in performance parameters. Fixed thresholds fail to fully account for these individual differences, potentially leading to overly strict or lenient current judgments for certain batteries. Furthermore, battery performance gradually declines with age and cycle count, manifesting as changes in current characteristics. Fixed thresholds fail to adjust as batteries age, potentially leading to inaccurate current status judgments for aged batteries.

[0103] 3. Ignoring dynamic changes. During rapid battery charging and discharging, startup, or sudden power changes, the current may experience brief fluctuations. Fixed thresholds may not effectively distinguish these transient phenomena from true current anomalies, leading to false positives or missed alarms.

[0104] Therefore, improving the fixed-threshold current anomaly detection method, so that power battery current anomaly detection is independent of pre-defined thresholds, will facilitate accurate anomaly identification under various operating conditions and battery characteristics, reduce the probability of false positives and missed positives, and significantly improve vehicle safety. On the other hand, regarding the real-time nature of warnings, many solutions rely on pre-trained models for anomaly warnings. However, after fine-tuning the usage scenario or object orientation, the model's performance degrades and retraining is likely required, significantly increasing the cost of updating the model. Therefore, how to cost-effectively update existing models while ensuring their real-time effectiveness has become a pressing issue.

[0105] As can be seen, most existing battery anomaly detection methods use predefined thresholds to provide warnings for current anomalies. They often focus on the overall health of the battery, rarely providing warnings for detailed current anomalies. Furthermore, existing battery anomaly detection methods completely ignore the complexity and cost of model updates, resulting in low battery anomaly detection efficiency.

[0106] To this end, an embodiment of the present application provides an anomaly detection method based on the RRCF algorithm for dynamically analyzing vehicles with abnormal power battery current. This method can detect current anomalies without manually setting thresholds, eliminating the need to use artificially defined current thresholds for anomaly judgment, which is conducive to accurately identifying anomalies under various operating conditions and battery characteristics. At the same time, the model can be updated in real time at a relatively low cost, thereby ensuring that the data involved in current anomaly detection is the latest and does not require retraining, saving time and training resources and greatly improving the efficiency of battery anomaly detection.

[0107] In one embodiment, please refer to Figure 4c , Figure 4c which is a schematic diagram of the overall process of an anomaly detection method provided by an embodiment of the present application. Taking the device as a vehicle and the operation data as current data as an example, the message (CAN) data of the vehicle can be collected, the historical data within three days can be parsed and preprocessed, the total current of the battery pack and the current of each single battery of each battery pack can be selected to form a historical data set D, the RRCF algorithm can be used to initialize the tree building for the data set D to obtain an anomaly detection model, and the anomaly value (i.e., anomaly information) of each node can be calculated. In addition, the real-time collected data of the vehicle can be parsed and preprocessed, the total current of the battery pack and the current of each single battery of each battery pack can be selected to form a real-time data stream F. For the initialized tree in the anomaly detection model, nodes can be deleted according to the maximum number of nodes of the tree and the data valid time. At the same time, nodes can be inserted into the data stream F. Calculate the mean u and standard deviation σ of the anomaly values of all nodes, and according to the 3σ principle, select the vehicles corresponding to the anomaly values that are not in the target feature interval [u - 3σ, u + 3σ] and give early warnings to them.

[0108] As can be seen from the above, in the embodiment of the present application, an anomaly detection model is obtained. The anomaly detection model includes multiple nodes, and each node corresponds to a set of operation data of a battery; a node corresponding to a set of operation data of a target battery to be detected in the battery is added to the anomaly detection model to obtain a target anomaly detection model; based on the positions of the respective nodes in the target anomaly detection model, the target battery is subjected to anomaly detection to obtain a detection result of the target battery. In this way, by constructing an anomaly detection model based on the operation data of multiple groups of batteries and taking the operation data of the battery to be detected as a node and adding it to the anomaly detection model, the target battery can be subjected to anomaly detection based on the positions of the respective nodes in the updated target anomaly detection model, without using a manually specified threshold for anomaly judgment of the battery, which is beneficial to accurately identifying abnormal batteries under various working conditions and battery characteristics and effectively improving the accuracy of battery anomaly detection.

[0109] To facilitate better implementation of the anomaly detection method provided by the embodiment of the present application, the embodiment of the present application also provides a device based on the above anomaly detection method. The meanings of the nouns are the same as those in the above anomaly detection method, and the specific implementation details can refer to the description in the method embodiment.

[0110] For example, as Figure 5 shown, which is a schematic structural diagram of the anomaly detection device provided by the embodiment of the present application. The anomaly detection device may include an acquisition module 201, an update module 202, and a detection module 203, specifically as follows:

[0111] An acquisition module 201, configured to acquire an anomaly detection model, where the anomaly detection model includes multiple nodes, and each node corresponds to a set of operation data of a battery;

[0112] An update module 202, configured to add a node corresponding to a set of operation data of a target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model;

[0113] A detection module 203, configured to perform anomaly detection on the target battery based on the positions of the nodes in the target anomaly detection model to obtain a detection result of the target battery.

[0114] In one embodiment, the anomaly detection model includes at least one tree structure, the tree structure includes at least one node, and the positions of the nodes in the target anomaly detection model include the positions of the nodes relative to the root node of the tree structure to which they belong.

[0115] In one embodiment, the detection module 203 includes:

[0116] A calculation sub-module, configured to calculate target anomaly information of a target node corresponding to the target battery based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong;

[0117] A detection sub-module, configured to perform anomaly detection on the target battery based on the target anomaly information to obtain a detection result of the target battery.

[0118] In one embodiment, the calculation sub-module is configured to:

[0119] Calculate a first complexity of the target tree structure to which the target node corresponding to the target battery belongs based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong; <C

[0120] Obtain a second complexity of the target tree structure before inserting the target node;

[0121] Calculate target anomaly information corresponding to the target node in the target tree structure based on the first complexity and the second complexity.

[0122] In one embodiment, the above-mentioned calculation of the first complexity of the target tree structure to which the target node corresponding to the target battery belongs based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong is specifically configured to:

[0123] Based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, count the distances of the nodes in the target tree structure relative to the root node of the target tree structure to obtain the depth values of the nodes;

[0124] Accumulate the depth values of the nodes to obtain the first complexity of the target tree structure.

[0125] In one embodiment, the detection subunit is configured to:

[0126] Obtain the abnormal information corresponding to other nodes in the target tree structure to which the target node belongs;

[0127] Calculate the abnormal information distribution characteristics based on the target abnormal information and the abnormal information;

[0128] Perform abnormal detection on the target battery based on the abnormal information distribution characteristics to obtain the detection result of the target battery.

[0129] In one embodiment, the abnormal information distribution characteristics include the mean value and the standard deviation. The above-mentioned performing abnormal detection on the target battery based on the abnormal information distribution characteristics to obtain the detection result of the target battery is specifically configured to:

[0130] Determine the target feature interval corresponding to the target tree structure based on the mean value and the standard deviation;

[0131] Determine the detection result of performing abnormal detection on the target battery based on the target feature interval and the target abnormal information.

[0132] In one embodiment, there are multiple target tree structures. The above-mentioned determining the detection result of performing abnormal detection on the target battery based on the target feature interval and the target abnormal information is specifically configured to:

[0133] Determine the sub-detection result of the target battery for the target tree structure based on the target feature interval and the target abnormal information;

[0134] Determine the detection result of performing abnormal detection on the target battery based on the sub-detection result.

[0135] In one embodiment, the above-mentioned determining the sub-detection result of the target battery for the target tree structure based on the target feature interval and the target abnormal information is specifically configured to:

[0136] If the target abnormal information corresponding to the target tree structure is not within the target feature interval, determine that the sub-detection result of the target battery for the target tree structure is an abnormal result;

[0137] If the target abnormal information corresponding to the target tree structure is within the target feature interval, determine that the sub-detection result of the target battery for the target tree structure is a normal result.

[0138] In one embodiment, the abnormal detection device further includes:

[0139] An abnormal warning module, configured to perform abnormal warning processing on the target device to which the target battery belongs if the detection result indicates that the target battery is abnormal.

[0140] In one embodiment, the operation data includes the total electrical parameter values of the battery and the electrical parameter values of each single battery in the battery, and the electrical parameter values include at least one of a current value, a voltage value, and a power value.

[0141] In one embodiment, the obtaining module 201 is configured to:

[0142] Obtain a battery data set corresponding to the battery of at least one device;

[0143] Construct a random cut tree based on multiple sets of operation data in the battery data set to obtain an anomaly detection model.

[0144] In one embodiment, the updating module 202 includes:

[0145] A node determination sub-module, configured to obtain a set of operation data of a target battery to be detected in the battery as a target node in a target tree structure to be inserted into the anomaly detection model;

[0146] A range statistics sub-module, configured to statistically calculate the maximum value and the minimum value in each set of operation data in the target tree structure based on the operation data of the target node and each node in the target tree structure;

[0147] A position determination sub-module, configured to determine the insertion position of the target node in the target tree structure according to the maximum value and the minimum value, and insert the target node into the target tree structure in the anomaly detection model according to the insertion position to obtain a target anomaly detection model.

[0148] In one embodiment, the position determination sub-module is configured to:

[0149] Determine a first difference value according to the maximum value and the minimum value;

[0150] Determine a segmentation feature and a segmentation value according to the first difference value;

[0151] Determine the insertion position of the target node in the target tree structure based on the segmentation feature and the segmentation value.

[0152] In one embodiment, the above-mentioned determining the insertion position of the target node in the target tree structure based on the segmentation feature and the segmentation value is specifically configured to:

[0153] If the segmentation value is not within the interval of the maximum value and the minimum value of the operation data corresponding to the segmentation feature, create a parent node based on the segmentation value, and determine the insertion position of the target node in the target tree structure according to the size relationship between the operation data corresponding to the segmentation feature in the target node and the operation data corresponding to the segmentation feature in the parent node;

[0154] If the splitting value is within the range of the maximum and minimum values of the operation data corresponding to the splitting feature, determine the insertion position of the target node in the target tree structure according to the magnitude relationship between the operation data corresponding to the splitting feature in the target node and the operation data corresponding to the splitting feature in the root node of the target tree structure.

[0155] In one embodiment, the anomaly detection device further includes a node deletion module for:

[0156] Obtain the timestamp information of the operation data corresponding to each node in the target anomaly detection model;

[0157] Based on the timestamp information, determine the first node to be deleted in the target anomaly detection model;

[0158] Delete the first node.

[0159] In one embodiment, the above-mentioned determining the first node to be deleted in the target anomaly detection model based on the timestamp information is specifically used for:

[0160] If there is a tree structure to be updated with the number of nodes greater than the preset node number threshold in the target anomaly detection model, based on the timestamp information corresponding to each node in the tree structure to be updated, screen out the first node to be deleted among the nodes in the tree structure to be updated;

[0161] Take the node whose timestamp information exceeds the data valid time as the first node to be deleted.

[0162] In one embodiment, the anomaly detection device is further specifically used for:

[0163] Replace the parent node corresponding to the first node with the second node at the same level.

[0164] As can be seen from the above, in the embodiment of the present application, the acquisition module 2**01** acquires the anomaly detection model, and the anomaly detection model includes multiple nodes, and each node corresponds to a set of operation data of a battery; the update module 2**02** adds a node corresponding to a set of operation data of the target battery to be detected in the battery in the anomaly detection model to obtain the target anomaly detection model; the detection module 2**03** performs anomaly detection on the target battery based on the positions of the respective nodes in the target anomaly detection model to obtain the detection result of the target battery. In this way, by constructing an anomaly detection model based on the operation data of multiple groups of batteries and adding the operation data of the battery to be detected as a node in the anomaly detection model, the target battery can be subjected to anomaly detection based on the positions of the respective nodes in the updated target anomaly detection model, without using a manually specified threshold to determine the anomaly of the battery, which is beneficial to accurately identifying abnormal batteries under various working conditions and battery characteristics and effectively improving the accuracy of battery anomaly detection.

[0165] Correspondingly, an embodiment of the present application further provides an electronic device, such as Figure 6 shown in Figure 6 is a schematic structural diagram of the electronic device provided by the embodiment of the present application. The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored on the memory 302 and executable on the processor. Among them, the processor 301 is electrically connected to the memory 302. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and it may include more or fewer components than shown in the figure, or combine some components, or arrange different components.

[0166] The processor 301 is the control center of the electronic device 300, connecting various parts of the entire electronic device 300 through various interfaces and lines. By running or loading software programs and / or units stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device 300 and processes data. The processor 301 may be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.

[0167] In the embodiment of the present application, the processor 301 in the electronic device 300 will load the instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions, such as:

[0168] Obtain an anomaly detection model, where the anomaly detection model includes multiple nodes, and each node corresponds to a set of operating data of a battery; add a node corresponding to a set of operating data of a target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model; based on the positions of the nodes in the target anomaly detection model, perform anomaly detection on the target battery to obtain the detection result of the target battery.

[0169] Furthermore, for the various functions implemented by running the application programs stored in the memory 302, reference may also be made to the descriptions in the foregoing embodiments, which will not be elaborated herein.

[0170] For the specific implementation of each of the above operations, reference may be made to the previous embodiments, which will not be elaborated herein.

[0171] Optionally, such as Figure 6As shown, the electronic device 300 further includes: a touch display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. Among them, the processor 301 is electrically connected to the touch display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307 respectively. Those skilled in the art can understand that Figure 6 the structure of the electronic device shown in

[0172] does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 301, and can receive commands sent by the processor 301 and execute them. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits it to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiments of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to achieve the input function.

[0173] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and transmit and receive signals with the network device or other electronic devices.

[0174] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and then converted into audio data. After the audio data is output and processed by the processor 301, it is sent via the radio frequency circuit 304 to, for example, another electronic device, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earphone jack to provide communication between the peripheral earphone and the electronic device.

[0175] The input unit 306 can be used to receive an input target video, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0176] The power supply 307 is used to supply power to each component of the electronic device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 307 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0177] Although Figure 6 not shown in the figure, the electronic device 300 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be elaborated here.

[0178] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. It should be noted that the electronic device provided in the embodiments of the present application and the abnormal detection method in the above embodiments belong to the same concept. The specific implementation process is detailed in the above method embodiments and will not be elaborated here.

[0179] As described above, the electronic device provided by the embodiment of the present application can obtain an anomaly detection model, where the anomaly detection model includes multiple nodes, and each node corresponds to a set of operation data of a battery; add a node corresponding to a set of operation data of the target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model; based on the positions of the nodes in the target anomaly detection model, perform anomaly detection on the target battery to obtain the detection result of the target battery. In this way, by constructing an anomaly detection model based on the operation data of multiple batteries and adding the operation data of the battery to be detected as a node to the anomaly detection model, the anomaly detection of the target battery can be performed based on the positions of the nodes in the updated target anomaly detection model, without using a manually specified threshold to determine battery anomalies, which is beneficial to accurately identifying abnormal batteries under various working conditions and battery characteristics and effectively improving the accuracy of battery anomaly detection.

[0180] Those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned various methods can be completed by instructions or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0181] Therefore, the embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program runs on an electronic device, the computer program is used to make the electronic device execute any anomaly detection method provided by the embodiment of the present application. For example, the computer program can execute the steps of the following anomaly detection method:

[0182] Obtain an anomaly detection model, where the anomaly detection model includes multiple nodes, and each node corresponds to a set of operation data of a battery; add a node corresponding to a set of operation data of the target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model; based on the positions of the nodes in the target anomaly detection model, perform anomaly detection on the target battery to obtain the detection result of the target battery.

[0183] Furthermore, for the refinement steps of the above method steps, reference can also be made to the description in the foregoing embodiments, which will not be elaborated herein.

[0184] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated herein.

[0185] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

[0186] Since the computer program stored in the computer-readable storage medium can execute any of the anomaly detection methods provided in the embodiments of the present application, the beneficial effects achievable by any of the anomaly detection methods provided in the embodiments of the present application can be realized. For details, refer to the previous embodiments and will not be elaborated herein.

[0187] According to one aspect of the present application, there is also provided a computer program product, including a computer program, where the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to execute the methods provided in various alternative implementations in the above embodiments.

[0188] In the above embodiments of the anomaly detection device, computer-readable storage medium, electronic device, and computer program product, the descriptions of the respective embodiments have their own focuses. For parts not elaborated in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. Those skilled in the art can clearly understand that for the sake of convenience and brevity of description, the specific working processes and the beneficial effects brought about by the above-described anomaly detection device, computer-readable storage medium, computer program product, electronic device, and their corresponding units can refer to the description of the anomaly detection method in the above embodiments and will not be elaborated herein specifically.

[0189] The above has introduced in detail an anomaly detection method, device, electronic device, vehicle, computer-readable storage medium, and computer program product provided by the embodiments of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, based on the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. An anomaly detection method, characterized in that, Including: Obtain an anomaly detection model, where the anomaly detection model includes multiple nodes, and each node corresponds to a set of operating data of a battery; Add a node corresponding to a set of operating data of a target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model; Based on the positions of the nodes in the target anomaly detection model, perform anomaly detection on the target battery to obtain a detection result of the target battery.

2. The anomaly detection method according to claim 1, wherein The anomaly detection model includes at least one tree structure, the tree structure includes at least one node, and the positions of the nodes in the target anomaly detection model include the positions of the nodes relative to the root node of the tree structure to which they belong.

3. The anomaly detection method according to claim 2, wherein, The performing anomaly detection on the target battery based on the positions of the nodes in the target anomaly detection model to obtain a detection result of the target battery includes: Based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, calculate target anomaly information of a target node corresponding to the target battery; Based on the target anomaly information, perform anomaly detection on the target battery to obtain a detection result of the target battery.

4. The anomaly detection method according to claim 3, wherein The calculating target anomaly information of a target node corresponding to the target battery based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong includes: Based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, calculate a first complexity of a target tree structure to which the target node corresponding to the target battery belongs; Obtain a second complexity of the target tree structure before inserting the target node; Based on the first complexity and the second complexity, calculate target anomaly information corresponding to the target node in the target tree structure.

5. The anomaly detection method according to claim 4, wherein The calculating a first complexity of a target tree structure to which the target node corresponding to the target battery belongs based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong includes: Based on the positions of the nodes in the target anomaly detection model relative to the root node of the tree structure to which they belong, count the distances of the nodes in the target tree structure relative to the root node of the target tree structure to obtain depth values of the nodes; Accumulate the depth values of the nodes to obtain the first complexity of the target tree structure.

6. The anomaly detection method according to claim 3, wherein The performing anomaly detection on the target battery based on the target anomaly information to obtain a detection result of the target battery includes: Obtain anomaly information corresponding to other nodes in the target tree structure to which the target node belongs; Based on the target anomaly information and the anomaly information, calculate an anomaly information distribution feature; Based on the anomaly information distribution feature, perform anomaly detection on the target battery to obtain a detection result of the target battery.

7. The anomaly detection method according to claim 6, wherein The anomaly information distribution feature includes an average value and a standard deviation, and the performing anomaly detection on the target battery based on the anomaly information distribution feature to obtain a detection result of the target battery includes: Based on the average value and the standard deviation, determine a target feature interval corresponding to the target tree structure; Determine the detection result of anomaly detection for the target battery based on the target feature interval and the target anomaly information.

8. The anomaly detection method according to claim 7, wherein There are multiple target tree structures. The determining the detection result of anomaly detection for the target battery based on the target feature interval and the target anomaly information includes: Determine the sub-detection result of the target battery for the target tree structure based on the target feature interval and the target anomaly information; Determine the detection result of anomaly detection for the target battery based on the sub-detection result.

9. The anomaly detection method according to claim 8, wherein The determining the sub-detection result of the target battery for the target tree structure based on the target feature interval and the target anomaly information includes: If the target anomaly information corresponding to the target tree structure is not within the target feature interval, determine that the sub-detection result of the target battery for the target tree structure is an abnormal result; If the target anomaly information corresponding to the target tree structure is within the target feature interval, determine that the sub-detection result of the target battery for the target tree structure is a normal result.

10. The anomaly detection method according to claim 1, wherein The method further includes: If the detection result indicates that the target battery is abnormal, perform abnormal warning processing on the target device to which the target battery belongs.

11. The anomaly detection method according to claim 1, wherein The operating data includes the total electrical parameter value of the battery and the electrical parameter values of each single battery in the battery. The electrical parameter value includes at least one of a current value, a voltage value, and a power value.

12. The anomaly detection method according to claim 1, wherein The obtaining the anomaly detection model includes: Obtain a battery data set corresponding to the batteries of at least one device; Construct a random cut tree based on multiple sets of operating data in the battery data set to obtain an anomaly detection model.

13. The anomaly detection method according to claim 1, characterized in that The adding a node corresponding to a set of operating data of the target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model includes: Obtain a set of operating data of the target battery to be detected in the battery as the target node to be inserted into the target tree structure of the anomaly detection model; Based on the target node and the operating data of each node in the target tree structure, count the maximum value and the minimum value in each set of operating data in the target tree structure; According to the maximum value and the minimum value, determine the insertion position of the target node in the target tree structure, and insert the target node into the target tree structure in the anomaly detection model according to the insertion position to obtain a target anomaly detection model.

14. The anomaly detection method according to claim 13, wherein The determining the insertion position of the target node in the target tree structure according to the maximum value and the minimum value includes: Determine a first difference value according to the maximum value and the minimum value; Determine a splitting feature and a splitting value according to the first difference value; Based on the splitting feature and the splitting value, determine the insertion position of the target node in the target tree structure.

15. The anomaly detection method according to claim 14, wherein The determining the insertion position of the target node in the target tree structure based on the splitting feature and the splitting value includes: If the segmentation value is not within the range of the maximum and minimum values of the operation data corresponding to the segmentation feature, a parent node is created based on the segmentation value, and the insertion position of the target node in the target tree structure is determined according to the size relationship between the operation data corresponding to the segmentation feature in the target node and the operation data corresponding to the segmentation feature in the parent node; If the segmentation value is within the range of the maximum and minimum values of the operation data corresponding to the segmentation feature, the insertion position of the target node in the target tree structure is determined according to the size relationship between the operation data corresponding to the segmentation feature in the target node and the operation data corresponding to the segmentation feature in the root node of the target tree structure.

16. The anomaly detection method according to any one of claims 1-15, characterized in that, The method further includes: Obtaining the timestamp information of the operation data corresponding to each node in the target anomaly detection model; Determining a first node to be deleted in the target anomaly detection model based on the timestamp information; Deleting the first node.

17. The anomaly detection method according to claim 16, wherein, The determining a first node to be deleted in the target anomaly detection model based on the timestamp information includes: If there is a tree structure to be updated with the number of nodes greater than the preset node number threshold in the target anomaly detection model, filtering out the first node to be deleted from the nodes in the tree structure to be updated based on the timestamp information corresponding to each node in the tree structure to be updated; Taking the node whose timestamp information exceeds the data valid time as the first node to be deleted.

18. The anomaly detection method according to claim 16, characterized in that, The method further includes: Replacing the parent node corresponding to the first node with a second node at the same level.

19. An anomaly detection device, characterized in that, including: An acquisition module, configured to acquire an anomaly detection model, where the anomaly detection model includes a plurality of nodes, and each node corresponds to a set of operation data of a battery; An update module, configured to add a node corresponding to a set of operation data of a target battery to be detected in the battery to the anomaly detection model to obtain a target anomaly detection model; A detection module, configured to perform anomaly detection on the target battery based on the positions of the respective nodes in the target anomaly detection model to obtain a detection result of the target battery.

20. An electronic device, characterized in that, It includes a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the steps of any one of claims 1 to 18.

21. A vehicle, characterized in that, The vehicle includes the battery according to any one of claims 1 to 18.

22. A computer-readable storage medium, characterized in that, It includes a computer program, and when the computer program runs on an electronic device, the computer program is used to cause the electronic device to execute the steps of any one of claims 1 to 18.

23. A computer program product, characterized in that, including a computer program or instruction, and when the computer program or instruction is executed by a processor, the steps of any one of claims 1 to 18 are implemented.

Citation Information

Cited By

  • Battery detection control method and system of charging pile, terminal and storage medium

    CN120735644A