A battery abnormal data clustering method and a clustering device

CN120724189BActive Publication Date: 2026-10-16CHINA FAW CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510852219.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2026-10-16
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

(3)抗噪性弱,时间序列的时域特征受噪声干扰,仅计算时域相似性无法准确抽取其特征,导致最终的事件模型存在偏差,可靠性不足

Benefits of technology

[0013] The battery anomaly data clustering method and device provided in this application determine an original time series set based on the detection data of multiple sensors corresponding to the battery cell under test; based on the original time series set, determine time series data segments and anomaly time set; based on the time difference of the anomaly time in the anomaly time set, construct a time series graph set, which includes multiple time series graphs, each including at least one vertex and at least one edge; form a similarity matrix based on the time series data segments; determine a similarity graph set based on the similarity matrix; and perform vertex feature aggregation on the time series graph set and the similarity graph set to generate an event cluster set. By constructing the time series graph set and the similarity graph set, the time series correlation and feature similarity are integrated, improving the accuracy of battery anomaly event classification and diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120724189B_ABST
    Figure CN120724189B_ABST
Patent Text Reader

Abstract

The application provides a battery abnormal data clustering method and a battery abnormal data clustering device. The method comprises the following steps: determining an original time sequence set according to detection data of a plurality of sensors corresponding to a battery under test; determining a time sequence data segment and an abnormal time set based on the original time sequence set; constructing a time sequence graph set based on an abnormal time difference in the abnormal time set and in combination with a preset threshold, wherein the time sequence graph set comprises a plurality of time sequence graphs, each time sequence graph comprises at least one vertex and at least one edge; forming a similarity matrix according to the time sequence data segment; determining a similarity graph set according to the similarity matrix; and performing vertex feature aggregation on the time sequence graph set and the similarity graph set to generate an event class cluster set. Through the application, the accuracy of abnormal event classification of the battery under test is improved by fusing time sequence correlation and feature similarity, and the accuracy of abnormal diagnosis is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery technology, and more specifically, to a clustering method and clustering device for abnormal battery data. Background Technology

[0002] Currently, time series data plays a crucial role in numerous fields, such as industrial monitoring, financial analysis, and the Internet of Things. However, this type of data generally suffers from inherent characteristics such as low value density and high noise interference. This makes it difficult to accurately capture and characterize the temporal correlations and data patterns between different data sources (channels). Consequently, the key events and their underlying evolutionary patterns contained within the data stream cannot be effectively identified and analyzed, significantly hindering in-depth insights and decision-making based on time series data.

[0003] Currently, modeling methods for time series events primarily focus on time-domain analysis, using thresholds to detect outliers or calculate segment similarity as the basis for constructing event features or graph structures. While these methods are effective in specific scenarios, they have significant limitations: (1) The computational complexity is high, and the cost of screening and maintaining large-scale data is unbearable; (2) The threshold setting is highly sensitive and dependent on experience. If the screening threshold is set too high, events will be lost. If the threshold is set too low, the number of noisy events will increase dramatically. That is, it depends on expert experience. (3) The noise resistance is weak. The time-domain features of the time series are affected by noise. Calculating only the time-domain similarity cannot accurately extract its features, resulting in deviations in the final event model and insufficient reliability. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a clustering method and clustering apparatus for abnormal battery data to overcome at least one of the above-mentioned defects.

[0005] In a first aspect, embodiments of this application provide a clustering method for abnormal battery data. The method includes: determining an original time series set based on detection data from multiple sensors corresponding to a battery cell under test; determining a time series data segment and an abnormal time set based on the original time series set, wherein the time series data segment includes all detection times within a preset time period and the detection data corresponding to each detection time, and the abnormal time set includes all abnormal times when sensors collect detection data within the time series data segment; constructing a time series graph set based on the time difference of abnormal times in the abnormal time set and a preset threshold, wherein the time series graph set includes multiple time series graphs, each time series graph including at least one vertex and at least one edge; forming a similarity matrix based on the time series data segment; determining a similarity graph set based on the similarity matrix; performing vertex feature aggregation on the time series graph set and the similarity graph set to generate an event cluster set, wherein each cluster set represents a type of abnormal data of the battery under test, and each cluster set includes at least one event, each event including the time of abnormal occurrence, the duration of abnormality, the associated sensor identifier, and the corresponding abnormal detection data features. In one optional embodiment of this application, the time series data segment is a first matrix. The number of rows in the first matrix corresponds to the total number of the plurality of sensors, and the number of columns in the first matrix corresponds to the total number of segmented time periods. Each matrix element contains all the detection data of the sensor within the corresponding time period, and the data is arranged in chronological order. The time series data segment is determined by: scanning the original time series set in chronological order, using a global threshold as a fixed time window length; continuously extracting multi-sensor data within each time window to form independent data segments; arranging all data segments in chronological order to construct the first matrix.

[0006] In one optional embodiment of this application, the set of abnormal moments is a second matrix, where the number of rows in the second matrix corresponds to the total number of the plurality of sensors, and the number of columns in the second matrix corresponds to the total number of segmented time periods. Each matrix element contains the set of abnormal moments for that sensor within the corresponding time period. The set of abnormal moments is determined by: defining the window length and statistical threshold based on the long-short window method; sliding the time series data segment by window and calculating the statistical characteristic value of the detected data within each window; when the window statistical characteristic value exceeds a preset abnormal judgment threshold, the detection moment that meets the condition within the current window is recorded as an abnormal moment.

[0007] In one optional embodiment of this application, the vertices of the timing graph represent individual sensors of the battery cell under test, and the preset threshold is a global segmentation threshold. The timing graph set is constructed as follows: the time difference between two adjacent sensors within the abnormal time set is calculated; for each abnormal time difference, it is determined whether the abnormal time difference is less than or equal to the global segmentation threshold; for each abnormal time difference, if the abnormal time difference is less than or equal to the global segmentation threshold, an edge with a weight equal to the abnormal time difference is formed between the two vertices; for each abnormal time difference, if the abnormal time difference is greater than the global segmentation threshold, the current timing graph is truncated, and a new timing graph is established; all elements in the time difference matrix are traversed, and a timing graph set is formed based on all generated timing graphs.

[0008] In one optional embodiment of this application, the similarity matrix is ​​determined as follows: traverse all sensor combinations, calculate the difference in the absolute values ​​of the detection data in the time series data segments corresponding to each pair of sensors, and sum all the differences; perform a logarithmic operation on the sum of all the differences to obtain a normalized similarity value; arrange the normalized similarity values ​​of all sensor combinations into a similarity matrix, where the rows and columns of the similarity matrix correspond to the sensor numbers.

[0009] In one optional embodiment of this application, the similarity graph set is determined by: mapping each sensor to a vertex of the similarity graph; for any two vertices, using the normalized similarity value as the weight of the connecting edge between the two vertices; for each event's time series data segment, generating a similarity graph with weighted connections between all vertices; and constructing a similarity graph set from the similarity graphs of all events, wherein each event's time series data segment corresponds to a fully connected similarity graph.

[0010] In one optional embodiment of this application, the event cluster set is generated in the following manner: for each time series graph, the number of neighbors of each vertex and the sum of the time differences of all out-degree edges are calculated as time series graph features; for each similarity graph, the in-degree and out-degree of each vertex and the mean of the weights of all edges are calculated as similarity graph features; the time series graph features and similarity graph features of the same vertex are concatenated to form an event fusion embedding representation; the cosine similarity is calculated for the fusion embedding representations of every two events to construct an event distance matrix; hierarchical clustering is performed according to a preset event distance threshold to generate an event cluster set.

[0011] Secondly, embodiments of this application also provide a clustering device for abnormal battery data. The device includes: a first determining module, configured to determine an original time series set based on detection data from multiple sensors corresponding to the battery cell under test; a second determining module, configured to determine a time series data segment and an abnormal time set based on the original time series set, wherein the time series data segment includes all detection times within a preset time period and the detection data corresponding to each detection time, and the abnormal time set includes all abnormal times when sensors collect detection data within the time series data segment; and a time series graph set construction module, configured to construct a time series graph set based on the time difference of abnormal times in the abnormal time set, combined with a preset threshold. A time series graph set is constructed, comprising multiple time series graphs, each including at least one vertex and at least one edge; a similarity matrix forming module is used to form a similarity matrix based on the time series data segments; a third determining module is used to determine the similarity graph set based on the similarity matrix; an event cluster set generation module is used to perform vertex feature aggregation on the time series graph set and the similarity graph set to generate an event cluster set, each cluster set representing a type of abnormal data of the battery under test, each cluster set including at least one event, each event including the time of occurrence of the abnormality, the duration of the abnormality, the associated sensor identifier, and the corresponding abnormal detection data features. Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method described above are performed.

[0012] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the method described above.

[0013] The battery anomaly data clustering method and device provided in this application determine an original time series set based on the detection data of multiple sensors corresponding to the battery cell under test; based on the original time series set, determine time series data segments and anomaly time set; based on the time difference of the anomaly time in the anomaly time set, construct a time series graph set, which includes multiple time series graphs, each including at least one vertex and at least one edge; form a similarity matrix based on the time series data segments; determine a similarity graph set based on the similarity matrix; and perform vertex feature aggregation on the time series graph set and the similarity graph set to generate an event cluster set. By constructing the time series graph set and the similarity graph set, the time series correlation and feature similarity are integrated, improving the accuracy of battery anomaly event classification and diagnosis.

[0014] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A flowchart of the clustering method for abnormal battery data provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the determination of a time-series data segment provided in an embodiment of this application; Figure 3 A flowchart illustrating the process of determining the set of abnormal moments provided in this application embodiment; Figure 4 A flowchart of the set of construction timing diagrams provided in the embodiments of this application; Figure 5 This is a flowchart illustrating the determination of the similarity matrix provided in an embodiment of this application; Figure 6 This is a flowchart illustrating the process of determining a set of similarity maps as provided in an embodiment of this application. Figure 7 This is a flowchart illustrating the generation of event cluster sets provided in an embodiment of this application; Figure 8 A schematic diagram showing the curves of the four battery packs in event 0 and their abnormal moments provided in the embodiments of this application; Figure 9 The timing diagram for the four battery packs in event 0 provided in the embodiments of this application; Figure 10 A schematic diagram of the curves of the four battery packs in event 19 and the abnormal moments provided in the embodiments of this application; Figure 11 Timing diagrams for the four battery packs in event 19 provided in this application embodiment; Figure 12 This is a set of similarity graphs provided in the embodiments of this application; Figure 13 The normalized clustering results provided in the embodiments of this application; Figure 14 A schematic diagram illustrating the process of generating the event example set provided in the embodiments of this application; Figure 15This is a schematic diagram of the structure of the battery anomaly data clustering device provided in the embodiments of this application; Figure 16 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.

[0018] First, the applicable scenarios for this application will be introduced. This application can be applied to the field of battery technology.

[0019] Research has revealed that time series data is crucial in fields such as industrial monitoring, financial analysis, and the Internet of Things (IoT). However, due to its low value density and strong noise interference, its temporal correlations and data patterns are difficult to accurately capture and represent, hindering the effective identification and analysis of key events and evolutionary patterns. Current modeling methods for time series events mostly focus on time-domain analysis. While effective in specific scenarios, these methods suffer from limitations such as high computational complexity, sensitivity to threshold settings and reliance on experience, and weak noise resistance, which can easily lead to biased event models and insufficient reliability.

[0020] Based on this, embodiments of this application provide a clustering method and apparatus for abnormal battery data. The method includes: determining an original time series set based on detection data from multiple sensors corresponding to the battery cell under test; determining time series data segments and an abnormal time set based on the original time series set; constructing a time series graph set based on the time difference of abnormal times in the abnormal time set, combined with a preset threshold, wherein the time series graph set includes multiple time series graphs, each including at least one vertex and at least one edge; forming a similarity matrix based on the time series data segments; determining a similarity graph set based on the similarity matrix; and performing vertex feature aggregation on the time series graph set and the similarity graph set to generate an event cluster set. Through this application, the fusion of time series correlation and feature similarity improves the accuracy of abnormal event classification for the battery under test and enhances the accuracy of abnormal diagnosis.

[0021] First, the method of long and short time windows is used to quickly obtain the set of abnormal moments in the time series. Events with the same data length are constructed using a global threshold. Within a global threshold range, the time series data segments and the set of abnormal moments are included, significantly reducing the computational cost for users to filter events. Second, single events are transformed into a graph structure on the timeline, and a set of bijective relationships between single events and time series graphs and similarity graphs is constructed. This improves the feature dimensions of events in terms of time and form, thereby enhancing the ability to distinguish between similar events and reducing noise interference. Third, the vertex features in the similarity graph formed by the similarity of time series data and the time difference of abnormal moments and the time series graph are aggregated. The high-dimensional embeddings of the two graphs are cascaded to form a fused embedding representation. Finally, hierarchical clustering is used to initially form an effective set of events, providing a set of examples for subsequent event analysis and constructing an event representation library.

[0022] Please see Figure 1 , Figure 1 This is a flowchart illustrating the clustering method for abnormal battery data provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the clustering method for battery anomaly data includes: S101. Determine the original time series set based on the detection data of multiple sensors corresponding to the battery cell under test; The raw time series set Z=[Z1,Z2,...,Z] collected from multiple sensors n In the original time series set Z, all sensor measurements are recorded at consecutive time points.

[0023] (1) The row direction (vertical): represents different sensors. For example, the first row is all the historical data of sensor 1, the second row is the data of sensor 2, and so on.

[0024] Column direction (horizontal): Represents discrete sampling points on the time axis. For example, the first column is the measurement value of all sensors at the first time point, the second column is the value at the second time point, and so on.

[0025] Cell content: z on This represents the measured value of the o-th sensor at time n (e.g., z). 23 = Measurement data of sensor 2 at time point 3).

[0026] The sampling data of all sensors (such as voltage sensors, temperature sensors, etc.) deployed on the battery cell under test are collected during the continuous monitoring period, classified and stored according to sensor number, forming an original time series set. The data sequence of each sensor includes a timestamp and the corresponding detection value.

[0027] S102. Based on the original time series set, determine the time series data segments and the set of abnormal moments.

[0028] The time series data segment includes all detection times within a preset time period and the detection data corresponding to each detection time. The abnormal time set includes all abnormal times when the sensor collects detection data within the time series data segment. The time series data segment is the first matrix. The number of rows in the first matrix corresponds to the total number of multiple sensors, and the number of columns in the first matrix corresponds to the total number of time periods after segmentation. Each matrix element contains all the detection data of that sensor in the corresponding time period, and the data is arranged in chronological order.

[0029] Determine the truncation range T of the time series data segment, where T represents the global threshold. Divide Z according to the global threshold T to obtain a fixed-length time series data segment Y=[Y1, Y2,…Y]. p ]'.

[0030] (2) Where Y represents a time series data segment, rows (o rows): corresponding to o sensors, each row representing the complete time series segment of one sensor, columns (p columns): corresponding to p fixed-length time periods divided by a threshold T, each column representing the data from all sensors within a time period, and element y on This represents a raw data segment (such as a temperature curve, vibration signal, etc.) of the o-th sensor during the n-th time period.

[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating the determination of a time-series data segment as provided in an embodiment of this application. Figure 2 As shown, time series data segments are determined in the following manner: S201. Scan the original time series set in chronological order, using a global threshold as the fixed time window length; Set the global time window length (e.g., 30 minutes), and scan the detection data of each sensor in chronological order starting from the beginning of the original time series set. Each scan is based on the global threshold (time window) to ensure that the time range covered by each window is consistent.

[0032] S202. Continuously capture multi-sensor data within each time window to form independent data segments; Within each time window, extract the detection data (including timestamps and detection values) from all sensors within that window, and combine the multi-sensor data within each window into an independent data segment. The data segment contains the detection data from all sensors within that window.

[0033] S203. Arrange all data segments in chronological order to construct the first matrix.

[0034] All independent data segments are arranged in chronological order to form a first matrix. The number of rows in the first matrix corresponds to the total number of sensors, and the number of columns corresponds to the total number of time periods after segmentation. Each matrix element contains all the detection data of the corresponding sensor within the corresponding time period, and the data is arranged in chronological order.

[0035] Here, the continuous raw time series data is divided into independent data segments with fixed time windows to facilitate subsequent local analysis. The data is organized in matrix form to facilitate subsequent calculations and feature extraction.

[0036] The set of abnormal moments is a second matrix. The number of rows in the second matrix corresponds to the total number of multiple sensors, and the number of columns in the second matrix corresponds to the total number of time periods after segmentation. Each matrix element contains the set of abnormal moments of that sensor within the corresponding time period. Please see Figure 3 , Figure 3 This is a flowchart illustrating the process of determining the set of abnormal moments as provided in an embodiment of this application. Figure 3 As shown in the figure, the set of anomalous moments is determined in the following way: An anomaly time set is constructed using the long-short time window method, Υ=[r1,r2,...,r...]. n ]' refers to the set of abnormal moments corresponding to time series data segments collected by multiple sensors.

[0037] (3) Where r represents the set of abnormal moments, rows (o rows): corresponding to o sensors, each row represents the set of abnormal moments for one sensor, columns (m columns): corresponding to m time periods, each column represents the abnormal moments of all sensors within a time period, and element r om : Represents the set of abnormal time points detected by the o-th sensor in the m-th time period (such as the moment of sudden temperature increase, the moment of vibration exceeding the limit).

[0038] Here, combining (1), (2), and (3), where the number of sensors is o, the number of segments after being divided by T is p, and the length of the time series data is n. r1 is the set of abnormal moments of sensor 1, Y1 is the first set of time series data segments after being divided by T for all sensors, and Z=Y=Y1∪Y2∪...∪Y p That is, Z is divided into multiple data segments by T, y 11 Y1 represents the first amplitude of the time series data Z1 from sensor 1 after being segmented by T, and Y1 represents the data segments from all sensors included within the first T. 11R represents the data segment contained in the first T of the first sensor, Y represents the set of abnormal moments obtained on Z by the long-short time window method, i.e. r1 represents the set of abnormal moments of sensor 1 on all data segments Y, and so on.

[0039] The relationship between time series data segments and events is bijective, i.e., Y↔E, where each y(⋅i) is bijective to E. i A one-to-one correspondence exists. Similarly, the relationship between the set of abnormal moments and the events is bijective, i.e., Υ↔E, where each Υi corresponds to E. i One-to-one correspondence. The final set of events is represented as E = {E1, E2, ..., E...} n}, where each E i ={y(⋅i),r(⋅i)} represents an event E. i Time series data segment y(⋅i)={y 1i ,...,y oi} and the set of abnormal moments r(⋅i)={r 1i ,...,r oi That is, in T, there must be |r(⋅1)|≥0, and at the same time, Y(⋅1) containing r(⋅1) must satisfy Y(⋅1)↔r(⋅1),Y↔r. Since the thresholds are different in different fields, they will not be elaborated here. It is sufficient to ensure that all events (events are data segments with abnormal behavior in time series and their associated abnormal moments) can be identified.

[0040] S301. Define window length and statistical thresholds based on the long-short window method; Window length definition: Define the length of short time windows (e.g., 5 minutes) and long time windows (e.g., 30 minutes) based on data characteristics and anomaly detection requirements; Short windows are used to capture local data fluctuations, while long windows are used to calculate global statistical features as a reference.

[0041] Definition of statistical threshold: Select an appropriate statistical measure (such as mean, variance, standard deviation, etc.) for anomaly detection; based on historical data or experience, set anomaly judgment threshold for the statistical measure (such as mean ± 3σ, where σ is the standard deviation). The threshold can be adjusted according to sensor characteristics and application scenarios.

[0042] This step clarifies the time range and statistical standards for anomaly detection, providing a basis for subsequent calculations. A reasonable threshold setting can improve the accuracy and sensitivity of anomaly detection.

[0043] S302. Slide the time series data segment by window and calculate the statistical characteristic value of the detected data in each window; In this process, short time windows are used as units to slide across the time series data segments in chronological order; after each slide, the short time window covers a new subset of data.

[0044] For the detection data within each short time window, a preset statistic (such as mean and variance) is calculated. At the same time, the statistic within the long time window can be calculated as a reference for dynamically adjusting the threshold (such as the moving average method).

[0045] Here, local fluctuation characteristics of data are captured in real time to provide data support for anomaly detection; through sliding window calculation, time series data can be fully covered to avoid missing anomalies.

[0046] S303. When the window statistical feature value exceeds the preset anomaly judgment threshold, the detection time that meets the condition in the current window is recorded as an anomaly time.

[0047] The statistical characteristic value of each short window is compared with the preset anomaly detection threshold; if the statistical characteristic value exceeds the threshold (e.g., mean + 3σ), an anomaly is determined to exist in the current window.

[0048] For windows that are determined to be abnormal, all detection times that meet the conditions within the window are recorded as abnormal times. The specific timestamp, detection value, and sensor number of the abnormal times can be recorded to facilitate subsequent analysis and accurately locate the time when the abnormality occurred. By recording abnormal times, a complete set of abnormal times can be constructed.

[0049] S103. Based on the time difference of abnormal moments in the abnormal moment set, and combined with a preset threshold, construct a time sequence graph set. The time sequence graph set includes multiple time sequence graphs, and each time sequence graph includes at least one vertex and at least one edge. A temporal correlation network is constructed using a time difference threshold to reflect anomaly propagation patterns.

[0050] Please see Figure 4 , Figure 4 This is a flowchart illustrating the set of construction timing diagrams provided in embodiments of this application. For example... Figure 4 As shown, the time series diagram set is constructed in the following manner: The vertices of the timing diagram represent individual sensors of the battery cell under test. The vertex attributes include the sensor number and the associated set of abnormal moments. The preset threshold is the global segmentation threshold.

[0051] Vertex definition: Each vertex in the timing diagram represents a single sensor of the battery cell under test; Vertex attributes include sensor number and associated set of anomalous moments (obtained from step S102).

[0052] Threshold range definition: The preset threshold is the global segmentation threshold (e.g., 1 hour); the global segmentation threshold is used to distinguish the time range of different abnormal events.

[0053] This application clarifies the basic structure and vertex attributes of the sequence graph, providing a foundation for subsequent construction of the sequence graph.

[0054] S401. Calculate the time difference between the abnormal moments of two adjacent sensors within the abnormal moment set; Here, the abnormal moment sets of all sensors are traversed; for each pair of adjacent sensors (sorted by sensor number or spatial location), the time difference of all adjacent abnormal moments in their abnormal moment sets is calculated; a time difference matrix is ​​generated, where the matrix elements represent the time difference of abnormal moments between corresponding sensor pairs, quantifying the time interval of abnormal moments of adjacent sensors, and providing data support for subsequent correlation analysis.

[0055] (4) Where, r ij -r (i-1,j) Let r' represent the set of difference sequences between the anomalous times of the i-th to o-th (i∈[2,o]) sensors and the 1-m-th anomalous times of the previous sensor, which together form a time difference matrix r'. (o-1)×m If every element in the matrix is ​​calculated and a time series diagram is constructed based on the matrix, the time complexity is high and the event cannot be effectively represented. In order to improve the computational efficiency, this application designs a threshold term, which is the global segmentation threshold T1. The construction rule is as follows: r1 represents the set of abnormal moments of all sensors 1.

[0056] S402. For each abnormal time difference, determine whether the abnormal time difference is less than or equal to the global segmentation threshold. For each element in the time difference matrix (i.e., the time difference between abnormal moments between each pair of sensors), determine whether the time difference satisfies the following condition: less than or equal to the global segmentation threshold (e.g., 1 hour).

[0057] By using threshold judgment, sensor pairs that may belong to the same abnormal event are filtered out.

[0058] S403. For each abnormal time difference, if the abnormal time difference is less than or equal to the global segmentation threshold, then an edge with a weight equal to the abnormal time difference is formed between the two vertices. If the time difference between the abnormal moments of a pair of sensors meets the threshold condition, an edge is formed between the corresponding vertices of the time sequence graph; the weight of the edge is the time difference between the abnormal moments, which represents the time interval between the abnormal moments of the two sensors.

[0059] The basic structure of the timing graph is constructed by representing the temporal correlation between sensors using weighted edges.

[0060] S404. For each abnormal time difference, if the abnormal time difference is greater than the global segmentation threshold, the current time sequence diagram is truncated and a new time sequence diagram is established. If the time difference between the abnormal moments of a pair of sensors does not meet the threshold condition (i.e., it is greater than the global segmentation threshold), then they are considered to belong to different abnormal events. Truncate the current sequence graph (i.e., stop adding edges between the current vertex pairs) and begin building a new sequence graph; the new sequence graph is built starting from the next sensor pair that meets the conditions.

[0061] By truncating and creating new sequence diagrams, different abnormal events can be distinguished, ensuring that each sequence diagram corresponds to an independent abnormal event.

[0062] S405. Traverse all elements in the time difference matrix and form a time sequence map set based on all generated time sequence maps.

[0063] Iterate through all elements in the time difference matrix, repeating steps S402 to S404; dynamically construct multiple time series diagrams based on the threshold judgment results; combine all constructed time series diagrams into a time series diagram set. Generate a complete time series diagram set, with each time series diagram corresponding to an independent abnormal event; The time series graph set can reflect the temporal correlation patterns of abnormal battery data, providing a foundation for subsequent cluster analysis.

[0064] When t <r i -r j When T1 ≤ T1, a path with weight r is formed between vertices i and j. i -r j The edge.

[0065] When r i -r j At time T1, the current time series graph G is truncated.

[0066] Repeat the above rules to generate an infinite number of new time series diagrams G. T This process continues until all time series data Y and its corresponding Y' have been traversed, forming a time series graph set G. T ={G T 1, G T 2, ..., G T n}

[0067] Here, threshold judgment can accurately associate sensors belonging to the same abnormal event; by truncating and creating time series graphs, different abnormal events can be effectively distinguished; the time series graph set can intuitively reflect the time series correlation pattern of battery abnormal data, providing strong support for subsequent cluster analysis.

[0068] S104. Form a similarity matrix based on the time series data segments; The edge weights of the time series graph set G generated by S103 are the differences at anomalous moments. This can only represent the temporal anomaly relationships between events, but it still cannot distinguish between different types of events with similar time series data segments. This interferes with subsequent analysis of E, thus reducing the accuracy of classification or prediction. Therefore, to solve the above problems, this invention further proposes a method based on Y... i The similarity matrix is ​​used to calculate the amplitude Y of the time series data segments between each pair of vertices (sensors). i Sum of absolute differences (y) i2 -y i1 ,y i3 -y i2 , ,...,y ir -y i(r-1) The sum of the absolute differences forms the difference distance (similarity) matrix A. S .

[0069] (5) (6) Among them, A s This is a similarity (difference distance) matrix, which here may represent the similarity with sample Y. i Related similarity sets. Here, the superscript 's' indicates a set identifier related to "similarity," where sim... k Yi (k=1,2,…,o) represents sample Y i The k-th similarity value. sim is an abbreviation for "similarity," with the superscript Y. i This indicates that the similarity is for sample Y. i The calculated value, k, is used to distinguish different similarity indicators or calculation results.

[0070] |Y i | represents sample Y i The size or length, such as the number of data points in the sample, depends on Y. i Definition.

[0071] y ir and y js It is sample Y i In the array, r and s are index variables. |y ir | and |y js | represents the absolute value of these elements. This summation formula sums the differences in the absolute values ​​of sample elements within a certain range.

[0072] sim ijm Yi(j=1,…,|Yi|; m=1,…,|Yi|−1 and m≠j) represents the sample Y i The similarity value between different combinations of elements in Y. i might be an index used to distinguish different types of similarity calculations or sample batches; j and m are the similarity values ​​between samples Y. i index of inner element, sim ijm Yi Indicates sample Y i The similarity between the j-th element and the m-th element is calculated. The entire matrix is ​​composed of the similarity values ​​between these different combinations of elements.

[0073] Where, sim i Yi E represents i The similarity between each pair of vertices r and s.

[0074] Please see Figure 5 , Figure 5 This is a flowchart illustrating the determination of a similarity matrix provided in an embodiment of this application. Figure 5 As shown, the similarity matrix is ​​determined in the following manner: S501. Traverse all sensor combinations, calculate the difference in absolute values ​​of the detection data in the corresponding time series data segments of every two sensors, and sum all the differences. Sensor combination traversal: Iterate through all possible sensor combinations (i.e., all sensors are paired up). Assuming there are N sensors in total, then there are C possible combinations. N 2 =N(N−1) ÷2 combinations.

[0075] Absolute difference calculation: For each pair of sensors, acquire their detection data in the corresponding time series data segment; calculate the absolute difference of the detection data of each pair of sensors at the same time point (or time window); sum the absolute differences at all time points (or time windows) to obtain the total difference of the sensor pair.

[0076] S502. Perform a logarithmic operation on the sum of all differences to obtain the normalized similarity value; Logarithmic operation: Perform logarithmic operation (such as natural logarithm or common logarithm) on the total difference of each pair of sensors to narrow the numerical range and enhance the distinguishability of differences; The formula for logarithmic operation is: Sij = −log(Dij + ϵ), where Sij is the normalized similarity value, Dij is the total difference between sensor i and sensor j, and ϵ is a minimum value (such as 10−6) used to avoid the problem of zero values ​​in logarithmic operation.

[0077] Normalization: By taking the negative logarithm, larger differences are converted into smaller similarity values, and smaller differences are converted into larger similarity values, thus achieving a normalization effect.

[0078] Converting the original differences into normalized similarity values ​​facilitates subsequent matrix construction and cluster analysis. Logarithmic operations enhance the discriminative power of the differences, making the similarity values ​​more reflective of the actual similarity between sensors.

[0079] S503. Arrange the normalized similarity values ​​of all sensor combinations into a similarity matrix, where the rows and columns of the similarity matrix correspond to the sensor numbers.

[0080] Create an N×N similarity matrix, where N is the total number of sensors; the rows and columns of the matrix correspond to the sensor numbers, and the matrix element Sij represents the normalized similarity value between sensor i and sensor j; since the similarity matrix is ​​symmetric (i.e., Sij=Sji), we can calculate only the elements of the upper or lower triangular part, and then fill the matrix symmetrically.

[0081] Constructing a complete similarity matrix intuitively reflects the degree of similarity among all sensors, which helps to identify correlation patterns and anomalous events among sensors.

[0082] Here, the degree of difference between each pair of sensors in the time series data segment is quantified by calculating the absolute difference and summing them; the difference is converted into a normalized similarity value by logarithmic operation to enhance the distinguishability of the differences; and a complete similarity matrix is ​​constructed to provide a foundation for subsequent cluster analysis.

[0083] S105. Determine the set of similarity maps based on the similarity matrix; Please see Figure 6 , Figure 6 This is a flowchart illustrating the process of determining a set of similarity maps as provided in an embodiment of this application. Figure 6 As shown in the figure, the set of similarity graphs is determined in the following way: S601. Map each sensor to a vertex of the similarity graph; Each sensor of the battery cell under test is mapped to a vertex in the similarity graph; the vertex number corresponds one-to-one with the sensor number, ensuring that each sensor has a unique representation in the similarity graph.

[0084] The basic structure of a similarity graph is constructed by transforming the similarity relationships between sensors into node relationships in a graph structure through vertex mapping.

[0085] S602. For any two vertices, use the normalized similarity value as the weight of the edge connecting the two vertices. Obtain the normalized similarity value for each pair of sensors (i.e., each pair of vertices) from the similarity matrix (generated in step S104); in the similarity graph, add an edge between each pair of vertices and use the normalized similarity value as the weight of the edge; the larger the weight of the edge, the higher the similarity between the two sensors; the smaller the weight of the edge, the lower the similarity.

[0086] By quantifying the similarity relationship between vertices using edge weights, the similarity graph can intuitively reflect the degree of similarity between sensors.

[0087] S603. For each event's time series data segment, generate a similarity map with weighted connections between all vertices; Based on the characteristics of the abnormal time set (generated in step S103) or the time series data, the time series data is divided into time series data segments of multiple events; each event's time series data segment corresponds to an independent abnormal event or data pattern.

[0088] Similarity graph generation: For each time series data segment of an event, a fully connected similarity graph is constructed based on the similarity matrix generated for that data segment (generated in step S104). In this similarity graph, all vertices are connected by weighted edges, and the weight of each edge is the normalized similarity value of the corresponding sensor in the similarity matrix.

[0089] S604. A similarity graph set is formed by the similarity graphs of all events. The similarity graph set includes the similarity graphs of all events, and each event's time series data segment corresponds to a fully connected similarity graph.

[0090] Similarity graph set construction: Combine the similarity graphs corresponding to all events into a similarity graph set; each element in the similarity graph set is a similarity graph, corresponding to a specific event time series data segment.

[0091] Constructing a complete set of similarity graphs can reflect the similarity patterns of battery anomaly data under different events, which helps to identify the commonalities and differences of anomaly events.

[0092] S106. Perform vertex feature aggregation on the time series graph set and the similarity graph set to generate an event cluster set. Each cluster set represents a type of abnormal data of the battery under test. Each cluster set includes at least one event. Each event includes the time of occurrence of the abnormality, the duration of the abnormality, the associated sensor identifier, and the corresponding abnormal detection data features.

[0093] Please see Figure 7 , Figure 7 This is a flowchart illustrating the generation of event cluster sets provided in an embodiment of this application. For example... Figure 7As shown, the event cluster set is generated in the following way: S701. For each time series graph, calculate the number of neighbors of each vertex and the sum of the time differences of all out-degree edges, as the time series graph features; Neighbor count calculation: For each vertex in the time sequence graph (i.e., each sensor), count the number of its neighbor vertices; a neighbor vertex is defined as a vertex that is directly connected to the vertex through an edge.

[0094] Calculation of the sum of time differences of out-degree edges: For each vertex, calculate the sum of time differences of all its out-degree edges (i.e., edges originating from that vertex); the time difference is the weight of the edge (generated in step S403), representing the time interval between the two sensor anomaly moments.

[0095] Temporal graph feature generation: The sum of the number of neighbors and the time difference of out-degree edges of each vertex is combined into a feature vector, which serves as the temporal graph feature of that vertex.

[0096] The local structure and temporal correlation characteristics of vertices in a temporal graph are quantified by summing the number of neighbors and the time difference of out-degree edges. The temporal graph features provide temporal dimension information for subsequent fusion embedding representations.

[0097] S702. For each similarity graph, calculate the in-degree of each vertex and the mean of all edge weights, as features of the similarity graph. In-degree and out-degree calculation: For each vertex in the similarity graph, calculate its in-degree (i.e., the number of edges pointing to that vertex) and out-degree (i.e., the number of edges originating from that vertex). In a fully connected similarity graph, the in-degree and out-degree are usually equal and equal to the total number of vertices minus one (because each vertex is connected to all other vertices).

[0098] Edge weight mean calculation: For each vertex, calculate the mean of all its edge weights; the edge weights are normalized similarity values ​​(generated in step S602), representing the degree of similarity between the two sensors.

[0099] Similarity graph feature generation: Combine the in-degree and edge weight of each vertex into a feature vector, which serves as the similarity graph feature of that vertex.

[0100] The global structure and similarity characteristics of vertices in the similarity graph are quantified by using in-degree and edge weight mean. Similarity graph features provide similarity dimension information for subsequent fusion embedding representations.

[0101] The time sequence diagram G was constructed using the above method. T Similarity graph G SHowever, the event requires further effective characterization. Therefore, vertex feature aggregation of the graph is necessary. Since the temporal graph proposed in this application has a large number of edges, this application calculates the in-degree of each vertex in the similarity graph (|Out| is the number of other vertices pointed to by that vertex, and |In| is the number of other vertices pointed to by other vertices) and the average weight of all edges of each vertex as the vertex feature h. av The characteristics h of a vertex are determined by calculating the number of its neighbors |N(v)| and the sum of the time differences (edge ​​weights) in the time sequence graph. bv As shown in formulas (7), (8), (9), and (10).

[0102] (7) (8) (9) (10) In formula (7), weight represents the set of weights of all out-degree edges from vertex v, and in formula (8), weight represents the set of weights of all neighboring edges from vertex v. (k) (h v‘ (k-1) ) represents the k-th summation operation performed on each element of N(v), and similarly, avg (k) (h v‘ (k-1) ) indicates that the summation and averaging of each element of N(v) in the k-th iteration is performed, h v (k) Let h represent the vertex embedding representation after the k-th iteration of the two transformation graphs. a '、h b 'represents G respectively T G S The high-dimensional features after cascading, due to the time series graph G T For directed graphs, this application considers the out-degree edges of a vertex as valid aggregate edges, that is, N edges with out-degree on vertex v. + (v) is effective during aggregation. To avoid excessive fusion of vertex features, k=2 is set here. CONCAT means row concatenation. The embedding representations of the two graphs can be obtained through formula (9). In the final formula (10), D(E) i The high-dimensional embedding of two cascaded graphs is represented as a fused embedding representation.

[0103] S703. Concatenate the temporal graph features and similarity graph features of the same vertex to form an event fusion embedding representation; For each vertex, its temporal graph features and similarity graph features are concatenated (i.e., spliced); the concatenated feature vector contains information in both temporal and similarity dimensions.

[0104] Event fusion embedding representation generation: The concatenated feature vector is used as the fusion embedding representation of the event corresponding to the vertex; each event corresponds to a vertex (mapped in step S601), so each event has a fusion embedding representation.

[0105] By cascading features, information from both temporal and similarity dimensions is fused into a unified embedding representation; the event fusion embedding representation provides comprehensive feature support for subsequent similarity calculation and clustering analysis.

[0106] S704. Calculate the cosine similarity of the fused embedding representation of each pair of events and construct the event distance matrix; After vertex feature fusion, the cosine similarity of the embeddings of different events is calculated, and the event set E is distinguished by hierarchical clustering method, as shown in formula (11).

[0107] (11) Among them, sim ij E Indicates event E i With E j The cosine similarity of the graph fusion features, these similarities constitute the distance matrix A. d Finally, the data is fed into a hierarchical clustering algorithm, which, based on a user-defined distance threshold, yields a set of different clusters C = {C1, C2, ..., C}. n}, where each cluster C i Contains multiple events E i Then, through weak domain knowledge, typical events are discovered from the clusters, forming an event example set P={P1,P2,...,P...} n}

[0108] S705. Perform hierarchical clustering based on the preset event distance threshold to generate a set of event clusters.

[0109] Based on the event distance matrix, hierarchical clustering algorithms (such as AGNES) are used to cluster events; hierarchical clustering algorithms form a tree-like cluster structure by gradually merging similar events.

[0110] Application of preset event distance threshold: Set a preset event distance threshold to control the granularity of clustering; when the distance during the clustering process exceeds the threshold, the merging operation stops and the final clustering result is formed.

[0111] Event cluster set generation: Each cluster in the hierarchical clustering result is treated as an event cluster; all event clusters are combined into an event cluster set, and each cluster set represents a type of abnormal data of the battery under test.

[0112] By using hierarchical clustering and a preset event distance threshold, similar events are grouped together to form an event cluster set. The event cluster set can intuitively reflect the classification results of battery abnormal data. Each cluster corresponds to a type of abnormal data, including the time of occurrence of the abnormality, the duration of the abnormality, the associated sensor identifier, and the corresponding abnormal detection data features.

[0113] All symbols used in this application and their meanings are shown in Table 1: Table 1. Symbols and their meanings

[0114] This application provides a clustering method and apparatus for abnormal battery data. The method includes: determining an original time series set based on detection data from multiple sensors corresponding to the battery cell under test; determining time series data segments and an abnormal time set based on the original time series set; constructing a time series graph set based on the time difference of abnormal times in the abnormal time set, combined with a preset threshold, wherein the time series graph set includes multiple time series graphs, each including at least one vertex and at least one edge; forming a similarity matrix based on the time series data segments; determining a similarity graph set based on the similarity matrix; and performing vertex feature aggregation on the time series graph set and the similarity graph set to generate an event cluster set. This application improves the accuracy of abnormal event classification for the battery under test by fusing time series correlation and feature similarity, thereby enhancing the accuracy of abnormality diagnosis.

[0115] The beneficial effects of this application are: (1) Based on time series data collected by multiple sensors, this invention constructs a single event time series graph by comprehensively considering the global segmentation threshold. The global segmentation threshold ensures the disconnection of adjacent event time series graphs, ensuring the integrity and independence of a single event, effectively improving the representation ability of the time dimension of the event, increasing the speed of user event filtering, and shielding noise interference to a certain extent.

[0116] (2) This invention proposes a time series distance calculation method by calculating the temporal similarity of time series data segments between vertices. This method can calculate the waveform similarity between different vertices (sensors) of a single event based on its waveform morphology characteristics. Based on the similarity sequence, a similarity graph is further constructed, that is, the temporal data similarity between each vertex (sensor) is used as the edge, which effectively improves the representation ability of the morphological dimension of the event and makes up for the shortcomings of only representing the event in time series.

[0117] (3) The present invention obtains the graph form of all events through (1) and (2), uses the idea of ​​vertex feature aggregation in graph neural network to perform high-dimensional embedding of the time sequence graph and similarity graph of the events, and cascades them to form a fusion embedding representation. It calculates the cos similarity between each pair of events, performs hierarchical clustering based on the distance, and quickly identifies typical events with only weak domain knowledge, providing event examples for subsequent analysis.

[0118] In Example 1, using power battery charge-discharge test data, the multiple time series data segments, time series graphs, distances, and hierarchical clustering results formed on the time series data of different battery packs were observed. Typical event sets were clearly identified, and the dataset was divided into 21 time intervals. Among them, the time series graph set G... T like Figure 9 , Figure 11 As shown, the similarity graph set G s like Figure 12 As shown.

[0119] Please see Figure 8 , Figure 10 , Figure 8 A schematic diagram showing the curves of the four battery packs in event 0 and their abnormal moments provided in the embodiments of this application; Figure 10 A schematic diagram of the curves of the four battery packs in event 19 and the abnormal moments provided in the embodiments of this application; Figure 8 and Figure 10 All figures are schematic diagrams of the curves for the four battery packs and the moments of abnormality, differing only in the timeframes used. Figure 8 For example, each row represents the time series data of a different battery pack. As can be seen from the graph, there are four rows, meaning data from four different battery packs are displayed. In each sub-graph, the x-axis represents time, and the y-axis represents charging voltage, depicting how the charging voltage changes over time.

[0120] Within each subplot, the entire subplot is presented as a continuous time series. However, from an overall layout perspective, multiple subplots are arranged vertically, forming a visual effect similar to a "column." Each subplot independently displays a time series data segment of a battery pack. The blue broken lines in each subplot represent the changes in the charging voltage of the battery pack as the number of data points increases, constituting a time series data segment. The red vertical dashed lines represent anomalous moments calculated using the long and short time window method.

[0121] Please see Figure 9 , Figure 11 , Figure 9 The timing diagram for the four battery packs in event 0 provided in the embodiments of this application; Figure 11 This is a timing diagram of the four battery packs in event 19 provided in an embodiment of this application. Figure 9 and Figure 11 In China, with Figure 9 For example, each blue vertex in the diagram represents a battery pack. As mentioned above, a vertex is a sensor; here, a vertex is a battery pack. The meaning of a vertex can be defined according to the actual situation.

[0122] Edges and edge weights: The blue lines (edges) in the graph represent the connections between two vertices (different types of battery packs). The edge weights represent the time difference between the two vertices at the moment of anomaly, calculated using the formula weight=r. i -r j , where r i and r j These are the abnormal moments of the two sensors. When ri-rj ≤ T, an edge with weight ri-rj is formed between vertices i and j, where T1 is the global segmentation threshold. This means that a connection is established between the two sensors only when the difference between their abnormal moments is less than or equal to the global segmentation threshold, and the edge weight is this time difference.

[0123] Figure 11 In the middle, there is only one vertex, corresponding to Figure 10 Only one battery pack 1114 has a red dashed line, indicating that abnormal data was detected in the battery pack at the time corresponding to the red dashed line. At this time, only the time with and without abnormal data is shown in the time series diagram. If there is no abnormal data, there is no connection. In addition, the value on the edge only subtracts the abnormal point of the adjacent sensor. The time value here is dimensionless and the interval is 1, so most of them are 1. If the interval is also subtracted, the number on that side will be too large.

[0124] The time series graph is constructed based on the set of anomalous moments in the time series data segment on the left. Specifically, for each anomalous moment in the time series data segment on the left, the time difference between anomalous moments of different sensors (vertices) is calculated. Based on these time differences and a set threshold t, it is determined whether the vertices are connected and the weight of the connection, thus forming the time series graph on the right.

[0125] like Figure 8 , Figure 10As shown, each subgraph contains a time series data segment, with the x-axis representing the number of data points and the y-axis representing the charging voltage, which includes abnormal time instants calculated by the long-short time window method (red vertical dashed lines in the figure). Based on the set of these abnormal time instants, the corresponding time sequence graph on the right is constructed by the method of the present invention. Each time series data segment has a length of [r0-β, β], that is, the global threshold, wherein the difference between the abnormal time instants between vertices, i.e., the edge weight, is less than t. The right side of each subgraph represents the time sequence graph, where each vertex represents a sensor for monitoring the voltage of the battery pack, and the weight on the edge represents the time difference between the abnormal time instants of the two vertices, with weight satisfying t < ri - rj ≤ T1. It can be seen from either the time series data segment on the left side of each subgraph or the time sequence graph on the right side that the morphology and time sequence graph of several events are not significantly different. If only through the naked eye of the user or the morphology, the categories of these events cannot be accurately identified, thus bringing huge cost overhead and computational overhead to the user. Here, the morphological similarity of different events is further calculated to form a similarity graph, which is combined with the time sequence Figure 1 to form a fused embedding representation, such as Figure 12 as shown in the following.

[0126] Please refer to Figure 12 , Figure 12 which is the similarity graph set provided by the embodiments of the present application, Distance Matrix of D(E i ): The distance matrix of D(E i ) represents the display of the distances between the embeddings related to Ei.

[0127] G i T : Generally represents the embedding after vertex aggregation of the similarity graph, where T here may be the abbreviation of "Topology" or other related concepts, used to identify that this is an embedding related to the similarity graph.

[0128] G i S : Generally represents the embedding after vertex feature aggregation of the time sequence graph, where S here may be the abbreviation of "Sequence" or other related concepts, used to identify that this is an embedding related to the time sequence graph.

[0129] Each row represents the embedding after aggregating the vertices of a similarity graph. Each column represents the embedding after aggregating the vertices of a time series graph. Element meaning: Each element in the heatmap represents the distance between the fused vertex embeddings of the similarity graph and the time series graph. Color and numerical relationship: The larger the value, the redder the color; the smaller the value, the bluer the color. The color bar on the right shows the correspondence between color and value, from blue to red, with values ​​ranging from approximately 0 to 8. Event distance situation: As can be seen from the heatmap, events 2 (second column) and 18 (18th column) are significantly farther away from the other events, indicating that these two events are significantly different from other events in the feature space after fusion embedding. Distance situation of other events: Except for events 2 and 18, the distance differences between the other events are not significant, indicating that these events are relatively close in the feature space after fusion embedding and have high similarity. However, the distance differences are not significant, so it is difficult to determine the event affiliation based on this distance. Therefore, hierarchical clustering is needed for further differentiation. The hierarchical clustering results of the above event set are as follows: Figure 13 As shown.

[0130] Please see Figure 13 , Figure 13 The normalized clustering results provided in the embodiments of this application; such as Figure 13 As shown, different colors represent different categories of events, while events of the same color represent the same category of events. The resulting clustering is as follows: C={C1={2,1,4,5},C2={3},C3={0,7,13,6,17},C4={9,8,12},C5={10,16,11,15,19,20},C6={14,18}} When the user sets the distance to 0.4, different categories can be identified. Among these events, by observing the structure of the time series data segments and the time series graph, typical events can be filtered out, such as those that are close in distance: 4 and 5, 6 and 17, 8 and 12, 19 and 20. This ensures that users can identify event paradigms even with weak domain knowledge.

[0131] Distance threshold: The graph shows a red dashed line marking a distance of 0.4. When the user sets the distance to 0.4, this line can be used to determine different categories. At this distance threshold, events are divided into the six clusters mentioned above.

[0132] Typical events: By observing the structure of time series data segments and time series plots, some typical events can be selected. For example, the close proximity of events 4 and 5 indicates that they have a high degree of similarity in hierarchical clustering.

[0133] Events 6 and 17 also show high similarity. Events 8 and 12 were merged together during the clustering process, indicating high similarity. Events 19 and 20 also exhibit high similarity. The selection of these typical events helps users identify event paradigms with less domain knowledge, thereby better understanding and analyzing the clustering results.

[0134] This application is not a single time series analysis or traditional event modeling method. This application adopts the long and short time window method in the process of obtaining the abnormal time set. The construction of its time series plot and similarity plot is dynamically adjusted according to the time, morphological characteristics and correlation of the corresponding time series data segments to adapt to the complex dynamic changes of time series events.

[0135] Please see Figure 14 , Figure 14 This is a schematic diagram illustrating the process of generating the event example set provided in the embodiments of this application.

[0136] like Figure 14 As shown, the monitoring sensor set is a comprehensive collection that includes various types of sensors used to monitor different physical quantities.

[0137] S1: Represents the first type of sensor, which monitors "vibration". Vibration sensors are used to detect the vibration of objects or the environment and can obtain data such as vibration amplitude and frequency.

[0138] S2: Represents the second type of sensor, which monitors "pressure". Pressure sensors are used to measure the magnitude of pressure and can be applied to detect pressure changes in liquids or gases.

[0139] ...: This indicates that there are other types of sensors that are not listed here.

[0140] Sn: Represents the nth type of sensor, which monitors "temperature". Temperature sensors are used to measure temperature and can obtain the temperature value of the environment or an object.

[0141] Data acquisition and processing section Data acquisition / collection: This refers to the process of collecting the data monitored by the various sensors (S1 - Sn) mentioned above.

[0142] 7×24-hour time series data: refers to sensor data collected continuously for 7 consecutive days, 24 hours a day. These data are arranged in chronological order to form a time series.

[0143] Abnormal fluctuation sequence extraction part Abnormal fluctuation sequence extraction: Extracting the abnormal fluctuation portion from 7×24-hour time series data.

[0144] Similarity matrix and time difference matrix construction part Morphological distance calculation: The morphological distance of the extracted abnormal fluctuation sequences is calculated to measure the morphological differences between different sequences.

[0145] Time series data segments: The abnormal fluctuation series is divided into different data segments for subsequent analysis.

[0146] Similarity matrix: Constructing based on the sum of amplitudes: A similarity matrix is ​​constructed based on the sum of amplitudes of time series data segments. The elements in the matrix represent the degree of similarity between different data segments.

[0147] Similarity graph: A graph structure built on a similarity matrix, used to visually display the similarity relationships between different data segments.

[0148] Time difference matrix: Difference between adjacent abnormal times: Calculate the time difference between adjacent abnormal times.

[0149] Global segmentation threshold construction: A time difference matrix is ​​constructed based on the global segmentation threshold. The elements in the matrix reflect the temporal relationship between different abnormal moments.

[0150] Multi-connection time series graph: A graph structure built based on the time difference matrix to show the temporal connection relationships between different abnormal moments.

[0151] Fusion Embedded Representation Part: Similarity graph embedding: The similarity graph is embedded to convert it into a vector representation suitable for subsequent calculations.

[0152] Multi-connection sequence graph embedding: The multi-connection sequence graph is embedded and converted into a vector representation.

[0153] Fusion Embedding Representation: The similarity graph embedding and the multi-connection temporal graph embedding are fused to obtain a comprehensive embedding representation that includes both similarity and temporal information.

[0154] Event example set generation section: Hierarchical clustering based on cosine similarity of pairs of events: Calculate the cosine similarity between different events and perform hierarchical clustering analysis based on these similarities to group similar events into one class.

[0155] Weak domain knowledge: In the clustering process, some limited domain knowledge can be incorporated to assist in judging and adjusting the clustering results.

[0156] Event Example Set: The final generated set contains different types of event examples, each example representing a class of events with similar characteristics.

[0157] When constructing time series graphs and similarity graphs, this application ensures the integrity and independence of time series events by dynamically adjusting the global segmentation threshold. At the same time, it incorporates historical event data into the graph structure to optimize the accuracy and robustness of event example generation.

[0158] This application establishes a similarity map and a time series map based on the amplitude difference between waveforms and the difference in abnormal moments, respectively. These two maps enrich the representation dimensions of the event from the perspectives of time series morphology and time series relationship, and further improve the effective representation of the event.

[0159] This application utilizes the concept of graph convolutional neural networks to fuse vertex features of time series graphs and similarity graphs, and introduces an aggregation mechanism to enhance the event representation capability. The two feature fusion methods are implemented in parallel, which improves the event representation capability and avoids the reduction in modeling quality due to the limitations of a single modeling method.

[0160] This application calculates the distance between the high-dimensional embedding representations of different events, and uses hierarchical clustering to improve the intuitiveness of event clustering. Users can dynamically adjust the clustering threshold through the distance between events, thereby improving the domain adaptability of time series event modeling.

[0161] Based on the same inventive concept, this application also provides a battery abnormal data clustering device corresponding to the battery abnormal data clustering method. Since the principle of the device in this application is similar to the battery abnormal data clustering method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0162] Please see Figure 15 , Figure 15 This is a schematic diagram of the structure of the battery anomaly data clustering device provided in an embodiment of this application. Figure 15 As shown, the clustering device 800 for the battery anomaly data includes: The first determining module 801 is used to determine the original time series set based on the detection data of multiple sensors corresponding to the battery cell under test; The second determining module 802 is used to determine a time series data segment and an abnormal time set based on the original time series set. The time series data segment includes all detection times within a preset time period and the detection data corresponding to each detection time. The abnormal time set includes all abnormal times when the sensor collects detection data within the time series data segment. The time sequence graph set construction module 803 is used to construct a time sequence graph set based on the time difference of abnormal moments in the abnormal moment set and combined with a preset threshold. The time sequence graph set includes multiple time sequence graphs, and each time sequence graph includes at least one vertex and at least one edge. The similarity matrix forming module 804 is used to form a similarity matrix based on the time series data segments; The third determining module 805 is used to determine the similarity map set based on the similarity matrix; The event cluster set generation module 806 is used to perform vertex feature aggregation on the time sequence graph set and the similarity graph set to generate an event cluster set. Each cluster set represents a type of abnormal data of the battery under test. Each cluster set includes at least one event. Each event includes the time of occurrence of the abnormality, the duration of the abnormality, the associated sensor identifier, and the corresponding abnormal detection data features.

[0163] Please see Figure 16 , Figure 16 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. Figure 16 As shown, the electronic device 300 includes a processor 310, a memory 320, and a bus 330.

[0164] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 and the memory 320 communicate via the bus 330. When the machine-readable instructions are executed by the processor 310, they can perform the operations described above. Figure 1 The steps of the clustering method for abnormal battery data in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.

[0165] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of the clustering method for abnormal battery data in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.

[0166] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0167] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0168] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0169] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

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

[0171] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A clustering method for abnormal battery data, characterized in that, include: Based on the detection data from multiple sensors corresponding to the battery cell under test, the original time series set is determined; Based on the original time series set, a time series data segment and an abnormal time set are determined. The time series data segment includes all detection times within a preset time period and the detection data corresponding to each detection time. The abnormal time set includes all abnormal times when the sensor collects detection data within the time series data segment. Based on the time difference of abnormal moments in the abnormal moment set, a time series graph set is constructed in combination with a preset threshold. The time series graph set includes multiple time series graphs, each of which includes at least one vertex and at least one edge. The vertex of the time series graph represents a single sensor of the battery cell under test. The preset threshold is a global segmentation threshold. The time series graph set is constructed in the following way: Calculate the time difference between the abnormal moments of two adjacent sensors within the abnormal moment set; For each abnormal time difference, determine whether the abnormal time difference is less than or equal to the global segmentation threshold; For each abnormal time difference, if the abnormal time difference is less than or equal to the global segmentation threshold, then an edge with a weight equal to the abnormal time difference is formed between the two vertices. For each abnormal time difference, if the abnormal time difference is greater than the global segmentation threshold, the current time series graph is truncated and a new time series graph is established. Iterate through all elements in the time difference matrix and form a time sequence map set based on all generated time sequence maps; A similarity matrix is ​​formed based on the time series data segments; Based on the similarity matrix, determine the set of similarity graphs; Vertex feature aggregation is performed on the time series graph set and the similarity graph set to generate an event cluster set. Each cluster set represents a type of abnormal data of the battery under test. Each cluster set includes at least one event. Each event includes the time of occurrence of the abnormality, the duration of the abnormality, the associated sensor identifier, and the corresponding abnormal detection data features. The similarity matrix is ​​determined in the following way: Iterate through all sensor combinations, calculate the difference in absolute values ​​of the detection data in the time series data segments corresponding to each pair of sensors, and sum all the differences; perform a logarithmic operation on the sum of all the differences to obtain a normalized similarity value; arrange the normalized similarity values ​​of all sensor combinations into a similarity matrix, where the rows and columns of the similarity matrix correspond to the sensor numbers. The similarity graph set is determined in the following way: Each sensor is mapped to a vertex in a similarity graph; for any two vertices, the normalized similarity value is used as the weight of the edge connecting the two vertices; for each event's time series data segment, a similarity graph with weighted connections between all vertices is generated; a similarity graph set is formed by the similarity graphs of all events, and the similarity graph set includes the similarity graphs of all events, with each event's time series data segment corresponding to a fully connected similarity graph; The event cluster collection is generated in the following way: For each time series graph, the number of neighbors of each vertex and the sum of the time differences of all out-degree edges are calculated as time series graph features. For each similarity graph, the in-degree and out-degree of each vertex and the mean of all edge weights are calculated as similarity graph features. The time series graph features and similarity graph features of the same vertex are concatenated to form an event fusion embedding representation. The cosine similarity is calculated for the fusion embedding representations of every two events to construct an event distance matrix. Hierarchical clustering is performed according to a preset event distance threshold to generate a set of event clusters.

2. The method according to claim 1, characterized in that, The time-series data segment is a first matrix. The number of rows in the first matrix corresponds to the total number of the multiple sensors, and the number of columns in the first matrix corresponds to the total number of time periods after segmentation. Each matrix element contains all the detection data of that sensor within the corresponding time period, and the data is arranged in chronological order. The time series data segment is determined in the following manner: Scan the original time series set in chronological order, using a global threshold as the fixed time window length; Continuously capture multi-sensor data within each time window to form independent data segments; Arrange all data segments in chronological order to construct the first matrix.

3. The method according to claim 1, characterized in that, The set of abnormal moments is a second matrix. The number of rows in the second matrix corresponds to the total number of the multiple sensors, and the number of columns in the second matrix corresponds to the total number of the segmented time periods. Each matrix element contains the set of abnormal moments of that sensor within the corresponding time period. The set of abnormal times is determined in the following way: Define window length and statistical thresholds based on the long-short window method; The time series data segment is slid through a window, and the statistical characteristic value of the detected data within each window is calculated; When the window statistical feature value exceeds the preset anomaly judgment threshold, the detection time that meets the condition in the current window is recorded as an anomaly time.

4. A clustering device for abnormal battery data, characterized in that, include: The first determining module is used to determine the original time series set based on the detection data of multiple sensors corresponding to the battery cell under test; The second determining module is used to determine a time series data segment and an abnormal time set based on the original time series set. The time series data segment includes all detection times within a preset time period and the detection data corresponding to each detection time. The abnormal time set includes all abnormal times when the sensor collects detection data within the time series data segment. A timing graph set construction module is used to construct a timing graph set based on the time difference of abnormal moments in an abnormal moment set and a preset threshold. The timing graph set includes multiple timing graphs, each timing graph including at least one vertex and at least one edge. The vertex of the timing graph represents a single sensor of the battery cell under test. The preset threshold is a global segmentation threshold. The timing graph set is constructed in the following way: calculating the time difference of abnormal moments between two adjacent sensors in the abnormal moment set; for each abnormal moment time difference, determining whether the abnormal moment time difference is less than or equal to the global segmentation threshold; for each abnormal moment time difference, if the abnormal moment time difference is less than or equal to the global segmentation threshold, forming an edge with a weight equal to the abnormal moment time difference between the two vertices; for each abnormal moment time difference, if the abnormal moment time difference is greater than the global segmentation threshold, truncating the current timing graph and establishing a new timing graph; traversing all elements in the time difference matrix, and forming a timing graph set based on all generated timing graphs. The similarity matrix forming module is used to form a similarity matrix based on the time series data segment. The similarity matrix is ​​determined by: traversing all sensor combinations, calculating the difference in the absolute values ​​of the detection data in the time series data segment corresponding to each pair of sensors, and summing all differences; performing a logarithmic operation on the sum of all differences to obtain a normalized similarity value; arranging the normalized similarity values ​​of all sensor combinations into a similarity matrix, where the rows and columns of the similarity matrix correspond to the sensor numbers. The third determining module is used to determine a similarity graph set based on the similarity matrix. The similarity graph set is determined in the following ways: mapping each sensor to a vertex of the similarity graph; for any two vertices, using the normalized similarity value as the weight of the edge connecting the two vertices; for each event's time series data segment, generating a similarity graph with weighted connections between all vertices; the similarity graph set is composed of the similarity graphs of all events, and the similarity graph set includes the similarity graphs of all events, with each event's time series data segment corresponding to a fully connected similarity graph; The event cluster set generation module is used to aggregate vertex features of the time series graph set and the similarity graph set to generate an event cluster set. Each cluster set represents a type of abnormal data of the battery under test. Each cluster set includes at least one event. Each event includes the time of occurrence of the abnormality, the duration of the abnormality, the associated sensor identifier, and the corresponding abnormal detection data features. The event cluster set is generated in the following way: For each time series graph, the number of neighbors of each vertex and the sum of the time differences of all out-degree edges are calculated as time series graph features; for each similarity graph, the in-degree and out-degree of each vertex and the mean of the weights of all edges are calculated as similarity graph features; the time series graph features and similarity graph features of the same vertex are concatenated to form an event fusion embedding representation; the cosine similarity is calculated for the fusion embedding representations of every two events to construct an event distance matrix; hierarchical clustering is performed according to a preset event distance threshold to generate the event cluster set.

5. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method for detecting anomalies in real time series

    CN105320727A

  • Sensor time sequence anomaly detection method and system based on multi-modal variable correlation

    CN117708738A