Abnormal power consumption behavior identification method and device, storage medium and electronic equipment
By using long and short-term memory neural network quantile regression model, similar daily clustering and Gaussian nuclear density estimation methods in the power stolen identification method, the photovoltaic power stolen behavior is solved, and the problem of long and low efficiency of power stolen identification cycles in the existing technology is solved, and efficient and fast power stolen identification is achieved.
Patent Information
- Application Number
- CN202411622849.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-04-04
AI Technical Summary
The existing power theft identification method has a long period and low efficiency, and cannot effectively identify and prevent photovoltaic power theft.
The preset long and short-term memory neural network quantile regression model is used to predict the target photovoltaic data, and combined with similar daily clustering and Gaussian nuclear density estimation methods to identify abnormal electricity consumption behavior.
Through the identification of abnormal electricity use behavior without on-site investigation, it can save labor costs, shorten the detection cycle, and improve identification efficiency.
Smart Images

Figure CN119760445A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed power generation technology, and in particular to a method, device, storage medium and electronic equipment for identifying abnormal power consumption behavior. Background Art
[0002] The commonality of different electricity theft behaviors is that they create the illusion of additional photovoltaic power generation by adding extra power to the photovoltaic power generation system. In fact, the additional power added comes from the power grid. Users who engage in electricity theft let this additional power pass through the meter together with the power generated by the photovoltaic array, increasing the power generation data recorded by the meter, thereby defrauding additional power generation subsidies.
[0003] Based on this, most of the current methods for identifying electricity theft use the data of the power station itself or the data predicted by the algorithm to compare with the data on the meter. At present, in the domestic photovoltaic electricity theft, the staff generally go to the user's power generation project site to investigate in person. The power generation meter is installed on the user side, and the staff does not need to go to the site. The meter is automatically read through the wireless network, so the inspectors generally rarely go to the user site, and the inspection cycle is long. At present, with the rapid development of distributed photovoltaic power generation, once a certain method of electricity theft is spread, it will cause serious economic losses. Summary of the invention
[0004] In view of this, the present invention provides a method, device, storage medium and electronic device for identifying abnormal electricity usage behavior, the main purpose of which is to solve the problem of long cycle and low efficiency of current electricity theft identification methods.
[0005] To solve the above problems, the present application provides a method for identifying abnormal power consumption behavior, including:
[0006] Preprocessing the pre-acquired data to be identified to obtain target photovoltaic data;
[0007] The target photovoltaic data is predicted using a preset long short-term memory neural network quantile regression model to obtain predicted power values corresponding to different quantiles;
[0008] Perform similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data;
[0009] Based on the similar day data set, a Gaussian kernel density estimation method is used to perform abnormal identification on the predicted power value to obtain an abnormal power consumption behavior identification result.
[0010] Optionally, the preprocessing of the pre-acquired data to be identified to obtain initial photovoltaic data specifically includes:
[0011] Performing data recognition on the data to be recognized to obtain various abnormal data;
[0012] Using a median calculation method to replace each of the abnormal data to obtain first photovoltaic data;
[0013] A piecewise linear interpolation method is used to supplement the missing values in the first photovoltaic data to obtain the target photovoltaic data.
[0014] Optionally, the use of a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles specifically includes:
[0015] Based on the target photovoltaic data, a preset long short-term memory neural network quantile regression model is used to predict the grid node corresponding to the first quantile point to obtain a predicted power value corresponding to the first grid node;
[0016] Performing calculation based on the initial value of the first quantile and the predetermined step length to obtain a first quantile value corresponding to the next quantile;
[0017] Perform judgment based on the first quantile value and a preset threshold to obtain a judgment result;
[0018] When the judgment result is that the first quantile value is equal to the preset threshold, the predicted power values corresponding to different quantiles are obtained;
[0019] When the judgment result is that the first quantile value is less than the preset quantile threshold, a preset long short-term memory neural network quantile regression model is used based on the target photovoltaic data to predict the grid node corresponding to the next quantile, and the predicted power value corresponding to the next grid node is obtained, and the cycle is iterated until the first quantile value is equal to the preset threshold, and the predicted power values corresponding to different quantiles are obtained.
[0020] Optionally, performing similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data specifically includes:
[0021] Performing feature extraction on the target photovoltaic data to obtain a first feature vector;
[0022] Performing feature extraction on each of the historical photovoltaic data to obtain each second feature vector;
[0023] Using a K-means clustering method to cluster each of the second feature vectors to obtain each cluster and a cluster center corresponding to each of the clusters;
[0024] Performing calculations based on the first feature vector and each of the cluster centers to obtain each distance value;
[0025] Each of the second feature vectors in the cluster corresponding to the smallest distance value is determined as the similar daily data set within the preset time period corresponding to the target photovoltaic data.
[0026] Optionally, the performing abnormal identification on the predicted power value based on the similar day data set using a Gaussian kernel density estimation method to obtain an abnormal power consumption behavior identification result specifically includes:
[0027] Based on the predicted power value, a Gaussian kernel density estimation method is used to perform calculation processing to obtain a kernel density estimation value corresponding to the predicted power value;
[0028] Normalizing the kernel density estimate to obtain a probability density function corresponding to the predicted power value;
[0029] Determine the data identification interval range of the target time period under the target confidence level based on the similar day data set and the preset error range;
[0030] Abnormal data is identified on the probability density function based on the data identification interval to obtain abnormal power consumption behavior identification results.
[0031] Optionally, the calculating and processing based on the predicted power value by using a Gaussian kernel density estimation method to obtain a kernel density estimation value corresponding to the predicted power value specifically includes:
[0032] Performing calculation processing on each power value in the predicted power value to obtain a Gaussian kernel value between each power value;
[0033] For the target power value, calculation processing is performed based on each of the Gaussian kernel values to obtain an accumulated kernel value corresponding to the target power value, so as to obtain kernel density estimation values corresponding to each of the power values.
[0034] Optionally, the performing abnormal data identification on the probability density function based on the data identification interval range to obtain an abnormal power usage behavior identification result specifically includes:
[0035] Based on the data identification interval range, the probability density function is subjected to abnormal data identification within a first preset time period to obtain an identification result;
[0036] When the identification result is that the abnormal power value in each preset time period is greater than or equal to the first preset threshold or the number of abnormal power values in the first time period is greater than or equal to the second preset threshold, the current user is determined as an abnormal power user;
[0037] The electricity theft behavior levels of the abnormal electricity users in the second time period are classified to obtain the electricity theft levels corresponding to the abnormal electricity users.
[0038] In order to solve the above problems, the present application provides a device for identifying abnormal power consumption behavior, including:
[0039] A preprocessing module is used to preprocess the pre-acquired data to be identified to obtain target photovoltaic data;
[0040] A prediction module, used to predict the target photovoltaic data using a preset long short-term memory neural network quantile regression model to obtain predicted power values corresponding to different quantiles;
[0041] A similar day clustering module, used to perform similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period, to obtain a similar day data set within the preset period corresponding to the target photovoltaic data;
[0042] The identification module is used to identify abnormalities of the predicted power value based on the similar day data set using a Gaussian kernel density estimation method to obtain abnormal power consumption behavior identification results.
[0043] In order to solve the above problem, the present application provides a storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned abnormal power consumption behavior identification method are implemented.
[0044] To solve the above problems, the present application provides an electronic device, which comprises at least a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned abnormal electricity usage behavior identification method when executing the computer program in the memory.
[0045] Beneficial effects of the present application: The present application obtains target photovoltaic data by preprocessing the pre-acquired data to be identified; the target photovoltaic data is predicted by using a preset long short-term memory neural network quantile regression model to obtain predicted power values corresponding to different quantiles; similar day clustering is performed based on the target photovoltaic data and the historical photovoltaic data within a preset time period to obtain a similar day data set within a preset time period corresponding to the target photovoltaic data; the impact of environmental, weather and other factors on the operation of the power grid is considered, and the predicted data is identified using a similar day data set as a measurement scale, thereby improving the accuracy of the identification results. Based on the similar day data set, the Gaussian kernel density estimation method is used to identify anomalies in the predicted power value to obtain abnormal power consumption behavior identification results. By using the method of the application, abnormal power consumption behavior can be identified without on-site investigation by staff, saving labor costs, shortening the detection cycle, and improving the efficiency of identifying abnormal user power consumption behavior.
[0046] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0048] Figure 1 A schematic diagram of a process for identifying abnormal electricity consumption behavior provided in an embodiment of the present application is shown;
[0049] Figure 2 A schematic flow chart of a method for identifying abnormal electricity usage behavior provided by another embodiment of the present application is shown;
[0050] Figure 3 A structural block diagram of an abnormal electricity usage behavior identification device provided by another embodiment of the present application is shown. DETAILED DESCRIPTION
[0051] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0052] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0053] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0054] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0055] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0056] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0057] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0058] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0059] The present application embodiment provides a method for identifying abnormal electricity consumption behavior, such as Figure 1 As shown, including:
[0060] Step S101: pre-processing the pre-acquired data to be identified to obtain target photovoltaic data;
[0061] In the specific implementation process of this step, the data to be identified is identified to obtain each abnormal data; the median calculation method is used to replace each abnormal data to obtain the first photovoltaic data; the median calculation method is used to calculate and process the data value corresponding to the position of the abnormal data to obtain the median corresponding to each abnormal data position; the abnormal data is replaced by the median. The missing values in the first photovoltaic data are supplemented by the piecewise linear interpolation method to obtain the target photovoltaic data.
[0062] Step S102: using a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data, and obtaining predicted power values corresponding to different quantiles;
[0063] In the specific implementation process of this step, based on the target photovoltaic data, a preset long short-term memory neural network quantile regression model is used to predict the grid node corresponding to the first quantile, and the predicted power value corresponding to the first grid node is obtained; based on the initial value of the first quantile and the predetermined step size, calculation processing is performed to obtain the first quantile value corresponding to the next quantile; based on the first quantile value and the preset threshold, judgment is performed to obtain a judgment result; when the judgment result is that the first quantile value is equal to the preset threshold, the predicted power values corresponding to different quantiles are obtained; when the judgment result is that the first quantile value is less than the preset quantile threshold, based on the target photovoltaic data, a preset long short-term memory neural network quantile regression model is used to predict the grid node corresponding to the next quantile, and the predicted power value corresponding to the next grid node is obtained, and the cycle is iterated until the first quantile value is equal to the preset threshold, and the predicted power values corresponding to different quantiles are obtained.
[0064] Step S103: performing similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data;
[0065] In the specific implementation process of this step, feature selection is first performed to extract features closely related to photovoltaic power generation from historical photovoltaic data, such as irradiance, temperature, wind speed, etc. These features should be able to reflect the characteristics of photovoltaic power generation under different weather conditions. Then the clustering algorithm is determined, and clustering algorithms such as K-means and fuzzy C-means clustering (FCM) can be used to cluster similar days. The clustering algorithm is used to cluster the historical photovoltaic data to obtain each cluster data set, and a data set of the same type as the day to be predicted is extracted from each cluster data set as a similar day data set.
[0066] Step S104: Based on the similar day data set, a Gaussian kernel density estimation method is used to perform abnormal identification on the predicted power value to obtain an abnormal power consumption behavior identification result.
[0067] During the specific implementation of this step, the probability density function is used to identify abnormal data within the first preset time period based on the data identification interval range to obtain an identification result; when the identification result is that the abnormal power value within each preset time period is greater than or equal to the first preset threshold or the number of abnormal power values within the first time period is greater than or equal to the second preset threshold, the current user is determined to be an abnormal electricity user; the electricity theft behavior level of the abnormal electricity user in the second time period is divided to obtain the electricity theft level corresponding to the abnormal electricity user.
[0068] This application obtains target photovoltaic data by preprocessing the pre-acquired data to be identified; uses a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles; performs similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset time period to obtain a similar day data set within a preset time period corresponding to the target photovoltaic data; considers the impact of environmental, weather and other factors on the operation of the power grid, uses similar day data sets as a measurement scale to identify the predicted data, and improves the accuracy of the identification results. Based on the similar day data set, the Gaussian kernel density estimation method is used to identify the anomalies of the predicted power value to obtain the abnormal power consumption behavior identification result. Using the method of the application, abnormal power consumption behavior can be identified without on-site investigation by staff, saving labor costs, shortening the detection cycle, and improving the efficiency of identifying abnormal user power consumption behavior.
[0069] Another embodiment of the present application provides another abnormal electricity usage behavior identification method, such as Figure 2 As shown, including:
[0070] Step S201: pre-processing the pre-acquired data to be identified to obtain target photovoltaic data;
[0071] In the specific implementation process of this step, data identification is performed on the data to be identified to obtain various abnormal data; the median calculation method is used to replace each of the abnormal data to obtain the first photovoltaic data; the median calculation method is used to calculate and process the data value corresponding to the position of the abnormal data to obtain the median corresponding to each position of the abnormal data; the median is used to replace the abnormal data. The missing values in the first photovoltaic data are supplemented by a piecewise linear interpolation method to obtain the target photovoltaic data. Specifically, assuming that the data of two adjacent power grid nodes with missing values are (b1, y1) and (b2, y2), respectively, then the piecewise linear interpolation mathematical formula between the two nodes can be shown by Formula 1:
[0072]
[0073] Among them, b1 and b2 represent the electrical distance values corresponding to the two adjacent grid nodes of the missing value, y1 and y2 represent the power values corresponding to the two adjacent grid nodes of the missing value, and F(y) represents the missing value.
[0074] Step S202: constructing a preset long short-term memory neural network quantile regression model;
[0075] In the specific implementation process of this step, an initial long short-term memory neural network quantile regression model is constructed; the mathematical expression of the initial long short-term memory neural network quantile regression model can be expressed as the following formula (2):
[0076]
[0077] Among them, W(τ) is the connection weight between the input layer and the hidden layer; V(τ) is the connection weight between the hidden layer and the output layer; I is the number of nodes in the input layer; J is the number of nodes in the hidden layer; f1 and f2 represent activation functions; X is the explanatory variable, representing basic weather information, as well as maintenance, fault and other data information; Y is the explained variable, representing parameters such as active power, reactive power, and voltage.
[0078] An optimization model for parameter estimation of the initial long short-term memory neural network quantile regression model is constructed; the mathematical expression of the optimization model can be expressed as the following formula (3):
[0079]
[0080] Among them: λ1, λ2 are penalty parameters, which can prevent the model from overfitting during training; N is the sample Y i The number of i ≥f(X i , W, V) indicates that the estimated value of the i-th regression model is less than or equal to the actual value. Using the pre-acquired historical label data set, the weight parameters W(τ) and V(τ) of the initial long short-term memory neural network quantile regression model are updated based on the optimization model and the preset loss function to train the preset long short-term memory neural network quantile regression model. The mathematical expression of the preset loss function can be expressed as the following formula (4):
[0081]
[0082] Among them, ρ τ represents the optimization function; solves the model parameter matrix of the initial long short-term memory neural network quantile regression model, transforms the optimization function based on the loss function, and obtains the target optimization function. The mathematical expression of the target optimization function can be shown in the following formula (5):
[0083]
[0084] in, is the weight under quantile conditions, is the weight of the bias term under the quantile condition. The weight parameters of the network model are updated using the Adam stochastic gradient descent method to minimize the loss function, and finally the model converges to obtain the preset long short-term memory neural network quantile regression model. The mathematical expression of the preset long short-term memory neural network quantile regression model can be expressed as the following formula (6):
[0085]
[0086] Step S203: using a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data, and obtaining predicted power values corresponding to different quantiles;
[0087] In the specific implementation process of this step, based on the target photovoltaic data, a preset long short-term memory neural network quantile regression model is used to predict the grid node corresponding to the first quantile, and the predicted power value corresponding to the first grid node is obtained; based on the initial value of the first quantile and the predetermined step size, calculation processing is performed to obtain the first quantile value corresponding to the next quantile; based on the first quantile value and the preset threshold, judgment is performed to obtain a judgment result; when the judgment result is that the first quantile value is equal to the preset threshold, the predicted power values corresponding to different quantiles are obtained; when the judgment result is that the first quantile value is less than the preset quantile threshold, based on the target photovoltaic data, a preset long short-term memory neural network quantile regression model is used to predict the grid node corresponding to the next quantile, and the predicted power value corresponding to the next grid node is obtained, and the cycle is iterated until the first quantile value is equal to the preset threshold, and the predicted power values corresponding to different quantiles are obtained. Each of the quantiles may correspond to a node or a branch of a preset power grid architecture. When the preset power grid architecture has only one node, the value of the quantile is 1. When the preset power grid architecture has multiple power grid nodes, the quantile value corresponding to each power grid node is allocated based on a predetermined step size to obtain the quantile value corresponding to each of the power grid nodes. Based on the target photovoltaic data, a preset long short-term memory neural network quantile regression model is used to predict the power value of the power grid node corresponding to each quantile value to obtain the predicted power values corresponding to different quantiles.
[0088] Step S204: performing similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data;
[0089] In the specific implementation process of this step, the target photovoltaic data is feature extracted to obtain the first feature vector; the historical photovoltaic data are feature extracted to obtain the second feature vectors; the second feature vectors are clustered using the K-means clustering method to obtain the clusters and the cluster centers corresponding to the clusters; the first feature vectors and the cluster centers are calculated to obtain the distance values; the second feature vectors in the cluster corresponding to the smallest distance value are determined as the similar day data set within the preset time period corresponding to the target photovoltaic data. The preset time period can be a quarter or other time period range. Taking the preset time period data close to the current data to be predicted to construct the similar day data set can improve the recognition result of abnormal data.
[0090] Step S205: performing calculation processing based on the predicted power value using a Gaussian kernel density estimation method to obtain a kernel density estimation value corresponding to the predicted power value;
[0091] In the specific implementation process of this step, a Gaussian kernel density estimation method is used to perform calculation processing based on the predicted power value to obtain a kernel density estimation value corresponding to the predicted power value; the mathematical expression of the Gaussian kernel density estimation function can be expressed as the following formula (7):
[0092]
[0093] Where f is the probability density function; K(·) is the kernel function; the kernel function is non-negative and its integral is 1. i is the i-th known data sample, and h is the window width. The mathematical expression of the Gaussian kernel function can be expressed as follows:
[0094]
[0095] Specifically, a calculation process is performed on each power value in the predicted power value to obtain a Gaussian kernel value between the power values; specifically, for each power data point x in the predicted power value i , calculate with other data points x j The Gaussian kernel value K(x i , x j ). A kernel matrix K corresponding to each of the power values is formed, where K ij =K(x i , x j ). For the target power value, calculation processing is performed based on each of the Gaussian kernel values to obtain an accumulated kernel value corresponding to the target power value, so as to obtain a kernel density estimation value corresponding to each of the power values.
[0096] Step S206: normalizing the kernel density estimation value to obtain a probability density function corresponding to the predicted power value;
[0097] In the specific implementation process of this step, first, calculation processing is performed based on the number of each power value and the predetermined kernel parameter to obtain a normalization factor; calculation processing is performed based on the kernel density estimate value corresponding to each power value and the normalization factor to obtain a target kernel density estimate value corresponding to each power value; a density curve is drawn based on each target kernel density estimate value to obtain a probability density function curve.
[0098] Step S207: determining a data identification interval range of a target period under a target confidence level based on the similar day data set and a preset error range;
[0099] In the specific implementation process of this step, the data in the similar daily data set are statistically analyzed to calculate the mean and standard deviation of each data point in the target time period; the target time period can be set to the time period of 6:00-8:00 in the morning and the time period of 16:00-18:00 in the afternoon. Regardless of whether it is sunny, cloudy, or rainy, the power generation of the photovoltaic array is theoretically very small due to the weak solar radiation at sunrise and sunset. However, the power theft curve caused by the power theft means deviates from the actual situation and does not change with the actual meteorological conditions. It is very likely that the power output of the power theft user in the morning and evening is significantly higher than the actual output. Therefore, the photovoltaic power generation in the morning and evening can be used to effectively judge whether the user steals electricity or not. In the specific implementation process, the determination of the target time period can be set according to actual needs. The target confidence level can be 95% confidence level. In the specific implementation process, the value of the target confidence level can be set according to actual needs. The data identification interval range of the target time period under the target confidence level is determined based on the mean and the standard deviation; according to the properties of the normal distribution, the 95% confidence interval is usually expressed as the mean plus or minus 1.96 times the standard deviation. Therefore, for each period, the upper and lower limits of the 95% confidence interval can be calculated. If the data for the target period falls within the interval, the data is considered reliable; if it exceeds the interval, further anomaly detection or processing may be required.
[0100] Step S208: performing abnormal data identification on the probability density function within a first preset time period based on the data identification interval range to obtain an identification result;
[0101] In the specific implementation of this step, the first preset period can be a preset time such as one day, and the short-term electricity theft behavior is detected based on the first preset period. How many data points in each target period of the first preset period are distributed outside the data identification interval range is detected to obtain the identification result.
[0102] Step S209: When the identification result is that the abnormal power value in each preset time period is greater than or equal to the first preset threshold or the number of abnormal power values in the first time period is greater than or equal to the second preset threshold, the current user is determined as an abnormal power user;
[0103] In the specific implementation process of this step, when the identification result is that the abnormal power value in each preset time period is greater than or equal to the first preset threshold or the number of abnormal power values in the first time period is greater than or equal to the second preset threshold, the current user is determined as an abnormal power user. The first preset threshold number can be 3; the second preset threshold number can be 5. In actual applications, the first preset threshold number and the second preset threshold number can be set according to actual needs. For example, when the power values at four moments in the target time period of 6:00-8:00 are distributed outside the data identification interval range, it is determined that there is a suspicion of power theft, and the current photovoltaic user has power theft behavior. When the power values at two moments in the target time period of 6:00-8:00 are distributed outside the data identification interval range and the power value at one moment in the target time period of 16:00-18:00 in the afternoon is distributed outside the data identification interval range, it is determined that there is a suspicion of power theft, and the current photovoltaic user has power theft behavior. When the sum of the number of abnormal power values in the first time period is equal to 6, it is determined that there is a suspicion of power theft, and the current photovoltaic user has power theft behavior.
[0104] Step S210: Classifying the electricity theft behavior levels of the abnormal electricity users in the second time period to obtain the electricity theft levels corresponding to the abnormal electricity users.
[0105] In the specific implementation of this step, the second period can be a medium- and long-term time scale such as one month; the number of electricity theft behaviors in the first period in the second period is judged. When there are 1-5 electricity theft behaviors in the first period in the first period, the photovoltaic user who has committed the electricity theft behavior is determined as a customer with mild electricity theft suspicion; when there are 6-9 electricity theft behaviors in the first period in the first period, the photovoltaic user who has committed the electricity theft behavior is determined as a customer with moderate electricity theft suspicion; when there are more than or equal to 10 electricity theft behaviors in the first period in the first period, the photovoltaic user who has committed the electricity theft behavior is determined as a customer with severe electricity theft suspicion. Then, according to the electricity theft level corresponding to the electricity theft user, the measures corresponding to the electricity theft level are adopted to deal with the electricity theft user. The medium- and long-term photovoltaic electricity theft identification is mainly based on the monthly scale. The sum of the number of days with electricity theft suspicion screened out by the user in one month is counted, and the judgment result is given accordingly. The medium- and long-term electricity theft screening makes up for the shortcomings of short-term electricity theft judgment. When the number of days in a month when a PV user is suspected of stealing electricity is in the range of [1,5], the user is judged to be slightly suspected of stealing electricity; when the number of days in a month when a PV user is suspected of stealing electricity is in the range of [6,9], the user is judged to be moderately suspected of stealing electricity; the above two situations can be appropriately checked offline. If the suspicion remains unchanged or worsens during the next inspection period, the user will be directly corrected on site. When a PV user is suspected of stealing electricity for 10 days or more in a month, it can be concluded that the user has committed major illegal acts of stealing electricity, and a comprehensive inspection will be conducted on site.
[0106] The present application obtains target photovoltaic data by preprocessing the pre-acquired data to be identified; constructs a preset long short-term memory neural network quantile regression model; uses the preset long short-term memory neural network quantile regression model to predict the target photovoltaic data, and obtains predicted power values corresponding to different quantiles; performs similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset time period, and obtains a similar day data set within a preset time period corresponding to the target photovoltaic data; the present application uses similar day data as a standard to perform abnormal identification on the predicted power value predicted by using the preset long short-term memory neural network quantile regression model, and takes into account the influence of environmental weather and other factors on photovoltaic power, so that the identification result of abnormal users is more accurate, based on The predicted power value is calculated and processed by using the Gaussian kernel density estimation method to obtain a kernel density estimation value corresponding to the predicted power value; the kernel density estimation value is normalized to obtain a probability density function corresponding to the predicted power value; based on the data identification interval range, the probability density function is identified for abnormal data within a first preset time period to obtain an identification result; when the identification result is that the abnormal power value within each preset time period is greater than or equal to a first preset threshold or the number of abnormal power values within the first time period is greater than or equal to a second preset threshold, the current user is determined as an abnormal electricity user; the electricity theft behavior level of the abnormal electricity user within the second time period is divided to obtain the electricity theft level corresponding to the abnormal electricity user. This application uses a method that combines short-term electricity theft behavior and medium- and long-term electricity theft behavior detection to judge the user's electricity theft level, so as to adopt different governance measures for users with different electricity theft levels. Strengthen the governance of photovoltaic users' electricity usage behavior and reduce property losses.
[0107] Another embodiment of the present application provides a device for identifying abnormal power consumption behavior, such as Figure 3 As shown, including:
[0108] A preprocessing module 1 is used to preprocess the pre-acquired data to be identified to obtain target photovoltaic data;
[0109] Prediction module 2, used to predict the target photovoltaic data using a preset long short-term memory neural network quantile regression model to obtain predicted power values corresponding to different quantiles;
[0110] A similar day clustering module 3 is used to perform similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period of time, and obtain a similar day data set within the preset period of time corresponding to the target photovoltaic data;
[0111] The identification module 4 is used to identify abnormalities of the predicted power value based on the similar day data set by using a Gaussian kernel density estimation method to obtain abnormal power consumption behavior identification results.
[0112] In the specific implementation process, the preprocessing module 1 is specifically used to: perform data identification on the data to be identified to obtain various abnormal data; use the median calculation method to replace each of the abnormal data to obtain the first photovoltaic data; use the piecewise linear interpolation method to supplement the missing values in the first photovoltaic data to obtain the target photovoltaic data.
[0113] In the specific implementation process, the prediction module 2 is specifically used to: predict the grid node corresponding to the first quantile based on the target photovoltaic data using a preset long short-term memory neural network quantile regression model to obtain the predicted power value corresponding to the first grid node; calculate and process based on the initial value of the first quantile and a predetermined step size to obtain the first quantile value corresponding to the next quantile; judge based on the first quantile value and a preset threshold to obtain a judgment result; when the judgment result is that the first quantile value is equal to the preset threshold, the predicted power values corresponding to different quantiles are obtained; when the judgment result is that the first quantile value is less than the preset quantile threshold, predict the grid node corresponding to the next quantile based on the target photovoltaic data using a preset long short-term memory neural network quantile regression model to obtain the predicted power value corresponding to the next grid node, and iterate until the first quantile value is equal to the preset threshold, and the predicted power values corresponding to different quantiles are obtained.
[0114] In the specific implementation process, the similar day clustering module 3 is specifically used to: perform feature extraction on the target photovoltaic data to obtain a first feature vector; perform feature extraction on each of the historical photovoltaic data to obtain each second feature vector; use the K-means clustering method to cluster each of the second feature vectors to obtain each cluster cluster and the cluster center corresponding to each of the cluster clusters; perform calculations based on the first feature vector and each of the cluster centers to obtain each distance value; and determine each of the second feature vectors in the cluster cluster corresponding to the smallest distance value as the similar day data set within the preset time period corresponding to the target photovoltaic data.
[0115] In the specific implementation process, the identification module 4 is specifically used to: perform calculation processing based on the predicted power value using the Gaussian kernel density estimation method to obtain a kernel density estimation value corresponding to the predicted power value; normalize the kernel density estimation value to obtain a probability density function corresponding to the predicted power value; determine the data identification interval range of the target time period under the target confidence level based on the similar daily data set and a preset error range; perform abnormal data identification on the probability density function based on the data identification interval range to obtain an abnormal power consumption behavior identification result.
[0116] During the specific implementation process, the identification module 4 is also used to: perform calculations and processing on each power value in the predicted power value to obtain a Gaussian kernel value between each power value; perform calculations and processing on the target power value based on each Gaussian kernel value to obtain an accumulated kernel value corresponding to the target power value, so as to obtain a kernel density estimation value corresponding to each power value.
[0117] In the specific implementation process, the identification module 4 is also used to: identify abnormal data on the probability density function within a first preset time period based on the data identification interval range to obtain an identification result; when the identification result is that the abnormal power value within each preset time period is greater than or equal to a first preset threshold or the number of abnormal power values within the first time period is greater than or equal to a second preset threshold, the current user is determined as an abnormal electricity user; and the electricity theft behavior level of the abnormal electricity user in the second time period is divided to obtain the electricity theft level corresponding to the abnormal electricity user.
[0118] This application obtains target photovoltaic data by preprocessing the pre-acquired data to be identified; uses a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles; performs similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset time period to obtain a similar day data set within a preset time period corresponding to the target photovoltaic data; considers the impact of environmental, weather and other factors on the operation of the power grid, uses similar day data sets as a measurement scale to identify the predicted data, and improves the accuracy of the identification results. Based on the similar day data set, the Gaussian kernel density estimation method is used to identify the anomalies of the predicted power value to obtain the abnormal power consumption behavior identification result. Using the method of the application, abnormal power consumption behavior can be identified without on-site investigation by staff, saving labor costs, shortening the detection cycle, and improving the efficiency of identifying abnormal user power consumption behavior.
[0119] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:
[0120] Step 1: pre-process the pre-acquired data to be identified to obtain target photovoltaic data;
[0121] Step 2: Use a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles;
[0122] Step 3: performing similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data;
[0123] Step 4: Based on the similar day data set, a Gaussian kernel density estimation method is used to identify anomalies in the predicted power value to obtain an abnormal power consumption behavior identification result.
[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0125] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0126] The specific implementation process of the above method steps can refer to the embodiments of any of the above-mentioned abnormal electricity usage behavior identification methods, and this embodiment will not be repeated here.
[0127] This application obtains target photovoltaic data by preprocessing the pre-acquired data to be identified; uses a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles; performs similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset time period to obtain a similar day data set within a preset time period corresponding to the target photovoltaic data; considers the impact of environmental, weather and other factors on the operation of the power grid, uses similar day data sets as a measurement scale to identify the predicted data, and improves the accuracy of the identification results. Based on the similar day data set, the Gaussian kernel density estimation method is used to identify the anomalies of the predicted power value to obtain the abnormal power consumption behavior identification result. Using the method of the application, abnormal power consumption behavior can be identified without on-site investigation by staff, saving labor costs, shortening the detection cycle, and improving the efficiency of identifying abnormal user power consumption behavior.
[0128] Another embodiment of the present application provides an electronic device, which may be a server, and the electronic device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the electronic device program is executed by the processor, it implements the functions or steps of a server-side method for identifying abnormal power consumption behavior.
[0129] In one embodiment, an electronic device is provided, which may be a client. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external server via a network connection. When the electronic device program is executed by the processor, the functions or steps on the client side of a method for identifying abnormal power consumption behavior are implemented.
[0130] Another embodiment of the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the following method steps when executing the computer program in the memory:
[0131] Step 1: pre-process the pre-acquired data to be identified to obtain target photovoltaic data;
[0132] Step 2: Use a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles;
[0133] Step 3: performing similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data;
[0134] Step 4: Based on the similar day data set, a Gaussian kernel density estimation method is used to identify anomalies in the predicted power value to obtain an abnormal power consumption behavior identification result.
[0135] The specific implementation process of the above method steps can refer to the embodiments of any of the above-mentioned abnormal electricity usage behavior identification methods, and this embodiment will not be repeated here.
[0136] This application obtains target photovoltaic data by preprocessing the pre-acquired data to be identified; uses a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles; performs similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset time period to obtain a similar day data set within a preset time period corresponding to the target photovoltaic data; considers the impact of environmental, weather and other factors on the operation of the power grid, uses similar day data sets as a measurement scale to identify the predicted data, and improves the accuracy of the identification results. Based on the similar day data set, the Gaussian kernel density estimation method is used to identify the anomalies of the predicted power value to obtain the abnormal power consumption behavior identification result. Using the method of the application, abnormal power consumption behavior can be identified without on-site investigation by staff, saving labor costs, shortening the detection cycle, and improving the efficiency of identifying abnormal user power consumption behavior.
[0137] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A method for identifying abnormal electricity usage behavior, characterized in that: include: Preprocessing the pre-acquired data to be identified to obtain target photovoltaic data; The target photovoltaic data is predicted using a preset long short-term memory neural network quantile regression model to obtain predicted power values corresponding to different quantiles; Perform similar day clustering based on the target photovoltaic data and historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data; Based on the similar day data set, a Gaussian kernel density estimation method is used to perform abnormal identification on the predicted power value to obtain an abnormal power consumption behavior identification result.
2. The method according to claim 1, characterized in that The preprocessing of the pre-acquired data to be identified to obtain initial photovoltaic data specifically includes: Performing data recognition on the data to be recognized to obtain various abnormal data; Using a median calculation method to replace each of the abnormal data to obtain first photovoltaic data; A piecewise linear interpolation method is used to supplement the missing values in the first photovoltaic data to obtain the target photovoltaic data.
3. The method according to claim 1, characterized in that The method of using a preset long short-term memory neural network quantile regression model to predict the target photovoltaic data to obtain predicted power values corresponding to different quantiles specifically includes: Based on the target photovoltaic data, a preset long short-term memory neural network quantile regression model is used to predict the grid node corresponding to the first quantile point to obtain a predicted power value corresponding to the first grid node; Performing calculation based on the initial value of the first quantile and the predetermined step length to obtain a first quantile value corresponding to the next quantile; Perform judgment based on the first quantile value and a preset threshold to obtain a judgment result; When the judgment result is that the first quantile value is equal to the preset threshold, the predicted power values corresponding to different quantiles are obtained; When the judgment result is that the first quantile value is less than the preset quantile threshold, a preset long short-term memory neural network quantile regression model is used based on the target photovoltaic data to predict the grid node corresponding to the next quantile, and the predicted power value corresponding to the next grid node is obtained, and the cycle is iterated until the first quantile value is equal to the preset threshold, and the predicted power values corresponding to different quantiles are obtained.
4. The method according to claim 1, characterized in that The performing similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period to obtain a similar day data set within the preset period corresponding to the target photovoltaic data specifically includes: Performing feature extraction on the target photovoltaic data to obtain a first feature vector; Performing feature extraction on each of the historical photovoltaic data to obtain each second feature vector; Using a K-means clustering method to cluster each of the second feature vectors to obtain each cluster and a cluster center corresponding to each of the clusters; Performing calculations based on the first feature vector and each of the cluster centers to obtain each distance value; Each of the second feature vectors in the cluster corresponding to the smallest distance value is determined as the similar daily data set within the preset time period corresponding to the target photovoltaic data.
5. The method according to claim 1, characterized in that The method of using a Gaussian kernel density estimation method to perform abnormal identification on the predicted power value based on the similar day data set to obtain an abnormal power consumption behavior identification result specifically includes: Based on the predicted power value, a Gaussian kernel density estimation method is used to perform calculation processing to obtain a kernel density estimation value corresponding to the predicted power value; Normalizing the kernel density estimate to obtain a probability density function corresponding to the predicted power value; Determine the data identification interval range of the target time period under the target confidence level based on the similar day data set and the preset error range; Abnormal data is identified on the probability density function based on the data identification interval to obtain abnormal power consumption behavior identification results.
6. The method according to claim 5, characterized in that The step of performing calculation based on the predicted power value by using a Gaussian kernel density estimation method to obtain a kernel density estimation value corresponding to the predicted power value specifically includes: Performing calculation processing on each power value in the predicted power value to obtain a Gaussian kernel value between each power value; For the target power value, calculation processing is performed based on each of the Gaussian kernel values to obtain an accumulated kernel value corresponding to the target power value, so as to obtain kernel density estimation values corresponding to each of the power values.
7. The method according to claim 5, characterized in that The performing abnormal data identification on the probability density function based on the data identification interval range to obtain the abnormal power consumption behavior identification result specifically includes: Based on the data identification interval range, the probability density function is subjected to abnormal data identification within a first preset time period to obtain an identification result; When the identification result is that the abnormal power value in each preset time period is greater than or equal to the first preset threshold or the number of abnormal power values in the first time period is greater than or equal to the second preset threshold, the current user is determined as an abnormal power user; The electricity theft behavior levels of the abnormal electricity users in the second time period are classified to obtain the electricity theft levels corresponding to the abnormal electricity users.
8. A device for identifying abnormal electricity usage behavior, characterized in that: include: A preprocessing module is used to preprocess the pre-acquired data to be identified to obtain target photovoltaic data; A prediction module, used to predict the target photovoltaic data using a preset long short-term memory neural network quantile regression model to obtain predicted power values corresponding to different quantiles; A similar day clustering module, used to perform similar day clustering based on the target photovoltaic data and the historical photovoltaic data within a preset period, to obtain a similar day data set within the preset period corresponding to the target photovoltaic data; The identification module is used to identify abnormalities of the predicted power value based on the similar day data set using a Gaussian kernel density estimation method to obtain abnormal power consumption behavior identification results.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying abnormal electricity usage behavior described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The method at least comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the abnormal electricity usage behavior identification method as described in any one of claims 1 to 7 when executing the computer program on the memory.
Citation Information
Cited By
Photovoltaic user electricity consumption abnormity monitoring method and system based on artificial intelligence
CN121261423A
Photovoltaic power utilization simulation and detection system, method and equipment and storage medium
CN121887123A
Photovoltaic power consumption simulation and testing systems, methods, equipment and storage media
CN121887123B