Abnormality detection method, device and equipment for full power generation users

By employing multi-attribute clustering and dual-benchmark detection methods, the problems of missed detection and false detection in the anomaly detection of all power generation users were solved, and accurate anomaly identification of power generation users was achieved.

CN121765598APending Publication Date: 2026-03-31国网河北省电力有限公司营销服务中心 +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies suffer from missed detections and false detections in the detection of anomalies among all power generation users, mainly because they ignore the differences between power generation users, making it impossible to accurately identify abnormal behavior.

Method used

By using multi-attribute clustering, all power generation users are divided into normal user clusters and abnormal candidate users. A dynamic benchmark is established using a power generation prediction model to detect local anomalies. Based on the power generation equipment and spatial attributes, a theoretical power generation curve is determined as an absolute benchmark for dual benchmark detection.

Benefits of technology

It effectively avoids missed detections and false detections, can sensitively detect subtle deviations and identify serious anomalies, and improves the accuracy and reliability of anomaly detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121765598A_ABST
    Figure CN121765598A_ABST
Patent Text Reader

Abstract

The invention provides an anomaly detection method, device and equipment for full power generation users, and relates to the technical field of power systems. The method comprises the following steps: acquiring a power generation equipment attribute, a space attribute and a power generation behavior attribute of each power generation user; clustering power generation users based on the power generation equipment attribute, the space attribute and the power generation behavior attribute to obtain a globally normal power generation user cluster and globally abnormal candidate users; for each globally normal power generation user cluster, using the power generation prediction model corresponding to the power generation user cluster to detect whether there is an abnormal user in the power generation user cluster; and for each globally abnormal candidate user, determining a theoretical power generation curve corresponding to the candidate user based on the power generation equipment attribute and the spatial attribute, and detecting whether the candidate user is an abnormal user based on the theoretical power generation curve and the power generation behavior attribute. According to the invention, the omission ratio and the false detection rate in the anomaly detection process of the power generation users can be reduced.
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 an anomaly detection method, device, and equipment for all power generation users. Background Technology

[0002] With the rapid development of the new energy industry, the scale of distributed photovoltaic and wind power users has experienced explosive growth. Effective operation monitoring and anomaly screening of these numerous and widely distributed power users are of great significance for ensuring grid security and improving power generation efficiency.

[0003] In related technologies, when detecting anomalies among power generation users, most methods employ set thresholds or rules to screen all power generation users. For example, a fixed lower limit for power generation efficiency is set, and any power generation user whose efficiency falls below this threshold is considered abnormal.

[0004] However, the aforementioned methods of anomaly detection based on thresholds or rules ignore the inherent differences among power generation users. Using a single standard for anomaly detection may result in false positives (e.g., misclassifying normal fluctuations as abnormal) or false negatives (e.g., ignoring abnormal behavior because it does not meet a uniform threshold). Summary of the Invention

[0005] This invention provides an anomaly detection method, apparatus, and equipment for all power generation users, in order to solve the problem of missed detection or false detection in the anomaly detection process for all power generation users.

[0006] In a first aspect, embodiments of the present invention provide an anomaly detection method for all power generation users, including: Obtain the power generation equipment attributes, spatial attributes, and power generation behavior attributes of each power generation user; Based on the power generation equipment attributes, spatial attributes, and power generation behavior attributes, the power generation users are clustered to obtain a globally normal power generation user cluster and a globally abnormal candidate user cluster. For each globally normal power generation user cluster, the power generation prediction model corresponding to the power generation user cluster is used to detect whether there are abnormal users in the power generation user cluster; For each candidate user with global anomalies, the theoretical power generation curve corresponding to the candidate user is determined based on the power generation equipment attributes and the spatial attributes, and the candidate user is detected as an abnormal user based on the theoretical power generation curve and the power generation behavior attributes.

[0007] Optionally, the step of clustering the power generation users based on the power generation equipment attributes, spatial attributes, and power generation behavior attributes to obtain a globally normal power generation user cluster and a globally abnormal candidate user cluster includes: Based on the power generation equipment attributes of each power generation user, determine the equipment attribute distance between each power generation user; Based on the spatial attributes of each power generation user, determine the spatial distance between each power generation user; Based on the power generation behavior attributes of each power generation user, determine the distance between power generation users' power generation behaviors; The weighted sum of the device attribute distance, spatial distance, and power generation behavior distance is used to determine the mixed distance between each power generation user; Based on the mixed distance, the power generation users are clustered to obtain a cluster of globally normal power generation users and a cluster of globally abnormal candidate users.

[0008] Optionally, the step of clustering the power generation users based on the mixed distance to obtain a globally normal power generation user cluster and globally abnormal candidate users includes: Obtain clustering parameters at different preset observation scales; DBSCAN clustering is performed on the power generation users according to the clustering parameters of each observation scale and based on the mixing distance to obtain the globally normal power generation user cluster and the globally abnormal candidate users at that observation scale. For each candidate user with global anomalies, the anomaly weight of the candidate user is determined based on the clustering results of the candidate user at each observation scale and the weight corresponding to each observation scale; where the more relaxed the observation scale, the higher the corresponding weight. Candidate users whose anomaly weight is greater than or equal to a set threshold are identified as final global anomaly candidates. The cluster of globally normal power generation users corresponding to the most lenient observation scale is determined as the final cluster of globally normal power generation users.

[0009] Optionally, for each candidate user with a global anomaly, the anomaly weight of the candidate user is determined based on the clustering results of the candidate user at each observation scale and the weights corresponding to each observation scale, including: For each candidate user of global anomaly at each observation scale, check whether the candidate user still belongs to the candidate user of global anomaly in the clustering results at the remaining observation scales; If the candidate user is still considered a globally anomalous candidate user in the clustering results of the remaining observation scales, then the weights corresponding to the remaining observation scales and the weights corresponding to the observation scales of the candidate user are summed to obtain the anomalous weights of the candidate user. If the candidate user is not a globally anomalous candidate user under the remaining observation scale, then the weight corresponding to the observation scale of the candidate user is determined as the anomalous weight of the candidate user.

[0010] Optionally, the power generation equipment attributes include power generation type and equipment attributes; the spatial attributes include spatial location; For each candidate user with a global anomaly, the theoretical power generation curve corresponding to the candidate user is determined based on the power generation equipment attributes and the spatial attributes, including: Based on the aforementioned power generation type, determine the corresponding physical power generation model; Based on the spatial location, the corresponding meteorological data is determined; The device attributes and meteorological data are input into the physical power generation model to determine the theoretical power generation curve of the candidate user.

[0011] Optionally, the power generation behavior attribute includes the actual power generation curve; The step of determining whether a candidate user is an anomalous user based on the theoretical power generation curve and the power generation behavior attributes includes: Based on the theoretical power generation curve and the actual power generation curve, the power generation deviation of the candidate user is determined; Based on the theoretical power generation curve and the actual power generation curve, the curve shape similarity of the candidate users is determined; If the power generation deviation exceeds the set range or the curve shape similarity is lower than the set similarity, then the candidate user is determined to be an abnormal user.

[0012] Optionally, for each globally normal power generation user cluster, the step of using the power generation prediction model corresponding to the power generation user cluster to detect whether there are abnormal users in the power generation user cluster includes: For each power generation user in the power generation user cluster, determine the meteorological data corresponding to that power generation user; The meteorological data is input into the power generation prediction model corresponding to the power generation user cluster to obtain the power generation prediction result corresponding to the power generation user; Determine the deviation between the power generation behavior attribute and the power generation prediction result, and based on the deviation and a set deviation threshold, determine whether the power generation user is an abnormal user.

[0013] Optionally, before detecting whether there are abnormal users in each globally normal power generation user cluster using the power generation prediction model corresponding to the power generation user cluster, the method further includes: Obtain historical power generation data for each power generation user in the power generation user cluster; The power generation prediction model is trained based on the historical power generation data to obtain the power generation prediction model corresponding to the power generation user cluster.

[0014] Secondly, embodiments of the present invention provide an anomaly detection device for all power generation users, comprising: The acquisition module is used to acquire the power generation equipment attributes, spatial attributes, and power generation behavior attributes of each power generation user; The clustering module is used to cluster the power generation users based on the power generation equipment attributes, spatial attributes, and power generation behavior attributes to obtain a globally normal power generation user cluster and a globally abnormal candidate user. The detection module is used for: For each globally normal power generation user cluster, the power generation prediction model corresponding to the power generation user cluster is used to detect whether there are abnormal users in the power generation user cluster; For each candidate user with global anomalies, the theoretical power generation curve corresponding to the candidate user is determined based on the power generation equipment attributes and the spatial attributes, and the candidate user is detected as an abnormal user based on the theoretical power generation curve and the power generation behavior attributes.

[0015] 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.

[0016] This invention employs multi-attribute clustering to divide all power generation users into normal user clusters and anomalous candidate users. Based on this, for the large number of normal user clusters, a dynamic relative benchmark can be established using the corresponding power generation prediction model, thereby sensitively detecting local anomalies deviating from the group's normal state. For the anomalous candidate users separated by clustering, an absolute physical benchmark (i.e., the theoretical power generation curve) is determined to detect whether they are anomalous. This dual-benchmark mechanism effectively overcomes the blind spots of single detection methods, possessing the ability to detect subtle deviations and identify serious anomalies, thus avoiding missed detections and false detections. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the implementation of an anomaly detection method for all power generation users according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the implementation of clustering power generation users according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the implementation of DBSCAN clustering for power generation users according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an anomaly detection device for all power generation users provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0019] Most related technologies use set thresholds or rules to screen all power generation users to identify abnormal users. However, anomaly detection methods based on set thresholds or rules ignore the inherent differences between power generation users, which may lead to false positives or false negatives.

[0020] To reduce the probability of false positives and false negatives in anomaly detection among power generation users, this invention employs multi-attribute clustering to divide all power generation users into normal user clusters and anomalous candidate users. Based on this, for the large number of normal user clusters, a dynamic relative benchmark can be established using the corresponding power generation prediction model, thereby sensitively detecting local anomalies that deviate from the group's normal state. For the anomalous candidate users separated by clustering, an absolute physical benchmark (i.e., the theoretical power generation curve) is determined to detect whether they are anomalies. This dual-benchmark mechanism effectively overcomes the blind spots of single detection methods, possessing both the ability to detect subtle deviations and identify serious anomalies, thus avoiding false positives and false negatives.

[0021] See Figure 1 The document illustrates a flowchart of the anomaly detection method for all power generation users provided in this embodiment of the invention, detailed below: Step 101: Obtain the power generation equipment attributes, spatial attributes, and power generation behavior attributes of each power generation user.

[0022] Here, the attributes of power generation equipment may include: power generation type, rated installed capacity, inverter or wind turbine model (which can be used to characterize the operating parameters of the inverter / wind turbine), photovoltaic panel tilt angle and azimuth angle, and grid connection voltage level, etc., which are inherent attributes of the power generation user, do not change over time, and affect the power generation capacity. Among them, the power generation type may include photovoltaic power generation or wind power generation, etc.

[0023] Spatial attributes can include spatial location. In this embodiment of the invention, meteorological data corresponding to the power generation user can be determined based on the user's spatial location. It is understood that meteorological data is a crucial factor affecting power generation in both photovoltaic and wind power generation.

[0024] Power generation behavior attributes may include: actual power generation curve, that is, the actual power generation curve of power generation users over time.

[0025] In this embodiment of the invention, considering that the "normal" and "abnormal" status of power generation users is not a unified standard but highly dependent on their own conditions, this embodiment collects the power generation equipment attributes, spatial attributes, and power generation behavior attributes of each power generation user for clustering. The core objective of clustering is to divide a massive number of heterogeneous power generation users into multiple highly consistent "homogeneous" groups, and define a meaningful "normal" benchmark within each group, thereby enabling the detection of anomalies among power generation users.

[0026] Step 102: Cluster the power generation users based on the attributes of the power generation equipment, spatial attributes, and power generation behavior attributes to obtain a global normal power generation user cluster and a global abnormal candidate user cluster.

[0027] Here, power generation equipment attributes can characterize the physical attributes of the power generation user. Spatial attributes can depict the external environment in which the power generation user is located, and are used to characterize external driving factors. Power generation behavior attributes are used to characterize the user's actual power generation behavior and dynamic performance, and are a direct measurement of the user's actual operating state.

[0028] The embodiments of the present invention comprehensively consider the attributes of power generation equipment, spatial attributes, and power generation behavior attributes to cluster power generation users, which can improve the clustering accuracy and avoid the benchmark contamination problem caused by single-dimensional clustering.

[0029] The clustering algorithm can be K-means clustering, spectral clustering, hierarchical clustering, or density-based spatial clustering of applications with noise (DBSCAN).

[0030] Considering that the DBSCAN clustering algorithm can cluster based on the density of data points, dividing areas with sufficiently high density into clusters and treating data points in low-density areas as noise, and that the ultimate goal of clustering power generation users is to discover abnormal power generation users, this embodiment of the invention can use the DBSCAN clustering algorithm to perform clustering, thereby determining each cluster after clustering (i.e., the globally normal power generation user cluster) and each data point identified as noise (i.e., globally abnormal candidate users).

[0031] DBSCAN clustering essentially identifies the most dense and representative patterns in the dataset as the basic normal group. Correspondingly, the noise points identified by DBSCAN clustering are abnormal groups that do not belong to any normal group. Thus, this embodiment of the invention uses DBSCAN clustering to determine the globally normal power generation user cluster and the globally abnormal candidate users, achieving a preliminary anomaly screening.

[0032] Based on the initial anomaly screening, this embodiment of the invention further performs anomaly detection for each power generation user cluster and candidate user.

[0033] Step 103: For each globally normal power generation user cluster, use the power generation prediction model corresponding to the power generation user cluster to detect whether there are abnormal users in the power generation user cluster.

[0034] It should be noted that while DBSCAN clustering ensures that users within a cluster are similar in terms of power generation equipment attributes, spatial attributes, and power generation behavior attributes, it cannot guarantee that each power generation user is always in a normal state. Therefore, in this embodiment of the invention, anomaly detection is still required for power generation users within the cluster.

[0035] Considering that within each globally normal power generation user cluster, all power generation users have similar power generation equipment attributes, spatial attributes, and power generation behavior attributes, this embodiment of the invention can establish a dynamic benchmark for each cluster. Any user that significantly deviates from this benchmark is considered an abnormal user.

[0036] Here, a power generation prediction model can be established for each power generation user cluster. This power generation prediction model can be a neural network model, used to output a dynamic benchmark for that power generation user cluster, i.e., a benchmark for each power generation user.

[0037] In some embodiments, for each power generation user cluster, historical power generation data of each power generation user in the cluster can be obtained in advance; and the power generation prediction model can be trained based on the historical power generation data to obtain the power generation prediction model corresponding to the power generation user cluster.

[0038] Here, historical power generation data can include the actual power generation data of each power generation user within a certain period and its corresponding meteorological data. In this embodiment of the invention, meteorological data can be input into the power generation prediction model to obtain the power generation prediction data output by the model. Based on the deviation between the power generation prediction data and the actual power generation data, the model parameters of the power generation prediction model are adjusted until the deviation between the power generation prediction data and the actual power generation data is less than a set threshold, thus obtaining a trained power generation prediction model.

[0039] It is understandable that the trained power generation prediction model can output the corresponding power generation prediction data based on the meteorological data of each power generation user in the cluster, that is, the benchmark for each power generation user.

[0040] In some embodiments, for each power generation user in a power generation user cluster, meteorological data corresponding to the power generation user is determined; then, the meteorological data is input into the power generation prediction model corresponding to the power generation user cluster to obtain the power generation prediction result corresponding to the power generation user; finally, the deviation between the power generation behavior attribute and the power generation prediction result is determined, and based on the deviation and a set deviation threshold, it is determined whether the power generation user is an abnormal user.

[0041] Based on the above, the power generation prediction results output by the power generation prediction model can be used to characterize the benchmark corresponding to the power generation user. This embodiment of the invention compares the power generation behavior attributes of the power generation user (i.e., the actual power generation curve) with the power generation prediction results and determines the deviation between the two.

[0042] Specifically, the power generation prediction model outputs a predicted power generation curve. This embodiment of the invention can calculate the mean absolute error between the predicted and actual power generation curves to reflect the overall level and magnitude of the deviation between the actual and predicted power generation. Next, the dynamic time warping distance between the predicted and actual power generation curves can be calculated to characterize the shape similarity of the two curves on the time axis. This indicator is mainly used to identify abnormal users whose total power generation is normal but whose power generation periods are abnormal.

[0043] Here, the deviation between the power generation behavior attributes and the power generation prediction results includes the aforementioned mean absolute error and the aforementioned shape similarity. Accordingly, the deviation thresholds include an error threshold and a similarity threshold.

[0044] In this embodiment of the invention, if the mean absolute error is greater than the error threshold, or the shape similarity is lower than the similarity threshold, then the candidate user is determined to be an abnormal user.

[0045] The embodiments of the present invention generate a dynamic benchmark through a power generation prediction model, and then through multi-dimensional error quantification, can sensitively and reliably identify those power generation users who are "normal in identity" (belong to the cluster) but "abnormal in behavior" (deviate from the cluster benchmark), thereby achieving refined intra-cluster anomaly detection.

[0046] Step 104: For each candidate user with global anomalies, determine the theoretical power generation curve corresponding to the candidate user based on the power generation equipment attributes and spatial attributes, and detect whether the candidate user is an abnormal user based on the theoretical power generation curve and power generation behavior attributes.

[0047] Candidate users exhibiting global anomalies have significantly different behavioral patterns from all globally normal power generation user groups, and there are no comparable user groups, making it impossible to establish an effective machine learning benchmark. In other words, it is impossible to use the method of training a power generation prediction model to establish a relative benchmark based on historical power generation data of similar users.

[0048] Therefore, embodiments of the present invention determine a theoretical power generation curve based on the attributes and spatial attributes of the power generation equipment. This theoretical power generation curve can serve as an absolute benchmark for detecting whether power generation users are experiencing abnormalities.

[0049] In some embodiments, power generation equipment attributes include power generation type and equipment attributes. Spatial attributes include spatial location.

[0050] Based on this, a corresponding physical power generation model can be determined according to the power generation type; then, the corresponding meteorological data can be determined according to the spatial location; finally, the equipment attributes and meteorological data are input into the physical power generation model to determine the theoretical power generation curve of the candidate user.

[0051] In this embodiment of the invention, the power generation types mainly consider photovoltaic (PV) power generation and wind power generation. Specifically, when establishing a physical power generation model for PV power generation, the solar altitude angle and azimuth angle can be calculated first using a solar position algorithm (such as the PSA algorithm) based on information such as geographical location, date and time, PV panel tilt angle, and azimuth angle. Then, the normal direct radiation, horizontal scattered radiation, and ground reflected radiation are calculated, ultimately outputting the total effective irradiance received by the PV panel's inclined surface. Based on this, the DC power is calculated using a diode model or a unit efficiency model, based on the total effective irradiance, ambient temperature, and PV panel rated parameters. Next, based on the DC power and inverter efficiency curves, the theoretical power generation is calculated, resulting in a theoretical power generation curve. Here, the theoretical power generation corresponding to different times constitutes the theoretical power generation curve.

[0052] When establishing a physical power generation model for wind power, the wind speed at the hub height can be calculated using the logarithmic wind profile law or exponential law, based on wind speed, turbine hub height, and ground roughness. Then, the theoretical wind power is calculated using the hub height wind speed, air density, and turbine swept area. Finally, the theoretical power generation is determined by analyzing the theoretical wind power, wind speed, and turbine power curves, thus obtaining the theoretical power generation curve.

[0053] Based on the above physical power generation model, this embodiment of the invention inputs equipment attributes and meteorological data into the physical power generation model to obtain the theoretical power generation power corresponding to the power generation user, and then determines the theoretical power generation curve.

[0054] Meteorological data may include ambient temperature, wind speed, and air density. Equipment attributes may include photovoltaic panel tilt angle, azimuth angle, rated parameters of the photovoltaic panel (e.g., peak power, open-circuit voltage, short-circuit current, temperature coefficient, etc.), inverter efficiency curve, wind turbine hub height, and wind turbine swept area. The inverter efficiency curve can be determined by the inverter model. The wind turbine hub height and swept area can be determined by the wind turbine model.

[0055] In some embodiments, the power generation behavior attribute includes the actual power generation curve. Based on this, the power generation deviation of candidate users can be determined based on the theoretical power generation curve and the actual power generation curve; then, the curve shape similarity of candidate users can be determined based on the theoretical power generation curve and the actual power generation curve; if the power generation deviation exceeds a set range or the curve shape similarity is lower than a set similarity, the candidate user is determined to be an abnormal user.

[0056] Here, the average absolute error between the theoretical power generation curve and the actual power generation curve can be calculated as the power generation deviation. When the power generation deviation exceeds the set range, the candidate user is identified as an abnormal user.

[0057] The embodiments of the present invention can calculate the dynamic time warping distance between the theoretical power generation curve and the actual power generation curve, which is used to characterize the shape similarity of the two curves.

[0058] Here, the set range and set similarity can be determined according to the actual situation, and the embodiments of the present invention do not impose specific limitations on this.

[0059] Compared to existing technologies, this invention uses multi-attribute clustering to divide all power generation users into normal user clusters and anomalous candidate users. Based on this, for the large number of normal user clusters, a dynamic relative benchmark can be established using the corresponding power generation prediction model, thereby sensitively detecting local anomalies that deviate from the group's normal state. For the anomalous candidate users separated by clustering, an absolute physical benchmark (i.e., the theoretical power generation curve) is determined to detect whether they are anomalous. This dual-benchmark mechanism effectively overcomes the blind spots of single detection methods, possessing the ability to detect subtle deviations and identify serious anomalies, thus avoiding missed detections and false detections.

[0060] The clustering process for power generation users will be described in detail below.

[0061] In some embodiments, see Figure 2 When clustering power generation users based on power generation equipment attributes, spatial attributes, and power generation behavior attributes to obtain globally normal power generation user clusters and globally abnormal candidate users, the following steps can be followed: Step 201: Determine the equipment attribute distance between each power generation user based on the power generation equipment attributes of each power generation user.

[0062] This invention allows for preprocessing of power generation equipment attributes. Continuous numerical data such as rated installed capacity, photovoltaic panel tilt angle, and azimuth angle are standardized to eliminate the influence of dimensions. Categorical variable data such as power generation type, grid connection voltage level, and inverter / wind turbine model are converted into binary vectors using hot-coding, ultimately yielding a numerical static feature vector to characterize the power generation equipment attributes.

[0063] Considering that Euclidean distance can better handle mixed-type features, embodiments of the present invention can calculate the Euclidean distance between the static feature vectors of each power generation user, which is used to characterize the equipment attribute distance between each power generation user.

[0064] Step 202: Determine the spatial distance between each power generation user based on the spatial attributes of each power generation user.

[0065] In this embodiment of the invention, the spatial attribute is spatial location. This embodiment of the invention can use the Haversine formula to calculate the spatial distance between each power generation user.

[0066] Step 203: Determine the distance between power generation users based on their power generation behavior attributes.

[0067] The power generation behavior attribute, namely the actual power generation curve, belongs to high-dimensional time series data. To avoid the curse of dimensionality, this embodiment of the invention pre-extracts features from the actual power generation curve. For example, principal component analysis can be used to extract features, resulting in a low-dimensional behavioral feature vector.

[0068] In this embodiment of the invention, the cosine distance or Euclidean distance of the behavioral feature vectors of each power generation user can be calculated to characterize the distance between the power generation behaviors of each power generation user.

[0069] Step 204: Perform a weighted summation of the device attribute distance, spatial distance, and power generation behavior distance to determine the mixed distance between each power generation user.

[0070] This invention provides a weighted summation of device attribute distance, spatial distance, and power generation behavior distance to obtain the mixed distance between each power generation user. The specific weights of these three distances can be determined based on actual circumstances, and this invention does not impose any specific limitations on them.

[0071] Step 205: Based on the mixed distance, cluster the power generation users to obtain a cluster of globally normal power generation users and a cluster of globally abnormal candidate users.

[0072] The embodiments of the present invention can perform DBSCAN clustering on all power generation users according to a pre-set neighborhood radius and minimum number of neighbors, and based on the mixed distance between each power generation user, thereby determining the globally normal power generation user cluster and the globally abnormal candidate user cluster.

[0073] Considering that DBSCAN can not only perform clustering but also preliminary anomaly screening, to improve the accuracy of preliminary anomaly screening, in some embodiments, see [reference needed]. Figure 3 DBSCAN clustering can be performed by following these steps.

[0074] Step 301: Obtain clustering parameters for different preset observation scales.

[0075] Considering that different types of anomalies will only appear at different observation scales, and a single observation scale cannot capture all types of anomalies, this embodiment of the invention presets clustering parameters for different observation scales to perform clustering, so as to scan and determine noise points (i.e., candidate users of global anomalies) at different observation scales.

[0076] Here, clustering parameters can include the neighborhood radius and the number of minimum neighbors. The smaller the neighborhood radius and the smaller the number of minimum neighbors, the finer the observation scale.

[0077] For example, embodiments of the present invention can set fine-scale, medium-scale, and loose-scale. At the fine-scale, the neighborhood radius can be the 10th quantile of the mixed distance distribution, and the minimum number of neighbors can be 2 or 3. At the medium-scale, the neighborhood radius can be the 20%-25% quantile of the mixed distance distribution, and the minimum number of neighbors can be 5 or 6. At the loose-scale, the neighborhood radius can be the 30%-40% quantile of the mixed distance distribution, and the minimum number of neighbors can be 8 or 9.

[0078] Step 302: Perform DBSCAN clustering on the power generation users based on the mixing distance according to the clustering parameters of each observation scale to obtain the globally normal power generation user cluster and the globally abnormal candidate users at that observation scale.

[0079] Here, DBSCAN clustering is performed on power generation users according to clustering parameters at different observation scales, which yields the corresponding power generation user clusters and candidate users at different observation scales.

[0080] Step 303: For each candidate user with global anomalies, determine the anomaly weight of the candidate user based on the clustering results of the candidate user at each observation scale and the weights corresponding to each observation scale.

[0081] It is understandable that noise points under a relaxed observation scale represent users with the most severe and obvious anomalies. Therefore, this embodiment of the invention sets different weights for different observation scales, and the more relaxed the observation scale, the higher the corresponding weight.

[0082] In some embodiments, the following steps may be performed when determining the outlier weight of a candidate user: For each candidate user who is a global anomaly at each observation scale, check whether the candidate user still belongs to the global anomaly candidate user in the clustering results of the remaining observation scales. If the candidate user still belongs to the global anomaly candidate user in the clustering results of the remaining observation scales, then the weights corresponding to the remaining observation scales and the weights corresponding to the observation scales corresponding to the candidate user are accumulated to obtain the anomaly weight corresponding to the candidate user. If the candidate user does not belong to the global anomaly candidate user at the remaining observation scales, then the weights corresponding to the observation scales corresponding to the candidate user are determined as the anomaly weight corresponding to the candidate user.

[0083] It is understandable that different observation scales correspond to different clustering results. For each candidate user at each observation scale, it can be checked whether the candidate user still belongs to the candidate user at the remaining observation scales. If the candidate user belongs to the candidate user at all different observation scales, the weights corresponding to the observation scales are summed to obtain the abnormal weight of the candidate user.

[0084] For example, if user A is identified as a candidate user under both the loose and medium scales, but not under the fine scale, then the weights corresponding to the loose and medium scales are added together as the abnormal weight for user A. If user A is not identified as a candidate user under either the loose or medium scales, but is identified as a candidate user under the fine scale, then the weight corresponding to the fine scale is used as the abnormal weight for user A.

[0085] Here, by determining the anomaly weight of a user based on whether they are identified as a candidate user at different observation scales, accidental misjudgments caused by improper sensitivity settings of a single scale parameter can be effectively avoided. This cross-validation mechanism significantly improves the reliability of candidate users.

[0086] Step 304: Candidate users whose abnormal weight is greater than or equal to the set threshold are identified as the final global abnormal candidate users.

[0087] Here, the value of the threshold can be determined according to the actual situation, and the embodiments of the present invention do not impose specific limitations on it.

[0088] Step 305: The globally normal power generation user cluster corresponding to the most lenient observation scale is determined as the final globally normal power generation user cluster.

[0089] It should be noted that there may be a special case where a candidate user is considered a candidate user at both fine and medium scales, but not at a loose scale, and the anomaly weight of this candidate user is greater than a set threshold, thus being identified as a candidate user for the final global anomaly. In this case, the power generation user cluster may contain the candidate user. In this embodiment of the invention, the candidate user can be removed from the power generation user cluster to obtain the final globally normal power generation user cluster.

[0090] This invention achieves a comprehensive scan of anomalies, from subtle to significant, by performing multi-scale DBSCAN clustering in parallel, effectively avoiding detection blind spots caused by a single scale parameter. Furthermore, the use of cumulative anomaly weights significantly reduces the risk of misjudgment due to temporary fluctuations or local features, improving the confidence level of candidate users. Simultaneously, the normal user cluster determined by the most lenient scale is used as the final normal user cluster, ensuring high behavioral consistency among cluster members and providing a clean data foundation for building accurate prediction models.

[0091] 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.

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

[0093] Figure 4 The diagram shows a schematic of an anomaly detection device for all power generation users provided in an embodiment of the present invention. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown, and are described in detail below: like Figure 4 As shown, the anomaly detection device 4 for all power generation users includes: an acquisition module 41, a clustering module 42, and a detection module 43.

[0094] Module 41 is used to acquire the power generation equipment attributes, spatial attributes, and power generation behavior attributes of each power generation user; Clustering module 42 is used to cluster power generation users based on power generation equipment attributes, spatial attributes, and power generation behavior attributes to obtain globally normal power generation user clusters and globally abnormal candidate users. Detection module 43 is used for: For each globally normal power generation user cluster, the power generation prediction model corresponding to the power generation user cluster is used to detect whether there are abnormal users in the power generation user cluster; For each candidate user with global anomalies, the theoretical power generation curve corresponding to the candidate user is determined based on the power generation equipment attributes and spatial attributes. Based on the theoretical power generation curve and power generation behavior attributes, the candidate user is detected as an abnormal user.

[0095] In one possible implementation, clustering module 42 is specifically used for: Based on the power generation equipment attributes of each power generation user, determine the equipment attribute distance between each power generation user; Based on the spatial attributes of each power generation user, determine the spatial distance between each power generation user; Based on the power generation behavior attributes of each power generation user, determine the distance between power generation users' power generation behaviors; The weighted summation of equipment attribute distance, spatial distance, and power generation behavior distance is used to determine the mixed distance between each power generation user; Based on the hybrid distance, power generation users are clustered to obtain a globally normal power generation user cluster and globally abnormal candidate users.

[0096] In one possible implementation, clustering module 42 is specifically used for: Obtain clustering parameters at different preset observation scales; DBSCAN clustering is performed on power generation users based on the mixing distance according to the clustering parameters of each observation scale to obtain the global normal power generation user cluster and the global abnormal candidate users at that observation scale. For each candidate user with global anomalies, the anomaly weight of the candidate user is determined based on the clustering results of the candidate user at each observation scale and the weight corresponding to each observation scale; where the more relaxed the observation scale, the higher the corresponding weight. Candidate users whose anomaly weight is greater than or equal to a set threshold are identified as final global anomaly candidates. The cluster of globally normal power generation users corresponding to the most lenient observation scale is determined as the final cluster of globally normal power generation users.

[0097] In one possible implementation, clustering module 42 is specifically used for: For each candidate user of global anomaly at each observation scale, check whether the candidate user still belongs to the candidate user of global anomaly in the clustering results at the remaining observation scales; If a candidate user is still considered a global anomaly in the clustering results at the remaining observation scales, then the weights corresponding to the remaining observation scales and the weights corresponding to the observation scales of the candidate user are summed to obtain the anomaly weights of the candidate user. If a candidate user is not a global anomaly candidate user under the remaining observation scales, then the weight corresponding to the observation scale of the candidate user is determined as the anomaly weight of the candidate user.

[0098] In one possible implementation, the power generation equipment attributes include power generation type and equipment attributes; the spatial attributes include spatial location. Detection module 43 is specifically used for: Based on the type of power generation, determine the corresponding physical power generation model; Based on spatial location, determine the corresponding meteorological data; The equipment attributes and meteorological data are input into the physical power generation model to determine the theoretical power generation curves for candidate users.

[0099] In one possible implementation, the power generation behavior attribute includes the actual power generation curve; Detection module 43 is specifically used for: Based on theoretical power generation curves and actual power generation curves, the power generation deviation of candidate users is determined; Based on theoretical power generation curves and actual power generation curves, determine the curve shape similarity of candidate users; If the power generation deviation exceeds the set range or the curve shape similarity is lower than the set similarity, the candidate user is determined to be an abnormal user.

[0100] In one possible implementation, the detection module 43 is specifically used for: For each power generation user in the power generation user cluster, determine the corresponding meteorological data for that user; Meteorological data is input into the power generation prediction model corresponding to the power generation user cluster to obtain the power generation prediction results for the power generation user. Determine the deviation between the power generation behavior attributes and the power generation prediction results, and based on the deviation and a set deviation threshold, determine whether the power generation user is an abnormal user.

[0101] In one possible implementation, the detection module 43 is further configured to: Before detecting whether there are abnormal users in each globally normal power generation user cluster using the corresponding power generation prediction model, the process also includes: Obtain historical power generation data for each power generation user in the power generation user cluster; The power generation prediction model is trained based on historical power generation data to obtain the power generation prediction model corresponding to the power generation user cluster.

[0102] This device embodiment can be used to implement the above method embodiment, and its technical principle and implementation effect are the same as those of the above method embodiment, so they will not be repeated here.

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

[0104] For example, computer program 52 may be divided into one or more modules / units, which are stored in memory 51 and executed by processor 50 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 52 in electronic device 5.

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

[0106] 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.

[0107] 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.

[0108] 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 anomaly detection for a full demand power user, characterized by, The method comprises the following steps: obtaining the generation equipment attributes, space attributes and generation behavior attributes of each power generation user; clustering the power generation users based on the generation equipment attributes, space attributes and generation behavior attributes to obtain globally normal power generation user clusters and globally abnormal candidate users; for each globally normal power generation user cluster, using the power generation prediction model corresponding to the power generation user cluster to detect whether there is an abnormal user in the power generation user cluster; for each globally abnormal candidate user, determining the theoretical power generation curve corresponding to the candidate user based on the generation equipment attributes and the space attributes, and detecting whether the candidate user is an abnormal user based on the theoretical power generation curve and the generation behavior attributes.

2. The anomaly detection method for a full demand power generation user according to claim 1, characterized by, The clustering of the power generation users based on the generation equipment attributes, space attributes and generation behavior attributes to obtain globally normal power generation user clusters and globally abnormal candidate users comprises the following steps: determining the equipment attribute distance between each power generation user based on the generation equipment attributes of each power generation user; determining the spatial distance between each power generation user based on the space attributes of each power generation user; determining the generation behavior distance between each power generation user based on the generation behavior attributes of each power generation user; weighting and summing the equipment attribute distance, spatial distance and generation behavior distance to determine the hybrid distance between each power generation user; clustering the power generation users based on the hybrid distance to obtain globally normal power generation user clusters and globally abnormal candidate users.

3. The anomaly detection method for a full demand power generation user according to claim 2, characterized by, The clustering of the power generation users based on the hybrid distance to obtain globally normal power generation user clusters and globally abnormal candidate users comprises the following steps: obtaining preset clustering parameters of different observation scales; performing DBSCAN clustering on the power generation users based on the hybrid distance according to the clustering parameters of each observation scale to obtain globally normal power generation user clusters and globally abnormal candidate users under the observation scale; for each globally abnormal candidate user, determining the abnormal weight of the candidate user based on the clustering results of the candidate user under each observation scale and the weights corresponding to each observation scale; wherein the wider the observation scale, the higher the corresponding weight; determining the candidate users whose abnormal weights are greater than or equal to a set threshold as the final globally abnormal candidate users; determining the globally normal power generation user cluster corresponding to the widest observation scale as the final globally normal power generation user cluster.

4. The anomaly detection method for a full demand power generation user according to claim 3, characterized by, The determination of the abnormal weight of each globally abnormal candidate user based on the clustering results of the candidate user under each observation scale and the weights corresponding to each observation scale comprises the following steps: for each globally abnormal candidate user under each observation scale, detecting whether the candidate user still belongs to the globally abnormal candidate users in the clustering results under the remaining observation scales; if the candidate user still belongs to the globally abnormal candidate users in the clustering results under the remaining observation scales, then adding the weight corresponding to the remaining observation scales and the weight corresponding to the observation scale corresponding to the candidate user to obtain the abnormal weight corresponding to the candidate user. If the candidate user does not belong to the candidate user of the global anomaly under the remaining observation scale, the weight corresponding to the observation scale corresponding to the candidate user is determined as the abnormal weight corresponding to the candidate user.

5. The method for anomaly detection for a total energy production consumer according to any one of claims 1 to 4, characterized in that, The power generation equipment attribute includes a power generation type and an equipment attribute; and the space attribute includes a space position. The method further includes: determining a corresponding physical power generation model based on the power generation type; determining corresponding meteorological data based on the space position; inputting the equipment attribute and the meteorological data into the physical power generation model to determine the theoretical power generation curve of the candidate user.

6. The method for anomaly detection for a total energy production consumer according to any one of claims 1 to 4, characterized in that, The power generation behavior attribute includes an actual power generation curve. The method further includes: determining a power generation deviation of the candidate user based on the theoretical power generation curve and the actual power generation curve; determining a curve shape similarity of the candidate user based on the theoretical power generation curve and the actual power generation curve; and determining the candidate user as an abnormal user if the power generation deviation exceeds a set range or the curve shape similarity is lower than a set similarity.

7. The method of anomaly detection for a total energy consumer according to any one of claims 1 to 4, characterized in that, The method further includes: determining meteorological data corresponding to each power generation user in the power generation user cluster; inputting the meteorological data into the power generation prediction model corresponding to the power generation user cluster to obtain a power generation prediction result corresponding to the power generation user; and determining a deviation between the power generation behavior attribute and the power generation prediction result, and determining whether the power generation user is an abnormal user based on the deviation and a set deviation threshold.

8. The anomaly detection method for a full demand power generation user according to claim 7, characterized by, The method further includes, before the step of detecting whether there is an abnormal user in the power generation user cluster based on the power generation prediction model corresponding to the power generation user cluster: obtaining historical power generation data of each power generation user in the power generation user cluster; and training the power generation prediction model based on the historical power generation data to obtain the power generation prediction model corresponding to the power generation user cluster.

9. An abnormality detection device for a total power generation user, characterized by, The method further includes: obtaining a power generation equipment attribute, a space attribute and a power generation behavior attribute of each power generation user; clustering the power generation users based on the power generation equipment attribute, the space attribute and the power generation behavior attribute to obtain a globally normal power generation user cluster and a globally abnormal candidate user; detecting whether there is an abnormal user in the power generation user cluster based on the power generation prediction model corresponding to the power generation user cluster for each globally normal power generation user cluster; and determining a theoretical power generation curve corresponding to the candidate user based on the power generation equipment attribute and the space attribute for each globally abnormal candidate user, and detecting whether the candidate user is an abnormal user based on the theoretical power generation curve and the power generation behavior attribute. ​ 10. An electronic device, comprising: A computer program product comprising a computer readable medium having stored thereon the computer program of claim 9, wherein said computer program is configured such that, when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is carried out. A computer program product comprising a computer readable medium having stored thereon the computer program of claim 9, wherein said computer program is configured such that, when the computer program is executed by a processor, the