Electricity consumption behavior analysis method and system based on multi-feature fusion and improved spectral clustering

Through multi-feature fusion and improved spectral clustering model, in-depth analysis of electricity consumption data is solved, and the problem of single feature extraction and poor clustering effect in traditional methods is achieved, achieving more accurate electricity consumption behavior analysis.

CN114065819BActive Publication Date: 2025-05-23STATE GRID JIANGSU ELECTRIC POWER CO LTD TAIZHOU POWER SUPPLY BRANCH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111421020.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2025-05-23
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

Traditional electricity consumption behavior analysis methods are based on single feature extraction, and cannot deeply explore electricity consumption big data, and the k-means clustering model is not clustered when the data types are unbalanced.

Method used

The multi-feature fusion method is used to fuse the features extracted from the electrical data and classify them through an improved spectral clustering model. The improved spectral clustering model includes an adjacency matrix built based on the enhanced Gaussian kernel function.

Benefits of technology

It improves the quality of electricity consumption data, enhances the accuracy of electricity consumption behavior analysis, and significantly improves the effectiveness of user classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114065819B_ABST
    Figure CN114065819B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for analyzing electricity consumption behavior based on multi-feature fusion and improved spectral clustering, including: data cleaning of electricity consumption data; extracting electricity consumption features from the cleaned electricity consumption data based on load characteristic curves, signal processing and load feature construction; performing feature selection of recursive feature elimination on the electricity consumption features, and performing feature fusion on the selected electricity consumption features; using an improved spectral clustering model to classify different electricity consumption behaviors based on the feature subsets obtained by fusion; the improved spectral clustering model includes constructing an adjacency matrix of the feature subset based on an enhanced Gaussian kernel function, and classifying based on this, the enhanced Gaussian kernel function is to obtain edge weights according to the distance between sample points in the feature subset and a preset positive parameter, and construct an adjacency matrix based on the edge weights. The analysis of electricity consumption behavior is achieved by performing multi-feature fusion on various types of electricity consumption features extracted from electricity consumption data, and classifying based on an improved spectral clustering algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electricity consumption behavior analysis, and in particular to an electricity consumption behavior analysis method and system based on multi-feature fusion and improved spectral clustering. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Most traditional methods for analyzing electricity consumption behavior are based on extracting electricity consumption features from a single aspect of electricity consumption data. Therefore, there is a lack of in-depth mining of residential electricity consumption big data. The extracted electricity consumption features have limited ability to characterize electricity consumption behavior, so such features often fail to achieve ideal analysis results. In addition, most traditional analysis methods use the most typical k-means clustering model for user classification. Although the k-means model is simple and fast to implement, it only uses the Euclidean distance between features as the evaluation index for classification, and the classification standard is too rough; it is also sensitive to abnormal points, and the clustering effect is poor when the data type is unbalanced; and the above factors are inevitable in power big data, so there are limitations in using k-means for user classification. Summary of the invention

[0004] In order to solve the above problems, the present invention proposes a method and system for analyzing electricity consumption behavior based on multi-feature fusion and improved spectral clustering. The analysis of user electricity consumption behavior is achieved by fusing multiple features of various types of electricity consumption features extracted from electricity consumption data and classifying them based on an improved spectral clustering algorithm.

[0005] In order to achieve the above object, the present invention adopts the following technical solution:

[0006] In a first aspect, the present invention provides a method for analyzing electricity consumption behavior based on multi-feature fusion and improved spectral clustering, comprising:

[0007] Clean the acquired electricity consumption data;

[0008] Extracting electricity consumption characteristics from cleaned electricity consumption data based on load characteristic curve, signal processing and load characteristic construction method;

[0009] According to the correlation between electricity consumption features and electricity consumption behaviors, recursive feature elimination is performed on the electricity consumption features, and feature fusion is performed on the selected electricity consumption features;

[0010] Based on the feature subsets obtained by fusion, an improved spectral clustering model is used to classify different electricity consumption behaviors; wherein, the improved spectral clustering model includes constructing an adjacency matrix of the feature subset based on an enhanced Gaussian kernel function, and classifying it based on this. The enhanced Gaussian kernel function obtains edge weights based on the distance between sample points in the feature subset and a preset positive parameter, and constructs an adjacency matrix based on the edge weights.

[0011] As an optional implementation, the data cleaning includes: missing value completion, low power data elimination and high power data elimination; wherein, low power data elimination means that if the power consumption in the power consumption data for several consecutive days is less than the power consumption threshold, it is regarded as abnormal data and eliminated; high power data elimination means eliminating the power consumption data in the power consumption data that is greater than the normal threshold.

[0012] As an optional implementation, the electricity consumption characteristics extracted based on the load characteristic curve include: load characteristic curve, average weekly electricity consumption curve, weekly average electricity consumption curve, daily electricity consumption difference curve, average weekly electricity consumption difference curve, weekly average electricity consumption difference curve, daily electricity consumption accumulation curve and weekly average electricity consumption accumulation curve.

[0013] As an optional implementation, extracting electricity consumption features based on signal processing includes: extracting electricity consumption features using wavelet transform and feature dimensionality reduction, the extracted electricity consumption features include: approximate coefficients and third-order detail coefficients, approximate coefficients and third-order second-order detail coefficients, standardized approximate coefficients and third-order detail coefficients, standardized approximate coefficients and third-order second-order detail coefficients, and features after dimensionality reduction of the four coefficients.

[0014] As an optional implementation method, the electricity consumption characteristics extracted based on the load characteristic construction method include: average electricity consumption, maximum electricity consumption, minimum electricity consumption, peak-to-valley difference, flat-section electricity consumption ratio, Pearson correlation coefficient, weekly electricity consumption distribution, weekly electricity consumption stability, monthly electricity consumption fluctuation, monthly electricity consumption dispersion and monthly electricity consumption trend.

[0015] As an optional implementation, the feature fusion process includes converting the selected power consumption features into a one-dimensional row vector form and then splicing them.

[0016] As an optional implementation, the enhanced Gaussian kernel function is: Among them, w ij is the sample point x i ,x j The edge weights of the lines between them; α and σ are positive parameters.

[0017] As an optional implementation, the process of using an improved spectral clustering model to classify different electricity usage behaviors includes constructing a degree matrix and a Laplace matrix based on the adjacency matrix, calculating the eigenvalues ​​of the Laplace matrix and its corresponding eigenvectors, normalizing the matrix composed of the eigenvectors by rows to obtain a new feature matrix after dimensionality reduction, and performing clustering based on the new feature matrix.

[0018] As an optional implementation, a fuzzy C-means clustering method is used for classification based on the new feature matrix.

[0019] In a second aspect, the present invention provides a power consumption behavior analysis system based on multi-feature fusion and improved spectral clustering, comprising:

[0020] A data cleaning module is configured to clean the acquired power consumption data;

[0021] A feature extraction module is configured to extract power consumption features from the cleaned power consumption data based on a load characteristic curve, signal processing, and a load feature construction method;

[0022] A feature fusion module is configured to perform feature selection of recursive feature elimination on the power usage features according to the association between the power usage features and the power usage behavior, and perform feature fusion on the selected power usage features;

[0023] The electricity consumption behavior classification module is configured to classify different electricity consumption behaviors based on the fused feature subsets using an improved spectral clustering model; wherein the improved spectral clustering model includes constructing an adjacency matrix of the feature subset based on an enhanced Gaussian kernel function, and classifying based on this, wherein the enhanced Gaussian kernel function obtains edge weights based on the distance between sample points in the feature subset and a preset positive parameter, and constructs an adjacency matrix based on the edge weights.

[0024] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is performed.

[0025] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, wherein when the computer instructions are executed by a processor, the method described in the first aspect is performed.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] The present invention proposes a method and system for analyzing electricity consumption behavior based on multi-feature fusion and improved spectral clustering. In the preprocessing of electricity consumption data, a three-step data cleaning method is adopted, namely, missing value completion, low-power data elimination and high-power data elimination method, which effectively cleans the abnormal data in the data, improves the quality of user electricity consumption data, and ensures the accuracy of subsequent classification.

[0028] The present invention proposes a method and system for analyzing electricity consumption behavior based on multi-feature fusion and improved spectral clustering. In terms of electricity consumption feature extraction, more complete electricity consumption features are extracted from three different aspects: load characteristic curve, wavelet transform, and feature construction. The recursive feature elimination algorithm RFE is used to delete redundant features and screen out feature subsets that are obviously associated with electricity consumption behavior analysis. The features in the feature subsets are spliced ​​and fused to obtain more differentiated user electricity consumption features.

[0029] The present invention proposes a method and system for analyzing electricity consumption behavior based on multi-feature fusion and improved spectral clustering. In terms of classification model, the present invention improves the traditional spectral clustering model by constructing an enhanced Gaussian kernel function EGK to better generate edge weights between sample points, and obtain a more accurate and higher-quality proximity matrix for characterizing the similarity between samples; by using fuzzy C-means clustering to perform classification tasks, user types can be more reasonably divided, and better user classification effects can be obtained, which can significantly improve the effect of electricity consumption behavior analysis of community users.

[0030] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0032] Figure 1 A flow chart of a method for analyzing electricity consumption behavior based on multi-feature fusion and improved spectral clustering provided in Example 1 of the present invention;

[0033] Figure 2(a)-2(b) A schematic diagram of a load characteristic curve of a community user for three months provided in Example 1 of the present invention;

[0034] Figure 3(a)-3(b) A schematic diagram of sample distribution before and after data cleaning provided in Example 1 of the present invention;

[0035] Figure 4 A schematic diagram of a feature selection process of a recursive feature elimination algorithm RFE provided in Example 1 of the present invention;

[0036] Figure 5 Schematic diagram of the enhanced Gaussian kernel function EGK provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0037] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0038] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0039] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0040] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0041] Example 1

[0042] like Figure 1 As shown, this embodiment provides a method for analyzing power consumption behavior based on multi-feature fusion and improved spectral clustering, including:

[0043] S1: Obtain electricity consumption data;

[0044] S2: Clean the electricity consumption data;

[0045] S3: Extracting power consumption characteristics from the cleaned power consumption data based on load characteristic curve, signal processing and load characteristic construction method;

[0046] S4: According to the association between electricity usage features and electricity usage behaviors, recursive feature elimination is performed on the electricity usage features, and feature fusion is performed on the selected electricity usage features;

[0047] S5: Based on the feature subsets obtained by fusion, an improved spectral clustering model is used to classify different electricity consumption behaviors; wherein the improved spectral clustering model includes constructing an adjacency matrix of the feature subset based on an enhanced Gaussian kernel function, and classifying based on this, wherein the enhanced Gaussian kernel function obtains edge weights based on the distance between sample points in the feature subset and a preset positive parameter, and constructs an adjacency matrix based on the edge weights.

[0048] In the step S1, the electricity consumption data is collected by a smart meter, and the daily electricity consumption of the user is collected once at 24:00 every day to obtain load characteristic curve data recording the user's electricity consumption characteristics;

[0049] Among them, each data point in the electricity consumption data collected by the smart meter represents the user's daily electricity consumption, and the electricity consumption data for one year is 365 dimensions. Due to the requirements of the clustering model on the input dimension, this embodiment selects three months of load characteristic curves, a total of 93 dimensions of electricity consumption features, for user electricity consumption behavior analysis. Figure 2(a)-2(b) The figure shows the load characteristic data for three months, taking two types of electricity users, namely, elderly people living alone and normal household users, as examples.

[0050] In step S2, since there are problems such as missing data and abnormal data in the original load characteristic curve data, this embodiment performs data cleaning to remove abnormal data and improve the quality of user power consumption data; this embodiment designs a "three-step" data cleaning method to process missing power consumption data, low power consumption data, and high power consumption data respectively; the detailed processing steps are as follows:

[0051] Step S2.1: Missing value filling: When the amount of missing data is short (such as only a few days of electricity consumption are missing), the interpolation method is used to fill the data, and the non-missing data at both ends of the missing part are used for interpolation and filling; when the amount of missing data is long (such as missing for more than 15 consecutive days), the interpolation method can no longer accurately characterize the electricity consumption behavior, so this embodiment fills such missing data with 0 and eliminates such data in the next step of processing.

[0052] Step S2.2: Elimination of low power data: Some data in the power consumption data are at extremely low values ​​for a long time. Such data do not carry power consumption characteristics, and their existence will reduce the data quality. Therefore, this embodiment sets a power consumption threshold. When it is detected that the power consumption in the power consumption data is less than the power consumption threshold for several consecutive days, such as 15 consecutive days, it is judged as abnormal data and eliminated. At the same time, this step will eliminate the data filled with 0 in the previous step.

[0053] Step S2.3: Elimination of large power consumption data: There is also a type of power consumption data that is obviously larger than the normal value in the power consumption data. This type of data is an outlier in the overall data distribution, which has a great impact on the clustering effect and will seriously reduce the clustering effect, as shown in Figure 3 (a); but manually searching and eliminating it in the power consumption big data is not only time-consuming and laborious, but may also be missed. Therefore, this embodiment uses PCA to reduce the power consumption data to 2 dimensions and visualize it, observe the obvious outliers in the 2D feature space, obtain their indexes, and return the power consumption data according to the index to manually recheck the data, and if it is indeed large power consumption abnormal data, it will be eliminated.

[0054] At this point, the data cleaning process is completed, and a standard load characteristic curve carrying power consumption characteristics is obtained. This embodiment uses power consumption data with a time span of 3 months, as shown in Figure 3(b). It can be seen that after cleaning, abnormal data is eliminated and the distribution range of samples is more reasonable.

[0055] In step S3, this embodiment extracts various types of power consumption characteristics of users from three aspects: load characteristic curve, signal processing method, and load characteristic construction method (some characteristics only use 12 weeks of power consumption data in actual calculation); specifically, it includes:

[0056] Step S3.1: Extraction of power consumption features based on load characteristic curves. This group of features uses the original load characteristic curve, or only performs shallow processing such as averaging and differentiation on it to obtain power consumption features. This group of features is recorded as A, and the features it contains are as follows:

[0057] (1) Load characteristic curve A1: directly use the load characteristic curve as the feature.

[0058] (2) Average weekly electricity consumption curve A2: The electricity consumption of four weeks in a month is averaged to obtain a 7-dimensional average weekly electricity consumption. Then the average weekly electricity consumption features of three months are spliced ​​to obtain a 21-dimensional feature; that is:

[0059]

[0060] Among them, week1 represents the electricity consumption data for one week.

[0061] (3) Weekly average electricity consumption curve A3: The weekly electricity consumption is averaged to obtain a one-dimensional feature, and then the weekly average electricity consumption features of 12 weeks are spliced ​​to obtain A3;

[0062]

[0063] (4) Daily power consumption difference curve A4: The power consumption difference between two consecutive days is calculated from the load characteristic curve A1 to obtain characteristic A4;

[0064]

[0065] Among them, V dayi The electricity consumption for a certain day.

[0066] (5) Average weekly electricity consumption difference curve A5: In the 21-dimensional feature A2, the difference between adjacent features is calculated and recorded as feature A5:

[0067]

[0068] (6) Weekly average electricity consumption difference curve A6: Calculate the difference of 12-dimensional feature A3:

[0069]

[0070] (7) Daily power consumption accumulation curve A7: Each data point in the load characteristic curve represents the power consumption of the day, but does not carry the trend information of the user's accumulated power consumption. Therefore, the accumulated power consumption is calculated to obtain feature A7:

[0071]

[0072] Among them, V i is the user's electricity consumption on a certain day, sum i The current accumulated power consumption.

[0073] (8) Weekly average electricity consumption accumulation curve A8: Calculate the accumulation feature of the 12-dimensional feature A3:

[0074]

[0075] As shown in Table 1, there are 8 groups of electricity consumption characteristics extracted based on the load characteristic curve;

[0076] Table 1 Characteristics A based on load characteristic curve

[0077]

[0078]

[0079] Step S3.2: Extraction of electricity consumption features based on signal processing methods. This group of features uses wavelet transform and feature dimension reduction technology to obtain electricity consumption features, and this group of features is recorded as B; among them, jinsi curve represents the approximate coefficient, 3 orderxijie curve represents the third-order detail coefficient, and std jinsi curve represents the standardized approximate coefficient; the features included in B are as follows:

[0080] (1) Approximate coefficients and third-order detail coefficients B1: The approximate coefficients and third-order detail coefficients are concatenated to form the first set of wavelet features B1:

[0081] B1=[jinsi curve,3 order xijie curve].

[0082] (2) Approximate coefficients and third-order and second-order detail coefficients B2: The approximate coefficients and third-order and second-order wavelet coefficients are concatenated to form feature B2:

[0083] B2=[jinsi curve,3 order xijie curve,2 order xijie curve].

[0084] (3) Standardized approximation coefficient and third-order detail coefficient B3: After consulting relevant literature, it is known that standardizing the approximation coefficient can better extract features. Therefore, the standardized approximation coefficient is used to reconstruct the B1 feature:

[0085]

[0086] (4) Standardized approximation coefficient and third-order and second-order detail coefficient B4: Use the standardized approximation coefficient to reconstruct the B2 feature:

[0087] B4=[std jinsi curve,3 order xijie curve,2 order xijie curve].

[0088] (5) Use PCA dimensionality reduction technology to reduce the dimension of B1~B4: The extracted wavelet coefficient feature has a high dimension, while the input feature of the clustering model is preferably low-dimensional; therefore, principal component analysis PCA is used to reduce the dimension of the feature, and the above B1~B4 features are all reduced to 8 dimensions:

[0089]

[0090] (6) Use LDA dimensionality reduction technology to reduce the dimensions of B1 to B4: LDA is a dimensionality reduction method similar to PCA, but the two focus on different angles in the dimensionality reduction process; use LDA to reduce the dimensions of the above B1 to B4 features to 8 dimensions:

[0091]

[0092] As shown in Table 2, 12 groups of electricity consumption characteristics are extracted based on wavelet transform;

[0093] Table 2 Features B based on wavelet transform

[0094] Feature Number Feature Dimension Feature Number Feature Dimension B1 34 B7 8 B2 64 B8 8 B3 34 B9 8 B4 64 B10 8 B5 8 B11 8 B6 8 B12 8

[0095] Step S3.3: Extraction of electricity consumption features based on the load feature construction method. This group of features extracts electricity consumption features by constructing various load indicators; since it is designed for electricity consumption behavior characteristics, the extraction of electricity consumption features is more targeted; the load characteristic curve used is set to the electricity consumption curve, and this group of features is recorded as C, and the characteristic values ​​it contains are as follows:

[0096] (1) Average power consumption C1: Calculate the average power consumption within three months and obtain a 1-dimensional feature:

[0097] C1=mean(Electricity consumption curve).

[0098] (2) Maximum power consumption C2: Calculate the maximum power consumption and obtain a 1-dimensional feature:

[0099] C2=max(Electricity consumption curve).

[0100] (3) Minimum power consumption C3: Calculate the minimum power consumption and obtain the 1-dimensional feature:

[0101] C3=min(Electricity consumption curve).

[0102] (4) Peak-to-valley difference C4: Calculate the difference between the maximum and minimum power consumption to obtain the one-dimensional peak-to-valley difference feature C4:

[0103] C4=C2-C3.

[0104] (5) Flat-term electricity consumption ratio C5: The flat-term electricity consumption in a month is defined as the electricity consumption lower than the average electricity consumption. The sum of the flat-term electricity consumption is calculated and divided by the total electricity consumption of the month to obtain the flat-term electricity consumption ratio of the month. The flat-term electricity consumption ratios of the three months are concatenated to obtain a 3D feature.

[0105]

[0106] Among them, V monthi This is the electricity consumption data for one month.

[0107] (6) Pearson correlation coefficient C6: To describe the similarity of electricity consumption between months, the Pearson correlation coefficient of electricity consumption between months is calculated:

[0108]

[0109] (7) Weekly electricity consumption distribution C7: The weekly electricity consumption distribution is obtained by dividing the daily electricity consumption by the sum of the electricity consumption in the week. To reduce the influence of random factors, the weekly electricity consumption distribution of the four weeks in a month is averaged. The results of each month are then spliced ​​into a 21-dimensional weekly electricity consumption distribution.

[0110]

[0111] Among them, V week Represents electricity consumption data for one week.

[0112] (8) Weekly electricity consumption stability C8: Based on the weekly electricity consumption distribution C7, the weekly electricity consumption stability characteristic C8 is calculated:

[0113]

[0114] (9) Monthly electricity consumption fluctuation C9: Variance is used to characterize the fluctuation of monthly electricity consumption:

[0115]

[0116] (10) Monthly electricity consumption dispersion C10: The standard deviation of monthly electricity consumption divided by the mean is defined as the monthly electricity consumption dispersion:

[0117]

[0118] (11) Monthly electricity consumption trend C11: The monthly electricity consumption trend is represented by the mean difference and mean ratio of the monthly electricity consumption:

[0119]

[0120] As shown in Table 3, 11 groups of electricity consumption features are extracted based on the feature construction method;

[0121] Table 3 Feature C based on feature construction method

[0122] Feature Number Feature Dimension Feature Number Feature Dimension C1 1 C7 21 C2 1 C8 3 C3 1 C9 4 C4 1 C10 3 C5 3 C11 4 C6 3

[0123] In the step S4, a recursive feature elimination algorithm (RFE) is used to select features that are obviously related to the power consumption behavior analysis from the various types of power consumption features extracted, and the selected feature subsets are subjected to feature fusion.

[0124] The feature selection process of the recursive feature elimination algorithm RFE is as follows Figure 4 As shown in the figure, through the iterative cycle of "evaluator training - deleting low-impact features - retraining the evaluator with the remaining feature subsets", the feature subsets closely related to the power consumption behavior analysis are screened out from the original feature set. Specifically, it includes:

[0125] The RFE algorithm first needs to determine an external estimator that assigns weights to each feature. In this embodiment, SVM is selected; the original feature set is used to train the estimator, and the importance of each feature is obtained through the coef attribute of the estimator; the least important feature is deleted from the current feature set to obtain a pruned feature subset; this process is recursively repeated on the feature subset until all features are traversed; the order in which features are eliminated in this process is the importance ranking of the features, so this is a greedy algorithm for finding the optimal feature subset. After the feature traversal is completed, the feature subset with the best classification effect is selected as the feature selection result.

[0126] Therefore, the three groups of extracted user behavior features are used as the input of the recursive feature elimination algorithm RFE for recursive selection, the number of features to be retained is set to 1 (that is, all features are processed by RFE), and the number of features to be deleted each time is set to 1; after continuous iterations, the feature subset G after feature selection is obtained, and G contains features that have a greater impact on electricity consumption behavior analysis.

[0127] During feature fusion, all filtered features in the feature subset are converted into one-dimensional row vectors and spliced. The splicing order has no effect on the fusion quality of the features. The features obtained after feature fusion are used to analyze the electricity consumption behavior of community users.

[0128] When fusion of features is performed, the features in the feature subset G are fused, and the scattered features are integrated into a set of features as the input of the spectral clustering model; the fusion method used in this embodiment is to convert all the filtered features in the feature subset into a one-dimensional row vector for splicing, and the splicing order has no effect on the fusion quality of the features. Assume that there are n groups of electricity users, and the features of each group of users after fusion are 1*M features; then the size of the feature subset obtained after feature fusion becomes n*M, denoted as H={x 1 ,x 2 ,…,x n}, where each x is a 1*M sample feature.

[0129] In step S5, a spectral clustering model is used based on the fused electricity usage features. Each row of the electricity usage features represents a sample. The most appropriate number of cluster centers is selected through the traversal method, and a spectral clustering operation is performed to obtain different types of clusters to classify electricity usage behaviors.

[0130] This embodiment uses spectral clustering to analyze electricity consumption behavior. The main idea of ​​spectral clustering is to regard all samples as points in space, which can be connected by edges to form a graph; the edge weight value between two points that are farther away is lower, while the edge weight value between two points that are closer is higher; by cutting the graph composed of all sample points, the sum of the edge weights between different subgraphs after cutting is as low as possible, and the sum of the edge weights within the subgraph is as high as possible, so as to achieve the purpose of clustering. Treat each sample in H as a point in the sample space for spectral clustering, and the specific process is as follows:

[0131] Step S5.1: Construct an adjacency matrix W. The adjacency matrix is ​​used to represent the connection relationship between points in the sample space. It is a two-dimensional matrix, in which each value represents the relationship between two sample points x i ,x j The edge weight w between ij , when there is no edge connection w ij = 0, when there is an edge connection w ij >0; In order to quantitatively measure the distance between sample points, a weight generation method is required to obtain w ij ; However, the commonly used edge weight measurement methods have limitations in describing distance. Therefore, this embodiment designs an enhanced Gaussian kernel function EGK (Enhanced Gaussian Kernel) to better generate edge weights and describe the distance between sample points. The EGK formula is as follows.

[0132]

[0133] Since similar sample points are close to each other, the Euclidean distance between them is small; while the Euclidean distance between sample points that are far away is large; therefore, this embodiment subtracts a positive number α from the Euclidean distance, so that the Euclidean distance between sample points that are close to each other is further reduced, or even negative; while the result between sample points that are far away is still a large value. Combined with the characteristics of the exponential function, the difference in edge weights between close and far points can be further widened. For example, if the Euclidean distance between close points is 1 and the distance is 10, this embodiment temporarily sets α and σ to 3 and 1, and the edge weights of the connecting line obtained by EGK are e and σ, respectively. 2 and like Figure 5 The figure shows the changing trend of edge weight w with Euclidean distance. When the Euclidean distance is small, the weight w is large, and the weight w between sample points that are farther away is small, which can amplify the edge weight of samples at close distances, have a better weight generation effect, and can better measure the distance of samples, so it can better perform graph cutting clustering. Using the edge weight w between each sample point ij The adjacency matrix W is constructed, which is an n*n symmetric matrix, and the horizontal and vertical coordinates of the matrix represent the serial numbers of the sample points.

[0134] Step S5.2: Calculate the degree matrix D and the Laplace matrix L;

[0135] The degree d of a sample point is the sum of the edge weights between the sample point and other sample points, that is, the sum of each row of elements in the adjacency matrix:

[0136]

[0137] Use the degree of each sample point to form an n*n degree matrix D, which is a diagonal matrix, as shown below:

[0138]

[0139] Using the degree matrix D and the adjacency matrix W, calculate the Laplacian matrix L:

[0140] L=D -0.5 LD -0.5 =D -0.5 (DW)D -0.5 .

[0141] Step S5.3: Calculate the eigenvalues ​​and eigenvectors of the Laplace matrix L; solve the following equation to obtain all eigenvalues ​​of the Laplace matrix L:

[0142] |λE-L|=0;

[0143] Since the order of L is equal to the number of samples n, we will get n eigenvalues ​​λ 1 ,λ 2 ,…,λ n; Sort the eigenvalues in ascending order, take the first k eigenvalues, denoted as λ′ 1 , λ′ 2 , …, λ′ k (k < n), and calculate their corresponding eigenvectors u according to the following formula 1 , u 2 , …, u k ; Since L is n*n, the size of u is n*1;

[0144] (λ′ i E - L)u i =0 i = 1, 2, …, k.

[0145] Step S5.4: Construct a new feature matrix F; form a matrix U of size n*k with the obtained k eigen-column vectors;

[0146] U = {u 1 , u 2 , …, u k};

[0147] Let y i ∈R k be the i-th row vector of matrix U, where i = 1, 2, …, n; normalize each y i in turn:

[0148]

[0149]

[0150] The normalized constitute the feature matrix F of n*k. Each row in F is the feature of a sample, and the feature quantity of the sample is reduced from the original n to k, realizing feature dimensionality reduction.

[0151] Step S5.5: Based on the newly constructed feature matrix F, use the spectral clustering model to classify users. In this embodiment, fuzzy C-means clustering is used. Fuzzy C-means clustering enables each sample to have a membership degree to each class, and better clustering results can be obtained. Traverse the number of cluster centers, select the number of cluster centers with the best clustering effect for setting, and the clustering model will finally cluster the input electricity consumption features into different clusters C 1 , C 2 , …, C k .

[0152] So far, in this embodiment, by performing multi-feature fusion on the extracted various types of electricity consumption features to construct new electricity consumption features, and by improving spectral clustering for user classification, the analysis of community users' electricity consumption behavior is realized.

[0153] Embodiment 2

[0154] This embodiment provides a power consumption behavior analysis system based on multi-feature fusion and improved spectral clustering, including:

[0155] A data cleaning module is configured to clean the acquired power consumption data;

[0156] A feature extraction module is configured to extract power consumption features from the cleaned power consumption data based on a load characteristic curve, signal processing, and a load feature construction method;

[0157] A feature fusion module is configured to perform feature selection of recursive feature elimination on the power usage features according to the association between the power usage features and the power usage behavior, and perform feature fusion on the selected power usage features;

[0158] The electricity consumption behavior classification module is configured to classify different electricity consumption behaviors based on the fused feature subsets using an improved spectral clustering model; wherein the improved spectral clustering model includes constructing an adjacency matrix of the feature subset based on an enhanced Gaussian kernel function, and classifying based on this, wherein the enhanced Gaussian kernel function obtains edge weights based on the distance between sample points in the feature subset and a preset positive parameter, and constructs an adjacency matrix based on the edge weights.

[0159] It should be noted that the above modules correspond to the steps described in Example 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.

[0160] In further embodiments, there is also provided:

[0161] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in Embodiment 1 is performed. For the sake of brevity, it will not be described in detail here.

[0162] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0163] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0164] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the method described in Example 1 is completed.

[0165] The method in Example 1 can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it is not described in detail here.

[0166] Those skilled in the art will appreciate that the units, i.e., algorithm steps, of the various examples described in conjunction with this embodiment can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0167] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. Electricity consumption behavior analysis method based on multi-feature fusion and improved spectral clustering, It is characterized in that include: Clean the acquired electricity consumption data; Extracting electricity consumption characteristics from cleaned electricity consumption data based on load characteristic curve, signal processing and load characteristic construction method; The power consumption features extracted based on the load characteristic curve include: load characteristic curve, average weekly power consumption curve, weekly average power consumption curve, daily power consumption difference curve, average weekly power consumption difference curve, weekly average power consumption difference curve, daily power consumption accumulation curve and weekly average power consumption accumulation curve; Extracting electricity consumption features based on signal processing includes: extracting electricity consumption features using wavelet transform and feature dimension reduction, and the extracted electricity consumption features include: approximate coefficient and third-order detail coefficient, approximate coefficient and third-order second-order detail coefficient, standardized approximate coefficient and third-order detail coefficient, standardized approximate coefficient and third-order second-order detail coefficient, and features after dimension reduction of the four coefficients; The electricity consumption characteristics extracted based on the load characteristic construction method include: average electricity consumption, maximum electricity consumption, minimum electricity consumption, peak-to-valley difference, flat-section electricity consumption ratio, Pearson correlation coefficient, weekly electricity consumption distribution, weekly electricity consumption stability, monthly electricity consumption fluctuation, monthly electricity consumption dispersion and monthly electricity consumption trend; According to the correlation between electricity consumption features and electricity consumption behaviors, recursive feature elimination is performed on the electricity consumption features, and feature fusion is performed on the selected electricity consumption features; The recursive feature elimination algorithm (RFE) is used to select features that are obviously related to the analysis of electricity consumption behavior from the various types of electricity consumption features extracted. Specifically, the RFE algorithm determines an evaluator that assigns weights to each feature, and uses the original feature set to train the evaluator; the evaluator deletes the least important features in the original feature set to obtain a pruned feature subset; this process is recursively repeated on the feature subset until all features are traversed; after the feature traversal is completed, the feature subset with the best classification effect is selected as the feature selection result; Based on the feature subsets obtained by fusion, an improved spectral clustering model is used to classify different electricity consumption behaviors; wherein, the improved spectral clustering model includes constructing an adjacency matrix of the feature subset based on an enhanced Gaussian kernel function, and classifying it based on this. The enhanced Gaussian kernel function obtains edge weights based on the distance between sample points in the feature subset and a preset positive parameter, and constructs an adjacency matrix based on the edge weights.

2. The power consumption behavior analysis method based on multi-feature fusion and improved spectral clustering according to claim 1, It is characterized in that The data cleaning includes: missing value completion, low power data elimination and high power data elimination; among which, low power data elimination means that if the power consumption in the power consumption data for several consecutive days is less than the power consumption threshold, it is regarded as abnormal data and eliminated; high power data elimination means eliminating the power consumption data that is greater than the normal threshold in the power consumption data.

3. The power consumption behavior analysis method based on multi-feature fusion and improved spectral clustering according to claim 1, It is characterized in that The feature fusion process includes converting the selected power consumption features into a one-dimensional row vector form and then splicing them.

4. The power consumption behavior analysis method based on multi-feature fusion and improved spectral clustering according to claim 1, It is characterized in that The enhanced Gaussian kernel function is: Among them, w ij is the sample point x i ,x j The edge weights of the lines between them; α and σ are positive parameters.

5. The power consumption behavior analysis method based on multi-feature fusion and improved spectral clustering according to claim 1, It is characterized in that The process of classifying different electricity consumption behaviors using the improved spectral clustering model includes constructing a degree matrix and a Laplace matrix based on the adjacency matrix, calculating the eigenvalues ​​of the Laplace matrix and its corresponding eigenvectors, normalizing the matrix composed of the eigenvectors by rows to obtain a new feature matrix after dimensionality reduction, and performing clustering based on the new feature matrix.

6. The power consumption behavior analysis method based on multi-feature fusion and improved spectral clustering according to claim 5, It is characterized in that The fuzzy C-means clustering method is used for classification based on the new feature matrix.

7. Power consumption behavior analysis system based on multi-feature fusion and improved spectral clustering, It is characterized in that Implementing the power consumption behavior analysis method based on multi-feature fusion and improved spectral clustering as described in any one of claims 1 to 6, comprising: A data cleaning module is configured to clean the acquired power consumption data; A feature extraction module is configured to extract power consumption features from the cleaned power consumption data based on a load characteristic curve, signal processing, and a load feature construction method; A feature fusion module is configured to perform feature selection of recursive feature elimination on the power usage features according to the association between the power usage features and the power usage behavior, and perform feature fusion on the selected power usage features; The electricity consumption behavior classification module is configured to classify different electricity consumption behaviors based on the fused feature subsets using an improved spectral clustering model; wherein the improved spectral clustering model includes constructing an adjacency matrix of the feature subset based on an enhanced Gaussian kernel function, and classifying based on this, wherein the enhanced Gaussian kernel function obtains edge weights based on the distance between sample points in the feature subset and a preset positive parameter, and constructs an adjacency matrix based on the edge weights.

8. An electronic device, It is characterized in that The method comprises a memory and a processor and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method according to any one of claims 1 to 6 is completed.

9. A computer-readable storage medium, It is characterized in that Used to store computer instructions, which, when executed by a processor, complete the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Load curve clustering method based on improved spectral and multi-manifold clustering

    CN107657266A

  • Load curve morphological clustering algorithm based on improved kmeans

    CN110796173A