A method and system for identifying electricity theft by power users based on deep learning

Through the combination of deep convolutional neural network and random forest classifier, the power consumption behavior characteristics in smart meter data are automatically extracted to identify power stolen users, solving the problems of low accuracy in power stolen identification and difficult to defend against advanced attacks in the existing technology. , realizes efficient identification of power theft and grid security.

CN113901977BActive Publication Date: 2024-12-31CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202010576678.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-22
Publication Date
2024-12-31
Estimated Expiration
2040-06-22

AI Technical Summary

Technical Problem

The existing smart meter power stolen recognition method relies on manual extraction of power consumption data features, has low accuracy and is unable to effectively resist advanced cyber attacks.

Method used

Using a deep learning-based method, deep convolutional neural network combined with random forest classifiers is used to train through smart electricity meter data, automatically extract electricity usage behavior characteristics, identify power stolen users, and reduce dependence on manual intervention and advanced attacks.

Benefits of technology

It improves the accuracy and efficiency of power stolen identification, reduces the operating costs of power companies, ensures the safe operation of the power grid, and reaches 97% for identification accuracy, accuracy rate and F1-measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901977B_ABST
    Figure CN113901977B_ABST
Patent Text Reader

Abstract

The present invention provides a method for identifying electricity theft by power users based on deep learning, comprising: obtaining smart meter data of multiple users for a period of time; bringing the smart meter data into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft users; wherein the deep convolutional neural network user electricity theft identification model is constructed by replacing the softmax classifier of the fully connected layer with a random forest classifier; the massive data collected by the smart meter is fully utilized to improve the accuracy of identifying the electricity theft behavior of the user, thereby improving the efficiency of electricity theft investigation, recovering electricity loss, thereby reducing the operating cost of the power company and ensuring the safe operation of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electric power, and relates to a method and system for identifying electricity theft by electric power users based on deep learning. Background Art

[0002] With the development of smart grid construction, advanced metering infrastructure (AMI) is gradually being established, and the penetration rate of smart meters is also increasing, allowing power companies to obtain high-frequency, wide-coverage and time-consistent measured data at the end of the distribution network. In addition to destroying the meter or pulling wires privately, users can also attack smart meters through digital storage technology and network communication technology to reduce the power consumption at the corresponding time or directly return to zero to reduce the electricity bill. Traditionally, the identification of power theft mainly relies on the power company to send technicians for manual screening. There are also some methods that rely on cameras or drones to monitor to prevent power theft. These methods usually consume more manpower and material resources of the distribution company, and cannot avoid advanced attack methods to manipulate and tamper with the meter in communication and network. From the current situation, the existing smart meter measurement data and acquisition system presents the main characteristics of large scale, high acquisition frequency, long data storage time, data diversification and dense distribution of measurement points, which provides a data basis for the application of data mining technology. Nowadays, data mining technology develops rapidly and is widely used, providing a good new idea and method for identifying users' electricity theft behavior.

[0003] At present, many scholars have paid attention to power big data and used classifiers such as neural networks and support vector machines to identify users' electricity theft behavior. However, these methods require manual extraction of electricity consumption data features such as trend indicators, sequence standard deviation, linear slope, etc. based on experience, and their accuracy needs to be improved.

[0004] Deep learning is a new field of data mining. Its essence is to build a machine learning architecture model with multiple hidden layers, and obtain a large amount of more representative feature information through large-scale data training. Deep learning has recently achieved unprecedented performance in fields such as computer vision, speech recognition, and natural language. In addition, deep learning is gradually being applied to other fields: genomics, astronomy, which has prompted its application in the problem of identifying electricity theft by electricity users. Summary of the invention

[0005] In view of the problem that the existing methods for identifying the user's electricity theft behavior using classifiers such as neural networks and support vector machines need to manually extract the trend indicators of electricity consumption data, sequence standard deviation, linear slope and other electricity consumption data features based on experience, and the accuracy needs to be improved, the present invention provides a method for identifying the electricity theft of electricity users based on deep learning, including:

[0006] Obtain smart meter data for multiple users over a period of time;

[0007] The smart meter data is brought into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft user;

[0008] Among them, the deep convolutional neural network user electricity theft identification model is constructed by replacing the softmax classifier of the fully connected layer with a random forest classifier.

[0009] Preferably, the training of the deep convolutional neural network user electricity theft identification model includes:

[0010] The original electricity consumption history data samples of smart meters marked with electricity theft are processed by minority class synthesis algorithm to obtain a balanced data set marked with electricity theft;

[0011] Using a cross-validation method, the balanced data set labeled with whether electricity is stolen is divided into a test set and a training set;

[0012] Using the training set to train a deep convolutional neural network built based on a random forest classifier to obtain an initial deep convolutional neural network user electricity theft recognition model;

[0013] The initial deep convolutional neural network user electricity theft identification model is optimized based on the test set to obtain a deep convolutional neural network user electricity theft identification model.

[0014] Preferably, the method of using the training set to train a deep convolutional neural network constructed based on a random forest classifier to obtain an initial deep convolutional neural network user electricity theft identification model includes:

[0015] Constructing a power consumption data matrix of power users based on the training set;

[0016] The user electricity consumption data matrix is ​​input into the convolution layer as an input layer, and the convolution layer extracts electricity consumption behavior features in the user electricity consumption data matrix and performs convolution calculation to obtain a user electricity consumption behavior feature matrix;

[0017] The user's electricity consumption behavior feature matrix is ​​activated by a corrected linear unit function and then input into a pooling layer, and a maximum pooling method is used to perform a pooling operation to obtain the main features of the electricity consumption behavior;

[0018] The main features of the electricity usage behavior are input into the fully connected layer, and the random forest classifier of the fully connected layer is used for classification to obtain the results of each decision tree, and the mean is calculated based on the results of each decision tree to obtain the identification and prediction results of the electricity theft behavior characteristics corresponding to the user's electricity usage data.

[0019] Preferably, the user electricity consumption data matrix is ​​input as an input layer to a convolution layer, and the convolution layer extracts electricity consumption behavior features in the user electricity consumption data matrix and performs convolution calculation to obtain a user electricity consumption behavior feature matrix, including:

[0020] Input the user electricity consumption data matrix into multiple feature maps of each convolutional layer;

[0021] Based on the multiple neuron convolution kernels of the feature map and the local area of ​​the feature map of the previous convolution layer, a convolution operation is performed on the power user power consumption data matrix to obtain a user power consumption behavior feature matrix.

[0022] Preferably, the main features of the electricity usage behavior are input into a fully connected layer, and the random forest classifier of the fully connected layer is used for classification to obtain the results of each decision tree, and the mean value is calculated based on the results of each decision tree to obtain the identification and prediction results of the electricity theft behavior features corresponding to the user's electricity usage data, including:

[0023] The main features of the electricity consumption behavior are input into the fully connected layer and passed through the random forest classifier to obtain the results of each decision tree, and the mean is calculated based on the pre-set probability threshold that the user belongs to a normal user and the results of each decision tree to obtain the identification prediction result;

[0024] Wherein, if the identification prediction result is greater than the probability threshold of the user belonging to a normal user, the user is classified as a normal user;

[0025] The identification prediction result is smaller than the probability threshold of the user belonging to a normal user and is classified as an electricity stealing user.

[0026] Preferably, the method of using the training set to train a deep convolutional neural network constructed based on a random forest classifier to obtain an initial deep convolutional neural network user electricity theft identification model also includes:

[0027] In the forward propagation stage, when the training set is trained by the random forest classifier of the convolution layer, the pooling layer and the fully connected layer, the gradient of the weight parameter and the bias parameter in each layer is calculated according to the gradient descent algorithm and the weight parameter and the bias parameter are continuously updated, and the amplitude of each update of the weight parameter and the bias parameter is determined according to a preset learning rate, and the calculation results of each layer are output;

[0028] Solving the loss function based on the mean square error between the calculation result and the actual marked result;

[0029] Based on the loss function, the weight parameters and bias parameters of each layer are updated until the loss function reaches a preset minimum value;

[0030] When the gradient of the weight parameter and the bias parameter reaches a preset gradient threshold, the calculation is stopped.

[0031] Preferably, the loss function is solved based on the mean square error of the calculation result and the actual marked result, and then includes:

[0032] If the mean square error exceeds a preset error threshold, the error reverse propagation phase is entered;

[0033] In the error back propagation stage, the mean square error of the previous layer is obtained using the gradient descent algorithm, and the weight parameters and bias parameters are continuously adjusted until the weight parameters and bias parameters of the convolutional layer are reached.

[0034] Preferably, the method of using a minority class synthesis algorithm to process the original electricity consumption history data samples of smart meters marked with whether electricity is stolen to obtain a balanced data set marked with whether electricity is stolen includes:

[0035] Eliminate user data from industries that do not involve electricity theft from the original electricity usage history data samples of smart meters marked with whether electricity is stolen;

[0036] The missing values ​​of the original electricity consumption history data samples of the smart electric meter marked with whether electricity is stolen are filled by using the mean value insertion method;

[0037] Deleting duplicate values ​​of the original electricity consumption history data samples of the smart meter marked with whether electricity is stolen;

[0038] The original electricity consumption history data samples of the smart meter marked with electricity theft after being processed by elimination, filling and deletion are converted into a balanced data set marked with electricity theft by using a minority class synthesis algorithm.

[0039] Preferably, the method of using a minority class synthesis algorithm to convert the original electricity consumption history data samples of the smart meter marked with electricity theft after being processed by elimination, filling and deletion into the balanced data set marked with electricity theft includes:

[0040] S001 uses a minority class synthesis algorithm to determine the sample points of electricity theft users for the original data samples collected by the smart meter marked as electricity theft;

[0041] S002 determines the neighboring sample points of the electricity stealing user sample point;

[0042] S003 performs calculation based on the electricity stealing user sample point and the neighboring sample points to obtain a new electricity stealing user sample point;

[0043] S004 sets the new electricity theft user sample point as the electricity theft user sample point, repeats step S002 until the number of electricity theft user sample points is balanced with the number of normal user samples of the original data samples collected by the smart meter, and then executes step S005;

[0044] S005 generates a new data set based on the new electricity theft user sample points and the original data samples collected by the smart meter;

[0045] S006: Process the new data set by using a minority class synthesis algorithm to obtain a balanced data set marked with whether electricity is stolen.

[0046] Preferably, the optimizing the initial deep convolutional neural network user electricity theft identification model based on the test set to obtain the deep convolutional neural network user electricity theft identification model includes:

[0047] Inputting the test set into the deep convolutional neural network user electricity theft identification model to output the test set identification prediction result;

[0048] Based on the test set recognition prediction results, the accuracy and precision of the deep convolutional neural network user electricity theft recognition model are evaluated;

[0049] Determine the confusion matrix evaluation index value and the ROC curve evaluation index value based on the test set recognition prediction result;

[0050] The overall credibility of the deep convolutional neural network user electricity theft identification model is evaluated based on the confusion matrix evaluation index value and the ROC curve evaluation index value.

[0051] Preferably, the determining of confusion matrix evaluation index values ​​and ROC curve evaluation index values ​​based on the test set recognition prediction results includes:

[0052] Based on the test set identification prediction results, calculate the confusion matrix evaluation index values ​​of the ratio of the number of users predicted to be normal to all actual normal users, the ratio of the number of users predicted to be normal to all normal users, and the ratio of the number of users predicted to be abnormal to all actual abnormal users;

[0053] Based on a preset proportional growth rate threshold, the existing ROC curve is used to establish the relative relationship between the proportion of the number of users predicted by the random forest classifier as abnormal users to all actual abnormal users and the proportion of the number predicted as normal users to all normal users for the confusion matrix evaluation index value, and the ROC curve evaluation index value is obtained by dividing the ROC curve evaluation index value into positive and negative classes to reflect the changes.

[0054] Preferably, the overall credibility of the deep convolutional neural network user electricity theft identification model is evaluated based on the confusion matrix evaluation index value and the ROC curve evaluation index value, including:

[0055] Based on the ratio of the number of users predicted to be normal to all actual normal users and the ratio of the number of users predicted to be normal to all normal users, an F1-measure index is calculated to evaluate the accuracy of electricity theft identification of the deep convolutional neural network user electricity theft identification model;

[0056] Based on the ratio of the number of users predicted as normal to all actual normal users, the ratio of the number of users predicted as normal to all normal users, and the ratio of the number of users predicted as abnormal to all actual abnormal users, different thresholds are taken for the random forest classifier to obtain different identification prediction results of the random forest classifier to measure the prediction accuracy;

[0057] The area under the curve value calculated based on the ROC curve evaluation index value indicates the quality of the random forest classifier;

[0058] Determining the overall credibility of the deep convolutional neural network user electricity theft identification model based on the electricity theft identification accuracy of the deep convolutional neural network user electricity theft identification model, the prediction accuracy of the random forest classifier, and the evaluation of the quality of the random forest classifier;

[0059] The identification prediction results include: users who are normal users but are actually normal users, users who are predicted to be abnormal users but are actually abnormal users, users who are predicted to be normal users but are actually abnormal users, and users who are predicted to be abnormal users but are actually normal users.

[0060] Based on the same concept, the present invention provides a power user electricity theft identification system based on deep learning, including: a data acquisition module and an electricity theft user confirmation module;

[0061] The data acquisition module is used to acquire smart meter data of multiple users over a period of time;

[0062] The electricity theft user confirmation module is used to bring the smart meter data into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft user;

[0063] Among them, the deep convolutional neural network user electricity theft identification model is constructed by replacing the softmax classifier of the fully connected layer with a random forest classifier.

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

[0065] 1. The present invention provides a method for identifying electricity theft by power users based on deep learning, comprising: obtaining smart meter data of multiple users for a period of time; bringing the smart meter data into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft users; wherein the deep convolutional neural network user electricity theft identification model is constructed by replacing the softmax classifier of the fully connected layer with a random forest classifier; making full use of the massive data collected by the smart meter, improving the accuracy of identifying the user's electricity theft behavior, thereby improving the efficiency of electricity theft investigation, recovering electricity loss, reducing the operating costs of the power company and ensuring the safe operation of the power grid.

[0066] 2. The present invention provides a method and system for identifying electricity theft by power users based on deep learning. The use of deep learning methods for electricity theft identification eliminates the tedious process of manual feature extraction, improves the efficiency of electricity consumption audits by power companies, and the accuracy, precision and F1-measure of electricity theft identification reach 97%. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A flow chart of the method provided by the present invention;

[0068] Figure 2 A flowchart of the entire process provided by an embodiment of the present invention;

[0069] Figure 3 A diagram of a user electricity theft identification model based on CNN-RF provided in an embodiment of the present invention;

[0070] Figure 4 A schematic diagram of a convolution operation provided by an embodiment of the present invention;

[0071] Figure 5 A pooling operation diagram provided by an embodiment of the present invention;

[0072] Figure 6 A diagram of the training process of a convolutional neural network provided by an embodiment of the present invention;

[0073] Figure 7 The ROC curve diagram of the CNN-RF model provided by the embodiment of the present invention;

[0074] Figure 8 This is a system structure diagram provided by the present invention. DETAILED DESCRIPTION

[0075] The embodiments of the present invention are further described in conjunction with the accompanying drawings.

[0076] Embodiment 1:

[0077] The present invention provides a method for identifying electricity theft by power users based on deep learning, which makes full use of the massive data collected by smart meters, improves the accuracy of identifying electricity theft by users, thereby improving the efficiency of electricity theft investigation and recovering electricity losses, thereby reducing the operating costs of power companies and ensuring the safe operation of the power grid. Figure 1 The method flow chart is introduced, including:

[0078] Step 1: Obtain smart meter data of multiple users over a period of time;

[0079] Step 2: The smart meter data is brought into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft user;

[0080] Step 1: obtaining smart meter data of multiple users for a period of time, specifically including:

[0081] (1) Combination Figure 2 The whole process flow chart is introduced. The original data: the smart meter records of 6,000 users, including residential users and small and medium-sized enterprises, are collected at a sampling interval of 1 hour, with a total of 525 days of data. This data set has a large number of users, diverse types and a long measurement cycle, which meets the characteristics of complex and diverse distribution of electricity data. The original electricity consumption history data samples of smart meters marked with whether electricity theft occurs include: data recorded by smart meters of users with a sampling interval of 1 hour and a total of 525 days.

[0082] (2) Data exploration and preprocessing: Exploring and analyzing the collected electricity consumption data, gaining an in-depth understanding of the distribution and variation patterns of the data will help lay the foundation for building a model and eliminate users in industries that are unlikely to engage in electricity theft, such as banks, taxation, schools, industry and commerce, and other non-residential whitelist users. This solution mainly preprocesses the data from the aspects of missing values ​​and duplicate values. Duplicate value data is directly deleted; missing data is filled using the mean interpolation method. The formula for the mean interpolation method is:

[0083]

[0084] Among them, x t is the electricity consumption of the electricity user on day t, f(x t ) is the filling value, that is, the missing value is filled with the average power consumption of the two days before and after the missing data.

[0085] (3) Construct an expert sample set: Use the minority class synthesis algorithm to convert the preprocessed data sample set into a balanced data set and divide the data set into a test set and a training set through cross-validation, thereby providing an expert sample library for establishing a user electricity theft identification model.

[0086] After the above preprocessing, a total of 4737 electricity user samples (with an indication of whether they steal electricity) were obtained, where the sampling interval of each sample was 1 hour, and a total of 525 days of data were recorded. Through data exploration and analysis, it can be found that there are only 600 samples of electricity stealing users, which accounts for a very low proportion of all users. This unbalanced data set will affect the recognition effect of the algorithm. In order to solve the data balance problem, this scheme introduces a minority class synthesis algorithm to reconstruct the data distribution and construct a relatively balanced data set so that the normal user class samples and the electricity stealing samples are roughly balanced. The general idea of ​​the minority class synthesis algorithm is to determine the nearest neighbor sample points of the electricity stealing user sample point, and randomly synthesize an electricity stealing user sample point between the sample point and its nearest neighbor. Repeat this until the number of normal user samples and electricity stealing user samples in the data sample set is balanced. The specific implementation plan is as follows:

[0087] Assume that the number of oversampled neighbors of the minority class synthesis algorithm is k = 3, the oversampling multiple is n = 7, and select the sample point x of the electricity theft user i (i=1, ..., l), l=600 is the number of samples of electricity theft users, find the n sample points among the k neighbors of the sample point and record them as x ij (j=1…n), calculate the new electricity stealing user sample point r according to the following formula j (j=1…n).

[0088] r j =x i +rand(0,1)(x i -x ij )

[0089] Among them, rand(0,1) represents a random number in the interval (0,1). Repeating the above steps can generate more sample points of electricity theft users, so that the two categories tend to be balanced. The new data set is generated by merging the newly synthesized sample points of electricity theft users with the original data set.

[0090] After processing the data sample set using the minority class synthesis algorithm, we get a balanced data set. The data set contains 9153 power user sample sets. Before establishing the electricity theft recognition model, this scheme uses the cross-validation method to divide the balanced data set into a training set and a test set, that is, 80% of the samples are taken as the training set and 20% of the samples are taken as the test set.

[0091] Step 2: Bring the smart meter data into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft user, specifically including:

[0092] (4) Establish a user electricity theft identification model: After constructing the expert sample library, establish an electricity theft user identification model. In order to fully utilize the feature extraction function of the convolutional layer of the convolutional neural network, the input vector of each sample is converted into a two-dimensional matrix data input into the convolutional neural network. After convolution, pooling, full connection and other steps, the electricity consumption pattern in the user's time series is mined. Finally, the random forest classifier classifies the electricity users based on the automatically extracted features, thereby identifying the electricity theft users.

[0093] Since the change of electricity consumption of electricity users depends on factors such as the user's lifestyle, the alternation of seasons, and climate change, it is very difficult to manually extract features based on manual experience. Convolutional neural networks have a unique structure. Through convolutional layers and pooling layers, they can learn the characteristics of users' electricity consumption behavior by themselves, avoiding the defect of traditional methods that rely too much on manual experience when extracting electricity consumption behavior features. The fully connected layer of the original convolutional neural network model uses softmax as a classifier, which is similar to a general single hidden layer feedforward neural network. However, the softmax classifier is based on empirical risk minimization. The network is not only sensitive to the training error of the local minimum, but also easily causes overfitting during the training process, and the classification accuracy is not very high. Among most classifiers, the random forest classifier has two powerful machine learning techniques, extraction with replacement and random feature selection, during the training process to overcome the limitations of the softmax classifier. Therefore, this scheme adopts the CNN-RF algorithm to automatically extract features through convolutional neural networks and use random forests for classification, thereby identifying electricity theft users. CNN-RF user electricity theft identification model is as follows Figure 3 As shown. The establishment of the CNN-RF model in this solution mainly includes the following three steps:

[0094] Design of CNN-RF structure

[0095] The basic components of CNN-RF include input layer, convolution layer (C-layer), pooling layer (S-layer), fully connected layer (FC-layer), and random forest classification layer. The input layer is a 525*24 power user electricity consumption data matrix. The convolution layer consists of multiple feature maps, each feature map consists of multiple neurons, and each neuron performs convolution operations with the local area of ​​the previous feature map through the convolution kernel. Each convolution layer has a certain number of convolution kernels, which is a weight matrix. The user electricity consumption behavior feature matrix output by this layer is calculated through convolution operations. By designing multiple convolution layers, multiple different features for classification can be extracted.

[0096] Convolution operation see Figure 4 As shown in the figure, the convolution kernel slides on the input matrix and performs a convolution operation on the overlapping area in the input matrix. The convolution result calculation formula is:

[0097]

[0098] In the formula, X in is the input of the convolutional layer, F i is the number of convolution kernels in the convolution layer, b is the bias parameter of the convolutional neural network, W i is the weight parameter matrix of convolution kernel i. Since this scheme selects 3×3 convolution kernels, each convolution kernel is Figure 4 The operation shown above independently convolves the input matrix to obtain the output matrix. The sliding step size is set to 1 and the input matrix is ​​zero-filled. Therefore, the dimension of each output matrix is ​​still the same as the input matrix dimension. The output matrix is ​​activated by the rectified linear unit (RELU) function and input to the pooling layer (downsampling layer) for pooling. On the one hand, the pooling layer reduces the dimension of the feature matrix and simplifies the computational complexity of the convolutional neural network. On the other hand, it compresses the features to extract the main features of the electricity consumption behavior. Commonly used methods include maximum pooling, mean pooling, and Gaussian pooling. The maximum pooling used in this solution is as follows: Figure 5 As shown, the input matrix is ​​traversed from the upper left to the lower right, and the maximum value of the four elements in the domain covered by the window is obtained as an element in the output matrix.

[0099] Since the size of each sample in the input data is 525×24 (similar to the input data in the image recognition problem) and the user's load curve is so variable, the number of convolutional layers and pooling layers in this solution is set to 2. After a series of convolutional pooling operations, the user's electricity consumption data enters the fully connected layer to convert the result into a one-dimensional vector form, and finally the random forest classification layer is used to identify the user's electricity theft.

[0100] Parameter setting in CNN-RF model

[0101] The parameters that need to be adjusted in CNN-RF consist of two parts: the convolutional neural network model parameters and the random forest classifier parameters. As shown in Table 1, the size of the convolution kernel is set to 3*3, the size of the pooling is set to 2*2, the step size is set to 1, and the activation function is set to the rectified linear unit (RELU) function. In addition, it is easy to cause overfitting when optimizing a large number of parameters. Therefore, the neuron loss rate of the fully connected layer in this scheme is set to 0.4, that is, during the training process, the fully connected layer randomly selects 40% of the neurons not to participate in the training, thereby reducing the risk of overfitting. There are two important parameters in the random forest classifier, namely the maximum number of decision trees T and the maximum number of features M in each tree. In order to achieve a higher classification accuracy for the RF classifier, the grid search algorithm (Grid Search) is used in this paper to search for parameters, that is, in the two-dimensional parameter matrix composed of T and M, each pair of parameters is tested once to obtain the global optimum. Among them, the grid search range of each parameter is: T = [50, 60, ..., 100] and M = [10, 20, ... 40], a total of 6 × 4 = 24 different combinations and when T = 100 and M = 30, the best result was obtained.

[0102] Table 1 Parameter settings of convolutional neural network

[0103]

[0104] Training of CNN-RF model

[0105] The training process of CNN-RF in the user electricity theft identification model includes two parts. First, the convolutional neural network is used to extract features from the input data. Then, the random forest classifier is used to classify the learned features to identify the electricity theft users. Figure 6 The training process diagram of the convolutional neural network is introduced.

[0106] Convolutional neural network training: The training process of the convolutional neural network model is to find the gradient in each layer according to the gradient descent algorithm. In this process, the weights and biases are continuously updated until the gradient of the parameters in the network (the gradient of the weight parameters and bias parameters in the neural network) reaches the specified threshold (a value close to 0) or no longer changes, and the learning process is stopped. After the gradient is obtained, a learning rate α needs to be defined to define the amplitude of each parameter update. The training algorithm is as follows: Figure 5 As shown, it mainly includes two stages: forward propagation and reverse propagation of errors.

[0107] Among them, X refers to the input user power consumption data, bx is the bias parameter of the convolutional neural network, and W conv and W pool Represent the weight parameters of the convolutional layer and the pooling layer, respectively, conv and b poolRepresent the bias parameters of the convolution layer and the pooling layer respectively. In the forward propagation stage, the data of the input layer is first passed to the middle layer, and then passes through the middle convolution layer, pooling layer and fully connected layer, and finally outputs the predicted value. . Then compare the output value with the target value y. If the error is too large and exceeds a certain threshold, the error back propagation stage begins. In the error back propagation stage, based on the error of the output layer, the error of the previous layer is calculated using gradient descent, and then the weights are adjusted until the first convolutional layer is reached. The weights and bias values ​​are continuously updated with the loss function J(W, b). The gradient descent algorithm needs to randomly generate initial values ​​for the weight and bias parameters in the first step, and then update the parameter values ​​through the gradient and learning rate to find the minimum value of the loss function.

[0108] The specific idea is as follows: In this scheme, the training sample set D = {(x1, y1), ..., (x m ,y m )} contains a total of m = 7484 samples, and the network is solved using batch gradient descent. The mean square error between the network output and the actual label is defined as the loss function J(W, b) as shown below:

[0109]

[0110] Among them, m refers to the number of users, x i Represents power consumption data, y i Represents the user's label, w is the connection weight of each layer in the network, and b is the corresponding bias. The CNN parameters to be updated include the weights and biases of the convolutional layer and the weights and biases of the fully connected layer. During the back propagation process, they are initialized according to the normal distribution function with a mean of 0 and a variance of ε, and then w and b are continuously updated using the loss function. The specific mathematical expression is as follows:

[0111]

[0112]

[0113] Among them, α represents the learning rate, represents the connection weight between neuron i in layer l and neuron j in layer 1+1, is the corresponding bias value.

[0114] Training of random forest classifier: The training process of random forest mainly includes three steps: first, sampling in the data set to generate a training set for each decision tree; then using each training set to build a decision tree, the process of generating decision trees does not require pruning; finally, the prediction set is predicted based on the generated decision tree, and the mean of the results generated by each tree is the final prediction result.

[0115] (5) Test the recognition model performance: The recognition model of electricity thieves is built offline based on the test sample set and the model is evaluated by the confusion matrix and ROC curve. The confusion matrix is ​​an evaluation indicator of the binary classifier. Since on-site inspection of the identification of electricity thieves often costs a lot of money, it is very important to accurately detect electricity thieves.

[0116] Since on-site inspection of abnormal electricity users often costs a lot of money, it is very important to accurately predict abnormal users. This topic uses confusion matrix and ROC curve as two evaluation indicators to evaluate the model.

[0117] Confusion matrix: This is a basic tool for evaluating classifier performance, as shown in Table 2. TP means that users predicted as normal are actually normal users; TN means that users predicted as abnormal are actually abnormal users. The higher the TP and TN, the higher the detection effect. FP means that users predicted as normal are actually abnormal users; FN means that users predicted as abnormal are actually normal users.

[0118] Table 2 Confusion matrix

[0119]

[0120] Based on the confusion matrix, the evaluation indicators of multiple classifiers can be derived:

[0121]

[0122]

[0123]

[0124] Among them, Precision indicates the proportion of power users predicted by the detection model as normal users to all actual normal users; TPR (True Positive Rate) indicates the proportion of power users predicted by the detection model as normal users to all normal users; FPR (Faise Positive Rate) indicates the proportion of power users predicted by the detection model as abnormal users to all actual abnormal users.

[0125] The above indicators measure the classification results from different aspects, but they are all static indicators. The output result of the random forest classifier is not a simple 0 or 1, but the degree to which the user belongs to the electricity theft category. The classifier can get different classification results by taking different thresholds. Dynamic indicators are needed to measure the overall credibility of the classifier.

[0126] ROC curve and AUC value

[0127] The ROC (receiver operating characteristic) curve describes the relative relationship between the growth rates of the two indicators FPR and TPR in the confusion matrix. For the continuous values ​​output by the binary classification model, samples greater than the threshold are classified as positive, and samples less than the threshold are classified as negative. Reducing the threshold can certainly identify more positive classes, that is, increase TPR, but it will also classify more negative samples as positive, that is, increase FPR. The introduction of the ROC curve can visualize this change process. Each point on the ROC curve corresponds to the confusion matrix of the classification result when the classifier takes a certain threshold. The area under the curve (AUC) uses a numerical value to represent the quality of the classifier. The value of AUC is the size of the area under the ROC curve. A larger AUC represents a better performance, and AUC = 1 corresponds to an ideal classifier.

[0128] After the electricity theft user identification model is established, the test set samples are input into the model and the results are as follows: TP class is 1049 samples; FN class is 20 samples; FP class is 21 samples; TN class is 579 samples. Therefore, it can be calculated that the accuracy, precision and F1-measure index of the electricity theft user identification model based on CNN-RF are 0.97, 0.97, and 0.97 respectively. As shown in Table 3, Class0 is the electricity theft user class, and Class1 is the normal user class.

[0129] The F1-measure is calculated based on the confusion matrix evaluation index:

[0130]

[0131] Table 3 Classification report of CNN-RF

[0132]

[0133] The output of the CNN-RF model is the probability value of the user belonging to a normal user. Users with a probability greater than the threshold are classified as normal users, and users with a probability less than the threshold are classified as electricity theft users. Figure 7 As shown in the figure, each point on the curve corresponds to a threshold, and the recognition result of each threshold corresponds to a group of points (FPR, TPR). The value of the area under the ROC curve AUC can be used to evaluate the quality of the model. It can be seen that the overall credibility AUC of the electricity theft user identification model based on CNN-RF can reach 0.98.

[0134] Embodiment 2:

[0135] Based on the same concept, the present invention provides a power user electricity theft identification system based on deep learning, which is characterized by combining Figure 8The system structure diagram is introduced, including: data acquisition module and electricity theft user confirmation module;

[0136] The data acquisition module is used to acquire smart meter data of multiple users over a period of time;

[0137] The electricity theft user confirmation module is used to bring the smart meter data into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft user;

[0138] Among them, the deep convolutional neural network user electricity theft identification model is constructed by replacing the softmax classifier of the fully connected layer with a random forest classifier.

[0139] The electricity stealing user confirmation module includes: a model training data submodule, a model training division submodule, a model training submodule and a model optimization submodule;

[0140] The model training data submodule is used to process the original electricity consumption history data samples of the smart meter marked with whether electricity is stolen using a minority class synthesis algorithm to obtain a balanced data set marked with whether electricity is stolen;

[0141] The model training division submodule is used to divide the balanced data set marked with whether electricity is stolen into a test set and a training set by using a cross-validation method;

[0142] The model training submodule is used to train the deep convolutional neural network constructed based on the random forest classifier using the training set to obtain an initial deep convolutional neural network user electricity theft recognition model;

[0143] The model optimization submodule is used to optimize the initial deep convolutional neural network user electricity theft identification model based on the test set to obtain a deep convolutional neural network user electricity theft identification model.

[0144] The model training submodule includes: an electricity consumption data matrix unit, an electricity consumption feature matrix unit, an electricity consumption main feature unit and an identification prediction result unit;

[0145] The power consumption data matrix unit is used to construct a power consumption data matrix of power users based on the training set;

[0146] The power consumption feature matrix unit is used to input the user power consumption data matrix as an input layer to the convolution layer, and extract the power consumption behavior features in the user power consumption data matrix and perform convolution calculations through the convolution layer to obtain the user power consumption behavior feature matrix;

[0147] The main power consumption feature unit is used to activate the user power consumption behavior feature matrix using a corrected linear unit function and then input it into a pooling layer, and perform a pooling operation using a maximum pooling method to obtain the main power consumption behavior features;

[0148] The identification and prediction result unit is used to input the main features of the electricity usage behavior into the fully connected layer, use the random forest classifier of the fully connected layer to perform classification, obtain the results of each decision tree, and perform mean calculation based on the results of each decision tree to obtain the identification and prediction results of the electricity theft behavior characteristics corresponding to the user's electricity usage data.

[0149] The power consumption feature matrix unit includes: an input subunit and a convolution calculation subunit;

[0150] The input subunit is used to input the user power consumption data matrix into multiple feature maps of each convolutional layer;

[0151] The convolution calculation subunit is used to perform a convolution operation on the power user power consumption data matrix based on multiple neuron convolution kernels of the feature map and a local area of ​​the feature map of the previous convolution layer to obtain a user power consumption behavior feature matrix.

[0152] The identification prediction result unit includes: a mean value calculation subunit;

[0153] The mean calculation subunit is used to input the main features of the power consumption behavior into the fully connected layer through the random forest classifier to obtain the results of each decision tree, and perform mean calculation based on a preset probability threshold that the user is a normal user and the results of each decision tree to obtain the identification prediction result;

[0154] Wherein, if the identification prediction result is greater than the probability threshold of the user belonging to a normal user, the user is classified as a normal user;

[0155] The identification prediction result is smaller than the probability threshold of the user belonging to a normal user and is classified as an electricity stealing user.

[0156] The model training submodule further includes: a forward propagation calculation unit, a loss function solving unit, an updating unit and a stop calculation unit;

[0157] The forward propagation calculation unit is used to calculate the gradient of the weight parameters and bias parameters in each layer according to the gradient descent algorithm and continuously update the weight parameters and bias parameters when the training set is trained by the random forest classifier of the convolution layer, the pooling layer and the fully connected layer in the forward propagation stage, and determine the amplitude of each update of the weight parameters and bias parameters according to a preset learning rate to output the calculation results of each layer;

[0158] The loss function solving unit is used to solve the loss function based on the mean square error between the calculation result and the actual marked result;

[0159] The updating unit is used to update the weight parameters and bias parameters of each layer based on the loss function until the loss function reaches a preset minimum value;

[0160] The stopping calculation unit is used to stop the calculation when the gradient of the weight parameter and the bias parameter reaches a preset gradient threshold.

[0161] The model training submodule further includes: a back propagation unit and a mean square error adjustment unit;

[0162] The reverse propagation unit is used to enter the error reverse propagation stage if the mean square error exceeds a preset error threshold;

[0163] The mean square error adjustment unit is used to use the gradient descent algorithm to obtain the mean square error of the previous layer in the error back propagation stage, and continuously adjust the weight parameters and bias parameters until the weight parameters and bias parameters of the convolution layer are reached.

[0164] The model training data submodule includes: a removal processing unit, a filling processing unit, a deletion processing unit and a conversion unit;

[0165] The elimination processing unit is used to eliminate user data of industries that do not involve electricity theft from the original electricity consumption history data samples of the smart electric meter marked with whether electricity theft occurs;

[0166] The filling processing unit is used to fill in the missing values ​​of the original electricity consumption history data samples of the smart meter marked with whether electricity is stolen by using the mean interpolation method;

[0167] The deletion processing unit is used to delete the duplicate values ​​of the original electricity consumption history data samples of the smart meter marked with whether electricity is stolen;

[0168] The conversion unit is used to convert the original electricity consumption history data samples of the smart meter marked with electricity theft after being processed by elimination, filling and deletion into the balanced data set marked with electricity theft by using a minority class synthesis algorithm.

[0169] The conversion unit includes: a sample point subunit, a neighboring sample point subunit, a new sample point subunit, a data balance subunit, a new data set subunit and a balanced data set subunit;

[0170] The sample point subunit is used to determine the sample points of electricity stealing users for the original data samples collected by the smart meter marked as electricity stealing by using the minority class synthesis algorithm;

[0171] The neighboring sample point subunit is used to determine the neighboring sample points of the electricity stealing user sample point;

[0172] The new sample point subunit is used to calculate based on the electricity stealing user sample point and the neighboring sample points to obtain a new electricity stealing user sample point;

[0173] The data balancing subunit is used to set the new electricity stealing user sample point as the electricity stealing user sample point, and repeat the calculation until the number of the electricity stealing user sample point and the normal user sample number of the original data sample collected by the smart meter are balanced;

[0174] The new data set subunit is used to generate a new data set based on the new electricity theft user sample points and the original data samples collected by the smart meter;

[0175] The balanced data set subunit is used to process the new data set by using a minority class synthesis algorithm to obtain the balanced data set marked with whether electricity is stolen.

[0176] The model optimization submodule includes: an input and output unit, a probability accuracy assessment unit, an index value unit and an overall credibility assessment unit;

[0177] The input-output unit is used to input the test set into the deep convolutional neural network user electricity theft recognition model to output the test set recognition prediction result;

[0178] The probability accuracy assessment unit is used to assess the accuracy and precision of the deep convolutional neural network user electricity theft recognition model based on the test set recognition prediction result;

[0179] The index value unit is used to determine the confusion matrix evaluation index value and the ROC curve evaluation index value based on the test set recognition prediction result;

[0180] The overall credibility assessment unit is used to evaluate the overall credibility of the deep convolutional neural network user electricity theft identification model based on the confusion matrix evaluation index value and the ROC curve evaluation index value.

[0181] The index value unit includes: a confusion matrix index value subunit and a ROC curve index value subunit;

[0182] The confusion matrix index value subunit is used to calculate the confusion matrix evaluation index value of the ratio of the number of users predicted to be normal to all actual normal users, the ratio of the number of users predicted to be normal to all normal users, and the ratio of the number of users predicted to be abnormal to all actual abnormal users based on the test set identification prediction result;

[0183] The ROC curve index value subunit is used to establish the relative relationship between the proportion of the number of users predicted by the random forest classifier as abnormal users to all actual abnormal users and the proportion of the number of users predicted as normal users to all normal users based on a preset proportional growth rate threshold, using the existing ROC curve to evaluate the confusion matrix index value, and obtain the ROC curve evaluation index value, and divide the ROC curve evaluation index value into positive and negative classes to reflect the changes.

[0184] The overall credibility assessment unit includes: a measurement accuracy subunit, a prediction accuracy unit, a classifier quality unit and an assessment unit;

[0185] The measurement accuracy subunit is used to calculate the F1-measure index based on the ratio of the number of users predicted to be normal to all actual normal users and the ratio of the number of users predicted to be normal to all normal users to evaluate the electricity theft recognition accuracy of the deep convolutional neural network user electricity theft recognition model;

[0186] The prediction accuracy unit is used to measure the prediction accuracy by taking different thresholds for the random forest classifier to obtain different identification prediction results of the random forest classifier based on the ratio of the number of users predicted to be normal to all actual normal users, the ratio of the number of users predicted to be normal to all normal users, and the ratio of the number of users predicted to be abnormal to all actual abnormal users;

[0187] The classifier quality unit is used to calculate the area under the curve value based on the ROC curve evaluation index value, indicating the quality of the random forest classifier;

[0188] The evaluation unit is used to determine the overall credibility of the deep convolutional neural network user electricity theft identification model based on the electricity theft identification accuracy of the deep convolutional neural network user electricity theft identification model, the prediction accuracy of the random forest classifier, and the evaluation of the quality of the random forest classifier;

[0189] The identification prediction results include: users who are normal users but are actually normal users, users who are predicted to be abnormal users but are actually abnormal users, users who are predicted to be normal users but are actually abnormal users, and users who are predicted to be abnormal users but are actually normal users.

[0190] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0191] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0192] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0194] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. A method for identifying electricity theft by power users based on deep learning, characterized in that: include: Obtain smart meter data for multiple users over a period of time; The smart meter data is brought into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft user; The deep convolutional neural network user electricity theft identification model is constructed by replacing the softmax classifier of the fully connected layer with a random forest classifier; The training of the deep convolutional neural network user electricity theft identification model includes: The original electricity consumption history data samples of smart meters marked with electricity theft are processed by minority class synthesis algorithm to obtain a balanced data set marked with electricity theft; Using a cross-validation method, the balanced data set labeled with whether electricity is stolen is divided into a test set and a training set; Using the training set to train a deep convolutional neural network built based on a random forest classifier to obtain an initial deep convolutional neural network user electricity theft recognition model; Optimizing the initial deep convolutional neural network user electricity theft identification model based on the test set to obtain a deep convolutional neural network user electricity theft identification model; The method of using the training set to train a deep convolutional neural network built based on a random forest classifier to obtain an initial deep convolutional neural network user electricity theft identification model includes: Constructing a power consumption data matrix of power users based on the training set; The user electricity consumption data matrix is ​​input into the convolution layer as an input layer, and the convolution layer extracts electricity consumption behavior features in the user electricity consumption data matrix and performs convolution calculation to obtain a user electricity consumption behavior feature matrix; The user's electricity consumption behavior feature matrix is ​​activated by a corrected linear unit function and then input into a pooling layer, and a maximum pooling method is used to perform a pooling operation to obtain the main features of the electricity consumption behavior; The main features of the electricity usage behavior are input into the fully connected layer, and the random forest classifier of the fully connected layer is used for classification to obtain the results of each decision tree, and the mean is calculated based on the results of each decision tree to obtain the identification and prediction results of the electricity theft behavior characteristics corresponding to the user's electricity usage data.

2. The method according to claim 1, characterized in that The user electricity consumption data matrix is ​​input into the convolution layer as an input layer, and the convolution layer extracts electricity consumption behavior features in the user electricity consumption data matrix and performs convolution calculation to obtain the user electricity consumption behavior feature matrix, including: Input the user electricity consumption data matrix into multiple feature maps of each convolutional layer; Based on the multiple neuron convolution kernels of the feature map and the local area of ​​the feature map of the previous convolution layer, a convolution operation is performed on the power user power consumption data matrix to obtain a user power consumption behavior feature matrix.

3. The method according to claim 2, characterized in that The main features of the electricity usage behavior are input into the fully connected layer, and the random forest classifier of the fully connected layer is used for classification to obtain the results of each decision tree, and the mean value is calculated based on the results of each decision tree to obtain the identification and prediction results of the electricity theft behavior characteristics corresponding to the user's electricity usage data, including: The main features of the electricity consumption behavior are input into the fully connected layer and passed through the random forest classifier to obtain the results of each decision tree, and the mean is calculated based on the pre-set probability threshold that the user belongs to a normal user and the results of each decision tree to obtain the identification prediction result; Wherein, if the identification prediction result is greater than the probability threshold of the user belonging to a normal user, the user is classified as a normal user; The identification prediction result is smaller than the probability threshold of the user belonging to a normal user and is classified as an electricity stealing user.

4. The method according to claim 3, characterized in that The method of using the training set to train a deep convolutional neural network constructed based on a random forest classifier to obtain an initial deep convolutional neural network user electricity theft identification model also includes: In the forward propagation stage, when the training set is trained by the random forest classifier of the convolution layer, the pooling layer and the fully connected layer, the gradient of the weight parameter and the bias parameter in each layer is calculated according to the gradient descent algorithm and the weight parameter and the bias parameter are continuously updated, and the amplitude of each update of the weight parameter and the bias parameter is determined according to a preset learning rate, and the calculation results of each layer are output; Solving the loss function based on the mean square error between the calculation result and the actual marked result; Based on the loss function, the weight parameters and bias parameters of each layer are updated until the loss function reaches a preset minimum value; When the gradient of the weight parameter and the bias parameter reaches a preset gradient threshold, the calculation is stopped.

5. The method according to claim 4, characterized in that The loss function is solved based on the mean square error of the calculation result and the actual marked result, and then includes: If the mean square error exceeds a preset error threshold, the error reverse propagation phase is entered; In the error back propagation stage, the mean square error of the previous layer is obtained using the gradient descent algorithm, and the weight parameters and bias parameters are continuously adjusted until the weight parameters and bias parameters of the convolutional layer are reached.

6. The method according to claim 1, characterized in that The method of using a minority class synthesis algorithm to process the original electricity consumption history data samples of smart meters marked with electricity theft to obtain a balanced data set marked with electricity theft includes: Eliminate user data from industries that do not involve electricity theft from the original electricity usage history data samples of smart meters marked with whether electricity is stolen; The missing values ​​of the original electricity consumption history data samples of the smart electric meter marked with whether electricity is stolen are filled by using the mean value insertion method; Deleting duplicate values ​​of the original electricity consumption history data samples of the smart meter marked with whether electricity is stolen; The original electricity consumption history data samples of the smart meter marked with electricity theft after being processed by elimination, filling and deletion are converted into a balanced data set marked with electricity theft by using a minority class synthesis algorithm.

7. The method according to claim 6, characterized in that The method of using a minority class synthesis algorithm to convert the original electricity consumption history data samples of the smart meter marked with electricity theft after being processed by elimination, filling and deletion into the balanced data set marked with electricity theft includes: S001 uses a minority class synthesis algorithm to determine the sample points of electricity theft users for the original data samples collected by the smart meter marked as electricity theft; S002 determines the neighboring sample points of the electricity stealing user sample point; S003 performs calculation based on the electricity stealing user sample point and the neighboring sample points to obtain a new electricity stealing user sample point; S004 sets the new electricity theft user sample point as the electricity theft user sample point, repeats step S002 until the number of electricity theft user sample points is balanced with the number of normal user samples of the original data samples collected by the smart meter, and then executes step S005; S005 generates a new data set based on the new electricity theft user sample points and the original data samples collected by the smart meter; S006: Process the new data set by using a minority class synthesis algorithm to obtain a balanced data set marked with whether electricity is stolen.

8. The method according to claim 7, characterized in that The step of optimizing the initial deep convolutional neural network user electricity theft identification model based on the test set to obtain a deep convolutional neural network user electricity theft identification model includes: Inputting the test set into the deep convolutional neural network user electricity theft identification model to output the test set identification prediction result; Based on the test set recognition prediction results, the accuracy and precision of the deep convolutional neural network user electricity theft recognition model are evaluated; Determine the confusion matrix evaluation index value and the ROC curve evaluation index value based on the test set recognition prediction result; The overall credibility of the deep convolutional neural network user electricity theft identification model is evaluated based on the confusion matrix evaluation index value and the ROC curve evaluation index value.

9. The method according to claim 8, characterized in that The determining of the confusion matrix evaluation index value and the ROC curve evaluation index value based on the test set recognition prediction result includes: Based on the test set identification prediction results, calculate the confusion matrix evaluation index values ​​of the ratio of the number of users predicted to be normal to all actual normal users, the ratio of the number of users predicted to be normal to all normal users, and the ratio of the number of users predicted to be abnormal to all actual abnormal users; Based on a preset proportional growth rate threshold, the existing ROC curve is used to establish the relative relationship between the proportion of the number of users predicted by the random forest classifier as abnormal users to all actual abnormal users and the proportion of the number of users predicted as normal users to all normal users for the confusion matrix evaluation index value, and the ROC curve evaluation index value is obtained by dividing the ROC curve evaluation index value into positive and negative classes to reflect the changes.

10. The method according to claim 9, characterized in that The overall credibility of the deep convolutional neural network user electricity theft identification model is evaluated based on the confusion matrix evaluation index value and the ROC curve evaluation index value, including: Based on the ratio of the number of users predicted to be normal to all actual normal users and the ratio of the number of users predicted to be normal to all normal users, an F1-measure index is calculated to evaluate the accuracy of electricity theft identification of the deep convolutional neural network user electricity theft identification model; Based on the ratio of the number of users predicted as normal to all actual normal users, the ratio of the number of users predicted as normal to all normal users, and the ratio of the number of users predicted as abnormal to all actual abnormal users, different thresholds are taken for the random forest classifier to obtain different identification prediction results of the random forest classifier to measure the prediction accuracy; The area under the curve value calculated based on the ROC curve evaluation index value indicates the quality of the random forest classifier; Determining the overall credibility of the deep convolutional neural network user electricity theft identification model based on the electricity theft identification accuracy of the deep convolutional neural network user electricity theft identification model, the prediction accuracy of the random forest classifier, and the evaluation of the quality of the random forest classifier; The identification prediction results include: users who are normal users but are actually normal users, users who are predicted to be abnormal users but are actually abnormal users, users who are predicted to be normal users but are actually abnormal users, and users who are predicted to be abnormal users but are actually normal users.

11. A system for implementing the method for identifying electricity theft by power users based on deep learning as claimed in claim 1, characterized in that: include: Data acquisition module and electricity theft user confirmation module; The data acquisition module is used to acquire smart meter data of multiple users over a period of time; The electricity theft user confirmation module is used to bring the smart meter data into a pre-trained deep convolutional neural network user electricity theft identification model to calculate and determine the electricity theft user; Among them, the deep convolutional neural network user electricity theft identification model is constructed by replacing the softmax classifier of the fully connected layer with a random forest classifier.

Citation Information

Cited By

  • Electricity stealing identification method and device based on non-invasive load identification

    CN122863192A