Electricity stealing behavior detection method, device and system
By using SG filters for noise reduction and the Wasserstein distance loss function in a deep network model, combined with power load and climate data, the accuracy of electricity theft detection is improved, solving the problem of insufficient accuracy in existing electricity theft detection technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2026-04-10
AI Technical Summary
Existing methods for detecting electricity theft still have room for improvement in accuracy, especially machine learning-based models, which suffer from insufficient estimation accuracy in identifying electricity theft users.
A deep network model is adopted, including an SG filter denoising module, a generator network module, and a discriminator network module. The dual form of Wasserstein distance is used as the loss function, and electricity theft behavior is detected by combining power load, time and climate data.
By introducing SG filter denoising and Wasserstein distance loss function, the accuracy of electricity theft detection and the reliability of detection results are improved.
Smart Images

Figure CN116561659B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of intelligent power grid electricity stealing behavior detection, and particularly relates to an electricity stealing behavior detection method, device and system. BACKGROUND
[0002] The power loss in the power grid transmission process can be divided into two categories: technical loss and non-technical loss. The resistance loss of power grid components such as generators, transformers and transmission circuits is classified as technical loss, and the loss caused by user electricity stealing and other fraudulent behaviors is referred to as non-technical loss. Malicious electricity stealing can cause economic losses to power grid companies, and thus is focused on by power supply enterprises and relevant researchers. Current electricity stealing detection mainly includes electricity stealing detection methods based on state estimation, game theory and machine learning. In recent years, with the establishment of the advanced measurement system and the popularization of smart meters, real-time data acquisition has laid a solid foundation for the application of machine learning in electricity stealing detection.
[0003] In existing machine learning-based electricity stealing detection research, the sample learning scheme based on supervised learning has achieved good application results. The scheme relies on labeled samples, analyzes and extracts sample features, and uses model training to mine the hidden rules of sample features. The machine learning models widely used in electricity stealing detection and identification at present include decision trees, support vector machines, neural networks and the like. In order to better compare the results of predicting electricity stealing users, the XGBoost decision tree model uses the weighted feature importance extraction technology of decision trees to reduce the complexity of the classifier and improve the timeliness. The electricity stealing behavior detection method based on the adversarial generative network effectively makes up for the shortcomings caused by under-sampling and over-sampling. However, the estimation accuracy of these methods still needs to be improved. SUMMARY
[0004] In view of the above problems, the application provides an electricity stealing behavior detection method, device and system, which can provide more accurate electricity stealing behavior detection.
[0005] In order to achieve the above technical purposes and achieve the above technical effects, the application is implemented through the following technical solutions:
[0006] In a first aspect, the application provides an electricity stealing behavior detection method, comprising:
[0007] A pre-trained deep network model is obtained, comprising a sequentially arranged SG filter denoising module, a generator network module, and a discriminator network module. During training, the loss function of the deep network model is the dual form of Wasserstein distance. The input signal of the SG filter denoising module is the characteristic factors of electricity theft behavior, including electricity load data, time data, and climate data. Its output signal is input to the generator network module. The output signal of the generator network module, together with the actual electricity theft behavior detection data, is input to the discriminator network module.
[0008] The real-time acquired characteristics of electricity theft are input into the pre-trained deep network model to obtain the detection results of electricity theft.
[0009] Optionally, the mathematical expression for the characteristic factors of electricity theft is:
[0010] X = (h,d,ty,hu,te,lo)
[0011] Where h∈{1,2,…,24} is the number of hours in a day, d∈{1,2,…,365} refers to a day in a year, ty is the type of day, ty=1 refers to a workday, ty=0 refers to a rest day, hu refers to humidity, te refers to the temperature at the current moment, described in degrees Celsius, and lo is the power load data.
[0012] Optionally, the SG filter denoising module is an SG filter, and the mathematical expression of an L-order SG filter is:
[0013]
[0014] Where, X(n) and These are the nth characteristic factors of electricity theft before and after noise reduction, respectively, a l The value of the l-th coefficient of the SG filter is given by [-m, m], where [-m, m] represents the range of the independent variable, and L is the order of the SG filter.
[0015] Optionally, the value of the l-th coefficient of the SG filter is obtained by the following steps:
[0016] Get the sequence {y} with a window size of 2m+1. s-m ,…,y s ,…,y s+m}, s∈[m+1,Tm];
[0017] The mean square error ε is minimized using the least squares optimization method, and the coefficient a is calculated. l The formula for calculating the mean square error ε is:
[0018]
[0019] Optionally, the generator network module comprises two residual convolutional networks connected in sequence, the first residual convolutional network comprises two dilated CNN networks with a kernel size of 6 and an expansion factor of 2; the expansion factor of the second residual convolutional network is 1, and the remaining parameters are the same as those of the first residual block; the relationship between the outputs of the two residual convolutional networks and the input is:
[0020]
[0021]
[0022] wherein, RB(·) refers to a residual block function, is a denoised electricity stealing behavior characteristic factor, D refers to the output of the first residual convolutional network, and refers to the output of the second residual convolutional network, and the input of the second residual block is the output of the first residual block.
[0023] Optionally, the discriminator network comprises an input layer, three hidden layers and an output layer arranged in sequence; each layer in the discriminator network has a plurality of neurons, and the output of each neuron is a nonlinear function of the weighted sum of the neurons of the previous layer; the nonlinear functions of the first layer and the second layer in the three hidden layers are set to Relu functions, and the nonlinear function of the third layer is set to a Sigmoid function; the three hidden layers respectively contain 256, 128 and 1 neurons; and the number of neurons of the output layer is 1.
[0024] Optionally, the mathematical expression of the loss function of the deep network model is:
[0025]
[0026] s.t.f(G(X))≤f(y)
[0027] wherein, W(p r ,p g ) is the improved Wasserstein distance between G(X) obeying p r distribution and y obeying p g distribution, G(X) is the output signal of the generator network, representing the electricity stealing behavior detection result, K is a Lipschitz constant, sup is the upper bound, and ||f|| L ≤K is a function f satisfying the K-Lipschitz continuity condition, y is the true detection result, p r , p grespectively, is the distribution of real electricity stealing behavior detection data and the distribution of electricity stealing behavior detection data generated by the generator, E represents the mean operation, ||·|| indicates the 2-norm, f(G(X)) represents the output of the generator output signal G(X) after the discriminator, f(y) represents the output of the real detection result after the discriminator, represents the mean value of f(G(X)) when G(X) obeys p r distribution, represents the mean value of f(y) when y obeys p r distribution.
[0028] Optionally, the to-be-optimized parameters in the pre-trained deep network model are obtained through an adam optimization algorithm.
[0029] In a second aspect, the present application provides an electricity stealing behavior detection device, comprising:
[0030] a model acquisition module, configured to acquire a pre-trained deep network model, the deep network model comprising an SG filter denoising module, a generator network module and a discriminator network module arranged in sequence; in a training process, a loss function of the deep network model is a dual form of a Wasserstein distance; an input signal of the SG filter denoising module is an electricity stealing behavior characteristic factor, the electricity stealing behavior characteristic factor comprising power load data, time data and climate data, and an output signal thereof is input to the generator network module; an output signal of the generator network module is input to the discriminator network module together with real electricity stealing behavior detection data;
[0031] a detection module, configured to input a real-time acquired electricity stealing behavior characteristic factor to the pre-trained deep network model to obtain an electricity stealing behavior detection result.
[0032] In a third aspect, the present application provides an electricity stealing behavior detection method system, comprising a storage medium and a processor;
[0033] the storage medium is configured to store instructions;
[0034] the processor is configured to operate according to the instructions to execute the method according to any one of the first aspect.
[0035] Compared with the prior art, the present application has the following beneficial effects:
[0036] The SG filter denoising module is introduced in the deep network model of the application, which can better preprocess the power load data to obtain better prediction accuracy, meanwhile, the dual form of the Wasserstein distance is introduced as a loss function, and the characteristics of electricity stealing behavior are introduced to predict the electricity stealing behavior, and the electricity stealing behavior detection method, device and system provided by the application can provide more accurate electricity stealing detection results. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without creative labor.
[0038] Figure 1 The deep network diagram of one embodiment of the application;
[0039] Figure 2 The discriminator model diagram of one embodiment of the application;
[0040] Figure 3 The generator model diagram of one embodiment of the application;
[0041] Figure 4 The electricity stealing behavior detection flowchart of one embodiment of the application;
[0042] Figure 5 The electricity stealing behavior detection performance diagram of one embodiment of the application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0044] In addition, if the description of "first", "second" and the like is involved in the embodiments of the present application, the description of "first", "second" and the like is only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features limited by "first", "second" can be explicitly or implicitly included at least one of the features. In addition, the technical solutions of various embodiments can be combined with each other, but it must be based on the realization of ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, also not within the protection scope required by the present application.
[0045] Embodiment 1
[0046] The embodiments of the present application provide a power stealing behavior detection method, comprising the following steps:
[0047] Step (1) acquires a pre-trained deep network model, the deep network model comprises an SG filter denoising module, a generator network module and a discriminator network module arranged in sequence; in the training process, the loss function of the deep network model is the dual form of the Wasserstein distance; the input signal of the SG filter denoising module is a power stealing behavior characteristic factor, the power stealing behavior characteristic factor includes power load data, time data and climate data, and the output signal is input to the generator network module; the output signal of the generator network module is input to the discriminator network module together with the real power stealing behavior detection data;
[0048] Step (2) inputs the real-time acquired power stealing behavior characteristic factor to the pre-trained deep network model to obtain the power stealing behavior detection result.
[0049] The method in the embodiments of the present application will be described in detail below in combination with a specific embodiment.
[0050] In the actual power collection system, the power collection data mainly includes user power consumption, monitoring data and automatic business data and other information. Research shows that the power collection data is a data related to many factors, which is greatly affected by some factors. Through the analysis of the power collection data in the power collection system, the influence factors of the power stealing behavior result in the embodiments of the present application are extracted in addition to the collected power data Y o In addition, it is also affected by the characteristic factors (time and climate) shown in Table 1. According to the analysis of the characteristic factors in Table 1, the influence factors of the user power stealing behavior (i.e. the power stealing behavior characteristic factors) are:
[0051] X=(h,d,ty,hu,te,lo) (1)
[0052] h e {1,2,…,24} is the hour of the day, d e {1,2,…,365} is the day of the year, ty is the type of day, ty = 1 means weekday, ty = 0 means holiday, hu is the humidity, te is the temperature at the current time, described in degrees Celsius, lo is the power load data, one lo per hour. The result of electricity stealing behavior is 0 and 1, which respectively represents no electricity stealing and electricity stealing.
[0053] Table 1 Characteristic factors of electricity stealing behavior
[0054]
[0055] For power collection data, it is affected by noise and other useless information. In order to better analyze the power collection data, it is necessary to preprocess the power collection data. The smoothing and denoising process can process the power collection data and obtain better detection of electricity stealing behavior. Since the SG filter (Savitzky-Golay filter) can keep the shape and width of the data unchanged in the process of smoothing and denoising, the SG filter is used in the embodiment of the application to preprocess the characteristic factors of electricity stealing behavior. The processing process of the SG filter for time series is as follows. Assuming that there is a time series with a width of n = 2m + 1,
[0056] {y s-m ,…,y s ,…,y s+m},s e [m + 1,T - m] (2)
[0057] The L-order polynomial adapted to the data in the window can be expressed as:
[0058]
[0059] Wherein, wherein, X(n) and X(n) and X(n) are the nth characteristic factor before and after denoising respectively, a l l is the value of the lth coefficient of the SG filter, [-m,m] is the range of the independent variable, and L is the order of the SG filter. In order to better utilize the polynomial to describe the time series, the least square method is used to obtain each coefficient, and the error is defined as:
[0060]
[0061] Where [-m,m] is the range of the independent variable, X(n) and X(n) and X(n) are the nth characteristic factor before and after denoising respectively.
[0062] By minimizing the error, the coefficients of the polynomial can be obtained. Then the obtained polynomial can be used to smooth and denoise the power collection data time series.
[0063] In the power collection system, the electricity stealing behavior is affected by multiple factors, and the relationship between the electricity stealing behavior and the power load data collected by the power collection system and the characteristic factors (h, d, ty, hu, te) is relatively complex, often showing a nonlinear relationship. Therefore, it is challenging to detect the electricity stealing behavior. The present application proposes a deep network model of SG-RW-GAN based on GAN network, which is used to detect the electricity stealing behavior of users and improve the detection accuracy. Figure 1 The deep network model of SG-RW-GAN proposed in the embodiments of the present application is described. First, the electricity stealing behavior characteristic factors are input into the SG filter denoising module for preprocessing to obtain smooth data, and then input into a generator network containing CNN to generate the electricity stealing behavior detection result for analysis. Then, the output signal (i.e. the electricity stealing behavior detection result) of the generator network containing CNN and the true electricity stealing behavior detection result are input into a discriminator network module containing DNN for discrimination.
[0064] In order to better analyze the preprocessed data, the data preprocessed by the SG filter denoising module is input into the generator network. The structure of the generator network is as shown in Figure 2 Figure 2 The generator network contains two residual convolutional networks in total. The first residual convolutional network contains two dilated CNN networks with a kernel size of 6 and an expansion factor of 2. The expansion factor of the second residual convolutional network is 1, and the rest of the parameters are the same as the first residual block. At this time, the relationship between the output and the input of the two residual convolutional networks can be described by the following formula
[0065]
[0066]
[0067] wherein, RB(·) refers to a residual block function, is the denoised characteristic factor, D refers to the output of the first residual block, and refers to the output of the second residual block, and the input of the second residual block is the input of the first residual block.
[0068] The discriminator network is composed of an input layer, three hidden layers and an output layer, as shown in Figure 3 Each layer in the discriminator network has multiple neurons, and the output of each neuron is a nonlinear function of the weighted sum of the neurons of the previous layer. The nonlinear functions of the first and second layers in the hidden layer of the neural network are set to the Relu function, and the nonlinear function of the third layer is set to the Sigmoid function. The three hidden layers contain 256, 128 and 1 neurons respectively. The number of neurons in the output layer is 1.
[0069] The generator network G outputs the electricity stealing behavior detection result as G(X), and the result after the discriminator is D(G(X)). The SG-CNN-GRU deep network model is trained to obtain each parameter to be optimized, specifically:
[0070] In the process of designing the optimization objective function, first define the Wasserstein distance:
[0071]
[0072] Wherein, W(p r ,p g ) is the improved Wasserstein distance between G(X) obeying p r distribution and y obeying p g distribution, G(X) is the generator detection result, y is the true electricity stealing behavior detection result, p r ,p g is the distribution of the true electricity stealing behavior detection result and the electricity stealing behavior detection result generated by the generator, Π(p r ,p g ) is the set of joint probability distribution with p r and p g as marginal distribution, E represents the mean operation, G(X), y ~ ρ means that the results of the generator and the real data obey the distribution of ρ, and ||·|| means 2 norm. In actual situation, it is very difficult to calculate the above Wasserstein distance, and the dual form of the Wasserstein distance is used as the loss function, that is:
[0073]
[0074] Wherein, K is the Lipschitz constant, sup is the supremum, and ||f|| L ≤K is the function f satisfying the K-Lipschitz continuous condition. In order to better improve the performance of the loss function, we consider that the function value corresponding to the actual data is generally not less than the function value corresponding to the generated data, so there is a limit f(G(X))≤f(y), and the loss function is defined as:
[0075]
[0076] s.t.f(G(X))≤f(y)
[0077] Wherein, W(p r ,p g ) is the improved Wasserstein distance between G(X) obeying p r distribution and y obeying p gimproved Wasserstein distance between the distributions of y, G(X) is the output signal of the generator network, represents the electricity stealing behavior detection result, K is a Lipschitz constant, sup is the supremum, and ||f L ≤K is a function f satisfying the K-Lipschitz continuity condition, y is the real detection result, p r , and p g are the distribution of the real electricity stealing behavior detection data and the distribution of the electricity stealing behavior detection data generated by the generator respectively, E represents the mean operation, ||·|| indicates the 2-norm, f(G(X)) represents the output after the generator output signal G(X) passes through the discriminator, f(y) represents the output after the real detection result passes through the discriminator, represents the mean value of f(G(X)) when G(X) obeys the p r distribution, represents the mean value of f(y) when y obeys the p r distribution.
[0078] Finally, the Adam algorithm is used to optimize each parameter in the model. After obtaining the parameters, a pre-trained SG-RW-GAN deep network model can be obtained.
[0079] The main idea and logical thought are as shown in Figure 4 .
[0080] The collected data from a main station of a certain county in Anhui Province is used as a sample. The SG-RW-GAN model proposed is implemented by using the Tensorflow framework. An Intel i7-8700 processor and a Nvidia GeForce RTX 2080Ti graphics processor are used, and the memory is 16 GB. The example data set is based on the historical load data of Anhui Province in 2020, and the features include user number, date, electric meter code on the same day, electric meter code on the same day, and daily power consumption. The data set is divided according to the proportion of electricity stealing users in the data set.
[0081] The SG-RW-GAN deep network model proposed in the application is compared with common support vector machine (SVM) and XGboost models. In order to verify the effectiveness of the proposed scheme, accuracy (Accuracy), geometric mean (G-mean), and macro F1 (Macro F1) index are used as indicators for comparison.
[0082] Figure 5The SG-RW-GAN, SVM and XGboost models are compared for electricity stealing behavior detection. Compared with the SVM and XGboost models, the SG-RW-GAN deep network model has a more superior detection result, and the XGboost model has a better performance than the SVM model. Since the SG-RW-GAN deep network model uses the SG filter denoising module to preprocess the power consumption collection data, and simultaneously introduces the generative adversarial network and analyzes the time and temperature and other feature factors, it can provide more accurate prediction results than other models, thereby verifying the effectiveness of the SG-RW-GAN deep network model.
[0083] Embodiment 2
[0084] Based on the same inventive concept as in Embodiment 1, the present embodiment provides an electricity stealing behavior detection device, comprising:
[0085] a model acquisition module configured to acquire a pre-trained deep network model, the deep network model comprising an SG filter denoising module, a generator network module and a discriminator network module arranged in sequence; in the training process, the loss function of the deep network model is a dual form of the Wasserstein distance; the input signal of the SG filter denoising module is power load data, and the output signal thereof is input to the generator network module together with electricity stealing behavior feature factors; the output signal of the generator network module is input to the discriminator network module together with real electricity stealing behavior detection data;
[0086] a detection module configured to input real-time acquired power load data and electricity stealing behavior feature factors to the pre-trained deep network model to obtain electricity stealing behavior detection results.
[0087] The remaining parts are the same as in Embodiment 1.
[0088] Embodiment 3
[0089] Based on the same inventive concept as in Embodiment 1, the present embodiment provides an electricity stealing behavior detection method system, comprising a storage medium and a processor;
[0090] The storage medium is configured to store instructions;
[0091] The processor is configured to operate according to the instructions to execute the method according to any one of Embodiments 1.
[0092] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In one
[0093] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or a combination of flowcharts and / or blocks in the flowcharts can be implemented by computer program instructions. Figure 1 means for carrying out functions specified in the flowchart block or blocks.
[0094] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or a combination of flowcharts and / or blocks in the flowcharts can be implemented by computer program instructions. Figure 1 means for carrying out functions specified in the flowchart block or blocks.
[0095] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or a combination of flowcharts and / or blocks in the flowcharts can be implemented by computer program instructions. Figure 1 means for carrying out functions specified in the flowchart block or blocks.
[0096] The embodiments of the application described above are illustrative, and not restrictive, of the scope of the application, which is defined by the appended claims. Many other embodiments of the application will be readily apparent to those skilled in the art upon reviewing the above description. The scope of the claims should not be limited by the preferred embodiments set forth in the examples, but should be given the broadest possible interpretation accessible under the laws.
[0097] The above shows and describes the basic principles and main features of the present application and the advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above embodiments, and the above embodiments and descriptions in the specification are only to illustrate the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A power stealing behavior detection method, characterized in that, The method comprises the following steps: obtaining a pre-trained deep network model, the deep network model comprising an SG filter denoising module, a generator network module and a discriminator network module arranged in sequence; in the training process, the loss function of the deep network model is a dual form of the Wasserstein distance; the input signal of the SG filter denoising module is a power stealing behavior characteristic factor, the power stealing behavior characteristic factor comprising power load data, time data and climate data, and the output signal of the SG filter denoising module is input to the generator network module; the output signal of the generator network module is input to the discriminator network module together with real power stealing behavior detection data; inputting real-time acquired power stealing behavior characteristic factors to the pre-trained deep network model to obtain a power stealing behavior detection result; the generator network module comprises two residual convolution networks connected in sequence, the first residual convolution network comprising two dilated CNN networks with a kernel size of 6 and an expansion factor of 2; the expansion factor of the second residual convolution network is 1, and the remaining parameters are the same as those of the first layer residual block; the relationship between the output and the input of the two residual convolution networks is as follows: , wherein, denotes a residual block function, is a denoised electricity stealing behavior feature factor, denotes an output of the first residual convolutional network, and denotes an output of the second residual convolutional network, an input of the second residual block being the output of the first residual block; the discriminator network module comprises an input layer, three hidden layers and an output layer arranged in sequence; each layer in the discriminator network has a plurality of neurons, the output of each neuron being a nonlinear function of the weighted sum of the neurons of the previous layer, the nonlinear function of the first layer and the second layer in the three hidden layers being set as a Relu function, and the nonlinear function of the third layer being set as a Sigmoid function; the three hidden layers respectively contain 256, 128 and 1 neurons; the number of neurons of the output layer is 1.
2. The method of claim 1, wherein: the mathematical expression of the power stealing behavior characteristic factor is as follows: , wherein, is the number of hours in a day, refers to a day of the year, is the type of day, refers to a weekday, refers to a weekend day, refers to humidity, refers to the temperature at the current time, described in degrees Celsius, is the power load data.
3. The method of claim 1, wherein: The SG filter denoising module is an SG filter, The mathematical expression of the SG filter is: , in, and The first and second denoisencies are before and after denoising, respectively. Characteristic factors of electricity theft behavior The SG filter is the first The value of each coefficient, The range of the independent variable. Let be the order of the SG filter.
4. The method of claim 3, wherein: SG filter The values of each coefficient are calculated using the following steps: The acquisition window size is a sequence of ; The least square optimization method is used to minimize the mean square error , the coefficients are calculated The calculation formula of the mean square error is: 。 5. The method of claim 1, wherein: the mathematical expression of the loss function of the deep network model is as follows: , wherein, is subject to distributed between distributed the improved Wasserstein distance, is an output signal of the generator network, representing the electricity stealing behavior detection result, is a Lipschitz constant, is a supremum, is a function satisfies the K-Lipschitz continuity condition, is a true detection result, are a distribution of the true electricity stealing behavior detection data and a distribution of the electricity stealing behavior detection data generated by the generator, respectively, represents a mean operation, refers to a 2-norm, represents an output signal of the generator after passing through the discriminator, represents an output of the true detection result after passing through the discriminator, represents the mean when is subject to the distribution, represents the mean when is subject to the distribution.
6. The method of claim 1, wherein: the to-be-optimized parameters in the pre-trained deep network model are obtained through an adam optimization algorithm.
7. An electricity theft behavior detection apparatus, characterized by, The method comprises the following steps: a model acquisition module is configured to obtain a pre-trained deep network model, the deep network model comprising an SG filter denoising module, a generator network module and a discriminator network module arranged in sequence; in the training process, the loss function of the deep network model is a dual form of the Wasserstein distance; the input signal of the SG filter denoising module is a power stealing behavior characteristic factor, the power stealing behavior characteristic factor comprising power load data, time data and climate data, and the output signal of the SG filter denoising module is input to the generator network module; the output signal of the generator network module is input to the discriminator network module together with real power stealing behavior detection data; a detection module is configured to input real-time acquired power stealing behavior characteristic factors to the pre-trained deep network model to obtain a power stealing behavior detection result; the generator network module comprises two residual convolution networks connected in sequence, the first residual convolution network comprising two dilated CNN networks with a kernel size of 6 and an expansion factor of 2; the expansion factor of the second residual convolution network is 1, and the remaining parameters are the same as those of the first layer residual block; the relationship between the output and the input of the two residual convolution networks is as follows: , wherein, denotes a residual block function, is a denoised electricity stealing behavior feature factor, denotes an output of the first residual convolutional network, and denotes an output of the second residual convolutional network, an input of the second residual block being the output of the first residual block; The discriminator network module comprises an input layer, three layers of hidden layers and an output layer arranged in sequence; each layer in the discriminator network has a plurality of neurons, the output of each neuron is a nonlinear function of the weighted sum of the neurons of the previous layer, the nonlinear function of the first layer and the second layer in the three layers of hidden layers is set as a Relu function, and the nonlinear function of the third layer is set as a Sigmoid function; the three layers of hidden layers respectively contain 256, 128 and 1 neurons; and the number of neurons of the output layer is 1.
8. A power theft detection method system characterized in that, comprising a storage medium and a processor; the storage medium is configured to store instructions; the processor is configured to operate according to the instructions to perform the method according to any one of claims 1-6.
Citation Information
Patent Citations
User electricity stealing detection method based on improved generative adversarial network
CN113780402A
Power distribution network flow prediction method, system and device based on neural network, and storage medium
CN114118401A
Electricity theft behavior detection method, apparatus, and device, and storage medium
WO2025152643A1