Abnormal power consumption behavior recognition method based on feature index dimension reduction and density peak clustering
Patent Information
- Application Number
- CN202411007511.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2044-07-25
AI Technical Summary
[0003]目前已有一些学者提出了相应的智能电表用电异常的判断方法,如申请号202111552871.0公开的一种基于主成分分析和密度峰值聚类的用户用电行为分析方法;或者杨峰等提出的基于改进快速密度峰值聚类算法的电力大数据异常值检测分析;但是上述方法得到的结果的准确性还有待提高
[0048]本发明相对于现有技术具备的有益效果为:本发明提供的一种基于特征指标降维与密度峰值聚类的异常用电行为辨识方法,以电力用户的用电量数据为研究对象,按照用电特征集构造、特征降维、聚类分析、离群点检测的流程进行异常用电行为的辨识。最后通过三维散点图的可视化方式进行展示。
Smart Images

Figure CN118885939B_ABST
Abstract
Description
Technical Field
[0001] This invention provides a method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering, belonging to the field of abnormal electricity consumption behavior detection technology. Background Technology
[0002] Smart meters, as metering devices for electricity supply and consumption, are a crucial component of smart grids, playing a vital role in real-time metering, load control, and demand response for power grid companies. Their operational status directly impacts the development and operational efficiency of the State Grid Corporation of China, as well as the fairness and security of electricity consumption for users. While the implementation of smart grids offers technological and social advantages, compared to traditional mechanical meters, smart meters deployed in smart grids are more vulnerable to attacks and network intrusions by electricity thieves. To reduce non-technical losses caused by electricity theft and inaccurate smart meter readings, the power sector is utilizing electricity data collected from advanced measurement systems to identify potentially defective smart meters and abnormal electricity consumption behavior.
[0003] Currently, some scholars have proposed corresponding methods for judging abnormal electricity consumption of smart meters, such as a user electricity consumption behavior analysis method based on principal component analysis and density peak clustering disclosed in application number 202111552871.0; or the power big data outlier detection and analysis proposed by Yang Feng et al. based on an improved fast density peak clustering algorithm; however, the accuracy of the results obtained by the above methods still needs to be improved. Summary of the Invention
[0004] In order to overcome the shortcomings of the prior art, the technical problem to be solved by the present invention is to provide an improved method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by this invention is: an abnormal electricity consumption behavior identification method based on feature index dimensionality reduction and density peak clustering, comprising the following steps:
[0006] S1: Based on daily and monthly electricity consumption data, construct a multi-dimensional feature set that reflects users' electricity consumption behavior from four perspectives: statistical indicators, volatility indicators, trend indicators, and similarity measurement indicators.
[0007] S2: Use feature reduction methods to reduce the dimensionality of the extracted multidimensional feature set;
[0008] S3: The density peak clustering algorithm is used to cluster the dimensionality-reduced features of all users according to density to obtain multiple density peak points representing different electricity consumption behaviors;
[0009] In the process of solving the density peak clustering algorithm, the Bonferroni exponent function (BI) is introduced to measure the distribution of the decision index set, and the improved whale optimization algorithm (IWOA) is used to solve for the maximum and minimum values of BI to obtain the optimal cutoff distance parameter d. c The expression for the Bonferroni exponential function BI is as follows:
[0010]
[0011] In the above formula: N is the total number of data points, γ j Decision indicators for density peak points;
[0012] The Improved Whale Optimization Algorithm (IWOA) improves upon the traditional Whale Optimization Algorithm (WOA) in terms of convergence factor, probability threshold, and position weight.
[0013] S4: Calculate the outlier index for each user and set a threshold to identify outlier users;
[0014] The formula for calculating the outlier index is as follows:
[0015]
[0016] In the above formula: Indicates the outlier index. ρi represents the centripetal relative distance of the data points, and ρi represents the local density of the data points.
[0017] The statistical indicators in step S1 include four characteristic indicators constructed based on daily electricity consumption data: mean, standard deviation, skewness, and kurtosis.
[0018] Volatility indicators include the coefficient of variation of daily electricity consumption, monthly electricity consumption rate, and monthly peak-to-valley difference rate for each quarter. The coefficient of variation of daily electricity consumption is the ratio of the standard deviation of daily electricity consumption to the mean of daily electricity consumption for each quarter.
[0019] Trend indicators include the linear fit slope of monthly electricity consumption data and trend indicators calculated from the zero-lag average line of similarity and difference constructed from daily electricity consumption data.
[0020] Similarity metrics include the Pearson correlation coefficient and Euclidean distance between user monthly electricity consumption data and typical monthly electricity consumption data.
[0021] Trend indicators calculated from the zero-lag moving average of daily electricity consumption data include upward and downward trend indicators for daily electricity consumption. The calculation formula is as follows:
[0022]
[0023]
[0024] ZLDIF(S,(p,q)) =ZLMA (S,p) -ZLMA (S,q) ;
[0025]
[0026]
[0027] In the above formula: ZLMA represents the n-day exponential moving average sequence of a time series S. (S,n) This represents the n-day zero-lag moving average sequence of time series S. Represents time series EMA (S,n) Given an n-day exponential moving average sequence, assuming p < q, then ZLMA (S,p) and ZLMA (S,q) These represent fast and slow zero-lag moving average sequences, respectively; ZLDIF (S,(p,q)) It is a sequence of difference values; ZLMACD (S,(p,q,α)) The zero-lag moving average of divergence indicator; ZLDIF represents the difference value sequence (S,(p,q)) The α-day exponential moving average sequence; C1 and C2 represent the number of data points greater than zero and less than zero in the ZLMACD sequence, respectively; m represents the length of the electricity consumption sequence; T up and T down These represent the upward and downward trend indicators for the electricity consumption series, respectively.
[0028] In step S2, the constructed 15-dimensional feature set is reduced to 3-dimensionality by using three feature dimensionality reduction models: factor analysis, principal component analysis, and linear discriminant analysis. The optimal feature dimensionality reduction model is then determined by the AUC value under the ROC curve.
[0029] Introducing a nonlinear convergence factor The linear convergence factor in WOA is improved, where T max t is the maximum number of iterations, e is the current number of iterations, and e is the natural constant.
[0030] An adaptive probability threshold is introduced to replace the equiprobability model of the search encirclement mechanism and the spiral position update mechanism in WOA. The mathematical model of the adaptive probability threshold is as follows:
[0031]
[0032] In the above formula: p * α and β are adaptive probability thresholds.
[0033] An adaptive position weight parameter is introduced to update the whale positions in WOA and assign different weights. Its mathematical model is expressed as follows:
[0034]
[0035] In the above formula: ω is the weight, and α and β are control parameters.
[0036] Centripetal relative distance of data points The expression is as follows:
[0037]
[0038] In the above formula: δ i Indicates cluster C j The relative distance between internal data points Indicates cluster C j The average centripetal distance of the data points within the data set.
[0039] Cluster C j Average centripetal distance of internal data points The expression is as follows:
[0040]
[0041] In the above formula: n represents cluster C j The total number of data points; dist represents the function for calculating the Euclidean distance between two points; x μ Indicates the cluster center of the cluster to which it belongs; x i Indicates cluster C j Data points within.
[0042] Cluster C j The relative distance δ between internal data points i The expression is as follows:
[0043]
[0044] δ i Represents the relationship between data point i and local density ρ i Euclidean distance d between data points larger than it ij The minimum value;
[0045] Local density ρ i The expression is as follows:
[0046]
[0047] In the above formula: n is the total number of data points; χ(x) is an indicator function, χ(x) = 1 when x < 0, and χ(x) = 0 when x ≥ 0; d ij d represents the Euclidean distance between data points i and j; c To cut off the distance.
[0048] The advantages of this invention compared to existing technologies are as follows: This invention provides a method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering. Taking electricity consumption data of power users as the research object, it identifies abnormal electricity consumption behavior according to the process of constructing an electricity consumption feature set, feature dimensionality reduction, cluster analysis, and outlier detection. Finally, the results are visualized using a three-dimensional scatter plot. Attached Figure Description
[0049] The present invention will be further described below with reference to the accompanying drawings:
[0050] Figure 1 This is a flowchart of the algorithm of the present invention;
[0051] Figure 2 This is a schematic diagram of the correlation matrix of the feature set;
[0052] Figure 3 ROC curves for three dimensionality reduction models;
[0053] Figure 4 This is a schematic diagram of the density peak clustering algorithm.
[0054] Figure 5 Map all users to a scatter plot and corresponding decision graph in three-dimensional space;
[0055] Figure 6 Pareto plot of the power user anomaly index;
[0056] Figure 7 This is a diagram showing the clustering anomaly identification results of the model proposed in this invention;
[0057] Figure 8 Comparison of BI and cutoff distance calculations before and after algorithm optimization. Detailed Implementation
[0058] like Figures 1 to 8 As shown, this invention provides a method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering. First, a multi-dimensional feature set that can characterize user electricity consumption behavior is extracted from the user's daily and monthly electricity consumption dataset. Second, three feature dimensionality reduction methods—linear discriminant analysis, principal component analysis, and factor analysis—are used to reduce the dimensionality of the extracted multi-dimensional feature set, and the effects of the three feature dimensionality reduction methods are compared. Then, the density peak clustering algorithm is used to cluster the dimensionality-reduced features of all users according to density, obtaining multiple density peak points representing different electricity consumption behaviors. Finally, the outlier index is used to determine the degree of outlier status of each user, and a threshold is set to judge anomalies.
[0059] The specific steps for implementing the method of this invention are as follows:
[0060] S1: Based on daily and monthly electricity consumption data, construct a feature set that reflects users' electricity consumption behavior from four perspectives: statistical indicators, volatility indicators, trend indicators, and similarity measurement indicators.
[0061] The statistical indicators include four characteristic indicators constructed based on daily electricity consumption data: mean, standard deviation, skewness, and kurtosis.
[0062] Volatility indicators include the coefficient of variation of daily electricity consumption per quarter (i.e., the ratio of the standard deviation of daily electricity consumption per quarter to the average daily electricity consumption), the monthly electricity consumption rate (i.e., the ratio of the average monthly electricity consumption to the maximum monthly electricity consumption), and the monthly electricity consumption peak-valley difference rate (i.e., the ratio of the difference between the maximum and minimum monthly electricity consumption to the maximum monthly electricity consumption).
[0063] Trend indicators include the linear fit slope k of monthly electricity consumption data, and the upward and downward trend indicators calculated from the Zero Lag Moving Average Convergence and Divergence (ZLMACD) constructed from daily electricity consumption data. The formulas for calculating the upward and downward trend indicators are as follows:
[0064]
[0065]
[0066] ZLDIF (S,(p,q)) =ZLMA (S,p) -ZLMA (S,q) (3);
[0067]
[0068]
[0069] In the above formula: ZLMA represents the n-day exponential moving average sequence of a time series S. (S,n) This represents the n-day zero-lag moving average sequence of time series S. Represents time series EMA (S,n) Given an n-day exponential moving average sequence, assuming p < q, then ZLMA (S,p) and ZLMA (S,q) These represent fast and slow zero-lag moving average sequences, respectively; ZLDIF (S,(p,q)) It is a sequence of difference values; ZLMACD (S,(p,q,α)) The zero-lag moving average of divergence indicator; ZLDIF represents the difference value sequence (S,(p,q))The α-day exponential moving average sequence; C1 and C2 represent the number of data points greater than zero and less than zero in the ZLMACD sequence, respectively; m represents the length of the electricity consumption sequence; T up and T down These represent the upward and downward trend indicators of the electricity consumption series, respectively; where the periodic parameters p, q, and α take values of 14, 28, and 9, respectively.
[0070] Similarity metrics include the Pearson correlation coefficient and Euclidean distance between user monthly electricity consumption data and typical monthly electricity consumption data (the mean of all users' monthly electricity consumption).
[0071] The 15-dimensional feature set constructed in this embodiment is shown in Table 1, and the correlation matrix between features is as follows: Figure 2 As shown.
[0072]
[0073] Table 1 shows the extracted 15-dimensional feature set.
[0074] S2: Based on the feature set obtained in the previous step, use a dimensionality reduction model to reduce the dimension of the feature set.
[0075] In S2, three feature reduction models—Factor Analysis (FA), Principal Component Analysis (PCA), and Linear Discriminant Analysis (LDA)—were used to reduce the constructed 15-dimensional feature set to 3 dimensions. The explained variance ratio (EVR) and cumulative explained variance ratio (CEVR) of the new features are shown in Table 2. The optimal feature reduction model was determined by the area under the curve (AUC) under the ROC curve. The ROC curve is shown below. Figure 3 As shown.
[0076]
[0077] Table 2 shows the contribution rate and cumulative contribution rate of the new features obtained from the three dimensionality reduction models.
[0078] S3: Define the Bonferroni Index (BI) function based on the local density and relative distance in the DPC algorithm, and use BI to solve for the optimal cutoff distance d. cThe improved Whale Optimization Algorithm (IWOA) is used to solve for its maximum value, thereby obtaining the globally optimal cutoff distance parameter.
[0079] The Whale Optimization Algorithm (WOA) consists of three phases: prey encirclement, spiral update, and random search. First, the whale population size N and the maximum number of iterations T are initialized. max And the location information X of each individual whale in the population. i The decision coefficient p is defined as a random number between [0, 1]. The coefficient vectors A and C are calculated as follows:
[0080]
[0081] In the above formula: r1 and r2 are random vectors between [0, 1]; a is the linear convergence factor in the shrinking encirclement mechanism, which decreases linearly from 2 to 0 as the number of iterations increases, and can be expressed as:
[0082] a=2×(1-t / T max (7);
[0083] In the above formula: t represents the current iteration number; T max This indicates the maximum number of iterations.
[0084] (1) Prey Encirclement Stage. This stage simulates the process of a humpback whale discovering prey and closing in to encircle it. In this stage, p < 0.5 and |A| < 1. The mathematical model is as follows:
[0085] D1=|C·X * (t)-X(t)| (8);
[0086] X(t+1)=X * (t)-AD1 (9);
[0087] In the above formula: D1 is the distance between the individual whale and its prey; X(t) is the position vector of the individual whale; X*(t) is the position vector of the current global best whale.
[0088] (2) Spiral Update Phase. The bubble web attack behavior of humpback whales is simulated using a shrinking encirclement mechanism and a spiral update position mechanism. In this phase, p ≥ 0.5. The mathematical model is as follows:
[0089] D2=|X * (t)-X(t)| (10);
[0090] X(t+1)=D2·e bl cos(2πl)+X* (t) (11);
[0091] In the above formula: D2 represents the distance from the individual whale to its prey; b is a constant used to define the shape of the logarithmic spiral; l is a random number between [-1, 1].
[0092] (3) Random Search Phase. The whale population increases its search range, exploring the optimal solution in the global space. In this phase, p < 0.5 and |A| ≥ 1. The mathematical model is expressed as follows:
[0093] D rand =|C·X rand -X(t)| (12);
[0094] X(t+1)=X rand -A·D rand (13);
[0095] In the above formula: D rand X represents the distance from a randomly selected whale to its prey. rand This represents the position vector of an individual randomly selected from the population.
[0096] To improve the ability of the traditional Whale Optimization Algorithm (WOA) to solve complex functions, improvements are made to it in terms of convergence factor, probability threshold, and position weight.
[0097] The linear convergence factor in WOA affects the algorithm's global search capability and local exploitation capability. Therefore, a nonlinear convergence factor is introduced. Where e is the natural constant and t is the current iteration number.
[0098] In WOA, the search encirclement mechanism and the spiral position update mechanism are performed simultaneously with equal probability. However, this equal-probability selection leads to slow convergence and a tendency to get trapped in local optima. Therefore, an adaptive probability threshold p is introduced. * Instead of the equal probability model, its mathematical model is expressed as follows:
[0099]
[0100] In the above formula: α and β are control parameters, α = 3, β = 2.
[0101] The WOA algorithm does not consider the varying influence of prey on whale position updates as iterations progress. Therefore, an adaptive position weight parameter is introduced to update whale positions in WOA and assign different weights. The mathematical model is as follows:
[0102]
[0103] In the above formula: ω is the weight, α and β are control parameters, α = 3, β = 2.
[0104] The DPC algorithm is described in detail by the following definitions:
[0105] Definition 1: Local density ρ i . ρ i This represents the number of other data points contained within the cutoff distance of data point i. It is calculated as follows:
[0106]
[0107] In the above formula: n is the total number of data points; χ(x) is an indicator function, χ(x) = 1 when x < 0, and χ(x) = 0 when x ≥ 0; d ij d represents the Euclidean distance between data points i and j; c The cutoff distance is the only parameter of the DPC algorithm.
[0108] Definition 2: Relative distance δ i δ i This represents the minimum Euclidean distance between data point i and data points with a higher local density. The calculation method is as follows:
[0109]
[0110] Definition 3: Density peak point decision index γ i γ i This represents the product of the local density and the relative distance of data point i. The calculation method is as follows:
[0111] γ i =ρ i ·δ i (19).
[0112] Based on the above definition, the classic DPC algorithm flow can be obtained as follows:
[0113] (1) Calculate the Euclidean distance matrix D between each sample point and the remaining sample points in the dataset;
[0114] (2) Manually set the cutoff distance d based on the data in D. c Then, the local density ρ of each sample point is calculated using equations (17) and (18). i and relative distance δ i ;
[0115] (3) Draw the δ-ρ decision diagram for the dataset, and based on the decision index γ i The size of the cluster center is selected;
[0116] (4) The remaining sample points are assigned to the clusters with the nearest cluster centers;
[0117] (5) Sample points with smaller ρ and larger δ can be regarded as outliers.
[0118] Figure 4 This is a schematic diagram of the DPC algorithm, containing a set of two-dimensional data distribution maps and a corresponding δ-ρ decision map. The yellow and blue data points represent two clusters, with data points 8 and 20 being the cluster centers (density peaks) of the blue and yellow clusters, respectively. These points have large ρ and δ values and are located in the upper right corner of the decision map. The red points are outliers with smaller ρ and larger δ values, located in the upper left corner of the decision map. The remaining points are normal data points, located at the bottom of the decision map with smaller δ values.
[0119] For the cutoff distance d in the DPC algorithm c To address the shortcomings of requiring manual settings, this invention introduces the Bonferroni Index (BI) to measure the set of decision indicators {γ1, γ2, ..., γ...}. N The distribution of} is analyzed, and the optimal cutoff distance parameter d is obtained by using IWOA to solve for the maximum and minimum values of BI. c Where γ1≥γ2…≥γ N .
[0120] The Bonferroni exponential function is calculated as follows:
[0121]
[0122] The size of BI is mainly influenced by the density peaks of the first few terms. Let the set {γ1, γ2, ..., γ...} be... N In the first m terms of the cluster, the sample data corresponding to the density peak points are set. The greater the contribution of the decision index of the m cluster centers to the overall decision index, the more information the cluster centers contain, the better the clustering effect, and the larger the BI value will be.
[0123] Figure 5 To map all users to a scatter plot in three-dimensional space and a corresponding decision graph using three dimensionality reduction models.
[0124] S4: Use the dimensionally reduced features as input to the DPC algorithm, perform cluster analysis using the DPC algorithm, and obtain multiple density peak points representing different electricity consumption behaviors.
[0125] S5: Introduce average centripetal distance and centripetal relative distance to calculate the outlier index of data objects, output the outlier ranking of users, and output the outlier user number according to the set threshold.
[0126] The Outlier Anomaly Index is used to describe the degree of anomaly among users, and it is calculated based on the following definitions:
[0127] Definition 4: Average centripetal distance Indicates cluster C j The average of the sum of distances between all data points and their cluster centers. The calculation method is as follows:
[0128]
[0129] In the above formula: n represents cluster C j The total number of data points; dist represents the function for calculating the Euclidean distance between two points; x μ Indicates the cluster center of the cluster to which it belongs; x i Indicates cluster C j Data points within.
[0130] Definition 5: Centripetal relative distance Indicates cluster C j The relative distance δ between internal data points i and average centripetal distance The ratio of . Its calculation method is as follows:
[0131]
[0132] It amplifies the outlier characteristics of outliers within their respective clusters, making outlier detection in the dataset unaffected by differences in cluster density, compared to δ... i It better characterizes the local outlier properties of data points.
[0133] Definition 6: Outlier Index Represents the centripetal relative distance of data points With the local density ρ of data points i The ratio of . Its calculation method is as follows:
[0134]
[0135] Generally, for local outliers within a cluster, their centripetal relative distance is much greater than that of normal points. Therefore, the outlier index can effectively describe the degree of outlierness in sample data. Figure 6 The chart displays a Pareto plot of the electricity user anomaly index, with the 97th percentile set as the anomaly threshold. The black curve represents the cumulative rate of the anomaly index, with the vast majority of users... The values are distributed in [0, 0.1], accounting for nearly 94% of all users. Figure 7 The results of the model's cluster anomaly identification are presented. Figure 8The paper compares the solutions for the optimal cutoff distance parameter in DPC before and after the optimization algorithm improvement. After the second iteration, the WOA algorithm gets trapped in a local optimum. The IWOA algorithm proposed in this invention overcomes the problem of the traditional WOA algorithm easily getting trapped in local optima, reaching convergence after 31 iterations. At this point, the BI value is 3.6389, and the cutoff distance is 0.0826. Experimental results show that the proposed IWOA algorithm performs excellently in the optimization process, exhibiting higher stability and solution accuracy. Table 3 compares the anomaly detection performance of different models. For models that do not use IWOA to determine the cutoff distance parameter, the DPC cutoff distance is taken as the 2% digit of all distances in the distance matrix D arranged in ascending order.
[0136]
[0137] Table 3 Comparison of anomaly detection performance of different models.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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 or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering, characterized in that: Includes the following steps: S1: Based on daily and monthly electricity consumption data, construct a multi-dimensional feature set that reflects users' electricity consumption behavior from four perspectives: statistical indicators, volatility indicators, trend indicators, and similarity measurement indicators. S2: Use feature reduction methods to reduce the dimensionality of the extracted multidimensional feature set; S3: The density peak clustering algorithm is used to cluster the dimensionality-reduced features of all users according to density to obtain multiple density peak points representing different electricity consumption behaviors; In the process of solving the density peak clustering algorithm, the Bonferroni exponent function (BI) is introduced to measure the distribution of the decision index set, and the improved whale optimization algorithm (IWOA) is used to solve for the maximum and minimum values of BI to obtain the optimal cutoff distance parameter d. c The expression for the Bonferroni exponential function BI is as follows: In the above formula: N is the total number of data points, γ j Decision indicators for density peak points; The Improved Whale Optimization Algorithm (IWOA) improves upon the traditional Whale Optimization Algorithm (WOA) in terms of convergence factor, probability threshold, and position weight. S4: Calculate the outlier index for each user and set a threshold to identify outlier users; The formula for calculating the outlier index is as follows: In the above formula: Indicates the outlier index. ρ represents the centripetal distance between data points. i This represents the local density of data points.
2. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 1, characterized in that: The statistical indicators in step S1 include four characteristic indicators constructed based on daily electricity consumption data: mean, standard deviation, skewness, and kurtosis. Volatility indicators include the coefficient of variation of daily electricity consumption, monthly electricity consumption rate, and monthly peak-to-valley difference rate for each quarter. The coefficient of variation of daily electricity consumption is the ratio of the standard deviation of daily electricity consumption to the mean of daily electricity consumption for each quarter. Trend indicators include the linear fit slope of monthly electricity consumption data and trend indicators calculated from the zero-lag average line of similarity and difference constructed from daily electricity consumption data. Similarity metrics include the Pearson correlation coefficient and Euclidean distance between user monthly electricity consumption data and typical monthly electricity consumption data.
3. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 2, characterized in that: Trend indicators calculated from the zero-lag moving average of daily electricity consumption data include upward and downward trend indicators for daily electricity consumption. The calculation formula is as follows: ZLDIF (S,(p,q)) =ZLMA (S,p) -ZLMA (S,q) ; In the above formula: ZLMA represents the n-day exponential moving average sequence of a time series S. (S,n) This represents the n-day zero-lag moving average sequence of time series S. Represents time series EMA (S,n) Given an n-day exponential moving average sequence, assuming p < q, then ZLMA (S,p) and ZLMA (S,q) These represent fast and slow zero-lag moving average sequences, respectively; ZLDIF (S,(p,q)) It is a sequence of difference values; ZLMACD (S,(p,q,α)) The zero-lag moving average of divergence indicator; ZLDIF represents the difference value sequence (S,(p,q)) The α-day exponential moving average sequence; C1 and C2 represent the number of data points greater than zero and less than zero in the ZLMACD sequence, respectively; m represents the length of the electricity consumption sequence; T up and T down These represent the upward and downward trend indicators for the electricity consumption series, respectively.
4. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 2, characterized in that: In step S2, the constructed 15-dimensional feature set is reduced to 3-dimensionality by using three feature dimensionality reduction models: factor analysis, principal component analysis, and linear discriminant analysis. The optimal feature dimensionality reduction model is then determined by the AUC value under the ROC curve.
5. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 1, characterized in that: Introducing a nonlinear convergence factor The linear convergence factor in WOA is improved, where T max t is the maximum number of iterations, e is the current number of iterations, and e is the natural constant.
6. The abnormal electricity consumption behavior identification method based on feature index dimensionality reduction and density peak clustering according to claim 5, characterized in that: [the method] introduces... An adaptive probability threshold replaces the equiprobability model of the search encirclement mechanism and the spiral position update mechanism in WOA. The mathematical model of the adaptive probability threshold is as follows: In the above formula: p * α and β are adaptive probability thresholds.
7. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 5, characterized in that: An adaptive position weight parameter is introduced to update the whale positions in WOA and assign different weights. Its mathematical model is expressed as follows: In the above formula: ω is the weight, and α and β are control parameters.
8. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 1, characterized in that: Centripetal relative distance of data points The expression is as follows: In the above formula: δ i Indicates cluster C j The relative distance between internal data points Indicates cluster C j The average centripetal distance of the data points within the data set.
9. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 8, characterized in that: Cluster C j Average centripetal distance of internal data points The expression is as follows: In the above formula: n represents cluster C j The total number of data points; dist represents the function for calculating the Euclidean distance between two points; x μ Indicates the cluster center of the cluster to which it belongs; x i Indicates cluster C j Data points within.
10. The method for identifying abnormal electricity consumption behavior based on feature index dimensionality reduction and density peak clustering according to claim 9, characterized in that: Cluster C j The relative distance δ between internal data points i The expression is as follows: δ i Represents the relationship between data point i and local density ρ i Euclidean distance d between data points larger than it ij The minimum value; Local density ρ i The expression is as follows: In the above formula: n is the total number of data points; χ(x) is an indicator function, χ(x) = 1 when x < 0, and χ(x) = 0 when x ≥ 0; d ij d represents the Euclidean distance between data points i and j; c To cut off the distance.
Citation Information
Patent Citations
User power consumption behavior analysis method based on principal component analysis and density peak clustering
CN114417972A
Power consumption anomaly detection method and system based on non-intrusive load decomposition
CN113344346A
Network intrusion detection method based on improved density peak clustering algorithm
CN117478390A