Multi-model fusion abnormal power consumption behavior identification method and system
Through multi-model fusion method, including Pearson correlation coefficient screening and BP neural network/XGBoost model analysis, abnormal electricity use behaviors are identified and investigated, which solves the problem of difficulty in identifying power theft, and improves the use and detection efficiency and power system safety.
Patent Information
- Application Number
- CN202411293849.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to quickly and accurately identify and investigate abnormal electricity use behaviors such as electricity theft, which has caused power companies and residents to face economic losses and security threats, and the high-level electricity theft method has increased the difficulty of procuratorial.
The multi-model fusion method is used to receive and preprocess the power consumption data, calculate the Pearson correlation coefficient, filter users with suspected abnormalities, and use BP neural network and XGBoost model to analyze the power consumption characteristics, and perform secondary detection to identify abnormal power consumption behavior.
It has achieved rapid and accurate mining of the electricity usage rules of abnormal electricity users, improved the work efficiency of inspectors, and ensured the safe and stable operation of the power system.
Smart Images

Figure CN119167269A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a multi-model fusion abnormal power consumption behavior identification method and system. Background Art
[0002] Abnormal electricity usage includes electricity theft, meter failure, billing errors, etc. The main source is electricity theft. With the rapid increase in electricity demand in my country, abnormal electricity usage also occurs from time to time, which not only causes huge economic losses to power companies, but also threatens the personal safety and normal electricity use of residents.
[0003] In recent years, electricity theft has gradually transformed into a high-level theft method with intelligent instruments and professional means, which has brought great difficulties to the on-site inspection personnel's investigation work. Summary of the invention
[0004] In order to solve the deficiencies mentioned in the above background technology, the purpose of the present invention is to provide a multi-model fusion abnormal electricity consumption behavior identification method and system, which can quickly and accurately dig out the electricity consumption patterns of abnormal electricity users and effectively improve the work efficiency of inspection personnel.
[0005] In the first aspect, the purpose of the present invention can be achieved by the following technical solution: a multi-model fusion abnormal power consumption behavior identification method, the method comprising the following steps:
[0006] Receiving power consumption data, preprocessing the power consumption data, and obtaining processed power consumption data, wherein the power consumption data includes: daily power consumption and daily line loss power data of users with abnormal power consumption tags;
[0007] Calculate the Pearson correlation coefficient corresponding to each processed electricity consumption data, set the screening conditions, screen the Pearson correlation coefficients, and use the processed electricity consumption data corresponding to the screened Pearson correlation coefficients as the electricity consumption data of suspected abnormal users;
[0008] Extract the numerical features of daily electricity consumption data in the processed electricity consumption data, input the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model, output the suspected abnormal electricity consumption probability, screen the suspected abnormal electricity consumption probability, and use the processed electricity consumption data corresponding to the screened abnormal electricity consumption probability as the suspected abnormal electricity consumption identification result;
[0009] The electricity consumption data of the suspected abnormal users and the suspected abnormal electricity consumption user numbers corresponding to the suspected abnormal electricity consumption identification results are subjected to secondary inspection.
[0010] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: the process of preprocessing the electricity consumption data includes: missing value interpolation, outlier processing and data normalization.
[0011] In combination with the first aspect, in some implementations of the first aspect, the method further includes: a calculation process of the missing value interpolation:
[0012]
[0013] Where f(x i ) is the power consumption at the i-th time point after filling, x i To fill the electricity consumption at the previous i-th time point, NaN is the missing value;
[0014] The calculation process of outlier processing:
[0015]
[0016] Where x is the real power consumption vector, is the average value of electricity consumption, σ is the standard deviation, and when the electricity consumption data measured at time i does not satisfy the Gaussian distribution, the measured value at time i is adopted Filling
[0017] The calculation process of data normalization:
[0018]
[0019] Where min(x) and max(x) represent the minimum and maximum power consumption of the user, respectively. x′ is the normalized power consumption data.
[0020] In combination with the first aspect, in some implementations of the first aspect, the method further includes: calculating the Pearson correlation coefficient r corresponding to each processed power consumption data xy The calculation process is as follows:
[0021]
[0022] Where n is the number of observation samples in a certain measurement period, x i (y i )and are the observed values and means of the two variables respectively.
[0023] In combination with the first aspect, in some implementations of the first aspect, the method further includes: setting a screening condition, wherein the screening condition for screening the Pearson correlation coefficient is:
[0024] Set the Pearson correlation coefficient threshold;
[0025] If the Pearson correlation coefficient is greater than the Pearson correlation coefficient threshold or the Pearson correlation coefficient is a missing value NaN, the corresponding processed power consumption data is used as the power consumption data of the suspected abnormal user.
[0026] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the numerical features of the daily power consumption data in the extracted power consumption data include:
[0027] Basic attribute characteristics and cumulative statistical characteristics. Basic attribute characteristics refer to the statistical characteristics of all records of electricity consumption attributes of each user ID, including maximum value, minimum value, mean, standard deviation, median and mode; cumulative statistical characteristics describe the fluctuation of user electricity consumption over a long period of time, including the number of abnormal points exceeding 2 times the standard deviation, the number of abnormal points exceeding 3 times the standard deviation, kurtosis, skewness, variance, range and coefficient of variation.
[0028] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the process of inputting the numerical features of the daily electricity consumption data into the pre-established BP neural network model and the XGBoost model:
[0029] The objective function of the BP neural network model is as follows:
[0030]
[0031] Where N is the number of samples, y i is the label of the sample, p i The probability of predicting a positive value for a sample;
[0032] The objective function of the XGBoost model is as follows:
[0033]
[0034] Where l is the loss function, which is used to measure the degree of fit of the model to the training data; Ω is the regularization term, which is used to measure the complexity of the model; T is the number of leaf nodes, and ω is the score of leaf nodes;
[0035] Calculate the output and get the probability p ANN ,p XGB , p ANN ,p XGB As the probability of suspected abnormal electricity usage.
[0036] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: the screening process of the suspected abnormal power usage probability is performed by setting a suspected abnormal power usage probability threshold. If the suspected abnormal power usage probability is greater than the suspected abnormal power usage probability threshold, the processed power usage data corresponding to the suspected abnormal power usage probability is used as the suspected abnormal power usage identification result.
[0037] In a second aspect, in order to achieve the above-mentioned purpose, the present invention discloses a multi-model fusion abnormal electricity consumption behavior identification system, comprising:
[0038] A data processing module is used to receive power consumption data, pre-process the power consumption data, and obtain processed power consumption data, wherein the power consumption data includes: daily power consumption and daily line loss power data of users with abnormal power consumption tags;
[0039] The coefficient screening module is used to calculate the Pearson correlation coefficient corresponding to each processed power consumption data, set the screening conditions, screen the Pearson correlation coefficient, and use the processed power consumption data corresponding to the screened Pearson correlation coefficient as the power consumption data of suspected abnormal users;
[0040] The probability screening module is used to extract the numerical features of daily electricity consumption data in the processed electricity consumption data, input the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model, output the suspected abnormal electricity consumption probability, screen the suspected abnormal electricity consumption probability, and use the processed electricity consumption data corresponding to the screened abnormal electricity consumption probability as the suspected abnormal electricity consumption identification result;
[0041] The secondary detection module is used to perform secondary detection on the electricity consumption data of the suspected abnormal users and the suspected abnormal electricity consumption user numbers corresponding to the suspected abnormal electricity consumption identification results.
[0042] In combination with the second aspect, in some implementations of the second aspect, the system further includes: the process of preprocessing the power consumption data in the data processing module includes: missing value interpolation, outlier processing and data normalization
[0043] Or the calculation process of missing value interpolation in the data processing module:
[0044]
[0045] Where f(x i ) is the power consumption at the i-th time point after filling, x i To fill the electricity consumption at the previous i-th time point, NaN is the missing value;
[0046] The calculation process of outlier processing:
[0047]
[0048] Where x is the real power consumption vector, is the average value of electricity consumption, σ is the standard deviation, and when the electricity consumption data measured at time i does not satisfy the Gaussian distribution, the measured value at time i is adopted Filling
[0049] The calculation process of data normalization:
[0050]
[0051] Where min(x) and max(x) represent the minimum and maximum power consumption of the user respectively; x′ is the normalized power consumption data.
[0052] Or calculate the Pearson correlation coefficient r corresponding to each processed electricity consumption data in the coefficient screening module xy The calculation process is as follows:
[0053]
[0054] Where n is the number of observation samples in a certain measurement period, x i (y i )and are the observed values and means of the two variables respectively;
[0055] Or set the screening conditions in the coefficient screening module. The screening conditions for the Pearson correlation coefficient are:
[0056] Set the Pearson correlation coefficient threshold;
[0057] If the Pearson correlation coefficient is greater than the Pearson correlation coefficient threshold or the Pearson correlation coefficient is a missing value NaN, the corresponding processed power consumption data is used as the power consumption data of suspected abnormal users;
[0058] The numerical features of daily power consumption data in the power consumption data extracted and processed in the probability screening module include:
[0059] Basic attribute characteristics and cumulative statistical characteristics. Basic attribute characteristics refer to the statistical characteristics of all records of electricity consumption attributes of each user ID, including maximum value, minimum value, mean, standard deviation, median and mode; cumulative statistical characteristics describe the fluctuation of electricity consumption of users over a long period of time, including the number of abnormal points exceeding 2 times the standard deviation, the number of abnormal points exceeding 3 times the standard deviation, kurtosis, skewness, variance, range and coefficient of variation;
[0060] The process of inputting the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model in the probability screening module:
[0061] The objective function of the BP neural network model is as follows:
[0062]
[0063] Where N is the number of samples, y i is the label of the sample, p i The probability of predicting a positive value for a sample;
[0064] The objective function of the XGBoost model is as follows:
[0065]
[0066] Where l is the loss function, which is used to measure the degree of fit of the model to the training data; Ω is the regularization term, which is used to measure the complexity of the model; T is the number of leaf nodes, and ω is the score of leaf nodes;
[0067] Calculate the output and get the probability p ANN ,p XGB , p ANN ,p XGB As the probability of suspected abnormal power consumption;
[0068] The screening process of the suspected abnormal power usage probability in the probability screening module is carried out by setting a suspected abnormal power usage probability threshold. If the suspected abnormal power usage probability is greater than the suspected abnormal power usage probability threshold, the processed power usage data corresponding to the suspected abnormal power usage probability is used as the suspected abnormal power usage identification result.
[0069] Beneficial effects of the present invention:
[0070] The present invention analyzes electricity consumption data through a variety of model means, which can quickly and accurately mine the electricity consumption patterns of abnormal electricity users, effectively improve the work efficiency of users and inspectors, and ensure the safe and stable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0072] Figure 1 It is a schematic flow chart of the method of the present invention;
[0073] Figure 2 This is a graph of the Pearson test results of the present invention;
[0074] Figure 3 Schematic diagram of the confusion matrix of the present invention;
[0075] Figure 4 This is a comparison chart of the detection effect of the model proposed in the present invention and the AUC scores of other models;
[0076] Figure 5 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] Embodiment 1:
[0079] The following is an introduction to the relevant terms involved in the embodiments of the present application:
[0080] Pearson correlation coefficient: Pearson correlation coefficient (Pearson Correlation Coefficient), usually expressed as r, is a statistic used to measure the strength and direction of the linear relationship between two quantitative variables. Its value range is -1 to 1, where: r = 1 indicates a completely positive linear relationship; r = -1 indicates a completely negative linear relationship; r = 0 indicates no linear relationship.
[0081] BP neural network: BP neural network is a multi-layer feedforward network trained by error back propagation (abbreviated as error back propagation). Its algorithm is called BP algorithm. Its basic idea is gradient descent method, which uses gradient search technology to minimize the mean square error between the actual output value and the expected output value of the network.
[0082] like Figure 1 As shown, a multi-model fusion abnormal power consumption behavior identification method is characterized in that the method includes the following steps:
[0083] Receiving power consumption data, preprocessing the power consumption data, and obtaining processed power consumption data, wherein the power consumption data includes: daily power consumption and daily line loss power data of users with abnormal power consumption tags;
[0084] The process of preprocessing electricity consumption data includes: missing value interpolation, outlier processing and data normalization;
[0085] The calculation process of missing value interpolation is as follows:
[0086]
[0087] Where f(x i ) is the power consumption at the i-th time point after filling, x i To fill the electricity consumption at the previous i-th time point, NaN is the missing value;
[0088] The calculation process of outlier processing:
[0089]
[0090] where \(x\) is the actual power consumption vector, is the average value of power consumption, \(\sigma\) is the standard deviation. When the measured power consumption data at time \(i\) does not satisfy the Gaussian distribution, the measured value at time \(i\) is filled with ;
[0091] Calculation process of data normalization:
[0092]
[0093] where \(\min(x)\) and \(\max(x)\) represent the minimum and maximum values of the user's power consumption respectively. \(x'\) is the normalized power consumption data.
[0094] Calculate the Pearson correlation coefficient corresponding to each processed power consumption data, set the screening conditions, and screen the Pearson correlation coefficient. The processed power consumption data corresponding to the screened Pearson correlation coefficient is used as the power consumption data of the suspected abnormal user;
[0095] Calculate the Pearson correlation coefficient \(r\) corresponding to each processed power consumption data xy The calculation process is as follows:
[0096]
[0097] where \(n\) is the number of observation samples in a certain measurement period, \(x\) i (y i ) and are the observed values and means of two variables respectively.
[0098] Set the screening conditions. The screening conditions for screening the Pearson correlation coefficient are:
[0099] Set the Pearson correlation coefficient threshold;
[0100] If the Pearson correlation coefficient is greater than the Pearson correlation coefficient threshold or the Pearson correlation coefficient is the missing value NaN, the corresponding processed power consumption data is used as the power consumption data of the suspected abnormal user.
[0101] In this embodiment:
[0102] Generally defined as
[0103] 0.8 < r ≤ 1.0, extremely strong correlation; 0.6 < r ≤ 0.8, strong correlation; 0.4 < r ≤ 0.6, medium correlation;
[0104] 0.2 < r ≤ 0.4, weak correlation; 0.0 ≤ r ≤ 0.2, extremely weak correlation or no correlation.
[0105] When \(r\) xy is higher than 0.6 or \(r\) xyWhen it is NaN, it is judged that the user may have abnormal electricity consumption behavior. xy When it is NaN, it means that the user's electricity consumption during the selected abnormal electricity consumption period is 0, so it is necessary to check whether there is electricity theft or meter failure.
[0106] Extract the numerical features of daily electricity consumption data in the processed electricity consumption data, input the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model, output the suspected abnormal electricity consumption probability, screen the suspected abnormal electricity consumption probability, and use the processed electricity consumption data corresponding to the screened abnormal electricity consumption probability as the suspected abnormal electricity consumption identification result;
[0107] The numerical features of daily power consumption data in the extracted and processed power consumption data include:
[0108] Basic attribute characteristics and cumulative statistical characteristics. Basic attribute characteristics refer to the statistical characteristics of all records of electricity consumption attributes of each user ID, including maximum value, minimum value, mean, standard deviation, median and mode; cumulative statistical characteristics describe the fluctuation of user electricity consumption over a long period of time, including the number of abnormal points exceeding 2 times the standard deviation, the number of abnormal points exceeding 3 times the standard deviation, kurtosis, skewness, variance, range and coefficient of variation.
[0109] The formula for calculating the coefficient of variation is:
[0110]
[0111] In the formula, std is the standard deviation and mean is the mean.
[0112] Kurtosis can be used to measure the steepness of the probability distribution of a random variable. The calculation formula is as follows:
[0113]
[0114] In the formula is the mean value, and std is the standard deviation. The range of kurtosis is [1, +∞). The kurtosis value of data that completely obeys the normal distribution is 3. The larger the kurtosis value, the higher and sharper the probability distribution graph is, and the smaller the kurtosis value, the shorter and fatter it is. Therefore, the abnormal power consumption characteristics can be analyzed by counting the power consumption kurtosis greater than 3.
[0115] Skewness can be used to measure the asymmetry of the probability distribution of a random variable. The calculation formula is as follows:
[0116]
[0117] When the skewness is <0, the probability distribution graph is skewed to the left. When the skewness is 0, it means that the data is relatively evenly distributed on both sides of the mean value, not necessarily an absolutely symmetrical distribution. When the skewness is >0, the probability distribution graph is skewed to the right. Therefore, we can judge whether there is an abnormality by comparing the degree to which the absolute value of the skewness is greater than 0.
[0118] The process of inputting the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model:
[0119] The objective function of the BP neural network model is as follows:
[0120]
[0121] Where N is the number of samples, y i is the label of the sample, p i The probability of predicting a positive value for a sample;
[0122] The objective function of the XGBoost model is as follows:
[0123]
[0124] Where l is the loss function, which is used to measure the degree of fit of the model to the training data; Ω is the regularization term, which is used to measure the complexity of the model; T is the number of leaf nodes, and ω is the score of leaf nodes;
[0125] Calculate the output and get the probability p ANN ,p XGB , p ANN ,p XGB As the probability of suspected abnormal electricity usage.
[0126] The model uses confusion matrix as the evaluation criterion. The confusion matrix is shown in Table 1, where True Positive (TP) represents the number of samples correctly predicted as positive examples, False Positive (FP) represents the number of samples incorrectly predicted as positive examples, False Negative (FN) represents the number of samples incorrectly predicted as negative examples, and True Negative (TN) represents the number of samples correctly predicted as negative examples.
[0127] The electricity consumption data of the suspected abnormal users and the suspected abnormal electricity consumption user numbers corresponding to the suspected abnormal electricity consumption identification results are subjected to secondary inspection.
[0128] In this embodiment, r xy Users with r above 0.6 or xy is NaN, p ANN and p XGB User numbers above 0.5 are summarized and await secondary inspection by the power supply company.
[0129] Specifically, the present invention is further described below by way of embodiments:
[0130] The artificial intelligence model was trained using the time series data related to user electricity consumption, and the electricity consumption records of 42,372 users were recorded from January 1, 2014 to October 31, 2016. Among them, 3,615 users were identified as abnormal electricity users through offline staff investigation, and the rest were users who were not marked as abnormal electricity users.
[0131] The model uses a confusion matrix for performance evaluation. In the confusion matrix, TruePositive (TP) represents the number of samples correctly predicted as positive examples, False Positive represents the number of samples incorrectly predicted as positive examples, FalseNegative (FN) represents the number of samples incorrectly predicted as negative examples, and TrueNegative represents the number of samples correctly predicted as negative examples. The ROC curve is a curve with FPR and TPR as axes. The ordinate is the true positive rate TPR = TP / P, where P is the number of positive samples, and the abscissa is the false positive rate FPR = FP / N, where N is the number of true negative samples. The larger the area enclosed by the ROC curve and the FPR axis (i.e., AUC), the better the classification performance of the model. The confusion matrix is as follows: Figure 3 shown.
[0132] Figure 4 The AUC-ROC scores of the ANN and XGBoost models on the test set are shown. It can be seen that the AUC scores of the two models are similar and both have relatively high accuracy, indicating that the two proposed artificial intelligence models can effectively distinguish between normal and abnormal electricity users.
[0133] Embodiment 2: In the second aspect, as Figure 5 As shown, in order to achieve the above-mentioned purpose, the present invention discloses a multi-model fusion abnormal electricity consumption behavior identification system, comprising:
[0134] A data processing module is used to receive power consumption data, pre-process the power consumption data, and obtain processed power consumption data, wherein the power consumption data includes: daily power consumption and daily line loss power data of users with abnormal power consumption tags;
[0135] The coefficient screening module is used to calculate the Pearson correlation coefficient corresponding to each processed power consumption data, set the screening conditions, screen the Pearson correlation coefficient, and use the processed power consumption data corresponding to the screened Pearson correlation coefficient as the power consumption data of suspected abnormal users;
[0136] The probability screening module is used to extract the numerical features of daily electricity consumption data in the processed electricity consumption data, input the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model, output the suspected abnormal electricity consumption probability, screen the suspected abnormal electricity consumption probability, and use the processed electricity consumption data corresponding to the screened abnormal electricity consumption probability as the suspected abnormal electricity consumption identification result;
[0137] The secondary detection module is used to perform secondary detection on the electricity consumption data of the suspected abnormal user and the suspected abnormal electricity consumption user number corresponding to the suspected abnormal electricity consumption identification result.
[0138] In combination with the second aspect, in some implementations of the second aspect, the system further includes: the process of preprocessing the power consumption data in the data processing module includes: missing value interpolation, outlier processing and data normalization
[0139] Or the calculation process of missing value interpolation in the data processing module:
[0140]
[0141] Where f(x i ) is the power consumption at the i-th time point after filling, x i To fill the electricity consumption at the previous i-th time point, NaN is the missing value;
[0142] The calculation process of outlier processing:
[0143]
[0144] Where x is the real power consumption vector, is the average value of electricity consumption, σ is the standard deviation, and when the electricity consumption data measured at time i does not satisfy the Gaussian distribution, the measured value at time i is adopted Filling
[0145] The calculation process of data normalization:
[0146]
[0147] Where min(x) and max(x) represent the minimum and maximum power consumption of the user respectively; x′ is the normalized power consumption data.
[0148] Or calculate the Pearson correlation coefficient r corresponding to each processed electricity consumption data in the coefficient screening module xy The calculation process is as follows:
[0149]
[0150] Where n is the number of observation samples in a certain measurement period, x i(y i )and are the observed values and means of the two variables respectively;
[0151] Or set the screening conditions in the coefficient screening module. The screening conditions for the Pearson correlation coefficient are:
[0152] Set the Pearson correlation coefficient threshold;
[0153] If the Pearson correlation coefficient is greater than the Pearson correlation coefficient threshold or the Pearson correlation coefficient is a missing value NaN, the corresponding processed power consumption data is used as the power consumption data of suspected abnormal users;
[0154] The numerical features of daily power consumption data in the power consumption data extracted and processed in the probability screening module include:
[0155] Basic attribute characteristics and cumulative statistical characteristics. Basic attribute characteristics refer to the statistical characteristics of all records of electricity consumption attributes of each user ID, including maximum value, minimum value, mean, standard deviation, median and mode; cumulative statistical characteristics describe the fluctuation of electricity consumption of users over a long period of time, including the number of abnormal points exceeding 2 times the standard deviation, the number of abnormal points exceeding 3 times the standard deviation, kurtosis, skewness, variance, range and coefficient of variation;
[0156] The process of inputting the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model in the probability screening module:
[0157] The objective function of the BP neural network model is as follows:
[0158]
[0159] Where N is the number of samples, y i is the label of the sample, p i The probability of predicting a positive value for a sample;
[0160] The objective function of the XGBoost model is as follows:
[0161]
[0162] Where l is the loss function, which is used to measure the degree of fit of the model to the training data; Ω is the regularization term, which is used to measure the complexity of the model; T is the number of leaf nodes, and ω is the score of leaf nodes;
[0163] Calculate the output and get the probability p ANN ,p XGB , p ANN ,p XGB As the probability of suspected abnormal power consumption;
[0164] The screening process of the suspected abnormal power usage probability in the probability screening module is carried out by setting a suspected abnormal power usage probability threshold. If the suspected abnormal power usage probability is greater than the suspected abnormal power usage probability threshold, the processed power usage data corresponding to the suspected abnormal power usage probability is used as the suspected abnormal power usage identification result.
[0165] Based on the same inventive concept, the present invention also provides a computer device, which includes: one or more processors, and a memory for storing one or more computer programs; the program includes program instructions, and the processor is used to execute the program instructions stored in the memory. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is used to implement one or more instructions, specifically for loading and executing one or more instructions in a computer storage medium to implement the above method.
[0166] It needs to be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to execute the above method. The storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electrical, magnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0167] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0168] The above shows and describes the basic principles, main features and advantages of the present disclosure. Those skilled in the art should understand that the present disclosure is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present disclosure. Without departing from the spirit and scope of the present disclosure, the present disclosure may have various changes and improvements, and these changes and improvements fall within the scope of the present disclosure to be protected.
Claims
1. A multi-model fusion abnormal electricity consumption behavior identification method, characterized in that: The method comprises the following steps: Receiving power consumption data, preprocessing the power consumption data, and obtaining processed power consumption data, wherein the power consumption data includes: daily power consumption and daily line loss power data of users with abnormal power consumption tags; Calculate the Pearson correlation coefficient corresponding to each processed electricity consumption data, set the screening conditions, screen the Pearson correlation coefficients, and use the processed electricity consumption data corresponding to the screened Pearson correlation coefficients as the electricity consumption data of suspected abnormal users; Extract the numerical features of daily electricity consumption data in the processed electricity consumption data, input the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model, output the suspected abnormal electricity consumption probability, screen the suspected abnormal electricity consumption probability, and use the processed electricity consumption data corresponding to the screened abnormal electricity consumption probability as the suspected abnormal electricity consumption identification result; The electricity consumption data of the suspected abnormal users and the suspected abnormal electricity consumption user numbers corresponding to the suspected abnormal electricity consumption identification results are subjected to secondary inspection.
2. According to claim 1, a multi-model fusion abnormal power consumption behavior identification method is characterized in that: The process of preprocessing the electricity consumption data includes: missing value interpolation, outlier processing and data normalization.
3. The multi-model fusion abnormal power consumption behavior identification method according to claim 2 is characterized in that: The calculation process of missing value interpolation is as follows: Where f(x i ) is the power consumption at the i-th time point after filling, x i To fill the electricity consumption at the previous i-th time point, NaN is the missing value; The calculation process of outlier processing: Where x is the real power consumption vector, is the average value of electricity consumption, σ is the standard deviation, and when the electricity consumption data measured at time i does not satisfy the Gaussian distribution, the measured value at time i is adopted Filling The calculation process of data normalization: Where min(x) and max(x) represent the minimum and maximum power consumption of the user, respectively, and x′ is the normalized power consumption data.
4. The multi-model fusion abnormal power consumption behavior identification method according to claim 1 is characterized in that: The Pearson correlation coefficient r corresponding to each processed electricity consumption data is calculated xy The calculation process is as follows: Where n is the number of observation samples in a certain measurement period, x i (y i )and are the observed values and means of the two variables respectively.
5. The multi-model fusion abnormal power consumption behavior identification method according to claim 1 is characterized in that: The screening conditions for setting the Pearson correlation coefficient are: Set the Pearson correlation coefficient threshold; If the Pearson correlation coefficient is greater than the Pearson correlation coefficient threshold or the Pearson correlation coefficient is a missing value NaN, the corresponding processed power consumption data is used as the power consumption data of the suspected abnormal user.
6. The multi-model fusion abnormal power consumption behavior identification method according to claim 1 is characterized in that: The numerical features of the daily power consumption data in the extracted power consumption data include: Basic attribute characteristics and cumulative statistical characteristics. Basic attribute characteristics refer to the statistical characteristics of all records of electricity consumption attributes of each user ID, including maximum value, minimum value, mean, standard deviation, median and mode; cumulative statistical characteristics describe the fluctuation of user electricity consumption over a long period of time, including the number of abnormal points exceeding 2 times the standard deviation, the number of abnormal points exceeding 3 times the standard deviation, kurtosis, skewness, variance, range and coefficient of variation.
7. The multi-model fusion abnormal power consumption behavior identification method according to claim 1 is characterized in that: The process of inputting the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model: The objective function of the BP neural network model is as follows: Where N is the number of samples, y i is the label of the sample, p i The probability of predicting a positive value for a sample; The objective function of the XGBoost model is as follows: Where l is the loss function, which is used to measure the degree of fit of the model to the training data; Ω is the regularization term, which is used to measure the complexity of the model; T is the number of leaf nodes, and ω is the score of leaf nodes; Calculate the output and get the probability p ANN ,p XGB , p ANN ,p XGB As the probability of suspected abnormal electricity usage.
8. The multi-model fusion abnormal power consumption behavior identification method according to claim 1 is characterized in that: The screening process of the suspected abnormal power usage probability is performed by setting a suspected abnormal power usage probability threshold. If the suspected abnormal power usage probability is greater than the suspected abnormal power usage probability threshold, the processed power usage data corresponding to the suspected abnormal power usage probability is used as the suspected abnormal power usage identification result.
9. A multi-model fusion abnormal electricity consumption behavior identification system, characterized in that: include: A data processing module is used to receive power consumption data, pre-process the power consumption data, and obtain processed power consumption data, wherein the power consumption data includes: daily power consumption and daily line loss power data of users with abnormal power consumption tags; The coefficient screening module is used to calculate the Pearson correlation coefficient corresponding to each processed power consumption data, set the screening conditions, screen the Pearson correlation coefficient, and use the processed power consumption data corresponding to the screened Pearson correlation coefficient as the power consumption data of suspected abnormal users; The probability screening module is used to extract the numerical features of daily electricity consumption data in the processed electricity consumption data, input the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model, output the suspected abnormal electricity consumption probability, screen the suspected abnormal electricity consumption probability, and use the processed electricity consumption data corresponding to the screened abnormal electricity consumption probability as the suspected abnormal electricity consumption identification result; The secondary detection module is used to perform secondary detection on the electricity consumption data of the suspected abnormal users and the suspected abnormal electricity consumption user numbers corresponding to the suspected abnormal electricity consumption identification results.
10. The multi-model fusion abnormal power consumption behavior identification system according to claim 9, characterized in that: The process of preprocessing the electricity consumption data in the data processing module includes: missing value interpolation, outlier processing and data normalization Or the calculation process of missing value interpolation in the data processing module: Where f(x i ) is the power consumption at the i-th time point after filling, x i To fill the electricity consumption at the previous i-th time point, NaN is the missing value; The calculation process of outlier processing: Where x is the real power consumption vector, is the average value of electricity consumption, σ is the standard deviation, and when the electricity consumption data measured at time i does not satisfy the Gaussian distribution, the measured value at time i is adopted Filling The calculation process of data normalization: Where min(x) and max(x) represent the minimum and maximum power consumption of the user respectively; x′ is the normalized power consumption data; Or calculate the Pearson correlation coefficient r corresponding to each processed electricity consumption data in the coefficient screening module xy The calculation process is as follows: Where n is the number of observation samples in a certain measurement period, x i (y i )and are the observed values and means of the two variables respectively; Or set the screening conditions in the coefficient screening module. The screening conditions for the Pearson correlation coefficient are: Set the Pearson correlation coefficient threshold; If the Pearson correlation coefficient is greater than the Pearson correlation coefficient threshold or the Pearson correlation coefficient is a missing value NaN, the corresponding processed power consumption data is used as the power consumption data of suspected abnormal users; The numerical features of daily power consumption data in the power consumption data extracted and processed in the probability screening module include: Basic attribute characteristics and cumulative statistical characteristics. Basic attribute characteristics refer to the statistical characteristics of all records of electricity consumption attributes of each user ID, including maximum value, minimum value, mean, standard deviation, median and mode; cumulative statistical characteristics describe the fluctuation of electricity consumption of users over a long period of time, including the number of abnormal points exceeding 2 times the standard deviation, the number of abnormal points exceeding 3 times the standard deviation, kurtosis, skewness, variance, range and coefficient of variation; The process of inputting the numerical features of daily electricity consumption data into the pre-established BP neural network model and XGBoost model in the probability screening module: The objective function of the BP neural network model is as follows: Where N is the number of samples, y i is the label of the sample, p i The probability of predicting a positive value for a sample; The objective function of the XGBoost model is as follows: Where l is the loss function, which is used to measure the degree of fit of the model to the training data; Ω is the regularization term, which is used to measure the complexity of the model; T is the number of leaf nodes, and ω is the score of leaf nodes; Calculate the output and get the probability p ANN ,p XGB , p ANN ,p XGB As the probability of suspected abnormal power consumption; The screening process of the suspected abnormal power usage probability in the probability screening module is carried out by setting a suspected abnormal power usage probability threshold. If the suspected abnormal power usage probability is greater than the suspected abnormal power usage probability threshold, the processed power usage data corresponding to the suspected abnormal power usage probability is used as the suspected abnormal power usage identification result.
