Energy storage system state detection early warning method and system based on machine learning

By combining dynamic optimization of communication data from energy storage systems with machine learning models, accurate segmentation and efficient early warning of abnormal areas have been achieved, solving the problem of inaccurate segmentation of abnormal areas in energy storage systems and improving the accuracy of early warning and system security.

CN120996978APending Publication Date: 2025-11-21NINGXIA RONGGUANG POWER ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510980225.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

During operation, energy storage systems generate complex and noisy abnormal data, which can lead to inaccurate identification of abnormal areas, affecting the accuracy of status warnings and posing risks of missed and false alarms, making it difficult to ensure system safety.

Method used

By dynamically optimizing the state partitioning of communication data in the energy storage system, clustering and greedy algorithms are used to accurately divide abnormal areas, and machine learning models are combined for state detection and early warning. The expansion range is dynamically adjusted to enhance detection capabilities.

Benefits of technology

It significantly improved the accuracy of abnormal area classification, reduced missed and false alarms, improved the accuracy and response speed of early warning, and ensured the safe and stable operation of the energy storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996978A_ABST
    Figure CN120996978A_ABST
Patent Text Reader

Abstract

The invention discloses an energy storage system state detection early warning method and system based on machine learning, and relates to the technical field of power grid fault early warning, and the method comprises the following steps: obtaining an operation communication data packet of an energy storage system, extracting an abnormal data segment in the communication data packet, and constructing a first map; dividing the first atlas by adopting a clustering algorithm to obtain initial state partitions; performing similarity matching on the initial state partition based on a historical normal trajectory, and correcting parameters of the initial state partition through a greedy algorithm to obtain a first state partition; expanding the first state partition according to a preset expansion range to obtain a plurality of expansion map layers, and judging whether the current expansion map layer exceeds a preset security boundary or not; and dynamically adjusting the expansion range based on the judgment result, obtaining an optimal state partition and inputting the optimal state partition into a preset machine learning model for state detection early warning, thereby solving the problem of low state early warning accuracy caused by inaccurate data anomaly region division in the state detection process of the energy storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power grid fault early warning technology. More specifically, this invention relates to a method and system for state detection and early warning of energy storage systems based on machine learning. Background Technology

[0002] With the rapid development of new energy and smart grid technologies, energy storage systems, as a crucial component of the power system, are directly related to the overall performance and reliability of the power grid. In actual operation, energy storage systems often face complex operating conditions and variable environmental factors, which can easily lead to equipment failures, performance degradation, and even safety accidents. Therefore, how to monitor the operating status of energy storage systems in real time and provide timely warnings of anomalies has become a key technical challenge to ensure the safe operation of energy storage systems.

[0003] However, the distribution of abnormal data in energy storage systems is complex and noisy, leading to inaccurate delineation of abnormal areas. This ambiguous delineation results in unclear state partitioning, affecting the input quality of early warning models and consequently causing low accuracy in state detection and early warning, posing risks of missed and false alarms, and making it difficult to ensure system safety.

[0004] To address the above problems, this invention proposes a solution. Summary of the Invention

[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a machine learning-based method and system for energy storage system status detection and early warning. By dynamically optimizing the status partitioning of energy storage system communication data, the method addresses the problem of inaccurate data anomaly region division during energy storage system status detection, which leads to low accuracy in status early warning.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A machine learning-based method for state detection and early warning of energy storage systems includes the following steps: acquiring the operational communication data packets of the energy storage system and extracting abnormal data segments from the communication data packets to construct a first graph; dividing the first graph using a clustering algorithm to obtain initial state partitions; performing similarity matching on the initial state partitions based on historical normal trajectories and correcting the parameters of the initial state partitions using a greedy algorithm to obtain the first state partition; expanding the first state partition according to a preset expansion range to obtain several expanded graph layers, and determining whether the current expanded graph layer exceeds a preset safety boundary; dynamically adjusting the expansion range based on the judgment result to obtain the optimal state partition and inputting it into a preset machine learning model for state detection and early warning.

[0008] In a preferred embodiment, the step of extracting abnormal data segments from communication data packets and constructing a first graph specifically involves: performing protocol reverse parsing on the running communication data packets to extract the timestamp sequence and abnormal identifier bits from the data packets; constructing a communication traffic time-series window based on the timestamp sequence, and calculating the entropy mutation point of the data packets within the communication traffic time-series window; extracting data segments of a preset time length centered on the entropy mutation point to obtain several first abnormal data segments; performing feature vectorization on all first abnormal data segments to obtain several directed graphs; and merging all directed graphs to obtain the first graph.

[0009] In a preferred embodiment, the step of using a clustering algorithm to divide the first graph to obtain an initial state partition specifically involves: extracting the degree distribution matrix and edge weight matrix of all nodes from the first graph; constructing a first clustering constraint based on the degree distribution matrix; inputting the edge weight matrix into the spectral clustering algorithm to perform graph segmentation on the first graph based on the first clustering constraint; optimizing the modularity of the graph segmentation results, merging subgraphs with modularity below a preset threshold, and obtaining the initial state partition.

[0010] In a preferred embodiment, the step of performing similarity matching on the initial state partition based on historical normal trajectories and correcting the initial state partition parameters using a greedy algorithm to obtain a first state partition specifically involves: extracting feature vectors of historical normal trajectories from a historical normal trajectory database; calculating the cosine similarity between the feature vector of each subgraph in the initial state partition and the feature vector of the historical normal trajectory; identifying the partition to be corrected based on the cosine similarity, and using the boundary nodes of the partition to be corrected as the starting point, iteratively adjusting the parameters of the partition to be corrected using a greedy algorithm to obtain a candidate parameter correction set; iteratively optimizing the candidate parameter correction set through gradient descent, and outputting a first state partition that meets the preset convergence conditions.

[0011] In a preferred embodiment, the step of iteratively adjusting the parameters of the partition to be corrected using a greedy algorithm to obtain a candidate parameter correction set specifically involves: obtaining the coordinates of the boundary nodes of the partition to be corrected and calculating the average Euclidean distance between adjacent boundary nodes to obtain the offset parameter; uniformly decomposing the offset parameter into several discrete points within a preset range and collecting the dominant power transmission direction within the correction partition to obtain the center point movement vector; generating several extension paths along the center point movement vector at preset angles and extracting density gradient values ​​at equal intervals within a preset dynamic density threshold space; constructing a parameter matrix based on the several discrete points, several extension paths, and density gradient values ​​as the correction partition parameters; and iteratively adjusting the parameters of the partition to be corrected using a greedy algorithm to obtain the candidate parameter correction set.

[0012] In a preferred embodiment, the step of expanding the first state partition according to a preset expansion range to obtain several expanded map layers, and determining whether the current expanded map layer exceeds a preset safety boundary, specifically involves: using the centroid coordinates of the first state partition as a reference point and expanding along the battery pack topology in three-dimensional space by a preset distance to form a first expanded map layer; calculating the second derivatives of the voltage and temperature gradients within the expanded map layer; if the second derivative exceeds the dynamic safety threshold, determining that the current expanded layer exceeds the safety boundary; if it does not exceed the safety boundary, continuing to expand along three-dimensional space to form the next expanded map layer.

[0013] In a preferred embodiment, the step of dynamically adjusting the expansion range based on the judgment result to obtain the optimal state partition is as follows: when the expansion graph layer exceeds the safety boundary, backtrack to the previous expansion graph layer that has not exceeded the boundary and construct a Bézier surface using the boundary point of that layer as the control vertex; sample a number of preset path points on the Bézier surface and calculate the path curvature; shrink the expansion range based on the path with the minimum curvature to obtain the optimal state partition.

[0014] In a preferred embodiment, the step of inputting the data into a preset machine learning model for state detection and early warning specifically involves: acquiring multi-dimensional feature data within the optimal state partition and performing wavelet packet transformation on the multi-dimensional feature data to obtain a time-frequency joint matrix; training a long short-term memory network using the time-frequency joint matrix to obtain a trained long short-term memory network; generating feature enhancement vectors based on the trained long short-term memory network through gated recurrent units; and inputting the feature enhancement vectors into a pre-trained risk assessment tree model for state detection and early warning.

[0015] The technical effects and advantages of the machine learning-based energy storage system state detection and early warning method and system of this invention are as follows:

[0016] 1. This invention extracts and constructs maps of abnormal data segments from communication data packets collected during the operation of an energy storage system. It then uses advanced clustering algorithms to initially divide abnormal regions, further performing similarity matching based on historical normal trajectories and dynamically correcting state partitioning parameters using a greedy algorithm. This significantly improves the accuracy of abnormal region division and solves the problems of ambiguous abnormal boundaries and unclear state partitioning in traditional methods. Simultaneously, this method dynamically expands the initial state partitioning by a preset expansion range and, combined with real-time judgment of safety boundaries, adaptively adjusts the detection range of abnormal regions, enhancing the ability to capture complex and diverse abnormal patterns and effectively reducing false alarms and missed alarms caused by inaccurate abnormal region division. Finally, the optimized state partitioning is input into a machine learning model to achieve accurate detection and early warning of the energy storage system's operating status, greatly improving the accuracy and response speed of early warnings, effectively ensuring the safe and stable operation of the energy storage system, enhancing system reliability and operating efficiency, and promoting the efficient development of smart grids and energy storage technologies. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the machine learning-based energy storage system state detection and early warning method of the present invention.

[0018] Figure 2 This is a schematic diagram of the structure of the energy storage system state detection and early warning system based on machine learning according to the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0020] Example 1, Figure 1 The present invention provides a machine learning-based method for state detection and early warning of energy storage systems, comprising the following steps:

[0021] S1, acquire the operation communication data packets of the energy storage system, extract abnormal data segments from the communication data packets, and construct the first map;

[0022] In this example, abnormal data segments are extracted from communication data packets to construct the first data map, specifically as follows:

[0023] Perform reverse protocol parsing on the running communication data packets to extract the timestamp sequence and anomaly flag bits from the data packets;

[0024] A communication traffic time series window is constructed based on the timestamp sequence, and the entropy change point of the data packet is calculated within the communication traffic time series window;

[0025] A data segment of a preset time length is extracted centered on the entropy mutation point to obtain several first abnormal data segments;

[0026] Feature vectorization is performed on all the first abnormal data segments to obtain several directed graphs;

[0027] Merging all directed graphs yields the first graph.

[0028] It should be noted that during the actual operation of the energy storage system, the system monitoring nodes continuously collect communication data between devices such as the Battery Management System (BMS), Energy Management System (EMS), and PCS controller. This communication data is encapsulated in the form of data packets, which typically include, but are not limited to, device ID, timestamp, data fields, checksums, and status identifiers.

[0029] Since the communication protocol may be a vendor-defined protocol, the data packet content is first subjected to reverse protocol parsing. Reverse parsing includes the following steps:

[0030] Header identification of data frames is performed using known communication format templates;

[0031] Extract the timestamp sequence of each data packet;

[0032] Detect and record abnormal flags, such as frame errors, abnormal retransmission counts, illegal data types, and illegal command codes;

[0033] The extracted timestamps and anomaly identifiers are stored as structured log data;

[0034] Furthermore, according to the timestamp sequence, the communication data stream is divided into multiple time-series windows along the time axis, for example, one window every 5 seconds; within each time-series window, the distribution of key fields (such as status bits and data bits) in the data packets is analyzed, and their Shannon entropy is calculated; the rate of change of entropy between adjacent windows is calculated using differential operations; it is determined whether the rate of change of entropy exceeds a set threshold. If it does, it is marked as an entropy mutation point. With the entropy mutation point as the center, a set time length is extended forward and backward (for example, 2 seconds before and after), and the corresponding data packets are intercepted to form the first abnormal data segment.

[0035] For example, if an entropy mutation is detected at t=30.5s, then all data packets from t=28.5s to t=32.5s constitute an anomalous data segment, and each anomalous data segment is processed as follows:

[0036] Extract key features from the data packet sequence within a segment, including command type, source and destination devices, anomaly identifier type, and inter-packet delay;

[0037] Each data packet is converted into a node, and directed edges are established between packets according to their chronological order.

[0038] The weight of each edge is determined by the time interval between data packets and the feature difference.

[0039] Ultimately, each anomalous data segment is represented as a directed graph structure, i.e., a single graph fragment.

[0040] Finally, all directed graphs corresponding to the abnormal data segments were uniformly numbered, and edge structures and node attributes were merged to construct a complete first graph. Different subgraphs in the graph correspond to abnormal behavior segments at different times, facilitating subsequent clustering analysis and state classification.

[0041] S2, use a clustering algorithm to divide the first map into initial state partitions;

[0042] In this example, a clustering algorithm is used to divide the first graph to obtain the initial state partitions, specifically:

[0043] Extract the degree distribution matrix and edge weight matrix of all nodes from the first graph;

[0044] The first clustering constraint is constructed based on the degree distribution matrix;

[0045] Based on the first clustering constraint, the edge weight matrix is ​​input into the spectral clustering algorithm to perform graph segmentation on the first graph.

[0046] Modularity optimization is performed on the graph segmentation results, and subgraphs with modularity below a preset threshold are merged to obtain the initial state partition.

[0047] It should be noted that the first graph is a comprehensive graph containing multiple directed subgraphs, where each node represents a data packet; each edge represents the communication timing or feature association; and the weight of the edge is calculated based on the feature similarity, time interval, and degree of anomaly between data packets.

[0048] Furthermore, a degree distribution matrix is ​​constructed using the in-degree and out-degree of each node in the statistical graph, and the first clustering constraint is constructed based on the degree distribution matrix, specifically:

[0049] Set maximum in-degree and out-degree thresholds to filter out sparsely connected or abnormally densely connected nodes;

[0050] The average in-degree of nodes in the same cluster must be no less than a certain value to ensure that the communication behavior within the cluster is consistent.

[0051] In this example, based on the first clustering constraint, the edge weight matrix is ​​input into the spectral clustering algorithm to perform graph segmentation on the first graph, specifically as follows:

[0052] Constructing the Laplacian matrix of the graph based on the edge weight matrix;

[0053] Perform eigenvalue decomposition on the Laplacian matrix to obtain the eigenvectors corresponding to the first k smallest eigenvalues, and construct the eigenma matrix.

[0054] K-means clustering is used to divide the feature matrix into k sub-graphs, each representing a candidate state partition.

[0055] In this example, the graph segmentation results are optimized for modularity by merging subgraphs with modularity below a preset threshold to obtain the initial state partitioning, specifically:

[0056] Calculate the modularity of each subgraph to evaluate the deviation of the internal edge density of the subgraph from that of a random graph;

[0057] If the modularity of some subgraphs is lower than a preset threshold, they are considered to have loose internal connections or unstable clustering.

[0058] Merge such subgraphs with their highest connectivity neighboring subgraphs and re-evaluate their modularity;

[0059] The merge operation can be iterated multiple times until the modularity of all subgraphs is higher than the threshold.

[0060] S3, perform similarity matching on the initial state partition based on the historical normal trajectory, and correct the initial state partition parameters through a greedy algorithm to obtain the first state partition;

[0061] In this example, similarity matching is performed on the initial state partitions based on historical normal trajectories, and the parameters of the initial state partitions are corrected using a greedy algorithm to obtain the first state partition, specifically:

[0062] Based on the historical normal trajectory database, feature vectors of historical normal trajectories are extracted;

[0063] Calculate the cosine similarity between the feature vector of each sub-graph in the initial state partition and the feature vector of the historical normal trajectory;

[0064] The partitions to be corrected are identified based on cosine similarity, and the parameters of the partitions to be corrected are iteratively adjusted using a greedy algorithm, starting from the boundary nodes of the partitions to be corrected, to obtain a set of candidate parameter corrections.

[0065] The candidate parameter correction set is iteratively optimized by gradient descent, and the first state partition that satisfies the preset convergence condition is output.

[0066] It should be noted that gradient descent is a numerical optimization method used to find optimal solutions, and it is applicable to the process of correcting state partitioning parameters in this invention. In practical applications, the system first uses the candidate parameter correction set as the initial point, calculates the similarity score between the current partition and the historical normal trajectory, and constructs a loss function based on this score to reflect the degree of deviation of the current solution. Then, the system calculates the gradient of this loss function with respect to each parameter (i.e., the rate of change of the loss function when each parameter changes), thereby determining how to adjust each parameter to minimize the overall error most quickly. In each iteration, the system makes small adjustments to the parameters according to the gradient direction and continuously updates the partition boundary position and shape. As multiple iterations proceed, the similarity score gradually improves. When the improvement is lower than a set threshold or the maximum number of iterations is reached, convergence is considered achieved. This method effectively avoids parameter correction from getting trapped in local optima, while improving the degree of consistency between the partitioning results and the historical normal pattern, achieving high-precision state partitioning optimization.

[0067] In this example, a greedy algorithm is used to iteratively adjust the partition parameters to be corrected, resulting in a candidate parameter correction set, specifically:

[0068] Obtain the coordinates of the boundary nodes of the partition to be corrected, and calculate the average Euclidean distance between adjacent boundary nodes to obtain the offset parameter;

[0069] Within a preset range, the offset parameter is uniformly decomposed into several discrete points, and the dominant power transmission direction within the correction partition is collected to obtain the center point movement vector.

[0070] Move the vector along the center point, generate several extension paths at preset angles, and extract density gradient values ​​at equal intervals within the preset dynamic density threshold space.

[0071] Based on several discrete points, several extension paths, and density gradient values, a parameter matrix is ​​constructed and used as the correction partitioning parameter;

[0072] A greedy algorithm is used to iteratively adjust the parameters of the partition to be corrected, and a set of candidate parameter corrections is obtained.

[0073] It should be noted that for a subgraph identified as a partition to be corrected, its boundary node set is first extracted. Boundary nodes are key points that are connected to other subgraphs or have abrupt changes in information entropy. Within a preset range, the offset is uniformly decomposed into several discrete points, and the behavior of data packets or nodes within the partition to be corrected is statistically analyzed to extract the dominant power transmission direction (such as the direction of SOC change, voltage change, and flow intensity). The direction vector is normalized and set as the center point movement vector, representing the main trend of the partition boundary's possible expansion in space.

[0074] In this example, a greedy algorithm is used to iteratively adjust the partition parameters to be corrected, resulting in a candidate parameter correction set, specifically:

[0075] Based on the current partition parameters to be corrected, a candidate solution set is generated in the solution space according to the Manhattan distance rule, and the DTW distance change rate between each candidate solution and the historical trajectory is calculated.

[0076] The candidate solution with the largest distance decrease rate is selected as the main iteration direction, while some suboptimal solutions are accepted with a probability function, and the probability value decreases as the temperature coefficient decays.

[0077] To detect topological conflicts caused by parameter correction, the Lagrange multiplier method is used to reconstruct the constraints and perform secondary optimization of the boundary parameters. The correction is terminated when the standard deviation of the distance decrease rate is less than 0.5% and the partition overlap rate is lower than the preset tolerance in three consecutive iterations.

[0078] S4, expand the first state partition according to the preset expansion range to obtain several extended graph layers, and determine whether the current extended graph layer exceeds the preset safety boundary.

[0079] In this example, the first state partition is expanded according to a preset expansion range to obtain several expanded graph layers, and it is determined whether the current expanded graph layer exceeds the preset safety boundary, specifically:

[0080] Using the centroid coordinates of the first state partition as a reference point and extending a preset distance along the battery pack topology in three-dimensional space, a first extended map layer is formed.

[0081] Calculate the second derivatives of the voltage and temperature gradients within the extended spectral layer;

[0082] If the second derivative exceeds the dynamic safety threshold, the current extension layer is determined to have exceeded the safety boundary.

[0083] If the safety boundary is not exceeded, the system continues to expand along the three-dimensional space to form the next extended map layer.

[0084] It should be noted that battery pack topology refers to the spatial and electrical connection and arrangement of individual battery cells in an energy storage system. It includes not only the physical layout between battery cells (such as matrix arrangement, series and parallel connection), but also the communication and management paths (such as the data flow direction and sampling order of the BMS).

[0085] The second derivative of the voltage-temperature gradient is a mathematical quantity describing the trend of voltage and temperature variation with spatial location within a battery pack, used to identify drastic local anomalies. For example, the first derivative represents the rate of change of voltage or temperature in a certain direction, while the second derivative measures the acceleration of this change. A sudden increase in the value of the second derivative indicates potential safety hazards such as abnormal heating, uneven heat dissipation, or sudden voltage drops in that area. Therefore, this indicator is often used as one of the key criteria for determining whether a boundary region exceeds a safety threshold.

[0086] Furthermore, the system first uses the centroid of the current state partition as a reference point, and, referencing the physical and logical layout of the battery pack in the energy storage system, expands outward by a predetermined distance along its topological direction in three-dimensional space to form the first extended map layer. Next, the system collects voltage and temperature information for each node in this extended layer and calculates the second derivatives of the voltage and temperature gradients generated by spatial variations. If the derivative value exceeds a preset safety threshold, it indicates that the extended region may be on the critical edge of thermal runaway, overload, or abnormal aging, thus determining that the current extended layer has exceeded its boundary. If it has not exceeded the boundary, it continues to expand according to the same rules to form the next extended map layer until the boundary conditions are triggered. This method, through layer-by-layer advancement and continuous detection, achieves the judgment of the dynamic safety of the state partition boundary, providing a scientific basis for the subsequent expansion range contraction and risk path planning of the system.

[0087] S5 dynamically adjusts the expansion range based on the judgment result, obtains the optimal state partition, and inputs it into the preset machine learning model for state detection and early warning.

[0088] In this example, the expansion range is dynamically adjusted based on the judgment result to obtain the optimal state partition, specifically as follows:

[0089] When the extended graph layer exceeds the safety boundary, backtrack to the previous extended graph layer that has not exceeded the boundary and construct a Bézier surface using the boundary points of that layer as control vertices;

[0090] Sample several preset path points on the Bézier surface and calculate the path curvature;

[0091] By shrinking the expansion range based on the path with minimum curvature, the optimal state partition is obtained.

[0092] It should be noted that the Bézier surface is generated in 3D space by extracting the coordinates of the boundary nodes of the extended atlas layer as control points. Each control point affects the shape of the surface, and a continuous, differentiable, smooth surface is formed through weighted interpolation. During the construction process, the system automatically adjusts the arrangement of control points according to the distribution density of the boundary nodes to ensure that the surface can fit the true shape of the boundary while having good spatial extensibility.

[0093] Furthermore, path curvature is a geometric quantity describing the degree of bending of a spatial path at a certain point, reflecting the drastic change in path direction. Intuitively, the smaller the curvature, the straighter the path; the larger the curvature, the more pronounced the bend in the path at that location. In this invention, by calculating the curvature of each sampled path on the Bézier surface, it is possible to determine which path is the most stable and deviates the least from the original trajectory. The system preferentially selects the path with the smallest curvature as the contraction direction because this path typically has lower risk variability and better thermal, electrical, and pressure continuity in space, which is beneficial for obtaining an optimal state partition with structural stability and lower risk.

[0094] Furthermore, firstly, after the expanded graph layer is determined to have exceeded the safety boundary, the system backtracks the expansion process to the previous, unbounded graph layer and extracts all boundary nodes of that layer as control vertices to construct a spatial Bézier surface. This surface smoothly fits an envelope region in 3D space to capture the potential safe outer boundary of the state partition. On the Bézier surface, the system samples multiple path points according to a preset density or direction strategy to obtain a set of paths from the current centroid to the boundary in different directions. Subsequently, the curvature change trend of each path is calculated, and the path with the smallest curvature is selected as the optimal shrinkage path. Finally, the system shrinks the current expansion range along this path direction to obtain an optimal state partition with a smoother shape and lower risk. This method effectively avoids false alarms or misreports caused by excessive boundary expansion, improving the spatial adaptability and decision reliability of the warning boundary.

[0095] In this example, the input is fed into a preset machine learning model for state detection and early warning, specifically as follows:

[0096] Obtain multidimensional feature data within the optimal state partition, and perform wavelet packet transform on the multidimensional feature data to obtain the time-frequency joint matrix;

[0097] The long short-term memory network was trained using a time-frequency joint matrix to obtain the trained long short-term memory network;

[0098] Based on the trained Long Short-Term Memory network, feature enhancement vectors are generated through gated recurrent units;

[0099] The feature enhancement vector is input into a pre-trained risk assessment tree model for state detection and early warning.

[0100] In this example, the feature enhancement vector is input into a pre-trained risk assessment tree model for state detection and early warning, specifically as follows:

[0101] Input the spatiotemporal feature enhancement vectors into the pre-trained risk assessment tree model;

[0102] Traverse the tree model branches and calculate the information gain value of each node. When the information gain value reaches the risk threshold, trigger an early warning signal.

[0103] Based on the tree level where the warning signal is located, a fault level label is generated, and a three-dimensional heat map-style warning map is output by combining the spatial coordinates of the optimal state partition.

[0104] It should be noted that, firstly, multi-dimensional feature data closely related to the operating state of the energy storage unit, such as voltage, current, temperature, SOC (state of charge), and power fluctuations, are extracted from the optimal state partition. Subsequently, wavelet packet transform technology is used to process these time-series feature data, achieving multi-scale time-frequency decomposition of the signal, thereby obtaining a joint time-frequency matrix that simultaneously preserves time and frequency features. This matrix not only reflects the instantaneous changes in abnormal behavior but also retains its periodic or trend structure. The system further inputs the joint time-frequency matrix into a pre-trained Long Short-Term Memory (LSTM) network, utilizing its sensitivity to temporal dependencies to extract potential evolutionary patterns and state features. Based on the LSTM output, a gated recurrent unit mechanism is introduced to further generate feature enhancement vectors, improving the model's ability to identify edge states and ambiguous transition regions. Finally, this feature enhancement vector is input into a pre-constructed risk assessment tree model to perform hierarchical judgment and early warning level assessment of the current state partition. Through the collaborative judgment of this combined model, the system can provide early warning of minor anomalies in the operating state, and at the same time has the ability to respond to sudden risks with high confidence, thereby effectively improving the overall safety and reliability of the energy storage system.

[0105] Example 2, Figure 2 The present invention provides a machine learning-based energy storage system state detection and early warning system, comprising a data acquisition module, a partitioning module, a trajectory matching module, a boundary expansion module, and a state early warning module.

[0106] The data acquisition module is used to acquire the operation communication data packets of the energy storage system, extract abnormal data segments from the communication data packets, and construct the first map.

[0107] The partitioning module is used to divide the first map using a clustering algorithm to obtain the initial state partitions;

[0108] The trajectory matching module is used to perform similarity matching on the initial state partition based on historical normal trajectories, and to correct the parameters of the initial state partition using a greedy algorithm to obtain the first state partition.

[0109] The boundary expansion module is used to expand the first state partition according to a preset expansion range to obtain several expanded graph layers, and to determine whether the current expanded graph layer exceeds the preset safety boundary.

[0110] The status warning module is used to dynamically adjust the expansion range based on the judgment results, obtain the optimal status partition, and input it into the preset machine learning model for status detection and warning.

[0111] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.

[0112] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

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

[0114] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included 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.

[0115] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A machine learning-based method for state detection and early warning of energy storage systems, characterized in that, Includes the following steps: Acquire the operational communication data packets of the energy storage system, extract abnormal data segments from the communication data packets, and construct the first map; Clustering algorithms are used to divide the first map into initial state partitions; The initial state partitions are similar to those based on historical normal trajectories, and the parameters of the initial state partitions are corrected using a greedy algorithm to obtain the first state partitions. The first state partition is expanded according to a preset expansion range to obtain several expanded graph layers, and it is determined whether the current expanded graph layer exceeds the preset safety boundary. The expansion range is dynamically adjusted based on the judgment results to obtain the optimal state partition, which is then input into a preset machine learning model for state detection and early warning.

2. The energy storage system state detection and early warning method based on machine learning according to claim 1, characterized in that, The step of extracting abnormal data segments from communication data packets and constructing the first map specifically involves: Perform reverse protocol parsing on the running communication data packets to extract the timestamp sequence and anomaly flag bits from the data packets; A communication traffic time series window is constructed based on the timestamp sequence, and the entropy change point of the data packet is calculated within the communication traffic time series window; A data segment of a preset time length is extracted centered on the entropy mutation point to obtain several first abnormal data segments; Feature vectorization is performed on all the first abnormal data segments to obtain several directed graphs; Merging all directed graphs yields the first graph.

3. The machine learning-based energy storage system state detection and early warning method according to claim 2, characterized in that, The first graph is divided using a clustering algorithm to obtain initial state partitions, specifically as follows: Extract the degree distribution matrix and edge weight matrix of all nodes from the first graph; The first clustering constraint is constructed based on the degree distribution matrix; Based on the first clustering constraint, the edge weight matrix is ​​input into the spectral clustering algorithm to perform graph segmentation on the first graph. Modularity optimization is performed on the graph segmentation results, and subgraphs with modularity below a preset threshold are merged to obtain the initial state partition.

4. The energy storage system state detection and early warning method based on machine learning according to claim 3, characterized in that, The process involves performing similarity matching on the initial state partitions based on historical normal trajectories, and then correcting the initial state partition parameters using a greedy algorithm to obtain the first state partition. Specifically: Based on the historical normal trajectory database, feature vectors of historical normal trajectories are extracted; Calculate the cosine similarity between the feature vector of each sub-graph in the initial state partition and the feature vector of the historical normal trajectory; The partitions to be corrected are identified based on cosine similarity, and the parameters of the partitions to be corrected are iteratively adjusted using a greedy algorithm, starting from the boundary nodes of the partitions to be corrected, to obtain a set of candidate parameter corrections. The candidate parameter correction set is iteratively optimized by gradient descent, and the first state partition that satisfies the preset convergence condition is output.

5. The energy storage system state detection and early warning method based on machine learning according to claim 4, characterized in that, The greedy algorithm is used to iteratively adjust the partition parameters to be corrected, and a candidate parameter correction set is obtained. Specifically: Obtain the coordinates of the boundary nodes of the partition to be corrected, and calculate the average Euclidean distance between adjacent boundary nodes to obtain the offset parameter; Within a preset range, the offset parameter is uniformly decomposed into several discrete points, and the dominant power transmission direction within the correction partition is collected to obtain the center point movement vector. The vector moves along the center point, generates several extension paths at preset angles, and extracts density gradient values ​​at equal intervals within the preset dynamic density threshold space. Based on several discrete points, several extension paths, and density gradient values, a parameter matrix is ​​constructed and used as the correction partitioning parameter; A greedy algorithm is used to iteratively adjust the parameters of the partition to be corrected, and a set of candidate parameter corrections is obtained.

6. The energy storage system state detection and early warning method based on machine learning according to claim 5, characterized in that, The step of expanding the first state partition according to a preset expansion range to obtain several expanded graph layers, and determining whether the current expanded graph layer exceeds a preset safety boundary, specifically involves: Using the centroid coordinates of the first state partition as a reference point and extending a preset distance along the battery pack topology in three-dimensional space, a first extended map layer is formed. Calculate the second derivatives of the voltage and temperature gradients within the extended spectral layer; If the second derivative exceeds the preset safety threshold, the current extended graph layer is determined to have exceeded the safety boundary. If the safety boundary is not exceeded, the system continues to expand along the three-dimensional space to form the next extended map layer.

7. The energy storage system state detection and early warning method based on machine learning according to claim 6, characterized in that, The process of dynamically adjusting the expansion range based on the judgment result to obtain the optimal state partition is as follows: When the extended graph layer exceeds the safety boundary, backtrack to the previous extended graph layer that has not exceeded the boundary and construct a Bézier surface using the boundary points of that layer as control vertices; Sample several preset path points on the Bézier surface and calculate the path curvature; By shrinking the expansion range based on the path with minimum curvature, the optimal state partition is obtained.

8. The energy storage system state detection and early warning method based on machine learning according to claim 7, characterized in that, The input to the preset machine learning model for state detection and early warning specifically includes: Obtain multidimensional feature data within the optimal state partition, and perform wavelet packet transform on the multidimensional feature data to obtain the time-frequency joint matrix; The long short-term memory network was trained using a time-frequency joint matrix to obtain the trained long short-term memory network; Based on the trained Long Short-Term Memory network, feature enhancement vectors are generated through gated recurrent units; The feature enhancement vector is input into a pre-trained risk assessment tree model for state detection and early warning.

9. A machine learning-based energy storage system state detection and early warning system, employing the machine learning-based energy storage system state detection and early warning method according to any one of claims 1-8, characterized in that, It includes a data acquisition module, a partitioning module, a trajectory matching module, a boundary expansion module, and a status warning module. The data acquisition module is used to acquire the operation communication data packets of the energy storage system, extract abnormal data segments from the communication data packets, and construct the first map. The partitioning module is used to divide the first map using a clustering algorithm to obtain the initial state partitions; The trajectory matching module is used to perform similarity matching on the initial state partition based on historical normal trajectories, and to correct the parameters of the initial state partition using a greedy algorithm to obtain the first state partition. The boundary expansion module is used to expand the first state partition according to a preset expansion range to obtain several expanded graph layers, and to determine whether the current expanded graph layer exceeds the preset safety boundary. The status warning module is used to dynamically adjust the expansion range based on the judgment results, obtain the optimal status partition, and input it into the preset machine learning model for status detection and warning.