A method and system for detecting abnormal electricity users
By constructing a training dataset and a neural network model, the problems of time-consuming and labor-intensive detection of abnormal electricity users and high false judgment rate in existing technologies have been solved, and accurate identification of abnormal electricity users and detection of various electricity theft methods have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2022-08-02
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for detecting abnormal electricity consumption are time-consuming and labor-intensive, have difficulty covering all users, and struggle to accurately locate electricity thieves. In particular, they lack rigorous logical judgment and accurate data analysis for new types of electricity theft.
A training dataset is constructed, and a neural network model is trained using historical electricity consumption data and anomaly rate. The anomaly rate prediction model is used to analyze the electricity consumption data of target users and identify abnormal electricity consumption behaviors, including electricity theft by undervoltage method, electricity theft by undercurrent method, and electricity theft by phase shifting method.
It enables precise location and identification of users with abnormal electricity consumption, improves detection accuracy, can identify various high-tech electricity theft methods, and reduces the false judgment rate.
Smart Images

Figure CN115293257B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of abnormal electricity consumption detection technology, and in particular to a detection method and system for users with abnormal electricity consumption. Background Technology
[0002] As power companies increasingly collect and apply user data in a more diversified manner, they have built databases to store this data. Simultaneously, data analysis allows for more accurate understanding of user electricity consumption patterns. Currently, the traditional method for identifying abnormal electricity consumption involves on-site inspections of each user. This method is time-consuming and labor-intensive, failing to cover all users and accurately pinpoint those stealing electricity. Existing metering automation systems use their transformer area line loss statistical analysis function to roughly assess line loss across the entire transformer area; however, they lack rigorous logical judgment and precise data analysis for new methods of electricity theft.
[0003] Chinese invention patent application publication number CN113452145A discloses a method and system for detecting the electricity consumption of users in a low-voltage distribution area. The method obtains the electricity consumption attributes of all users in the target distribution area and combines power consumption, opening time, wiring abnormalities, and historical metering data to determine electricity theft. This method considers the load scale and required electricity consumption of users under the low-voltage distribution area and makes judgments based on users' historical data, resulting in high accuracy. However, it has few bases for judging electricity theft and insufficient consideration for processing large amounts of user data. It also has oversights in judging new or high-tech electricity theft methods, leading to a high false alarm rate for electricity theft. Summary of the Invention
[0004] The purpose of this invention is to provide a detection method and system for users with abnormal electricity consumption, thereby improving the accuracy of abnormal electricity consumption detection.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] A method for detecting abnormal electricity consumption by users includes the following steps:
[0007] Construct a training dataset; the training dataset includes several historical electricity consumption data points and the anomaly rate corresponding to the historical electricity consumption data; the anomaly rate represents the probability that the historical electricity consumption data is abnormal electricity consumption data;
[0008] The historical electricity consumption data is used as the input to the anomaly rate prediction model, and the anomaly rate corresponding to the historical electricity consumption data is used as the target output of the anomaly rate prediction model. The anomaly rate prediction model is trained to obtain a trained anomaly rate prediction model.
[0009] Electricity consumption data of the target user within any time period is collected and input into the trained anomaly rate prediction model to obtain the anomaly rate of the target user within that time period.
[0010] If the abnormality rate of the target user is higher than the abnormality threshold during the time period, abnormal electricity consumption analysis is performed based on the electricity consumption data of the target user to obtain an abnormal electricity consumption description of the target user; the abnormal electricity consumption description includes at least one of undervoltage electricity theft, undercurrent electricity theft, phase shifting electricity theft, or other electricity theft methods.
[0011] Optionally, after collecting the electricity consumption data of the target user within any time period and inputting it into the trained anomaly rate prediction model to obtain the anomaly rate of the target user within that time period, the detection method further includes:
[0012] The abnormality rate prediction model, which has been trained, is used to predict the abnormality rate of the target user at various time periods on the same day.
[0013] Based on the abnormality rate of the target user in each time period of the day, calculate the overall abnormality rate of the target user for the day; the overall abnormality rate is the average of the abnormality rates of the target user in each time period of the day.
[0014] Based on the anomaly rate of the target user in each time period of the day, the continuous anomaly time of the target user on that day is determined; the continuous anomaly time on that day is the sum of multiple time periods in which the anomaly rate is higher than the anomaly threshold.
[0015] Optionally, after predicting the anomalous rate of the target user for each time period of the day using the trained anomalous rate prediction model, the detection method further includes:
[0016] Obtain the historical electricity consumption of the target user in the past seven days, the same day last month, and the same day last year within the target time period; the target time period is any time period in which the anomaly rate is higher than the anomaly threshold.
[0017] Based on the target user's historical electricity consumption during the target time period, the predicted electricity consumption of the target user during the target time period is obtained.
[0018] Based on the predicted electricity consumption of the target user during the target time period and the actual meter reading of the target user during the target time period, the predicted electricity theft amount of the target user during the target time period is obtained; the actual meter reading is the electricity consumption of the target user during the target time period measured by the electricity meter.
[0019] Optionally, constructing the training dataset specifically includes:
[0020] Collect several sets of routine electricity consumption data; the routine electricity consumption data includes user-side current, user-side voltage, and user-side power within any time period.
[0021] Normalize each set of regular electricity consumption data and calculate the corresponding imbalance rate data; the imbalance rate data includes: current imbalance rate, voltage imbalance rate and power imbalance rate; the power imbalance rate includes the power imbalance rate of phase A, the power imbalance rate of phase B and the power imbalance rate of phase C.
[0022] Each set of regular electricity consumption data and the corresponding imbalance rate data are combined to form a historical electricity consumption data set.
[0023] The historical electricity consumption data are marked with an abnormality rate according to preset rules.
[0024] Optionally, the imbalance rate corresponding to the regular electricity consumption data can be calculated according to the following formula:
[0025]
[0026] Where I_XNX is the current imbalance rate, U_XNX is the voltage imbalance rate, P_BPH is the power imbalance rate, A_BPH is the A-phase power imbalance rate, B_BPH is the B-phase power imbalance rate, C_BPH is the C-phase power imbalance rate, and U lmax For the maximum voltage, U lmin For the minimum voltage, I lmax For the maximum current, I lmin The minimum current is given. PA is the power of phase A, PB is the power of phase B, PC is the power of phase C, PZ is the average power of the three phases, UA is the voltage of phase A, IA is the current of phase A, UB is the voltage of phase B, IB is the current of phase B, UC is the voltage of phase C, and IC is the current of phase C.
[0027] Optionally, the regular electricity consumption data can be normalized according to the following formula:
[0028]
[0029] Where x' is the normalized data, x is the conventional electricity consumption data, and x min x is the minimum value of the aforementioned regular electricity consumption data. max This represents the maximum value of the aforementioned regular electricity consumption data.
[0030] Optionally, the step of marking the anomaly rate of each of the historical electricity consumption data according to a preset rule specifically includes:
[0031] Based on the user information corresponding to each of the historical electricity consumption data, an initial anomaly rate is set for each of the historical electricity consumption data.
[0032] Anomalies in electricity consumption are analyzed based on user-side current, user-side voltage, user-side power, current imbalance rate, voltage imbalance rate, and power imbalance rate, and the anomaly rate of the historical electricity consumption data is updated.
[0033] Optionally, setting an initial anomaly rate for each of the historical electricity consumption data points based on the user information corresponding to each historical electricity consumption data point specifically includes:
[0034] For any historical electricity consumption data, determine whether the user corresponding to the historical electricity consumption data has had any abnormal electricity consumption in the past, and obtain a first determination result;
[0035] If the first judgment result is negative, then the initial abnormality rate of the historical electricity consumption data is set to 0.
[0036] If the first judgment result is yes, then the initial abnormality rate of the historical electricity consumption data is set to a value between 0 and 1.
[0037] Optionally, after collecting the electricity consumption data of the target user within any time period and inputting it into the trained anomaly rate prediction model to obtain the anomaly rate of the target user within that time period, the detection method further includes:
[0038] Obtain the electricity consumption trend curve of the gateway where the target user is located;
[0039] The electricity consumption trend curve of the target user is compared with the electricity consumption trend curve of the threshold, and the abnormality rate of the target user is corrected.
[0040] Corresponding to the aforementioned detection method for users with abnormal electricity consumption, the present invention also provides a detection system for users with abnormal electricity consumption, comprising:
[0041] A dataset construction module is used to construct a training dataset; the training dataset includes several historical electricity consumption data points and the anomaly rate corresponding to the historical electricity consumption data; the anomaly rate represents the probability that the historical electricity consumption data is abnormal electricity consumption data;
[0042] The model training module is used to train the anomaly rate prediction model using the training dataset to obtain the trained anomaly rate prediction model; the historical electricity consumption data is used as the input of the anomaly rate prediction model, and the anomaly rate corresponding to the historical electricity consumption data is used as the target output of the anomaly rate prediction model.
[0043] An anomaly rate prediction module is used to collect electricity consumption data of a target user within any time period, input it into the trained anomaly rate prediction model, and obtain the anomaly rate of the target user within that time period.
[0044] An abnormal electricity consumption description module is used to perform abnormal electricity consumption analysis based on the electricity consumption data of the target user when the abnormal rate of the target user in the time period is higher than the abnormal threshold, and obtain an abnormal electricity consumption description of the target user; the abnormal electricity consumption description includes at least one of undervoltage electricity theft, undercurrent electricity theft, phase shifting electricity theft, or other electricity theft methods.
[0045] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0046] This invention provides a method and system for detecting users with abnormal electricity consumption. The detection method includes: constructing a training dataset; the training dataset includes several historical electricity consumption data points and the corresponding abnormality rate of the historical electricity consumption data; the abnormality rate represents the probability that the historical electricity consumption data is abnormal; using the historical electricity consumption data as input to an abnormality rate prediction model and the corresponding abnormality rate of the historical electricity consumption data as the target output of the abnormality rate prediction model, training the abnormality rate prediction model to obtain a trained abnormality rate prediction model; collecting electricity consumption data of the target user within any time period and inputting it into the trained abnormality rate prediction model to obtain the abnormality rate of the target user within that time period; if the abnormality rate of the target user within that time period is higher than an abnormality threshold, performing abnormal electricity consumption analysis based on the target user's electricity consumption data to obtain a description of the target user's abnormal electricity consumption. This invention combines big data and neural network technology in the detection of abnormal electricity consumption. It uses a large amount of historical electricity consumption data and corresponding anomaly rates to train a neural network model. The trained neural network model can accurately predict the anomaly rate of each electricity user and accurately locate users with abnormal electricity consumption. Moreover, based on the electricity consumption data of users with abnormal electricity consumption, it can analyze the abnormal electricity consumption of users, clearly understand the abnormal electricity consumption descriptions of users, and detect whether users have used other high-tech electricity theft methods such as undervoltage theft, undercurrent theft, and phase shifting theft. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart of a detection method for abnormal electricity consumption provided in Embodiment 1 of the present invention;
[0049] Figure 2 This is a flowchart of steps S11 to S14 in the method provided in Embodiment 1 of the present invention;
[0050] Figure 3This is a flowchart of the particle swarm optimization algorithm in the method provided in Embodiment 1 of the present invention;
[0051] Figure 4 This is a schematic diagram of the structure of a detection system for abnormal electricity consumption provided in Embodiment 2 of the present invention;
[0052] Figure 5 This is a schematic diagram of another structure of the detection system for abnormal power consumption provided in Embodiment 3 of the present invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] The purpose of this invention is to provide a detection method and system for users with abnormal electricity consumption, thereby improving the accuracy of abnormal electricity consumption detection.
[0055] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0056] Example 1:
[0057] This embodiment provides a detection method for users with abnormal electricity consumption, such as... Figure 1 The flowchart shown illustrates that the detection method includes the following steps:
[0058] S1. Construct a training dataset; the training dataset includes several historical electricity consumption data points and the corresponding anomaly rate for the historical electricity consumption data; the anomaly rate represents the probability that the historical electricity consumption data is abnormal; for example... Figure 2 As shown, step S1 specifically includes:
[0059] S11. Collect several sets of routine electricity consumption data; the routine electricity consumption data includes user-side current, user-side voltage, and user-side power within any time period.
[0060] In this embodiment, the scattered raw data is processed and statistically analyzed. The raw data includes information such as user voltage, current, power, user number, time, line number, transformer area number, comprehensive multiplier, and user name. Electricity consumption data and historical electricity consumption data of customers are received from the data operation management system, and electricity customer profile information is received from the database storing user information. The data is then stored in the database of the line loss intelligent classification model based on big data technology for big data analysis and line loss intelligent diagnosis analysis model analysis.
[0061] Based on the user ID to be predicted, edit the SQL statement to download the line data of the user. The line data includes, but is not limited to, the gateway data (summary table data), dedicated transformer user data, and public transformer user data of the line. The data for each user at each time point should include voltage, current, power, user ID, time, line ID, transformer area ID, comprehensive multiplier, user name, etc.
[0062] The system connects to the server storing the database, enters the edited SQL statement, and downloads the corresponding data. It collects data from the data operation management system and marketing system, including data on lines, transformer areas, users, metering points, and meters. This data is then compared, cleaned, and statistically analyzed. The data is categorized by line junction, dedicated transformer users, and public transformer users. Due to differences in electricity usage patterns and consumption, different calculation methods are used for different categories to obtain accurate results.
[0063] Based on different users, the maximum and minimum values of voltage, current, and power for each user are retrieved from the downloaded data and stored in a data table.
[0064] Find outliers in the user data for voltage, current, and power. Use the maximum and minimum values in the data table obtained above to replace the outliers according to different situations. For example, replace infinitely large outliers with the maximum value and infinitely small outliers with the minimum value.
[0065] The downloaded data comes from electricity meter measurements. Electricity meters may experience periods of disconnection, resulting in zero or empty data. By identifying these zero or empty values and performing time-series analysis on non-zero data from the same time period over the past seven days, the same day last month, and the same day last year, the missing data can be filled in, making the supplemented data closer to the user's actual data. This project calculates the integral electricity consumption of each node in the distribution network during the time period t1 to t2 based on real-time power data measured by the SCADA system.
[0066]
[0067] In the formula, P represents the instantaneous power, and t1 to t2 represents any time interval. Integrating the instantaneous power yields the total power W for that time interval. 12 If the meter reading is blank, linear interpolation is performed using the formula described above.
[0068] S12. Normalize each set of regular electricity consumption data and calculate the corresponding imbalance rate data. The imbalance rate data includes: current imbalance rate, voltage imbalance rate, and power imbalance rate. The power imbalance rate includes the power imbalance rate of phase A, phase B, and phase C. These calculated imbalance rate data can increase the accuracy of the trained model.
[0069] In this embodiment, the conventional electricity consumption data is normalized according to the following formula:
[0070]
[0071] Where x' is the normalized data, x is the conventional electricity consumption data, and x min x is the minimum value of the aforementioned regular electricity consumption data. max This represents the maximum value of the aforementioned regular electricity consumption data.
[0072] Calculate the imbalance rate corresponding to the regular electricity consumption data using the following formula:
[0073]
[0074] Where I_XNX is the current imbalance rate, U_XNX is the voltage imbalance rate, P_BPH is the power imbalance rate, A_BPH is the A-phase power imbalance rate, B_BPH is the B-phase power imbalance rate, C_BPH is the C-phase power imbalance rate, and U lmax For the maximum voltage, U lmin For the minimum voltage, I lmax For the maximum current, I lmin The minimum current is given. PA is the power of phase A, PB is the power of phase B, PC is the power of phase C, PZ is the average power of the three phases, UA is the voltage of phase A, IA is the current of phase A, UB is the voltage of phase B, IB is the current of phase B, UC is the voltage of phase C, and IC is the current of phase C.
[0075] S13. Combine each regular electricity consumption data and the imbalance rate data corresponding to the regular electricity consumption data to form a historical electricity consumption data.
[0076] S14. Mark the corresponding anomaly rate for each of the historical electricity consumption data according to preset rules; specifically including:
[0077] Based on the user information corresponding to each of the historical electricity consumption data, an initial anomaly rate is set for each of the historical electricity consumption data.
[0078] For any historical electricity consumption data, determine whether the user corresponding to the historical electricity consumption data has had any abnormal electricity consumption in the past, and obtain a first judgment result.
[0079] If the first judgment result is negative, then the initial abnormality rate of the historical electricity consumption data is set to 0.
[0080] If the first judgment result is yes, then the initial abnormality rate of the historical electricity consumption data is set to a value between 0 and 1.
[0081] Abnormal electricity consumption is analyzed based on user-side current, user-side voltage, user-side power, current imbalance rate, voltage imbalance rate, and power imbalance rate, and the abnormality rate of the historical electricity consumption data is updated. Specifically, various abnormal electricity consumption methods can be used for analysis:
[0082] Undervoltage theft: Determine if the input voltage of the high voltage metering device is abnormal; (1) Set the real-time measured three-phase voltage value of the high voltage metering device as the characteristic quantity in the electricity user information data. Based on whether the real-time measured voltage value is lower than the threshold voltage value set under normal electricity theft conditions, diagnose whether the electricity user at this location is stealing electricity under the undervoltage method. (2) Use the historical data of the real-time measured three-phase voltage value of the high voltage metering device as the auxiliary characteristic quantity. Key words: (1) The voltage of a certain phase is lower than 85% of the rated voltage (2) A certain phase is disconnected. It should be noted that in the power system, the zero B phase current of the dedicated transformer user is not enough to determine that the user is disconnected from the power supply, because some users only use two phases. In this case, the following measures should be taken: If the current of a certain phase of the user is always zero, it is not considered that the user is suspected of stealing electricity; if the current of a certain phase of the user changes and is sometimes zero and sometimes not zero, it is considered that the user is suspected of stealing electricity.
[0083] Electricity theft by undercurrent method: Determine whether the input current of the high-voltage metering device is abnormal under the load operation state; (1) Set the real-time measured three-phase current value of the high-voltage metering device as the characteristic quantity in the electricity user information data. Based on the real-time measured current data and the large data of three-phase current values obtained over a long period of time, and based on the matching degree between the current load current value of the electricity user and the historical data curve, diagnose whether the electricity user at this location is stealing electricity by undercurrent method. (2) Use the historical data of the real-time measured three-phase current value of the high-voltage metering device as the auxiliary characteristic quantity. The characteristic quantity is used to determine whether the user is stealing electricity by undercurrent method. If it cannot be determined, the auxiliary characteristic quantity is used to make the judgment. Key words: (1) Current imbalance, the current of a certain phase is the smallest. (2) A certain phase has opposite polarity. (3) A certain phase current and power have an abnormal correlation (the product of current and voltage is opposite to the power). (4) A certain phase current and power have an abnormal correlation (the product of single-phase voltage and current exceeds ten times the power of that phase).
[0084] Phase shifting method for electricity theft: Determine if the power factor is abnormal; (1) Use the real-time measured power values of each phase on the metering side and each phase on the load side of the high-voltage metering device as characteristic quantities. Based on the real-time measured power values of each phase on the metering side and each phase on the load side, the difference between the two values can be obtained, and the electricity users who meet the requirements of phase shifting method for electricity theft can be preliminarily determined and marked. Normal state: The difference between the real-time measured power values of each phase on the metering side and the power values of each phase on the load side is small; Electricity theft state: The real-time measured power values of each phase on the metering side are much lower than the power values of each phase on the load side. (2) Use the monthly line loss value in the electricity user information data as an auxiliary characteristic quantity. Key words: The sum of the three-phase power is greater than the total power.
[0085] Electricity theft by differential expansion method: Determine whether the electricity metering error is abnormal. Some abnormal manifestations are consistent with the undercurrent method and undervoltage method. Other external factors need to be checked on-site. (1) Use the real-time measured electricity value of each phase on the metering side of the high-voltage metering device as the characteristic quantity. Based on the difference between the real-time measured electricity value of each phase on the metering side and the historical data of the metering side, diagnose and analyze whether the electricity user has electricity theft by differential expansion method. (2) Use the electricity value of each phase on the metering side of the high-voltage metering device as the characteristic parameter.
[0086] In the above abnormal electricity consumption analysis and the process of updating the abnormality rate of historical electricity consumption data, for user data that is verified as normal offline, a single data point that meets the above abnormal electricity consumption characteristics is marked with an abnormality rate. If a single data point meets the characteristics, the abnormality rate is set to a lower initial value (e.g., 0.2). For each additional data point that meets the characteristics, the abnormality rate is further increased, with an upper limit of 1 and a lower limit of 0. If none of the data points meet the characteristics, the abnormality rate is set to 0. For user data that is verified as abnormal offline, a single data point that meets the above abnormal electricity consumption characteristics is marked with an abnormality rate. If a single data point meets the characteristics, the abnormality rate is set to a higher initial value (e.g., 0.5). For each additional data point that meets the characteristics, the abnormality rate is further increased, with an upper limit of 1 and a lower limit of 0. If none of the data points meet the characteristics, the abnormality rate is also set to a lower initial value (e.g., 0.3).
[0087] S2. Train the anomaly rate prediction model using the training dataset to obtain a trained anomaly rate prediction model; use the historical electricity consumption data as the input of the anomaly rate prediction model, and use the anomaly rate corresponding to the historical electricity consumption data as the target output of the anomaly rate prediction model. In some embodiments, the training dataset is divided into training set and test set data in an 8:2 ratio, and the data division process is random.
[0088] In this embodiment, after obtaining the trained anomaly rate prediction model, further optimization is performed. The input weights of the anomaly rate prediction model are multiple parameters, including data voltage, current, power, etc., as well as a bias term. The ReLU (rectified linear unit) function is chosen as the activation function. The output is the anomaly rate. The optimization part first obtains the root mean square error (RMSE) of the anomaly rate prediction model, which is the evaluation index of the algorithm model parameters. This is used as the optimization value for the particle swarm optimization (PSO) algorithm. The algorithm finds the minimum value of RMSE to determine the number of neurons in each layer, the number of iterations, and the batch size. The specific steps of the particle swarm optimization algorithm are as follows: Figure 3 As shown.
[0089] S3. Collect electricity consumption data of the target user within any time period and input it into the trained anomaly rate prediction model to obtain the anomaly rate of the target user within that time period. Due to the large number of users (i.e., user data), this invention also optimizes for insufficient server memory, mainly through step-by-step processing and a garbage collection mechanism. This allows for the processing of large amounts of data even with insufficient memory. Step-by-step processing involves dividing the data to be processed together by date, processing one date at a time, and then classifying the data by user type, processing one type at a time. Furthermore, after each processing step, the data is cleared and the garbage collection mechanism is invoked to reclaim memory, facilitating the next calculation.
[0090] S4. If the abnormality rate of the target user during the time period is higher than the abnormality threshold, perform abnormal electricity consumption analysis based on the target user's electricity consumption data to obtain an abnormal electricity consumption description for the target user; the abnormal electricity consumption description includes at least one of undervoltage theft, undercurrent theft, phase-shifting theft, or other electricity theft methods. In some embodiments, the abnormality threshold is preset to 0.
[0091] In order to count the amount of electricity stolen by a target user and to collect electricity bills, in some embodiments, the historical electricity consumption of the target user in the past seven days, the same day of last month, and the same day of last year in a target time period is obtained; the target time period is any time period in which the anomaly rate is higher than the anomaly threshold.
[0092] Based on the target user's historical electricity consumption during the target time period, the predicted electricity consumption of the target user during the target time period is obtained. In this embodiment, the electricity theft by the user is predicted by integrating electricity consumption data. The electricity consumption data of the electricity meter in the power grid system is detected. By performing time series analysis on the non-zero data of the user in the same time period of the past seven days, the same day of last month, and the same day of last year, the missing data is filled in, making the supplemented data closer to the user's real data.
[0093] Based on the predicted electricity consumption of the target user during the target time period and the actual meter reading of the target user during the target time period, the predicted electricity theft amount of the target user during the target time period is obtained; the actual meter reading refers to the electricity consumption of the target user during the target time period as measured by the electricity meter. That is, if the predicted data and the data detected by the electricity meter are different, the predicted electricity theft amount of the user is obtained by subtracting the power detected by the electricity meter from the power of the predicted data.
[0094] To further calibrate the anomalous rate of the target users, after obtaining the anomalous rate of the target users, this embodiment also includes:
[0095] Obtain the electricity consumption trend curve of the target user's location;
[0096] The electricity consumption trend curve of the target user is compared with the electricity consumption trend curve of the corresponding checkpoint, and the abnormality rate of the target user is corrected.
[0097] Specifically, in this embodiment, the user's location is compared with the user's electricity consumption trend curve. When downloading data from the database for processing, it is necessary to download not only the data of the dedicated transformer user, but also the meter information of the dedicated transformer user's line. The trend of electricity consumption at the point is relatively easy to obtain. The sum of the power consumption of all users on the line where the point is located is calculated, and the loss at the point is obtained by subtracting the electricity consumption of the point meter.
[0098] However, a problem remains: the meter at the gateway calculates data once an hour, while the data for dedicated transformer users is measured every fifteen minutes. Therefore, to compare the trends of these two data points, it is necessary to standardize the unit of time. This means that the data from dedicated transformers also needs to be aggregated to once an hour. The power and anomaly rate in the aggregated data are the average of four data points within that hour. Since the anomaly description does not affect the calculation, only the anomaly description of the last data point is used. When the gateway data and dedicated transformer data are on the same time scale, the trends of the two types of data can be compared. If the trends are the same, it indicates that the user's losses are increasing along with the losses at the gateway, suggesting a high probability that the user is suspected of electricity theft. Conversely, if the trends are different, the suspicion of electricity theft is lower. This method is effective in correcting the results of the anomaly rate prediction model.
[0099] In addition, in order to better count the duration of abnormal behavior of each user, in some embodiments, the abnormality rate of the target user in each time period of the day is predicted by the trained abnormality rate prediction model; generally, one data point is measured every fifteen minutes in a day, so there are a total of 96 data points in a day, and an abnormality rate is obtained for each data point.
[0100] Based on the anomaly rate of the target user in each time period of the day, the overall anomaly rate of the target user for that day is calculated; the overall anomaly rate is the average of the anomaly rates of the target user in each time period of the day. It is determined whether the abnormal data in the above 96 data entries exceeds a threshold. If it does, the user is suspected of electricity theft, the abnormal user is located, and the abnormal data is extracted. The anomaly rates of the abnormal data are summed and averaged to obtain the overall anomaly rate of the abnormal user for that day. Simultaneously, the anomaly description of each abnormal electricity consumption data entry can be separated by commas to obtain the number of times the anomaly description appears in the abnormal user's daily data. The anomaly descriptions are sorted from most frequent to least frequent and displayed in the daily summary data.
[0101] Based on the anomaly rate of the target user in various time periods of the day, the continuous abnormal time of the target user for that day is determined; the continuous abnormal time of the day is the sum of multiple time periods where the anomaly rate is higher than the anomaly threshold. The abnormal duration is obtained by calculating the number of times abnormal data occurs for the abnormal user throughout the day, and since each data point is measured every 15 minutes, multiplying the number of times abnormal data occurs by 15 minutes. The total amount of electricity stolen by the abnormal user can be obtained by adding up the amount of electricity stolen within a day or measurement period.
[0102] In some extreme cases, there may be electricity consumption data with a high anomaly rate but no anomaly description. In this embodiment, these electricity consumption data with a high anomaly rate but no anomaly description are identified as abnormal electricity consumption data, stored in another table in the database, and the anomaly rate prediction model is optimized using these data.
[0103] This invention combines big data and neural network technology in the detection of abnormal electricity consumption. It uses a large amount of historical electricity consumption data and corresponding anomaly rates to train a neural network model. The trained neural network model can accurately predict the anomaly rate of each electricity user and accurately locate users with abnormal electricity consumption. Moreover, based on the electricity consumption data of users with abnormal electricity consumption, it can analyze the abnormal electricity consumption of users, clearly understand the abnormal electricity consumption descriptions of users, and detect whether users have used other high-tech electricity theft methods such as undervoltage theft, undercurrent theft, and phase shifting theft.
[0104] Example 2:
[0105] like Figure 4 The schematic diagram shown corresponds to the detection method for abnormal electricity consumption provided in Embodiment 1. This embodiment provides a detection system for abnormal electricity consumption, including:
[0106] The dataset construction module A1 is used to construct the training dataset; the training dataset includes several historical electricity consumption data and the anomaly rate corresponding to the historical electricity consumption data; the anomaly rate represents the probability that the historical electricity consumption data is abnormal electricity consumption data;
[0107] The model training module A2 is used to train the anomaly rate prediction model using the training dataset to obtain the trained anomaly rate prediction model; the historical electricity consumption data is used as the input of the anomaly rate prediction model, and the anomaly rate corresponding to the historical electricity consumption data is used as the target output of the anomaly rate prediction model.
[0108] Anomaly rate prediction module A3 is used to collect electricity consumption data of a target user within any time period, input it into the trained anomaly rate prediction model, and obtain the anomaly rate of the target user in that time period.
[0109] The abnormal electricity consumption description module A4 is used to perform abnormal electricity consumption analysis based on the electricity consumption data of the target user when the abnormal rate of the target user in the time period is higher than the abnormal threshold, and obtain an abnormal electricity consumption description of the target user; the abnormal electricity consumption description includes at least one of undervoltage electricity theft, undercurrent electricity theft, phase shifting electricity theft, or other electricity theft methods.
[0110] Example 3:
[0111] This embodiment also provides a detection system for users with abnormal electricity consumption, with a structure different from that of Embodiment 2, such as... Figure 5 The structural block diagram shown indicates that the detection system includes: data acquisition module B1, data classification module B2, data preprocessing module B3, training data processing module B4, model training module B5, anomaly rate prediction module B6, integrated power consumption module B7, trend comparison module B8, anomaly correction module B9, and summary module B10.
[0112] The data acquisition module B1 is used to process and statistically analyze the scattered raw data. It receives electricity consumption data and historical electricity consumption data from the data operation management system, acquires massive instantaneous data from the massive data platform, receives electricity customer profile information from the database, and stores it in the database of the line loss intelligent classification model based on big data technology for big data analysis and line loss intelligent diagnosis analysis model analysis.
[0113] The data classification module B2 is used to collect archive information of lines, transformer areas, users, metering points and meters from the data operation management system and marketing system, perform data comparison, cleaning and statistical analysis, and then classify them according to line access points, dedicated transformer users and public transformer users.
[0114] The data preprocessing module B3 is used to collect the fields used for daily data collection from electricity meters. The preprocessing is performed as follows: Based on the daily collected data, some new data are calculated during the preprocessing process. These new data are called unbalance rates, such as voltage unbalance rate, current unbalance rate, three-phase power unbalance rate, and single-phase power unbalance rate.
[0115] The training data processing module B4 is used to extract data from the data of normal users and abnormal users verified offline, and add anomaly rate data. For abnormal electricity theft sample data, the anomaly rate is the corresponding percentage of abnormal electricity theft; for normal comparison data, the anomaly rate is set to 0.
[0116] Model training module B5 is used to train the neural network model. After the preprocessing work mentioned above is completed, the dataset required to build the model is obtained. Each data point includes daily collected data such as voltage, current, and power, as well as newly added data on various imbalance rates and anomaly rates. This dataset is used as the raw data for training the neural network model, constructing the relationship between the anomaly rate and other data to build an electricity theft analysis model. After training the model, PSO is used for optimization to obtain the optimal model.
[0117] The anomaly rate prediction module B6 is used to use the above model to predict the user's data using the electricity theft analysis model, obtain the anomaly rate of a single piece of user data, add anomaly descriptions and possible electricity theft methods, and predict the amount of electricity stolen by the user.
[0118] The integrated power consumption module B7 is used to predict the amount of electricity stolen from dedicated transformer users' data. By performing time series analysis on the non-zero data of the user over the past seven days, the same day last month, and the same day last year for the same period, it fills in the missing data, making the supplemented data closer to the user's actual data. Simultaneously, through integrated power consumption, we can supplement missing electricity consumption data, simulate the historical usage of each meter, and predict the future electricity consumption curve of that meter. For communication line losses in practical applications, whether real or spurious, it can supplement the blank data during the communication failure period. While spurious communication line losses do not result in an overall loss of electricity consumption, they do not show the specific electricity consumption of the meter when the communication failure occurs; integrated power consumption effectively solves this problem. After obtaining the supplemented user power data, subtracting the real-time power of the meter from the power data yields the predicted amount of electricity stolen from the user.
[0119] The trend comparison module B8 is used to compare the loss at the gateway with the predicted amount of electricity theft by users. If the trends are the same, for example, if the loss at the gateway increases while the predicted amount of electricity theft by users also increases, then such users are considered to be highly suspicious.
[0120] The anomaly correction module B9 is used to process data with zero or minimum current. In the power system, a zero current in phase B of a dedicated transformer user is insufficient to determine if the user is stealing electricity. Some users only use two phases. The following steps are taken to address this: If a user's phase current is consistently zero, they are not considered a suspect for electricity theft. If a user's phase current was normal before a certain time, but after that time it becomes the minimum or zero current in another phase, the user is considered a suspect for electricity theft after that time. If a user's phase current was zero before a certain time, but after that time it remains normal and not zero, the user is not considered a suspect for electricity theft. If a dedicated transformer user's phase current consistently remains zero or at its minimum, the user is considered normal. Users with this type of data are calibrated using this method.
[0121] The summary module B10 is used to summarize abnormal user information daily, obtaining the abnormal duration, overall abnormal rate, abnormal description, and possible methods of electricity theft, and uploading it to the server for display. First, users are sorted by user and date. For every 96 data points (one every 15 minutes) measured daily, abnormal data is checked against a threshold. If a threshold is exceeded, the user is suspected of electricity theft, the abnormal user is located, and the abnormal data is extracted. The abnormal rate of the abnormal data is averaged to obtain the daily abnormal rate for each user. Next, abnormal descriptions are extracted from the abnormal data of abnormal users, separated by commas, to obtain the frequency of each abnormal description throughout the day. The abnormal descriptions are then sorted by frequency from highest to lowest and displayed in the daily summary data. The number of times abnormal data for each user occurs throughout the day is calculated; since each data point is measured every 15 minutes, the abnormal duration is obtained by multiplying the number of times abnormal data occurs by 15 minutes. The total electricity theft for abnormal users is obtained by summing the total electricity theft for the day. From a user's daily data, information related to user location, such as user ID, route segment identifier, and user name, is obtained. This, along with the aggregated anomaly rate, anomaly description, duration, and stolen electricity, yields daily summary data for abnormal users. Data with high anomaly rates but no anomaly descriptions is identified as abnormal user data, stored in another table in the database, and used to optimize the model.
[0122] The program portion of a technology can be considered a "product" or "artifact" existing in the form of executable code and / or related data, and is involved in or implemented through a computer-readable medium. Tangible, permanent storage media can include memory or storage used by any computer, processor, or similar device or related module. For example, various semiconductor memories, tape drives, disk drives, or any similar device capable of providing storage functionality for software.
[0123] All software, or parts thereof, may sometimes communicate via networks, such as the Internet or other communication networks. Such communication can load software from one computer device or processor to another. For example, loading software from a server or host computer of a video object detection device to a hardware platform of a computer environment, or another computer environment that implements the system, or a system with similar functionality related to providing the information needed for object detection. Therefore, another medium capable of transmitting software elements can also be used as a physical connection between local devices, such as light waves, radio waves, electromagnetic waves, etc., propagated through cables, fiber optic cables, or air. Physical media used for carrier waves, such as cables, wireless connections, or fiber optic cables, can also be considered as media carrying software. In this context, unless limited to tangible "storage" media, the term "readable medium" for a computer or machine refers to the medium involved in the execution of any instructions by the processor.
[0124] Specific examples are used in this article, but the above description is only to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. Those skilled in the art should understand that the various modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, and thus, they can be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any specific combination of hardware and software.
[0125] Furthermore, those skilled in the art will recognize that, based on the principles of this invention, there will be variations in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as limiting the invention.
Claims
1. A method for detecting abnormal electricity consumption by users, characterized in that, The detection method includes: Construct a training dataset; the training dataset includes several historical electricity consumption data points and the anomaly rate corresponding to the historical electricity consumption data; the anomaly rate represents the probability that the historical electricity consumption data is abnormal electricity consumption data; The historical electricity consumption data is used as the input to the anomaly rate prediction model, and the anomaly rate corresponding to the historical electricity consumption data is used as the target output of the anomaly rate prediction model. The anomaly rate prediction model is trained to obtain a trained anomaly rate prediction model. Electricity consumption data of the target user within any time period is collected and input into the trained anomaly rate prediction model to obtain the anomaly rate of the target user within that time period. If the abnormality rate of the target user is higher than the abnormality threshold during the time period, abnormal electricity consumption analysis is performed based on the electricity consumption data of the target user to obtain an abnormal electricity consumption description of the target user; the abnormal electricity consumption description includes at least one of undervoltage electricity theft, undercurrent electricity theft, phase shifting electricity theft, or other electricity theft methods; Constructing the training dataset specifically includes: Collect several sets of routine electricity consumption data; the routine electricity consumption data includes user-side current, user-side voltage, and user-side power within any time period. Normalize each set of regular electricity consumption data and calculate the corresponding imbalance rate data; the imbalance rate data includes: current imbalance rate, voltage imbalance rate and power imbalance rate; the power imbalance rate includes the power imbalance rate of phase A, the power imbalance rate of phase B and the power imbalance rate of phase C. Each set of regular electricity consumption data and the corresponding imbalance rate data are combined to form a historical electricity consumption data set. According to preset rules, each of the historical electricity consumption data is marked with a corresponding anomaly rate; After collecting electricity consumption data of the target user within any time period and inputting it into the trained anomaly rate prediction model to obtain the anomaly rate of the target user within that time period, the detection method further includes: Obtain the electricity consumption trend curve of the gateway where the target user is located; The electricity consumption trend curve of the target user is compared with the electricity consumption trend curve of the threshold, and the abnormality rate of the target user in the time period is corrected. If the corrected abnormality rate of the target user in the time period is higher than the abnormality threshold, abnormal electricity consumption analysis is performed based on the electricity consumption data of the target user to obtain the abnormal electricity consumption description of the target user.
2. The detection method according to claim 1, characterized in that, After collecting electricity consumption data of the target user within any time period and inputting it into the trained anomaly rate prediction model to obtain the anomaly rate of the target user within that time period, the detection method further includes: The abnormality rate prediction model, which has been trained, is used to predict the abnormality rate of the target user at various time periods on the same day. Based on the abnormality rate of the target user in each time period of the day, calculate the overall abnormality rate of the target user for the day; the overall abnormality rate is the average of the abnormality rates of the target user in each time period of the day. Based on the anomaly rate of the target user in each time period of the day, the continuous anomaly time of the target user on that day is determined; the continuous anomaly time on that day is the sum of multiple time periods in which the anomaly rate is higher than the anomaly threshold.
3. The detection method according to claim 2, characterized in that, After predicting the anomalous rate of the target user for each time period of the day using the trained anomalous rate prediction model, the detection method further includes: Obtain the historical electricity consumption of the target user in the past seven days, the same day last month, and the same day last year within the target time period; the target time period is any time period in which the anomaly rate is higher than the anomaly threshold. Based on the target user's historical electricity consumption during the target time period, the predicted electricity consumption of the target user during the target time period is obtained. Based on the predicted electricity consumption of the target user during the target time period and the actual meter reading of the target user during the target time period, the predicted electricity theft amount of the target user during the target time period is obtained; the actual meter reading is the electricity consumption of the target user during the target time period measured by the electricity meter.
4. The detection method according to claim 1, characterized in that, Calculate the imbalance rate corresponding to the regular electricity consumption data using the following formula: in, I _ XNX The current imbalance rate, U _ XNX Voltage imbalance rate, P _ BPH The power imbalance rate, A _ BPH for A Phase power imbalance rate, B _ BPH for B Phase power imbalance rate, C _ BPH for C Phase power imbalance rate, U lmax For maximum voltage, U lmin For minimum voltage, I lmax For the maximum current, I lmin Minimum current, PA for A Phase power, PB for B Phase power, PC for C Phase power, PZ This is the average of the three-phase power. UA for A Phase voltage, IA for A Phase current, UB for B Phase voltage, IB for B Phase current, UC for C Phase voltage, IC for C Phase current.
5. The detection method according to claim 1, characterized in that, The following formula is used to normalize the regular electricity consumption data: in, x’ For data that has undergone normalization, x The aforementioned routine electricity consumption data, x min This is the minimum value of the aforementioned regular electricity consumption data. x max This represents the maximum value of the aforementioned regular electricity consumption data.
6. The detection method according to claim 1, characterized in that, The step of marking the anomaly rate of each of the historical electricity consumption data according to preset rules specifically includes: Based on the user information corresponding to each of the historical electricity consumption data, an initial anomaly rate is set for each of the historical electricity consumption data. Anomalies in electricity consumption are analyzed based on user-side current, user-side voltage, user-side power, current imbalance rate, voltage imbalance rate, and power imbalance rate, and the anomaly rate of the historical electricity consumption data is updated.
7. The detection method according to claim 6, characterized in that, The step of setting an initial anomaly rate for each historical electricity consumption data point based on the user information corresponding to each historical electricity consumption data point specifically includes: For any historical electricity consumption data, determine whether the user corresponding to the historical electricity consumption data has had any abnormal electricity consumption in the past, and obtain a first determination result; If the first judgment result is negative, then the initial abnormality rate of the historical electricity consumption data is set to 0. If the first judgment result is yes, then the initial abnormality rate of the historical electricity consumption data is set to a value between 0 and 1.
8. A detection system for users with abnormal electricity consumption, characterized in that, For implementing the detection method as described in any one of claims 1-7, the detection system comprises: A dataset construction module is used to construct a training dataset; the training dataset includes several historical electricity consumption data points and the anomaly rate corresponding to the historical electricity consumption data; the anomaly rate represents the probability that the historical electricity consumption data is abnormal electricity consumption data; The model training module is used to train the anomaly rate prediction model using the training dataset to obtain the trained anomaly rate prediction model; the historical electricity consumption data is used as the input of the anomaly rate prediction model, and the anomaly rate corresponding to the historical electricity consumption data is used as the target output of the anomaly rate prediction model. An anomaly rate prediction module is used to collect electricity consumption data of a target user within any time period, input it into the trained anomaly rate prediction model, and obtain the anomaly rate of the target user within that time period. An abnormal electricity consumption description module is used to perform abnormal electricity consumption analysis based on the electricity consumption data of the target user when the abnormal rate of the target user in the time period is higher than the abnormal threshold, and obtain an abnormal electricity consumption description of the target user; the abnormal electricity consumption description includes at least one of undervoltage electricity theft, undercurrent electricity theft, phase shifting electricity theft, or other electricity theft methods.