Power data anomaly identification method, device and equipment based on space-time relevance

By clustering power data and improving the isolated forest algorithm, combined with equipment and time information to identify false anomalies and eliminate invalid data, the problem of low accuracy of the isolated forest algorithm in power data anomaly identification is solved, and higher identification accuracy is achieved.

CN121901975APending Publication Date: 2026-04-21INST OF ECONOMIC & TECH STATE GRID HEBEI ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF ECONOMIC & TECH STATE GRID HEBEI ELECTRIC POWER
Filing Date
2026-01-06
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The isolated forest algorithm cannot consider temporal and spatial effects in power data anomaly identification, resulting in low identification accuracy.

Method used

By clustering the power data of the target power system, the first abnormal power dataset is determined. The parameters of the isolated forest algorithm are improved, and false abnormal data are identified by combining preset acquisition equipment and time. Invalid data is removed, and finally, the third abnormal power dataset is obtained by merging.

Benefits of technology

It improves the accuracy of power data anomaly identification, taking into account the impact of factors such as time, space and equipment maintenance, and ensures the accuracy of abnormal data in the dataset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901975A_ABST
    Figure CN121901975A_ABST
Patent Text Reader

Abstract

The invention provides an electric power data anomaly identification method, device and equipment based on space-time relevance, and relates to the technical field of electric power systems. The method comprises the following steps: clustering power data of a target power system in a preset time period, and determining a first abnormal power data set; improving an isolated forest algorithm based on the first abnormal power data set, and obtaining a second abnormal power data set according to the improved isolated forest algorithm; identifying pseudo-abnormal power data based on the preset acquisition position and the preset acquisition time of each abnormal power data, removing the pseudo-abnormal power data, removing invalid power data according to the maintenance record of the target power system in the preset time period, and combining the first abnormal power data set and the second abnormal power data set after the invalid power data is removed, and obtaining a third abnormal power data set. According to the method, the influence of factors such as time, space and equipment maintenance on abnormal identification of the power data can be considered, and the identification accuracy of the abnormal data is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and in particular to a method, apparatus and equipment for identifying power data anomalies based on spatiotemporal correlation. Background Technology

[0002] Power data anomaly identification is a crucial aspect of data governance in new power systems. Its core function is to accurately distinguish between normal fluctuations and abnormal deviations from massive, dynamic power data. Common implementation paths include quantitative judgment based on statistical features and pattern recognition based on algorithmic models, which must be adapted to the multi-source, heterogeneous, and real-time updated characteristics of power data. The identification process needs to cover scenarios such as numerical anomalies in single-point data and trend anomalies in time-series data. It must rely on the distribution patterns of the data itself while also considering the business logic of the entire power production, transmission, and consumption chain, thus laying a solid data foundation for subsequent applications such as grid dispatching and load forecasting.

[0003] In existing technologies, Z-score and Isolation Forest algorithms are mainly used for anomaly identification. Z-score calculates the standard deviation of data from the mean and sets a fixed threshold to filter out outliers. It relies heavily on the assumption of a normal distribution, but since power data is typically not normally distributed, Z-score is not suitable for anomaly identification. Isolation Forest, on the other hand, uses unsupervised learning to isolate data by constructing multiple decision trees, identifying isolated points that deviate from the majority of power data as anomalies. These methods do not require complex prior business knowledge, have a simple computational process, and are highly efficient, showing some effectiveness in identifying anomalies in traditional power systems.

[0004] However, when identifying abnormal power data, the isolated forest algorithm usually relies on experience to determine the ratio of abnormal data, and it cannot take into account the effects of time and space, thus resulting in a low identification accuracy. Summary of the Invention

[0005] This invention provides a method, apparatus, and device for identifying power data anomalies based on spatiotemporal correlation, in order to solve the problem that the isolated forest algorithm cannot take into account the effects of time and space, thus resulting in low identification accuracy.

[0006] In a first aspect, embodiments of the present invention provide a method for identifying power data anomalies based on spatiotemporal correlation, including: Cluster the power data of the target power system within a preset time period to obtain the clustering results, and determine the first abnormal power data set based on the clustering results; The parameters of the Isolation Forest algorithm are improved based on the first abnormal power dataset, and a second abnormal power dataset is obtained based on the improved Isolation Forest algorithm and power data within a preset time period. Based on the preset acquisition devices and preset acquisition times of each abnormal power data in the second abnormal power dataset, false abnormal power data are identified and removed to obtain the updated second abnormal power dataset. Based on the maintenance records of the target power system within a preset time period, invalid power data is removed from the first and second abnormal power datasets. The first and second abnormal power datasets, after removing the invalid power data, are then merged to obtain the third abnormal power dataset.

[0007] Secondly, embodiments of the present invention provide a power data anomaly identification device based on spatiotemporal correlation, comprising: The clustering module is used to cluster the power data of the target power system within a preset time period, obtain the clustering results, and determine the first abnormal power data set based on the clustering results. An improvement module is used to improve the parameters of the Isolation Forest algorithm based on the first abnormal power dataset, and to obtain the second abnormal power dataset based on the improved Isolation Forest algorithm and power data within a preset time period. The elimination module is used to identify and eliminate false abnormal power data based on the preset acquisition device and preset acquisition time of each abnormal power data in the second abnormal power dataset, so as to obtain the updated second abnormal power dataset. The merging module is used to remove invalid power data from the first abnormal power dataset and the second abnormal power dataset based on the maintenance records of the target power system within a preset time period, and then merge the first abnormal power dataset and the second abnormal power dataset after removing the invalid power data to obtain a third abnormal power dataset.

[0008] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.

[0009] In this embodiment of the invention, by clustering the power data of the target power system within a preset time period, a first abnormal power dataset is obtained. This dataset can extract abnormal data that does not conform to the group's patterns from the power data. A second abnormal power dataset is obtained through the isolated forest algorithm. The abnormal power data is corrected and updated according to the preset acquisition equipment and preset acquisition time. This takes into account the impact of different times and equipment locations, improving the accuracy of the second abnormal power dataset. Invalid power data is removed from the first and second abnormal power datasets by combining the maintenance records of the target power system, resulting in a final third abnormal power dataset. This ensures that the third power dataset includes both abnormal power data that does not conform to the group's patterns and abnormal data that does not conform to its own operating patterns. It also takes into account the impact of factors such as time, space, and equipment maintenance on the identification of abnormal power data, effectively improving the accuracy of abnormal data identification. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating the implementation of the power data anomaly identification method based on spatiotemporal correlation provided in this embodiment of the invention. Figure 2 This is a flowchart illustrating the implementation of step S110 of the power data anomaly identification method based on spatiotemporal correlation provided in this embodiment of the invention. Figure 3 This is a flowchart illustrating the implementation of step S130 of the power data anomaly identification method based on spatiotemporal correlation provided in this embodiment of the invention. Figure 4 This is a flowchart illustrating the implementation of step S140 of the power data anomaly identification method based on spatiotemporal correlation provided in this embodiment of the invention. Figure 5 This is a schematic diagram of the structure of the power data anomaly identification device based on spatiotemporal correlation provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0011] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0012] See Figure 1 The document illustrates a flowchart of the implementation of the power data anomaly identification method based on spatiotemporal correlation provided in an embodiment of the present invention, which is described in detail below: Step S110: Cluster the power data of the target power system within a preset time period to obtain clustering results, and determine the first abnormal power data set based on the clustering results.

[0013] In some embodiments, the target power system refers to the specific power system whose power data anomalies are monitored and analyzed. It encompasses related equipment and data acquisition systems for power generation, transmission, and distribution, and is the core analysis object for anomaly identification. For example, a city's regional power grid, an industrial park's independent power supply system, or a residential community's distribution network all fall under the category of target power systems. The preset time period is a pre-defined time range for collecting and analyzing power data. It can be flexibly determined according to actual needs, aiming to focus on data from a specific time period for centralized processing, ensuring the relevance of the analysis. For example, to investigate seasonal power consumption anomalies, the preset time period can be set to a quarter. Power data refers to various numerical information reflecting the system's state generated and collected during the operation of the target power system, serving as the fundamental data source for anomaly identification. Common data include voltage, current, active power, reactive power, and electricity consumption. Examples include hourly transmission power data recorded by substations and daily electricity consumption data collected by smart meters from residential users.

[0014] It's important to note that clustering results are the final classification outcome obtained after clustering power data. They are represented as a collection of multiple data clusters, each containing several power data points sharing common characteristics. For example, after clustering, the power data might be divided into three categories: stable load cluster, fluctuating load cluster, and low load cluster. The collection of these three categories is the clustering result. The first abnormal power dataset is the initial set of abnormal data selected from the clustering results. Its core component is data that does not conform to the distribution patterns of the majority of data. This type of data either belongs to a cluster with extremely small data volume (significantly different from the characteristics of the majority of data) or is too far from the cluster center within its own cluster (deviating from the overall characteristics of the data within the cluster). For example, if a cluster contains only a small amount of data, far less than other clusters, the power data corresponding to this data will be included in this set.

[0015] See Figure 2 The specific processing method of step S110 above includes steps S1101-S1106, and the specific content is as follows: Step S1101: Preprocess and normalize the power data of the target power system within a preset time period, and use principal component analysis to reduce the dimensionality of the preprocessed and normalized power data.

[0016] In some embodiments, preprocessing is a preliminary preparation of power data before it formally enters the analysis process. Its core purpose is to eliminate obvious defects in the data (such as missing, incorrect, or duplicate data), ensuring data integrity and usability, and laying the foundation for subsequent processing. For example, if a pre-set data acquisition device experiences a momentary communication failure, resulting in missing or incorrectly recorded power data, the preprocessing stage will use interpolation to supplement missing data, delete duplicate data, or correct erroneous data to prevent such problematic data from interfering with subsequent clustering results. Normalization is a standardized operation that converts power data of different magnitudes and units to a uniform numerical range. Its core purpose is to eliminate the impact of differences in data magnitude, making different types of data comparable. For example, voltage data may range in the thousands, while current data may range in the single digits; the magnitude difference is large. Normalization can unify the two types of data to the same range, such as 0-1, preventing the large voltage data from dominating cluster analysis.

[0017] It's important to note that Principal Component Analysis (PCA) is a data dimensionality reduction technique. By uncovering the inherent relationships within data, it extracts a few principal components that reflect the core characteristics of the data. These principal components replace multiple related data categories in the original dataset, simplifying the data structure while preserving key information. For example, electricity data contains several highly correlated data categories such as voltage, current, active power, and reactive power. Using this method, one or two principal components can be extracted, preserving the core operational patterns of the data while significantly reducing the complexity of subsequent calculations. Dimensionality reduction is the operation of reducing the dimensionality of electricity data variables, that is, eliminating redundant and irrelevant variables and retaining core characteristic variables. The core is to improve data processing efficiency without losing key information. For example, if the original electricity data contains five interrelated data categories, after dimensionality reduction, only two core categories that best reflect the differences in the data are retained, which does not affect the accuracy of anomaly identification and reduces the workload of clustering operations.

[0018] Step S1102: Calculate the variance of the power data for each data category in the dimensionality-reduced power data, and determine the weight of each data category based on the variance of each data category.

[0019] In some embodiments, variance is a statistic used to describe the dispersion of data within the same data category. A larger variance indicates a wider range of fluctuations and more significant individual differences in the data; a smaller variance indicates more concentrated data and more stable patterns. For example, in the residential electricity consumption data category, weekday and weekend electricity consumption differs significantly, resulting in a larger variance; while in the industrial production data category, the power data of a stable piece of equipment has a smaller variance due to its stable operating state. Weight is a quantitative coefficient assigned based on the importance or influence of a data category, used to reflect the proportion of different data categories in the comprehensive evaluation, with the core purpose of highlighting the role of key data. For example, power data has higher reference value for identifying power system anomalies and will be given a higher weight; while some auxiliary monitoring data has a smaller influence and will be given a lower weight, ensuring that the comprehensive calculation results reflect the characteristics of the core data. Since variance can intuitively reflect the dispersion of data within the same data category, a larger variance means that the data of that category fluctuates more widely and the individual differences are more significant. It often contains more key information related to power system anomalies and has higher reference value for anomaly identification. On the other hand, a smaller variance indicates that the data is more concentrated and the patterns are more stable. Its information contribution in anomaly identification is relatively low. Moreover, power data has undergone normalization processing. Therefore, the larger the variance of the data in each data category, the greater the influence of that data category and the higher its weight.

[0020] Step S1103: For a data group consisting of all power data from the same preset acquisition device and the same preset acquisition time, the sum of the products of the value of each data category and the weight of the corresponding data category in the data group after preprocessing and normalization is determined as the value of the data group.

[0021] In some embodiments, a data group refers to a collection of all power data collected by the same preset acquisition device at the same preset acquisition time. That is, data from the same device at the same time are grouped together, serving as the basic unit of cluster analysis. For example, device X collects three types of data: voltage, current, and power at 9:00 AM. These three types of data together constitute a data group, and each data group corresponds to a unique device-time combination. The sum of the products of the normalized values ​​and weights of all data categories in a data group is the value of the data group, used to reflect the overall characteristics of the data group. For example, a data group contains two data categories: voltage and current. The corresponding products are 0.28 and 0.32, respectively, and their sum is 0.6. This value is the comprehensive value of the data group and is the core basis for clustering.

[0022] Step S1104: Based on the values ​​of all data groups, cluster the power data of the target power system within a preset time period to obtain the clustering results.

[0023] In some embodiments, the input data for clustering is the values ​​of all data groups. For example, the target power system forms several data groups within a preset time period, and a corresponding comprehensive value is calculated for each data group. The overall set of these comprehensive values ​​is the core analysis object of clustering.

[0024] Step S1105: Extract the number of data groups in each cluster from the clustering results, and identify the power data corresponding to all data groups in each cluster whose number of data groups is less than a preset number as abnormal power data.

[0025] In some embodiments, each cluster is an independent data set unit formed after clustering. All data groups within the same cluster have high similarity in their overall values, reflecting similar or identical operational characteristics. Data groups between different clusters show significant differences in their overall values, with clear feature distinctions. For example, after clustering, power data can be divided into stable operation clusters, fluctuating operation clusters, and low load clusters; each cluster is a data set with unique characteristics. The number of data groups refers to the number of data groups contained in each cluster, a quantitative indicator reflecting the size of the cluster, primarily used to determine whether a cluster conforms to the distribution pattern of the majority of data. For example, a cluster containing hundreds of data groups is large in scale and conforms to the characteristics of the majority of data; another cluster containing only a few data groups is much smaller than other clusters and is more likely a collection of anomalous data.

[0026] It should be noted that the preset quantity is a reference value set in advance based on the historical operating data patterns of the power system or actual analysis needs. It serves as a critical standard for judging whether the cluster size is normal. For example, according to historical data statistics, the number of data groups in a normal cluster is usually not less than a certain value. Therefore, this value is set as the preset quantity to filter out abnormal clusters with too few data groups.

[0027] Step S1106: Based on the distance between each data group in each cluster and the cluster center, which is not less than a preset number of data groups, determine the abnormal power data and identify all the abnormal power data as the first abnormal power dataset.

[0028] In some embodiments, the cluster center is the core reference point for each cluster, typically the average or median of the combined values ​​of all data groups within the cluster. It represents the typical characteristics of the cluster's data and serves as a benchmark for determining whether a data group deviates from the cluster's patterns. For example, if the combined values ​​of all data groups within a cluster are distributed between 0.5 and 0.7, its cluster center might be 0.6, representing the concentrated characteristics of the cluster's data. The distance between each data group within a cluster and its cluster center, known as the intra-cluster distance, quantifies the degree of difference between the data group's combined value and its cluster center. A larger distance indicates a greater deviation from the cluster's typical characteristics; a smaller distance indicates a higher degree of fit. For example, if a data group has a combined value of 0.9 and its cluster center is 0.6, the distance between them quantifies the difference between this data group and most data within the cluster, used to determine whether it is outlier data.

[0029] In one possible implementation, step S1106 is specifically processed as follows: for each cluster with a number of data groups not less than a preset number, the average value and standard deviation of the distance between each data group in the cluster and the cluster center are calculated, and the power data corresponding to the data group whose distance exceeds the sum of the average value and the standard deviation of the preset multiple are identified as abnormal power data.

[0030] In some embodiments, the average distance specifically refers to the arithmetic mean of the distances between all data groups within a cluster and the cluster center. It is a quantitative indicator reflecting the overall deviation of the data groups from the cluster center, embodying the average distribution of the data groups. For example, if a cluster contains several data groups, each with a different distance from the cluster center, summing these distances and dividing by the total number of data groups yields the average distance, which intuitively reflects the overall deviation level of the cluster's data. The preset multiple is a coefficient pre-set based on the characteristics of power system data and the required accuracy of anomaly identification. It is used to adjust the weight of the standard deviation in the critical threshold, flexibly controlling the strictness of anomaly judgment. For example, to balance the false positive rate and the false negative rate, a preset multiple of 2 is set, allowing the distance between data groups to fluctuate within the range of average + 2 × standard deviation. If more sensitive anomaly detection is required, the preset multiple can be set to 1.5, narrowing the allowable range of normal fluctuations.

[0031] It should be noted that the sum of the average distance and the preset multiple multiplied by the standard deviation is the critical threshold for defining the normal deviation range of the data group, which is the maximum acceptable deviation. For example, if the average distance is at one level, the preset multiple multiplied by the standard deviation is at another level, and the sum of the two is the upper limit of normal deviation. Data groups whose distance does not exceed this value conform to the intra-cluster pattern, while those that exceed it are considered abnormal deviations.

[0032] Step S120: Improve the parameters of the Isolation Forest algorithm based on the first abnormal power dataset, and obtain the second abnormal power dataset based on the improved Isolation Forest algorithm and the power data within a preset time period.

[0033] In some embodiments, the Isolation Forest algorithm isolates isolated points in the data by constructing multiple decision trees, identifying isolated points that deviate from the majority data distribution as anomalies. It does not rely on prior distribution information of the data, making it computationally efficient. In massive amounts of electricity data, this algorithm can autonomously identify individual data points that do not conform to the patterns of the majority of the data, without needing to define the anomaly criteria in advance. The parameters of the Isolation Forest algorithm are adjustable settings that directly affect the algorithm's recognition performance and adaptability. Common parameters include the anomaly screening threshold and the number of decision trees. For example, the screening threshold determines the strictness of the algorithm's anomaly judgment; a threshold that is too lenient may miss genuine anomalies, while a threshold that is too strict may easily misjudge normal data.

[0034] It should be noted that the second abnormal power dataset is a collection of abnormal data obtained by inputting power data within a preset time period into the improved Isolation Forest algorithm. It represents the abnormal results derived by the algorithm based on optimized parameters. For example, the algorithm, through the improved parameters, identifies several data points where power fluctuations exceed a reasonable range within a certain period; these data points collectively form this set.

[0035] In one possible implementation, step S120 is specifically processed as follows: the ratio of the number of abnormal data in the first abnormal power dataset to the total number of power data of the target power system within a preset time period is calculated, and the ratio is determined as the screening threshold parameter of the isolated forest algorithm to obtain the improved isolated forest algorithm; the power data of the target power system within the preset time period is input into the improved isolated forest algorithm to obtain the second abnormal power dataset.

[0036] In some embodiments, the number of anomalous data points refers to the specific number of anomalous power data points contained in the first anomalous power dataset. It is a core indicator for quantifying the initial size of the anomalous dataset and directly reflects the total amount of anomalous data initially identified by the clustering method. For example, if the first anomalous power dataset contains several voltage and power anomalous data points that deviate from the clustering pattern, the cumulative number of these data points is the number of anomalous data points. The total number refers to the total number of power data points collected by the target power system within a preset time period, encompassing all normal data and anomalous data points initially identified by clustering. It is the basic denominator for calculating the proportion of anomalous data points. For example, if the system collects several data points of various types, such as voltage, current, and power, through all preset acquisition devices within a preset time period, the cumulative number of these data points is the total number.

[0037] It should be noted that the ratio obtained by dividing the number of abnormal data in the first abnormal power dataset by the total number of power data within the preset time period is used to reflect the proportion of abnormal data in all data, and is a key indicator reflecting the overall abnormal distribution characteristics of the data. The filtering threshold parameter is the core criterion used in the Isolation Forest algorithm to determine whether data is abnormal; its value directly determines the strictness of the algorithm's anomaly identification. After inputting data into the Isolation Forest algorithm, a score is obtained for each data point. The closer the score is to 0, the more normal it is; the closer the score is to 1, the more abnormal it is. The filtering threshold can be a value between 0 and 1. For example, a filtering threshold of 0.8 would identify data with scores between 0.8 and 1 as abnormal data. By using the first abnormal dataset to determine the proportion of abnormal data in all data, and further determining the filtering threshold, the reliability of the filtering threshold can be ensured.

[0038] Step S130: Based on the preset acquisition device and preset acquisition time of each abnormal power data in the second abnormal power dataset, identify and remove false abnormal power data to obtain the updated second abnormal power dataset.

[0039] In some embodiments, preset data acquisition devices are pre-determined hardware devices used to collect power data, distributed at different locations within the target power system, responsible for real-time or timed data collection. Examples include voltage sensors installed on transmission lines, power acquisition devices deployed in factory areas, and smart meters in residential homes. Preset acquisition time refers to the specific time points or time intervals at which the acquisition devices collect power data, ensuring the regularity and timeliness of data collection. For example, setting a sensor to collect voltage data every 15 minutes, or a smart meter to collect daily electricity consumption data at midnight, are examples of preset acquisition times.

[0040] False anomaly power data refers to data that appears abnormal on the surface but is actually caused by factors such as spatiotemporal correlation and normal equipment fluctuations, and is not generated by system failure or abnormal operation. For example, a data acquisition device may have normal data fluctuations due to its long service life, and some of the data it collects that seems to exceed the normal range is considered false anomaly data. After removing false anomaly data, the remaining abnormal data is reasonably corrected (such as adjusting outliers) to obtain the updated second abnormal power dataset. Compared with the original second abnormal power dataset, the data is more accurate and better reflects the true anomaly.

[0041] See Figure 3 The specific processing method of step S130 above includes steps S1301-S1304, and the specific content is as follows: Step S1301: Based on the data categories of all power data in the target power system, multiple preset acquisition devices, and multiple preset acquisition times within a preset time period, construct a data spatiotemporal matrix for each data category; wherein, the number of rows in the data spatiotemporal matrix is ​​the number of preset acquisition times within the target time period; and the number of columns in the data spatiotemporal matrix is ​​the number of preset acquisition devices.

[0042] In some embodiments, data category is a classification dimension used to divide the power data of a target power system according to its core characteristics. Data of the same category reflects the same aspect of the power system's operating status and serves as the basic classification basis for constructing the data spatiotemporal matrix. For example, power data can be divided into categories such as voltage data, current data, active power data, and reactive power data. The normal range and fluctuation patterns of different categories of data are different. The data spatiotemporal matrix is ​​a matrix structure constructed by combining the time dimension (preset acquisition time) and the device distribution dimension (preset acquisition device). It is used to integrate the same category of power data collected at different times and by different devices, intuitively presenting the spatiotemporal distribution characteristics of the data. For example, for voltage data, each row of the matrix corresponds to a preset acquisition time, and each column corresponds to a preset acquisition device. The cells in the matrix are used to carry the voltage data related information corresponding to that time and device.

[0043] It should be noted that the number of horizontal dimensions in the data spatiotemporal matrix represents the total number of preset data collection times within the preset time period, quantifying the time dimension of the matrix. For example, if 10 collection time points are set within the preset time period, then the data spatiotemporal matrix will have 10 rows, with each row corresponding to the data distribution of one collection time point. The number of vertical dimensions in the data spatiotemporal matrix represents the total number of preset data collection devices in the target power system, quantifying the device (spatial correlation) dimension of the matrix. For example, if there are 8 preset data collection devices in the target power system used to collect a certain type of data, then the data spatiotemporal matrix will have 8 columns, with each column corresponding to the data distribution of one data collection device.

[0044] Step S1302: Determine the absolute value of the minimum difference between each abnormal power data in the second abnormal power data set and the corresponding normal data range as the abnormal value of the abnormal power data.

[0045] It should be noted that the normal data range is a pre-determined reasonable fluctuation range for each data category. This range is based on factors such as equipment design parameters, historical normal operation data, and power system operation specifications, and serves as the benchmark for judging whether the data is abnormal. For example, the normal data range for a certain type of current data is a certain interval; current data exceeding this interval will be initially judged as abnormal power data.

[0046] In some embodiments, among all possible differences between abnormal power data and the corresponding normal data range, the absolute value of the smallest difference is considered the outlier of the abnormal power data. For example, if abnormal data exceeds both the upper and lower limits of the normal range, the differences between the data and the upper and lower limits are calculated separately, and the smaller value is the minimum. Taking the absolute value eliminates the influence of the positive or negative sign of the difference, retaining only the quantified magnitude of the deviation. For example, if the difference between abnormal data and the normal range is -6 (below the lower limit of the normal range), its absolute value is 6, representing a quantified degree of deviation of 6 from the normal range. The outlier is the core quantitative indicator of abnormal data deviating from the normal state; the larger the outlier, the more severe the deviation from the normal range. For example, if the outlier of abnormal power data is 4, it indicates that the data deviates from the normal data range by at least 4 quantified units.

[0047] Step S1303: According to the preset acquisition device and preset acquisition time for each abnormal power data, fill the abnormal value of each abnormal power data into the corresponding position of the data spatiotemporal matrix, and determine the element corresponding to the position of the data spatiotemporal matrix where no abnormal value is filled as 0, so as to obtain the abnormal data spatiotemporal matrix of each data category of the second abnormal power dataset.

[0048] In some embodiments, the location of an unfilled outlier is a cell in the data spatiotemporal matrix that does not correspond to any abnormal power data, meaning that the preset acquisition device and preset acquisition time corresponding to that location did not generate abnormal power data. For example, if a cell in the matrix corresponds to a device that acquires normal data at the corresponding time, that cell is the location of the unfilled outlier. An element is the specific value carried in each cell of the data spatiotemporal matrix; it is the basic building block of the matrix, and its value is either the filled out outlier or the default 0 (when no outlier is filled). For example, the element value of a location without an outlier is 0; the element value of a location filled with an outlier is the corresponding outlier. The abnormal data spatiotemporal matrix is ​​a matrix formed by filling the outliers in the second abnormal power dataset into the data spatiotemporal matrix according to their corresponding positions. The locations without outliers are filled with 0, fully presenting the distribution and deviation degree of abnormal data under different times and different devices. For example, in a certain abnormal data spatiotemporal matrix, some rows and columns of cells have non-zero outliers, intuitively reflecting the existence and degree of abnormal data at these times and for these devices.

[0049] Step S1304: Based on the spatiotemporal matrix of abnormal power data for each abnormal power data, identify and remove pseudo-abnormal data to obtain the updated second abnormal power data set.

[0050] In some embodiments, identifying pseudo-abnormal data based on the spatiotemporal matrix of abnormal data and removing pseudo-abnormal data from the second abnormal power dataset can make the data in the updated second abnormal power dataset more accurate and better reflect the real abnormal situation.

[0051] In one possible implementation, step S1304 is specifically processed as follows: For each abnormal power data, the following steps are performed: Calculate the standard deviation of all abnormal power data in the row where the abnormal power data is located in the abnormal data spatiotemporal matrix corresponding to the abnormal power data; when the standard deviation is less than a first preset threshold, correct the abnormal power data to the difference between the abnormal power data and the standard deviation; calculate the average value of all abnormal power data in the column where the abnormal power data is located in the abnormal spatiotemporal matrix corresponding to the abnormal power data; determine the maximum data fluctuation value of the preset acquisition equipment according to the service life of the preset acquisition equipment corresponding to the abnormal power data; if the average value is less than the maximum data fluctuation value, then the abnormal power data is identified as pseudo-abnormal data; if the average value is not less than the maximum data fluctuation value, then the correction value of the abnormal power data is determined as the difference between the abnormal power data and the maximum data fluctuation value; remove all pseudo-abnormal data from the second abnormal power dataset, and determine each abnormal power data as its correction value to obtain the updated second abnormal power dataset.

[0052] In some embodiments, the row containing abnormal power data refers to the horizontal row position of the abnormal power data in its corresponding abnormal data spatiotemporal matrix. All data in this row corresponds to the same preset collection time. That is, the data in the same row of the abnormal data spatiotemporal matrix are data collected from different devices at the same time. For example, if the collection time of a certain abnormal data is 3 pm, its row is the horizontal row position in the matrix corresponding to the collection time of 3 pm. Standard deviation is a statistic used to describe the degree of dispersion of data. The smaller the standard deviation, the more concentrated the fluctuations and the smaller the differences in the abnormal data in that row; the larger the standard deviation, the more dispersed the data fluctuations and the more obvious the differences. For example, a small standard deviation of abnormal data in a row means that the degree of abnormality of different devices at the same time is similar; if the standard deviation is large, it means that the abnormality of different devices at the same time is significantly different.

[0053] It should be noted that the first preset threshold refers to a reference value set in advance based on the operating patterns and data characteristics of the power system. This value is used to determine whether the row standard deviation is too small and serves as the critical standard for triggering data correction. For example, by combining historical fluctuations in normal data, a first preset threshold can be set. When the row standard deviation falls below this value, it indicates that the fluctuations in abnormal data at the same time are too concentrated and correction is needed. Correction refers to adjusting and optimizing the original abnormal power data to eliminate the impact of unreasonable fluctuations and make the data more closely reflect the actual abnormal situation. For example, if a certain abnormal data contains a component of misjudgment due to the excessively small fluctuations in data from other devices at the same time, correction operations can reduce the degree of abnormality quantification, making it more accurate.

[0054] In some embodiments, the average value refers to the sum of all abnormal power data in the column divided by the number of data points, reflecting the average degree of abnormality of the device over different times. For example, if device B collects several abnormal data points within a week, calculating the average of these data points will reveal the overall level of abnormality of the device during that period. Service life refers to the length of time from when the data acquisition device was put into use in the power system to the current analysis time, and is an important indicator reflecting the degree of aging and performance stability of the device. For example, if a data acquisition device was put into use 5 years ago, its service life is 5 years. Generally, the longer the service life, the more significant the performance fluctuations of the device may be.

[0055] The maximum data fluctuation value refers to the maximum reasonable fluctuation range that the data can exhibit under normal operating conditions. This value is determined by factors such as the equipment's age and performance parameters, and is a key benchmark for determining whether data is a false anomaly. For example, older equipment with aging components will have a higher maximum data fluctuation value than newer equipment, allowing for a wider range of normal fluctuations. The correction value refers to the final value determined after correcting the abnormal power data. Compared to the original anomaly value, it more accurately reflects the true anomaly, eliminating the interference of false anomalies. For example, when the column average is not less than the maximum data fluctuation value, subtracting the maximum data fluctuation value from the original anomaly value yields the correction value for that anomaly. Completely removing identified false anomaly data from the second abnormal power dataset eliminates its interference with subsequent analysis, ensuring the accuracy of the dataset.

[0056] Step S140: Based on the maintenance records of the target power system within a preset time period, invalid power data is removed from the first abnormal power dataset and the second abnormal power dataset, and the first abnormal power dataset and the second abnormal power dataset after removing the invalid power data are merged to obtain the third abnormal power dataset.

[0057] In some embodiments, maintenance records are records of maintenance performed on equipment within a preset time period after a fault occurs in the target power system. These records include key information such as the faulty equipment number, fault time, and maintenance completion time. For example, if a transformer is repaired due to a short-circuit fault, the maintenance record will clearly state the transformer number, the date of the fault, and the date the maintenance was completed. Invalid power data refers to abnormal power data caused by equipment faults and maintenance. This type of data is a product of equipment fault conditions and not a true anomaly during normal system operation; therefore, it has no analytical value. For example, abnormal voltage and current data collected before the maintenance of a faulty device is completed would be considered invalid power data.

[0058] It should be noted that the third abnormal power dataset is the final abnormal power dataset obtained by merging the first and second abnormal power datasets. It integrates the effective abnormal data identified by clustering methods and the improved isolated forest algorithm, and excludes false and invalid data. It can accurately reflect the real abnormal situation of the target power system and is an important basis for power grid dispatching and fault diagnosis.

[0059] See Figure 4 The specific processing method of step S140 above includes steps S1401-S1403, and the specific content is as follows: Step S1401: Extract the faulty equipment and the maintenance end time of each faulty equipment from the maintenance records of the target power system within a preset time period.

[0060] In some embodiments, maintenance records are documents or data sets that record maintenance-related information after a device in the target power system fails. They typically include key information such as the faulty device, maintenance time, and maintenance content, serving as a crucial basis for filtering invalid data. For example, maintenance records for a regional power distribution network might detail the fault type, repair reporting time, maintenance process, and repair completion time of a smart meter (faulty device), providing a temporal and device-level reference for identifying invalid data. Faulty devices refer to equipment in the target power system that cannot collect data or operate normally due to hardware damage, performance degradation, line faults, etc., including pre-set data collection devices and other core power equipment. For example, a power monitor on a transmission line that experiences data acquisition distortion due to component aging is considered a faulty device; a smart meter in a residential building that cannot record electricity consumption due to a short circuit is also considered a faulty device. The maintenance completion time is the specific point in time when the faulty device completes maintenance and resumes normal operation. It serves as the time boundary between the device's faulty and normal states, directly determining the time range of invalid data. For example, if a faulty current sensor is repaired starting at 10:00 AM and the repair is completed and data acquisition is restored at 2:00 PM, then 2:00 PM is the end time of the equipment's repair, and the data collected after that time will no longer be classified as invalid data.

[0061] Step S1402: Determine the abnormal power data of each faulty device in the first abnormal power dataset and the second abnormal power dataset before the maintenance end time as invalid power data, and remove the invalid power data from the first abnormal power dataset and the second abnormal power dataset.

[0062] In some embodiments, defining the time range earlier than the maintenance completion time as the invalid data limit can filter out abnormal data generated during equipment failure. For example, if the maintenance completion time of a device is 8 PM, then all abnormal data collected by the device within the preset time period from the start time to 8 PM must be included in the invalid data screening scope. Invalid power data refers to abnormal power data collected by the faulty device before the maintenance completion due to its own fault (rather than a real power system anomaly). This type of data only reflects the faulty state of the device and does not have reference value for reflecting abnormal system operation. For example, power data with large fluctuations collected by a faulty power acquisition device before maintenance due to poor internal wiring contact cannot reflect the actual operating conditions of the power system and is therefore invalid power data.

[0063] Step S1403: Merge the first abnormal power dataset and the second abnormal power dataset after removing invalid power data to obtain the third abnormal power dataset.

[0064] In some embodiments, the first abnormal power dataset after removing invalid data and the updated second abnormal power dataset after removing invalid data are integrated into a third abnormal power dataset, which can summarize the valid abnormal data identified by the two methods and ensure that no abnormal data is missed.

[0065] In one possible implementation, step S1403 is specifically processed as follows: the second abnormal power dataset after removing invalid power data is determined as the initial third abnormal power dataset; the preset acquisition device and preset acquisition time of each abnormal power data in the initial third abnormal power dataset and the first abnormal power dataset after removing invalid power data are determined as the acquisition tag of the abnormal power data; for each acquisition tag, when there is abnormal power data corresponding to the acquisition tag in the first abnormal power dataset after removing invalid power data, and there is no abnormal power data corresponding to the acquisition tag in the initial third abnormal power dataset, the abnormal power data corresponding to the acquisition tag is added to the initial third abnormal power dataset to obtain the third abnormal power dataset.

[0066] In some embodiments, the initial third abnormal power dataset is an intermediate transitional dataset during the merging process, constructed based on the second abnormal power dataset after removing invalid power data. Acquisition tags are used to uniquely identify the feature combinations of abnormal power data. Acquisition tags consist of a preset acquisition device and a preset acquisition time corresponding to the abnormal data. Their core function is to distinguish abnormal data from different sources and at different times, avoiding duplication or omission. For example, if abnormal data is acquired by device M at 11:00 AM, its acquisition tag is Device M - 11:00 AM. This tag allows for quick determination of whether abnormal data in different datasets are products of the same device-time combination.

[0067] It should be noted that the following example illustrates the specific process of obtaining the third abnormal power dataset from the initial third abnormal power dataset and the first abnormal power dataset after removing invalid data: In the first abnormal power dataset after removing invalid data, abnormal data corresponding to the acquisition tag "Device N - 3 PM" can be found, while the initial third power dataset does not contain abnormal data corresponding to this acquisition tag. Therefore, the abnormal data corresponding to the acquisition tag "Device N - 3 PM" is added to the initial third abnormal power dataset. Thus, the third abnormal power dataset is the final abnormal data set obtained after data merging, deduplication, and supplementation. It integrates the unique data from the first abnormal power dataset after removing invalid data and the valid data from the second abnormal power dataset, representing the final result that comprehensively and accurately reflects the abnormal situation of the target power system.

[0068] Clustering is performed on the power data of the target power system within a preset time period. After generating the clustering results, a first abnormal power dataset is determined, which can accurately extract abnormal data that deviates from the data group pattern. Based on this first abnormal power dataset, the parameters of the Isolation Forest algorithm are optimized. Then, the power data of the preset time period is input into the improved algorithm to obtain a second abnormal power dataset. Subsequently, a spatiotemporal matrix of data is constructed according to preset acquisition equipment and preset acquisition time. Abnormal data is corrected by calculating row standard deviation, column average, etc., and pseudo-abnormal data is removed to update the second abnormal power dataset. The influence of time and equipment spatial distribution is fully considered to improve data accuracy. Finally, combined with the maintenance records of the target power system, invalid power data before the completion of maintenance of faulty equipment is screened out and removed from the two datasets. The merged dataset is the third abnormal power dataset. This dataset includes both abnormal data that does not meet the group pattern and abnormal data that does not conform to the equipment's own operating pattern. It comprehensively considers key factors such as time, space, and equipment maintenance, effectively improving the accuracy of power data anomaly identification.

[0069] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0070] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.

[0071] Figure 5 A schematic diagram of the power data anomaly identification device based on spatiotemporal correlation provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 5 As shown, the power data anomaly identification device 5 based on spatiotemporal correlation includes: Clustering module 51 is used to cluster the power data of the target power system within a preset time period, obtain the clustering results, and determine the first abnormal power data set based on the clustering results. The improvement module 52 is used to improve the parameters of the isolated forest algorithm based on the first abnormal power dataset, and to obtain the second abnormal power dataset based on the improved isolated forest algorithm and the power data within a preset time period. The elimination module 53 is used to identify and eliminate false abnormal power data based on the preset acquisition device and preset acquisition time of each abnormal power data in the second abnormal power dataset, so as to obtain the updated second abnormal power dataset. The merging module 54 is used to remove invalid power data from the first abnormal power dataset and the second abnormal power dataset based on the maintenance records of the target power system within a preset time period, and merge the first abnormal power dataset and the second abnormal power dataset after removing the invalid power data to obtain a third abnormal power dataset.

[0072] In one possible implementation, the clustering module 51 is specifically used for: preprocessing and normalizing the power data of the target power system within a preset time period, and using principal component analysis to reduce the dimensionality of the preprocessed and normalized power data; calculating the variance of the power data for each data category in the dimensionality-reduced power data, and determining the weight of each data category based on the variance of each data category; for a data group composed of all power data from the same preset acquisition device and the same preset acquisition time, determining the value of the data group as the sum of the products of the value of each data category and the weight of the corresponding data category in the preprocessed and normalized data group; clustering the power data of the target power system within a preset time period based on the values ​​of all data groups to obtain clustering results; extracting the number of data groups in each cluster from the clustering results, and identifying the power data corresponding to all data groups in each cluster with a number of data groups less than a preset number as abnormal power data; determining abnormal power data based on the distance between each data group in each cluster with a number of data groups not less than a preset number and the cluster center, and identifying all abnormal power data as the first abnormal power dataset.

[0073] In one possible implementation, the clustering module 51 is further configured to: for each cluster with a number of data groups not less than a preset number, calculate the average and standard deviation of the distance between each data group in the cluster and the cluster center, and identify the power data corresponding to the data group whose distance exceeds the sum of the average and the standard deviation of the preset multiple as abnormal power data.

[0074] In one possible implementation, the improved module 52 is specifically used to: calculate the ratio of the number of abnormal data in the first abnormal power dataset to the total number of power data of the target power system within a preset time period, and determine the ratio as the screening threshold parameter of the isolated forest algorithm to obtain the improved isolated forest algorithm; input the power data of the target power system within the preset time period into the improved isolated forest algorithm to obtain the second abnormal power dataset.

[0075] In one possible implementation, the elimination module 53 is specifically used for: constructing a data spatiotemporal matrix for each data category based on the data categories of all power data within the target power system, multiple preset acquisition devices, and multiple preset acquisition times within a preset time period; wherein the number of rows in the data spatiotemporal matrix is ​​the number of preset acquisition times within the preset time period; the number of columns in the data spatiotemporal matrix is ​​the number of preset acquisition devices; determining the absolute value of the minimum difference between each abnormal power data in the second abnormal power dataset and the corresponding normal data range as the abnormal value of the abnormal power data; filling the abnormal value of each abnormal power data into the corresponding position of the data spatiotemporal matrix according to the preset acquisition device and preset acquisition time of each abnormal power data, and setting the element corresponding to the position of the data spatiotemporal matrix where no abnormal value is filled to 0, thereby obtaining the abnormal data spatiotemporal matrix of each data category in the second abnormal power dataset; and identifying and eliminating pseudo-abnormal data based on the abnormal data spatiotemporal matrix of each abnormal power data, thereby obtaining the updated second abnormal power dataset.

[0076] In one possible implementation, the elimination module 53 is further configured to: for each abnormal power data, perform the following steps: calculate the standard deviation of all abnormal power data in the row where the abnormal power data is located in the abnormal data spatiotemporal matrix corresponding to the abnormal power data; when the standard deviation is less than a first preset threshold, correct the abnormal power data to the difference between the abnormal power data and the standard deviation; calculate the average value of all abnormal power data in the column where the abnormal power data is located in the abnormal spatiotemporal matrix corresponding to the abnormal power data; determine the maximum data fluctuation value of the preset acquisition equipment according to the service life of the preset acquisition equipment corresponding to the abnormal power data; if the average value is less than the maximum data fluctuation value, then the abnormal power data is identified as pseudo-abnormal data; if the average value is not less than the maximum data fluctuation value, then the correction value of the abnormal power data is determined to be the difference between the abnormal power data and the maximum data fluctuation value; eliminate all pseudo-abnormal data from the second abnormal power dataset, and determine each abnormal power data as its correction value to obtain the updated second abnormal power dataset.

[0077] In one possible implementation, the merging module 54 is specifically used to: extract the faulty equipment and the maintenance end time of each faulty equipment from the maintenance records of the target power system within a preset time period; determine the abnormal power data of each faulty equipment before the maintenance end time in the first abnormal power dataset and the second abnormal power dataset as invalid power data, and remove the invalid power data from the first abnormal power dataset and the second abnormal power dataset; merge the first abnormal power dataset and the second abnormal power dataset after removing the invalid power data to obtain the third abnormal power dataset.

[0078] In one possible implementation, the merging module 54 is further configured to: determine the second abnormal power dataset after removing invalid power data as the initial third abnormal power dataset; determine the preset acquisition device and preset acquisition time of each abnormal power data in the initial third abnormal power dataset and the first abnormal power dataset after removing invalid power data as the acquisition tag of the abnormal power data; for each acquisition tag, when there is abnormal power data corresponding to the acquisition tag in the first abnormal power dataset after removing invalid power data, and there is no abnormal power data corresponding to the acquisition tag in the initial third abnormal power dataset, add the abnormal power data corresponding to the acquisition tag to the initial third abnormal power dataset to obtain the third abnormal power dataset.

[0079] Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 6 As shown, the electronic device 6 of this embodiment includes a processor 60 and a memory 61. The memory 61 stores a computer program 62. When the processor 60 executes the computer program 62, it implements the steps in the various method embodiments described above. Alternatively, when the processor 60 executes the computer program 62, it implements the functions of each module / unit in the various device embodiments described above.

[0080] For example, computer program 62 may be divided into one or more modules / units, which are stored in memory 61 and executed by processor 60 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 62 in electronic device 6.

[0081] Electronic device 6 may include, but is not limited to, processor 60 and memory 61. Those skilled in the art will understand that... Figure 6 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 6 may also include input / output devices, network access devices, buses, etc.

[0082] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.

[0083] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0084] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications 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 the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for identifying power data anomalies based on spatiotemporal correlation, characterized in that, include: Cluster the power data of the target power system within a preset time period to obtain clustering results, and determine the first abnormal power data set based on the clustering results; The parameters of the isolated forest algorithm are improved based on the first abnormal power dataset, and a second abnormal power dataset is obtained based on the improved isolated forest algorithm and power data within a preset time period. Based on the preset acquisition device and preset acquisition time of each abnormal power data in the second abnormal power dataset, false abnormal power data are identified and removed to obtain the updated second abnormal power dataset. Based on the maintenance records of the target power system within a preset time period, invalid power data is removed from the first and second abnormal power datasets, and the first and second abnormal power datasets after removing invalid power data are merged to obtain the third abnormal power dataset.

2. The power data anomaly identification method based on spatiotemporal correlation according to claim 1, characterized in that, The process of identifying and removing false abnormal power data based on preset acquisition devices and preset acquisition times for each abnormal power data in the second abnormal power dataset, to obtain an updated second abnormal power dataset, includes: Based on the data categories of all power data within the target power system, multiple preset acquisition devices, and multiple preset acquisition times within a preset time period, a data spatiotemporal matrix is ​​constructed for each data category; wherein, the number of rows in the data spatiotemporal matrix is ​​the number of preset acquisition times within the preset time period; and the number of columns in the data spatiotemporal matrix is ​​the number of preset acquisition devices. The absolute value of the minimum difference between each abnormal power data in the second abnormal power data set and the corresponding normal data range is determined as the abnormal value of that abnormal power data. According to the preset acquisition device and preset acquisition time for each abnormal power data, the abnormal value of each abnormal power data is filled into the corresponding position of the data spatiotemporal matrix, and the element corresponding to the position of the data spatiotemporal matrix where no abnormal value is filled is determined to be 0, so as to obtain the abnormal data spatiotemporal matrix of each data category of the second abnormal power dataset; Based on the spatiotemporal matrix of abnormal power data for each abnormal power data, pseudo-abnormal data is identified and removed to obtain the updated second abnormal power data set.

3. The power data anomaly identification method based on spatiotemporal correlation according to claim 2, characterized in that, The anomalous data spatiotemporal matrix based on each anomalous power data is used to identify and remove pseudo-anomalies, resulting in an updated second anomalous power dataset, including: For each abnormal power data, perform the following steps: Calculate the standard deviation of all abnormal power data in the row containing the abnormal power data in the spatiotemporal matrix of abnormal power data; When the standard deviation is less than the first preset threshold, the abnormal power data is corrected to the difference between the abnormal power data and the standard deviation. Calculate the average value of all abnormal power data in the column containing the abnormal power data in the abnormal spatiotemporal matrix corresponding to the abnormal power data; Based on the service life of the preset acquisition equipment corresponding to the abnormal power data, determine the maximum data fluctuation value of the preset acquisition equipment; If the average value is less than the maximum value of the data fluctuation, then the abnormal power data is determined to be pseudo-abnormal data; If the average value is not less than the maximum value of the data fluctuation, then the correction value of the abnormal power data is determined as the difference between the abnormal power data and the maximum value of the data fluctuation; All pseudo-anomaly data are removed from the second abnormal power dataset, and each abnormal power data is determined as its correction value to obtain the updated second abnormal power dataset.

4. The power data anomaly identification method based on spatiotemporal correlation according to claim 1, characterized in that, The process of clustering power data of the target power system within a preset time period to obtain clustering results, and determining the first abnormal power data set based on the clustering results, includes: The power data of the target power system within a preset time period is preprocessed and normalized, and the dimensionality of the preprocessed and normalized power data is reduced using principal component analysis. Calculate the variance of the power data for each data category in the dimensionality-reduced power data, and determine the weight of each data category based on the variance of each data category; For a data group consisting of all power data from the same preset acquisition device and the same preset acquisition time, the sum of the products of the value of each data category and the weight of the corresponding data category in the data group after preprocessing and normalization is determined as the value of the data group. Based on the values ​​of all data groups, the power data of the target power system within a preset time period are clustered to obtain the clustering results. From the clustering results, the number of data groups in each cluster is extracted, and the power data corresponding to all data groups in each cluster with a number of data groups less than a preset number are identified as abnormal power data. Based on the distance between each data group in each cluster and the cluster center, which is not less than a preset number of data groups, abnormal power data is identified, and all abnormal power data are identified as the first abnormal power dataset.

5. The power data anomaly identification method based on spatiotemporal correlation according to claim 4, characterized in that, The method of determining abnormal power data based on the distance between each data group within each cluster (with a data group count not less than a preset number) and the cluster center includes: For each cluster with a number of data groups not less than a preset number, calculate the average and standard deviation of the distance between each data group in the cluster and the cluster center, and identify the power data corresponding to the data groups whose distance exceeds the sum of the average and the standard deviation of a preset multiple as abnormal power data.

6. The power data anomaly identification method based on spatiotemporal correlation according to claim 1, characterized in that, The parameters of the isolated forest algorithm are improved based on the first abnormal power dataset, and a second abnormal power dataset is obtained based on the improved isolated forest algorithm and power data within a preset time period, including: Calculate the ratio of the number of abnormal data in the first abnormal power dataset to the total number of power data of the target power system within a preset time period, and determine the ratio as the screening threshold parameter of the isolated forest algorithm to obtain the improved isolated forest algorithm; The power data of the target power system within a preset time period is input into the improved isolated forest algorithm to obtain the second abnormal power dataset.

7. The power data anomaly identification method based on spatiotemporal correlation according to claim 1, characterized in that, The process involves removing invalid power data from the first and second abnormal power datasets based on maintenance records of the target power system within a preset time period, and then merging the first and second abnormal power datasets after removing the invalid power data to obtain a third abnormal power dataset, which includes: Extract the faulty equipment and the maintenance end time of each faulty equipment from the maintenance records of the target power system within a preset time period; The abnormal power data of each faulty device in the first abnormal power dataset and the second abnormal power dataset before the maintenance end time is identified as invalid power data, and invalid power data is removed from the first abnormal power dataset and the second abnormal power dataset. The first and second abnormal power datasets, after removing invalid power data, are merged to obtain the third abnormal power dataset.

8. The power data anomaly identification method based on spatiotemporal correlation according to claim 7, characterized in that, The first and second abnormal power datasets, after merging and removing invalid power data, yield a third abnormal power dataset, which includes: The second abnormal power dataset after removing invalid power data is determined as the initial third abnormal power dataset. The preset acquisition device and preset acquisition time of each abnormal power data in the initial third abnormal power data set and the first abnormal power data set after removing invalid power data are determined as the acquisition tag of the abnormal power data. For each data collection tag, if there is abnormal power data corresponding to the data collection tag in the first abnormal power data set after removing invalid power data, and there is no abnormal power data corresponding to the data collection tag in the initial third abnormal power data set, then the abnormal power data corresponding to the data collection tag is added to the initial third abnormal power data set to obtain the third abnormal power data set.

9. A power data anomaly identification device based on spatiotemporal correlation, characterized in that, include: The clustering module is used to cluster the power data of the target power system within a preset time period, obtain the clustering results, and determine the first abnormal power data set based on the clustering results. An improvement module is used to improve the parameters of the isolated forest algorithm based on the first abnormal power dataset, and to obtain a second abnormal power dataset based on the improved isolated forest algorithm and power data within a preset time period. The elimination module is used to identify and eliminate false abnormal power data based on the preset acquisition device and preset acquisition time of each abnormal power data in the second abnormal power dataset, so as to obtain the updated second abnormal power dataset. The merging module is used to remove invalid power data from the first abnormal power dataset and the second abnormal power dataset based on the maintenance records of the target power system within a preset time period, and merge the first abnormal power dataset and the second abnormal power dataset after removing the invalid power data to obtain a third abnormal power dataset.

10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 8.