An abnormal power consumption detection method based on power consumption trend quantification network
By constructing an abnormal electricity consumption detection model based on an electricity consumption trend quantification network, the performance degradation problem of existing models in unknown scenarios is solved, cross-domain detection capability is improved, and the accuracy and reliability of abnormal electricity consumption detection are enhanced.
Patent Information
- Application Number
- CN202310740549.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-06-20
AI Technical Summary
Existing abnormal electricity consumption detection models show significant performance degradation in unknown scenarios, lack cross-domain generalization ability, and are difficult to adapt to differences in electricity consumption behavior across different regions, times, and user types.
An abnormal electricity consumption detection model based on an electricity consumption trend quantization network is constructed, including an electricity consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network. The electricity consumption trend change information is extracted by dividing the time-of-use electricity consumption by the same period last year. The quantization network layer solves the problem of excessively large data range, and the normalization layer retains the time period information of the electricity consumption data. Finally, the model is trained with the goal of minimizing the classification loss.
It achieves excellent cross-domain detection capabilities in unknown scenarios, eliminates the need for manual extraction of electricity consumption features, and can capture abnormal electricity consumption information that is not related to the domain, thereby improving the accuracy and reliability of the detection model.
Smart Images

Figure CN116861306B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electricity consumption behavior analysis technology, and more specifically, relates to an abnormal electricity consumption detection method based on an electricity consumption trend quantification network. Background Technology
[0002] Anomaly detection is a crucial support for the safe operation of the power grid. During grid operation, metering equipment malfunctions and user electricity theft can prevent power grid companies from collecting accurate user electricity consumption data, resulting in anomaly data. Anomalies affect grid dispatching and power supply security, causing significant economic losses to the power sector. Therefore, effectively detecting anomalies using the high-precision, fine-granularity user electricity consumption data collected by smart grids is of great importance. By proactively identifying anomalies, timely repairs to faulty metering devices or penalties for electricity theft can be implemented, reducing power losses and ensuring the safe operation of the power grid.
[0003] Data-driven abnormal electricity consumption detection technology analyzes large amounts of electricity consumption data to identify patterns and characteristics of abnormal electricity use, thereby enabling the detection and identification of abnormal electricity consumption. While many data-driven studies have focused on improving the accuracy and reliability of abnormal electricity consumption detection, these studies primarily validate and test against single data sources, neglecting the detection challenges in unknown scenarios. Electricity consumption behaviors vary significantly across different regions, times, and user types. Training user-specific detectors is extremely resource-intensive and impractical, while training general-purpose detectors inevitably requires considering the distribution differences between the target user data and the training set. Most existing general-purpose detector models assume that the training and test sets are identically distributed, resulting in insufficient generalization ability in unknown scenarios.
[0004] Existing data-driven methods for detecting abnormal electricity consumption can be mainly divided into machine learning methods and deep learning methods. Machine learning methods mostly require manual feature extraction, followed by processing using algorithms such as clustering, outlier detection, and classification to ultimately identify users with abnormal electricity consumption. The extracted features are highly correlated with the current training set data distribution; when the data distribution changes, previously extracted features become invalid, lacking good cross-domain generalization ability. Deep learning methods have strong data modeling and representation capabilities, better uncovering the intrinsic relationships and patterns between data, and do not rely on manual modeling. However, current research is often limited to specific user detection or detection within the same user domain, failing to consider the performance degradation problem when the model crosses domains.
[0005] Therefore, studying how to improve the cross-domain generalization ability of abnormal power consumption detection models can help improve the practical application effect of abnormal power consumption detection and provide strong support and guarantee for the safe and stable operation and intelligent development of the power system. Summary of the Invention
[0006] To address the shortcomings and improvement needs of existing technologies, this invention provides an abnormal electricity consumption detection method based on an electricity consumption trend quantification network. Its purpose is to solve the technical problem that existing abnormal electricity consumption detection models suffer significant performance degradation in unknown scenarios.
[0007] To achieve the above objectives, in a first aspect, the present invention provides a method for constructing an abnormal electricity consumption detection model based on an electricity consumption trend quantification network, comprising the following steps:
[0008] Obtain time-series electricity consumption data for N consecutive days and label it to serve as a training sample set; where N is an integer greater than or equal to 2.
[0009] An abnormal electricity consumption detection model is constructed, comprising an electricity consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network. The electricity consumption trend information extraction layer divides the daily sampling data in the training sample set by the sampling data at the same time over N days to obtain a three-dimensional array. The quantization network layer calculates the m quantiles of all data in the three-dimensional array and calculates the distance between each data point and each quantile, obtaining m distance values for each data point. These distance values are then mapped to n quantization intervals using a neural network, and soft-argmax is used to obtain the quantization result for each data point. The normalization layer normalizes the data in the training sample set; where n is the quantization level of the quantization network layer.
[0010] The quantization result and the normalization result are combined and input into the deep time series classification network, and the abnormal power consumption detection model is trained with the goal of minimizing the classification loss.
[0011] Furthermore, in the process of obtaining the three-dimensional array, when it is necessary to divide by the sampling data of the same moment in each day thereafter, it is directly filled with 1.
[0012] Furthermore, before the quantization network layer obtains the m quantiles of all data in the three-dimensional array, the method further includes: discarding the last row of data in the three-dimensional array and inputting the reduced three-dimensional array into the quantization network layer.
[0013] Secondly, the present invention provides an abnormal electricity consumption detection method based on an electricity consumption trend quantification network, comprising: inputting the time-series data of the electricity consumption to be detected into an abnormal electricity consumption detection model constructed using the construction method of the abnormal electricity consumption detection model based on the electricity consumption trend quantification network described in the first aspect, and outputting the detection result.
[0014] Thirdly, the present invention provides a device for constructing an abnormal electricity consumption detection model based on an electricity consumption trend quantification network, comprising:
[0015] The acquisition module is used to acquire time-series electricity consumption data for N consecutive days and label it as a training sample set; where N is an integer greater than or equal to 2.
[0016] A module is constructed to build an abnormal electricity consumption detection model, including an electricity consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network. The electricity consumption trend information extraction layer divides the daily sampling data in the training sample set by the sampling data at the same time over N days to obtain a three-dimensional array. The quantization network layer calculates the m quantiles of all data in the three-dimensional array and the distance between each data point and each quantile, obtaining m distance values for each data point. These distance values are then mapped to n quantization intervals using a neural network, and soft-argmax is used to obtain the quantization result for each data point. The normalization layer normalizes the data in the training sample set; where n is the quantization level of the quantization network layer.
[0017] The training module is used to merge the quantization result and the normalization result and input them into the deep time series classification network, and to train the abnormal power consumption detection model with the goal of minimizing the classification loss.
[0018] Fourthly, the present invention provides an abnormal electricity consumption detection device based on an electricity consumption trend quantification network, including a detection module. The detection module is used to input the time-series data of the electricity consumption to be detected into an abnormal electricity consumption detection model constructed by the construction device of the abnormal electricity consumption detection model based on the electricity consumption trend quantification network described in the third aspect, and output the detection result.
[0019] Fifthly, the present invention provides a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for constructing an abnormal electricity consumption detection model based on an electricity consumption trend quantization network as described in the first aspect and / or the method for detecting abnormal electricity consumption based on an electricity consumption trend quantization network as described in the second aspect.
[0020] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects:
[0021] The main innovation of this invention lies in constructing an abnormal electricity consumption detection model comprising an electricity consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network. Specifically, the electricity consumption trend information extraction layer extracts electricity consumption trend change information by dividing time-of-use electricity consumption by the same period last year; the quantization network layer addresses the problem of excessively large data range after dividing time-of-use electricity consumption by the same period last year, and eliminates the impact of normal fluctuations in electricity consumption data caused by the randomness of electricity consumption behavior on abnormal electricity consumption detection; the normalization layer aims to retain the time-period information of the electricity consumption data; finally, the quantization and normalization results are combined and input into the deep time series classification network, and the abnormal electricity consumption detection model is trained with the goal of minimizing classification loss; the trained model is then used for abnormal electricity consumption detection. Thus, this invention can capture domain-independent abnormal electricity consumption information without manual extraction of electricity consumption features, exhibiting excellent cross-domain detection capabilities. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the method for constructing an abnormal electricity consumption detection model based on an electricity consumption trend quantification network provided in this embodiment of the invention.
[0023] Figure 2 This is a structural diagram of the abnormal power consumption detection model provided in an embodiment of the present invention;
[0024] Figure 3 This is a structural diagram of the electricity consumption trend information extraction layer provided in an embodiment of the present invention;
[0025] Figure 4 This is a diagram of the quantization network layer structure provided in an embodiment of the present invention;
[0026] Figure 5 This is a flowchart for abnormal power consumption detection provided in an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0028] See Figure 1 , combined Figures 2 to 4 This invention provides a method for constructing an abnormal electricity consumption detection model based on an electricity consumption trend quantification network, including operations S1 to S3.
[0029] Operation S1 obtains the electricity consumption time series data for N consecutive days and labels it as a training sample set; where N is an integer greater than or equal to 2.
[0030] In this embodiment, the electricity consumption time-series data refers to the user's electricity consumption within each standard time interval (commonly 15 minutes or 30 minutes) recorded by the smart meter. In this embodiment, the sampling interval for electricity consumption data is 30 minutes, resulting in 48 sampling points per day. The user's time-of-use electricity consumption data is divided into weekly segments, with each data entry containing 336 sampling points of electricity consumption data.
[0031] In addition, necessary data preprocessing is required for the electricity consumption data at the sampling points, including handling missing values and data cleaning. Specifically:
[0032] (1) Handling missing values. Due to malfunctions in the smart meter metering equipment or the meter information transmission equipment, missing values may exist in the data. For a small number of missing data, this embodiment uses linear interpolation to fill in the data; for a large number of missing data, a direct filtering method is used.
[0033] (2) Data Cleaning. The data to be cleaned here includes maximum values exceeding the normal electricity metering range, minimum values that are persistently zero, and negative values. Maximum values are defined as:
[0034] Maximum value = Q3 + (Q3 - Q1) * 5
[0035] Q3 is the third-quarter locus, and Q1 is the quarter-quarter locus.
[0036] Furthermore, the sample data is labeled based on the on-site inspection results to construct a training sample set. For example, abnormal data is labeled as 1, and normal data is labeled as 0.
[0037] Operation S2 constructs an abnormal electricity consumption detection model comprising an electricity consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network. The electricity consumption trend information extraction layer divides the daily sampling data in the training sample set by the sampling data at the same time in N days to obtain a three-dimensional array. The quantization network layer is used to find the m quantiles of all data in the three-dimensional array, and calculates the distance between each data point and each quantile, obtaining m distance values corresponding to each data point. Then, the distance values are mapped to n quantization intervals through a neural network, and soft-argmax is used to obtain the quantization result corresponding to each data point. The normalization layer is used to normalize the data in the training sample set. Here, n is the quantization level of the quantization network layer.
[0038] Unlike existing technologies, this method only normalizes the raw data, using it as training samples to train the classification network. For example... Figure 2 As shown, this invention proposes an abnormal electricity consumption detection model that includes an electricity consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network.
[0039] Specifically:
[0040] (1) Electricity consumption trend information extraction layer. The preprocessed data is divided by the year-on-year comparison of time-of-use electricity consumption to obtain electricity consumption trend information.
[0041] For example, such as Figure 3 The diagram shows a schematic of the electricity consumption trend information extraction layer of this invention. Assume the length of daily electricity consumption data is D, and the length of weekly electricity consumption data is 7D. The input single data point is a univariate time series with a size of 1×7D. After splitting by day, the array is reshaped into a two-dimensional array with a size of 7×D. Next, a year-on-year division operation is performed. This year-on-year division operation means dividing the D daily sampling data points by the sampling data from the same time on each previous day. For example, the sampling data at 5 PM on Wednesday is divided by the data at 5 PM on Tuesday. Similarly, the D electricity consumption data points on Wednesday are divided by the D electricity consumption data points at the corresponding times on Monday and Tuesday. Figure 3 Each cell in the array matrix represents a sequence of D points, from... Figure 3 The table diagram obtained after year-on-year division is shown below. Looking at the columns, the last column represents the data obtained by dividing the electricity consumption data of the seventh day (D) by the previous six days and the seventh day itself. When encountering data that needs to be divided by the next day, it is directly filled with 1. For example, the second column represents the data that needs to be divided for the first day of the week, which is only itself. The D data in each cell that needs to be filled is directly set to 1. After the year-on-year division operation is completed, the original data of size 7×D becomes a 7×7×D three-dimensional array. From the two-dimensional cross-section of the three-dimensional array, the lower triangular matrix and diagonal elements are all set to 1. These parts have no practical meaning and are only used to fill the dimensions and retain the time correlation. However, the last row is full of meaningless values and can be discarded. Therefore, after array reduction, the size of the data becomes 6×7×D. After array reconstruction, a multivariate time series with a data size of 6×7D is obtained.
[0042] The purpose of dividing time-of-use electricity consumption by year-on-year is to uncover information on changes in user electricity consumption trends and to capture abnormal electricity consumption information characterized by a continuous decrease in electricity consumption. User electricity consumption behavior exhibits periodicity, and there is also a background load (such as the electricity consumption of normally running appliances). If an abnormal electricity consumption detection model identifies a user who began abnormal electricity consumption at a certain time during a certain week, then the electricity consumption behavior on the days following the abnormal consumption in that week will inevitably show a decreasing trend compared to normal electricity consumption periods. By dividing the daily time-of-use electricity consumption data by the previous daily time-of-use electricity consumption data, the timing of the decrease in electricity consumption can be obtained without data preprocessing.
[0043] (2) Quantization Network Layer. This addresses the issue of excessively large data ranges after dividing time-of-use electricity consumption by the same period of the previous day. Dividing time-of-use electricity consumption by the same period of the previous day can completely eliminate the influence of different electricity consumption scales, transforming the time-of-use electricity consumption data into information on the change in time-of-use electricity consumption compared to the same period of the previous day. After the year-on-year division, the value is less than 1, indicating that the electricity consumption has decreased. However, the data range after the year-on-year division is [0, a large value]. Directly inputting such data with an excessively large value range into the neural network will lead to unstable model training.
[0044] like Figure 4 The diagram shows the quantization network structure of this invention. Quantizing data first requires determining its position within the overall data distribution. By calculating the quantiles of the input data as a whole, and then calculating the L1 distance between the input data and each quantile, the coordinates of the input data within the overall data distribution can be obtained, thus locating the input data within the overall distribution. A neural network is used to map the distance coordinates to different quantization intervals, and then quantization labels are obtained through Softmax and argmax operations. In the adaptive quantization network, m represents the number of quantiles, and n represents the quantization level. Setting m to a value greater than a multiple of n provides the quantization network with space to adaptively select the quantization threshold. Generally, a larger quantization level results in higher quantization accuracy, but may introduce varying degrees of noise. The optimal quantization level is not necessarily the same for different types of data and needs to be determined experimentally. The weights and biases of the linear layers are determined by backpropagation of the neural network.
[0045] Furthermore, since the argmax operation takes the maximum index, this process is not differentiable and cannot backpropagate gradients in a neural network, causing the quantized network to fail to update its parameters. Therefore, the soft-argmax operation is used here instead of Softmax and argmax to obtain the quantization result. The calculation formula is as follows:
[0046]
[0047] Where τ is a temperature coefficient that controls the sharpness of the probability distribution output by the Softmax function. The smaller τ is, the closer the output probability distribution is to a one-hot vector. During training, the annealing strategy is used to gradually anneal τ from a large value (e.g., 1) to a value close to 0, thereby simulating argmax; i = 1, ..., n, j = 1, ..., n.
[0048] (3) Normalization layer. The purpose of adding a channel of normalized data is to retain the time period information of electricity consumption data. Compared with the behavior of fixed low electricity consumption during peak electricity consumption period, the fixed low electricity consumption during peak electricity consumption period is obviously more suspicious. At the same time, during the peak electricity consumption period, only the normally open appliances are usually working to form background load. The sudden or continuous decrease in background load is also suspicious. The time period information of peak and valley and background load information can be provided by normalized data.
[0049] In this embodiment, the Min-Max normalization method is used to map the data to the interval [0, 1], x i For the original data, x i ′ represents the normalized data, and the formula is as follows:
[0050]
[0051] (4) Deep Time Series Classification Network. Abnormal electricity consumption detection can be viewed as a standard binary classification task, where the detection model classifies samples as normal or abnormal (normal is typically set to 0 and abnormal to 1 in the task). User electricity consumption data samples can be considered as univariate time series, therefore, the abnormal electricity consumption detection task can use the latest time series classification network. The deep time series classification network is trained using the processed data in a binary classification manner.
[0052] Operation S3 involves merging the quantization result and the normalization result, inputting them into the deep time series classification network, and training the abnormal power consumption detection model with the goal of minimizing the classification loss.
[0053] In the model application phase, such as Figure 5 As shown, the time series data of the electricity consumption to be detected is input into the trained abnormal electricity consumption detection model to obtain the category probability. For the category probability, the maximum value index is taken along the horizontal axis. If the maximum value index is 1, it indicates that the electricity consumption is abnormal. If the maximum value index is 0, it indicates that the electricity consumption is normal.
[0054] Application examples:
[0055] A cross-domain scenario dataset was constructed using publicly available power datasets and False Data Injection (FDI) to provide training, testing, and comparison for the proposed model algorithm.
[0056] The publicly available power dataset used in this embodiment includes:
[0057] (1) Ireland Smart Meter Dataset, which contains electricity consumption data of 4,225 residential users and 485 small and medium-sized industrial and commercial users in Ireland from July 15, 2009 to December 31, 2010, with a sampling interval of 30 minutes.
[0058] (2) Low Carbon London Smart Meter Dataset, which contains electricity consumption data of 5,567 residents in London, UK, who participated in the Low Carbon London project from November 2011 to February 2014, with a sampling interval of 30 minutes.
[0059] (3) The UCI Electricity Load Dataset contains electricity consumption data from 370 large industrial users from 2011 to 2014, with a sampling interval of 15 minutes. To ensure scale consistency, the data from every two sampling points in this dataset are added and merged, resulting in a final time granularity of 30 minutes.
[0060] Hereinafter referred to as the Ireland dataset, the London dataset, and the UCI Electricity dataset.
[0061] Real-world abnormal electricity consumption data may exhibit the following characteristics: a continuous or variable decrease in electricity consumption; irregular electricity consumption patterns; zero electricity consumption; and a sudden drop in electricity consumption. The abnormal data injection types in this embodiment are the six types shown in Table 1.
[0062] Table 1. Types of abnormal power consumption used in this embodiment.
[0063]
[0064] *Note: x t This represents the raw electricity consumption collected at time t. Let x represent the electricity consumption after time t is altered, x be the original electricity consumption sequence, α and β be random numbers, γ be the percentile, and α be the value of β. t Let be the value at time t in a random sequence. This represents the average electricity consumption.
[0065] In this embodiment, the three public datasets are divided into four different domains after data cleaning, based on different users, user types, time periods, and regions:
[0066] 1) Source Domain. The source domain contains electricity consumption data for residential users in the Ireland dataset for one year (52 weeks, 364 days).
[0067] 2) Target Domain 1. This target domain contains electricity consumption data for small and medium-sized industrial and commercial users over one year (52 weeks, 364 days) from the Ireland dataset. This domain simulates scenarios across user types, using residential electricity consumption data from the source domain for training, and detecting electricity consumption data from industrial and commercial users.
[0068] 3) Target Domain 2. This target domain contains electricity consumption data for one year (52 weeks, 364 days) of residential users in the London dataset who participated in the Low Carbon London project. Due to their participation in the low carbon program, the electricity consumption of users in this dataset is significantly smaller than that of residential users in the Ireland dataset.
[0069] 4) Target Domain 3. This target domain contains electricity consumption data for large industrial users in the UCI Electricity dataset, spanning 52 weeks (364 days) from January 2, 2012 to December 30, 2012. The electricity consumption scale of users in this target domain is much higher than that of residential users.
[0070] Since existing publicly available fine-grained datasets only contain normal electricity consumption data, it is necessary to construct a dataset containing abnormal electricity consumption data for model training and testing. To reduce data dimensionality, decrease model parameters, and accelerate training, a weekly-level abnormal electricity consumption dataset is constructed for model training and performance testing. The steps for constructing the weekly-level abnormal electricity consumption dataset are as follows:
[0071] 1) After data cleaning, users in each field are randomly divided into normal users and abnormal users and labeled. The ratio of normal users to abnormal users is 2:1.
[0072] 2) Randomly assign one of the six abnormal electricity consumption types in Table 1 to the marked abnormal electricity consumption type.
[0073] 3) After cropping the user electricity consumption data marked with abnormal electricity consumption types by week, randomly select a point each week as the abnormal starting point. The selection of the abnormal starting point is limited to any sampling point time from the second day to the second to last day to ensure that the data has enough information on changes in electricity consumption behavior. Convert the data after the abnormal electricity consumption behavior starting point into abnormal electricity consumption data according to the conversion formula corresponding to the marked abnormal electricity consumption type.
[0074] 4) The normal user labeled data of each domain is cropped weekly and then merged with the abnormal data after abnormal data injection processing to form the abnormal electricity consumption dataset of that domain.
[0075] The final dataset information for each domain is shown in Table 2:
[0076] Table 2 Dataset Information for Cross-Domain Scenarios
[0077]
[0078] This embodiment uses a binary classification method to detect abnormal power consumption, testing the performance of a classification model trained in the source domain under different cross-domain scenarios. This embodiment uses accuracy (ACC) and area under the curve (AUC) as evaluation metrics to represent the model's classification performance.
[0079] ACC represents the overall accuracy of the model's classification, while AUC (Area Under Curve) is the area under the Receiver Operating Characteristic (ROC) curve. The ROC curve is a performance curve of the classifier plotted based on different classification thresholds. The horizontal axis represents the false positive rate, and the vertical axis represents the true positive rate. AUC can reflect the classification performance of the classifier under imbalanced conditions, and its value ranges between 0.5 and 1. The closer it is to 1, the better the model's classification performance.
[0080] The results obtained using these two metrics are shown in Table 3. Training was performed using source domain data, and testing was conducted using target domain data. The batch size was set to 1024, the training epochs were 150, the optimizer used was SGD with momentum, the initial learning rate was set to 0.1, decreasing to 0.01 after the 90th epoch and to 0.001 after the 120th epoch, the number of quantization vectors m was set to 20, the number of quantization levels n was set to 5, the input dimension of the linear layer was set to 20, the output dimension was set to 5, and the initial temperature coefficient τ was set to 1, decreasing to 0.1 after the 40th epoch and to 0.01 after the 80th epoch.
[0081] The deep time series classification network uses the InceptionTime network. Table 3 shows the experimental results comparing the performance of the deep time series classification model before and after adding the method of this invention. The model was trained directly on normalized data without using this invention. As can be seen from the table, the ACC and AUC of each target domain, as well as the average ACC and average AUC, are improved after adopting this invention. The electricity consumption trend quantification network method of this invention improves the cross-domain detection capability of the abnormal electricity consumption detection model.
[0082] Table 3 Comparison of the effects of adding the method of this invention to the deep time series classification model.
[0083]
[0084] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing an abnormal power consumption detection model based on a power consumption trend quantification network, characterized in that, The method comprises the following steps: obtaining power consumption time series data of consecutive N days and labeling the data as a training sample set; wherein N is an integer greater than or equal to 2; building an abnormal power consumption detection model comprising a power consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network; the power consumption trend information extraction layer is used to divide the sampling point data of each day in the training sample set by the sampling data at the same time in N days to obtain a three-dimensional array; the quantization network layer is used to obtain m quantile points of all data in the three-dimensional array, calculate the distance of each data from each quantile point to obtain m distance values corresponding to each data, and then map each distance value to n quantization intervals through a neural network to obtain a quantization result corresponding to each data using soft-argmax; the normalization layer is used to normalize the data in the training sample set; wherein n is the quantization level of the quantization network layer; inputting the quantization result and the normalization result into the deep time series classification network, and training the abnormal power consumption detection model with the objective of minimizing the classification loss; wherein, in the process of obtaining the three-dimensional array, when the sampling data at the same time in each day after the current day is encountered, it is directly filled as 1; before the quantization network layer obtains m quantile points of all data in the three-dimensional array, the last row of data in the three-dimensional array is discarded, and the reduced three-dimensional array is input into the quantization network layer.
2. An abnormal power consumption detection method based on a power consumption trend quantification network, characterized in that, comprising: inputting the power consumption time series data to be detected into the abnormal power consumption detection model constructed by the method for constructing an abnormal power consumption detection model based on a power consumption trend quantization network according to claim 1, and outputting a detection result. 3.A device for constructing an abnormal power consumption detection model based on a power consumption trend quantification network, characterized in that, comprising: an acquisition module, configured to acquire power consumption time series data of consecutive N days and label the data as a training sample set; wherein N is an integer greater than or equal to 2; a building module, configured to build an abnormal power consumption detection model comprising a power consumption trend information extraction layer, a quantization network layer, a normalization layer, and a deep time series classification network; the power consumption trend information extraction layer is used to divide the sampling point data of each day in the training sample set by the sampling data at the same time in N days to obtain a three-dimensional array; the quantization network layer is used to obtain m quantile points of all data in the three-dimensional array, calculate the distance of each data from each quantile point to obtain m distance values corresponding to each data, and then map each distance value to n quantization intervals through a neural network to obtain a quantization result corresponding to each data using soft-argmax; the normalization layer is used to normalize the data in the training sample set; wherein n is the quantization level of the quantization network layer; a training module, configured to input the quantization result and the normalization result into the deep time series classification network, and train the abnormal power consumption detection model with the objective of minimizing the classification loss; wherein, in the process of obtaining the three-dimensional array, when the sampling data at the same time in each day after the current day is encountered, it is directly filled as 1; Before the m quantiles of all data in the three-dimensional array are calculated in the quantization network layer, the method further comprises: discarding the last row of data in the three-dimensional array, and inputting the reduced three-dimensional array into the quantization network layer.
4. An abnormal power consumption detection device based on a network of power consumption trend quantification, characterized by, The detection module is configured to input the power consumption time series data to be detected into an abnormal power consumption detection model constructed by the construction device of the abnormal power consumption detection model based on the power consumption trend quantization network.
5. A machine-readable storage medium, characterized in that, The machine readable storage medium stores machine executable instructions, when the machine executable instructions are called and executed by the processor, the machine executable instructions cause the processor to implement the construction method of the abnormal power consumption detection model based on the power consumption trend quantization network and / or the abnormal power consumption detection method based on the power consumption trend quantization network.