A method for detecting abnormal power consumption time intervals in smart grids

By constructing the abnormal power consumption time interval detection model of the feature extraction network and the regression network, the problem of insufficient time intervals for detecting abnormal power consumption behavior in the existing technology is solved, and the success rate and detection accuracy of on-site inspections are improved.

CN114970729BInactive Publication Date: 2024-09-06HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210609391.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2024-09-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology has insufficient research on the time interval for detecting abnormal power consumption behavior, resulting in a low success rate of on-site inspections and a lack of effective detection methods for smart grids.

Method used

Construct an abnormal power consumption time interval detection model including a feature extraction network, classification network and regression network. By obtaining abnormal power consumption time series data, candidate intervals are screened based on expert knowledge, and a regional weighting mechanism is used to calculate the candidate interval and the real abnormal power consumption time. The overlap rate of the interval is labeled and the loss is calculated until the model converges.

Benefits of technology

It improves the success probability of on-site investigation, can effectively extract key information from long time series data with redundant information and noise, and improves detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114970729B
    Figure CN114970729B
Patent Text Reader

Abstract

The present invention discloses a method for detecting abnormal power consumption time intervals for smart grids, the method comprising: selecting candidate intervals based on expert knowledge, judging whether the candidate interval is a real abnormal power consumption time interval according to whether the overlap rate between the candidate interval and the real abnormal power consumption time interval exceeds a threshold; inputting abnormal power consumption time series data into a feature extraction network to obtain a feature map, and then performing regional weighting through different candidate intervals to obtain corresponding weighted feature maps, and then inputting them into a classification network and a regression network respectively to obtain predicted candidate interval labels and predicted abnormal power consumption time intervals; using the real candidate interval labels and the real abnormal power consumption time intervals as real labels to calculate losses until the model converges; and using the converged model to detect abnormal power consumption time intervals. The method can effectively extract key information from long time series data with more redundant information and noise, which not only improves the detection speed, but also improves the detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of abnormal power consumption detection, and more specifically, relates to a method for detecting abnormal power consumption time intervals for a smart grid. Background Art

[0002] With the reform of the power industry and the further construction of smart grids, the automation, informationization and intelligence of various power equipment and systems have been greatly improved, and with it, a large amount of electric energy metering data has exploded. In the process of collecting electric energy metering information, a large amount of data anomalies are generated due to power grid fluctuations, equipment failures, communication failures and management methods. Normal electric energy metering data can ensure the accuracy of electric energy metering, while abnormal electric energy metering data also contains a lot of important information in the power grid, which affects the dynamics, effectiveness and accuracy of electric energy metering information to a certain extent.

[0003] There are many reasons that lead to abnormal status of electric energy metering equipment, which can be classified according to different angles: According to the location where the abnormal information appears, there are generally the following situations: caused by failure of the electric energy meter itself, failure of the metering cabinet and many factors in the electric energy metering circuit; According to the cause of the abnormal information, there are mainly two situations: human factors and non-human factors. Human factors are mainly caused by human negligence or subjective theft of electricity and illegal electricity use such as civil electricity commercial use, while non-human factors are caused by failure of the equipment itself.

[0004] Abnormal electricity use, such as electricity theft, has always brought great harm to the power grid, so a large number of abnormal electricity use detection-related works have emerged in recent years. The collection of massive power data has also opened up new solutions and ideas for the field of metering abnormality diagnosis. The use of machine learning methods can intelligently, efficiently and accurately identify abnormal electricity use customers and faulty equipment, and quickly push them to the inspection personnel, who will then conduct on-site inspections and follow-up. This solution has gradually become a hot research issue.

[0005] However, during the on-site inspection by the inspectors, whether the time interval of abnormal power consumption behavior overlaps with the time interval of the inspection by the inspectors is a very important factor affecting the success rate of the inspection, because during the on-site inspection, it is possible that the user did not have abnormal power consumption behavior during the inspection, resulting in the failure of the inspection; if these key information of the user is mastered, the success rate of the on-site inspection can be greatly improved. However, in the current research work on abnormal power consumption detection, there is insufficient research on the time interval of abnormal power consumption behavior, and the support for on-site inspection is not strong enough.

[0006] In summary, the current research on abnormal diagnosis of power metering is insufficient in the research on the time interval of detecting abnormal power consumption behavior, the support for on-site audits is insufficient, and there is a lack of abnormal power consumption time interval detection methods for smart grids. Summary of the invention

[0007] In view of the defects of the prior art and the need for improvement, the present invention provides a method for detecting abnormal power consumption time intervals for smart grids, which aims to detect the time intervals in which users' abnormal power consumption behaviors occur and provide time-related information to increase the success rate of on-site investigations.

[0008] To achieve the above objectives, in a first aspect, the present invention provides a method for constructing an abnormal power consumption time interval detection model for a smart grid, comprising the following steps:

[0009] S1, obtaining multiple abnormal power consumption time series data, wherein each abnormal power consumption time series data corresponds to one or more real abnormal power consumption time intervals;

[0010] S2, based on expert knowledge, select candidate intervals, and determine whether the candidate interval is a real abnormal power consumption time interval according to whether the overlap rate between the candidate interval and the real abnormal power consumption time interval exceeds a threshold, so as to mark the candidate interval as a real candidate interval label;

[0011] S3, building an abnormal power consumption time interval detection model including a feature extraction network, a classification network and a regression network; inputting the abnormal power consumption time series data into the feature extraction network to obtain a feature map, and then performing regional weighting through different candidate intervals to obtain a corresponding weighted feature map; inputting the weighted feature map into the classification network and the regression network respectively to obtain a predicted candidate interval label and a predicted abnormal power consumption time interval;

[0012] S4, using the real candidate interval label and the real abnormal power consumption time interval as the real label to calculate the loss until the abnormal power consumption time interval detection model converges.

[0013] Furthermore, in S2, the calculation method of the overlap rate IoU between the candidate interval and the actual abnormal power consumption time interval is as follows:

[0014]

[0015]

[0016] Among them, x1 and x2 are the starting and ending coordinates of the candidate interval on the time axis, y1 and y2 are the starting and ending coordinates of the actual abnormal power consumption time interval on the time axis, and s inter Indicates the overlap between the two.

[0017] Furthermore, in S3, the formula of the regional weighting mechanism is as follows:

[0018] A(X mn , bbox) = alpha · X mn , alpha = [B1, O, B2]

[0019] B1=[a1,…,a i ],a1=…=a i =α

[0020] O=[b1,…,b j ],b1=…=b j =β

[0021] B2=[c1,…,c k ],c1=…=c k =α

[0022] i=bbox l , j = bbox r -bbox l +1, k = n-bbox r +1

[0023] Among them, X mn is the input feature map, m represents the number of channels of the feature map, n represents the length of the feature map, alpha represents the weight score vector, bbox is the coordinate of the candidate interval, bbox l is the starting point coordinate value, bbox r is the end point coordinate value, α and β are hyper parameters.

[0024] Furthermore, the feature extraction network is a one-dimensional residual convolutional network.

[0025] Furthermore, the classification network is a three-layer fully connected layer network plus a layer of Sigmoid function.

[0026] Furthermore, the regression network is a three-layer fully connected layer network.

[0027] In a second aspect, the present invention provides a method for detecting abnormal power consumption time intervals for smart grids, comprising: inputting the time series data of abnormal power consumption to be detected into an abnormal power consumption time interval detection model constructed by adopting the method for constructing an abnormal power consumption time interval detection model for smart grids described in the first aspect, and outputting the abnormal power consumption time interval detection result.

[0028] In a third aspect, the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method for constructing an abnormal power consumption time interval detection model for a smart grid as described in the first aspect and / or the method for detecting abnormal power consumption time intervals for a smart grid as described in the second aspect.

[0029] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0030] (1) The abnormal power consumption time interval detection model provided by the present invention is suitable for one-dimensional long time series data, such as power consumption time series data with a long sequence length; the model generates candidate boxes based on knowledge embedding, and adds a regional weighting mechanism, making the model more suitable for small target detection in long time series data, and can effectively extract key information from long time series data with more redundant information and noise.

[0031] (2) Different from statistical methods and other machine learning models for detecting time series outliers, the present invention uses a one-dimensional data target detection method, treating outliers as targets and other values ​​as background, and generating candidate boxes based on knowledge embedding, which not only improves the detection speed but also improves the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flow chart of a method for constructing an abnormal power consumption time interval detection model for a smart grid provided by an embodiment of the invention;

[0033] Figure 2 This is a framework diagram of an abnormal power consumption time interval detection model provided by an embodiment of the present invention;

[0034] FIG. 3( a ) is a diagram of a feature extraction network architecture provided by an embodiment of the present invention;

[0035] FIG3( b ) is a diagram of the residual block structure in FIG3( a );

[0036] Figure 4 is a classification network architecture diagram provided by an embodiment of the present invention;

[0037] Figure 5 It is a regression network architecture diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0039] See also Figure 1 , combined with Figures 2 to 5 The present invention provides a method for constructing an abnormal power consumption time interval detection model for a smart grid, including operations S1 to S4.

[0040] Operation S1, obtaining multiple sets of abnormal power consumption time series data, wherein each set of abnormal power consumption time series data corresponds to one or more real abnormal power consumption time intervals.

[0041] In this embodiment, the user's abnormal power consumption time series data is obtained, the time span of the data is one week, and the sampling interval period shall not be higher than one hour. For each abnormal power consumption data sample, the corresponding real abnormal power consumption time interval coordinates are obtained.

[0042] Operation S2, based on expert knowledge, selects candidate intervals, and determines whether the candidate interval is a real abnormal power consumption time interval according to whether the overlap rate between the candidate interval and the real abnormal power consumption time interval exceeds a threshold, thereby marking the candidate interval as a real candidate interval label.

[0043] In this embodiment, the candidate intervals are generated based on expert knowledge. For example, the candidate intervals are set as two high-load periods every day of the week. The first high-load period is from 10 a.m. to 2 p.m., and the second high-load period is from 5 p.m. to 9 p.m., then the sample data of one week corresponds to 14 candidate intervals.

[0044] Among them, the calculation method of overlap rate, i.e., IoU, is as follows:

[0045]

[0046]

[0047] Among them, x1 and x2 are the starting and ending coordinates of the candidate interval on the time axis, y1 and y2 are the starting and ending coordinates of the actual abnormal power consumption time interval on the time axis, and s inter Indicates the overlap between the two.

[0048] Preferably, the threshold is 0.5.

[0049] It should be noted that each set of abnormal power consumption time series data corresponds to one or more real abnormal power consumption time intervals. When each set of abnormal power consumption time series data corresponds to multiple real abnormal power consumption time intervals, as long as the overlap rate between the candidate interval and one of the real abnormal power consumption time intervals exceeds a threshold, the candidate interval is judged to be a real abnormal power consumption time interval; otherwise, the candidate interval is judged not to be a real abnormal power consumption time interval.

[0050] Operation S3, build an abnormal power consumption time interval detection model including a feature extraction network, a classification network and a regression network; input the abnormal power consumption time series data into the feature extraction network to obtain a feature map, and then perform regional weighting through different candidate intervals to obtain a corresponding weighted feature map; input the weighted feature map into the classification network and the regression network respectively to obtain a predicted candidate interval label and a predicted abnormal power consumption time interval.

[0051] like Figure 2 As shown, in the abnormal power consumption time interval detection model provided by the embodiment of the present invention, the feature extraction network is preferably a one-dimensional residual convolution network, and the sampling frequency is preferably half an hour. After the abnormal power consumption data sample is input into the feature extraction network, a feature map is output. Before the feature map is input into the classification network and the regression network, the feature map is regionally weighted according to the coordinates of 14 different candidate intervals. Finally, the classification network classifies the weighted feature map, outputs the predicted classification result, calculates the loss between the predicted candidate interval label and the true candidate interval label, and the loss function used is the binary cross entropy loss function; the regression network regresses the coordinates of the candidate interval, outputs the predicted abnormal power consumption time interval, and calculates the loss between the predicted abnormal power consumption time interval and the true abnormal power consumption time interval. The loss function used is the smooth L1 loss. The final loss is to add the two together, iterate the model parameters, and the optimizer is preferably the Adam optimizer.

[0052] The feature extraction network structure is shown in Figure 3(a), which is ResNet-25. The input is an abnormal power consumption data sample with a data size of 1x336. After being input into a one-dimensional convolution layer, it is input into two residual blocks. The residual block structure is shown in Figure 3(b). Each residual block has four Bottleneck modules. The stride of the first convolution layer of the first Bottleneck module is 2, and the stride of the other two layers is 1. The stride of the three subsequent Bottleneck modules is 1. There are 25 one-dimensional convolution layers in total, the channels of residual block 1 are 64, and the channels of residual block 2 are 128, and finally a 256x84 feature map is output.

[0053] The formula of the regional weighting mechanism is as follows:

[0054] A(X mn, bbox) = alpha · X mn , alpha = [B1, O, B2]

[0055] B1=[a1,…,a i ],a1=…=a i =α

[0056] O=[b1,…,b j ],b1=…=b j =β

[0057] B2=[c1,…,c k ],c1=…=c k =α

[0058] i=bbox l , j = bbox r -bbox l +1, k = n-bbox r +1

[0059] Among them, X mn is the input feature map, m represents the number of channels of the feature map, n represents the length of the feature map, alpha represents the weight score vector, bbox is the coordinate of the candidate interval, bbox l is the starting point coordinate value, bbox r is the end point coordinate value, α and β are hyperparameters. Preferably, α is 0.5 and β is 1.

[0060] Among them, the classification network structure is as follows Figure 4 As shown, the three-layer fully connected network has output channels of 2048, 512, and 2 respectively. Finally, a Sigmoid function is added, preferably with a threshold of 0.5, and finally a label of 0 or 1 is output. 0 represents that the candidate interval detected is not a real abnormal power consumption time interval, and 1 represents that the candidate interval detected is a real abnormal power consumption time interval.

[0061] Among them, the regression network structure is as follows Figure 5 As shown, the three-layer fully connected network has output channels of 2048, 512, and 2 respectively, and the output is the predicted abnormal power consumption time interval, including the starting coordinates and the ending coordinates.

[0062] Operation S4: using the real candidate interval label and the real abnormal power consumption time interval as the real label to calculate the loss until the abnormal power consumption time interval detection model converges.

[0063] In this embodiment, the loss is divided into two parts, one part is the classification loss of the classification network, and the other part is the regression loss of the regression network. The sum of the two parts is the overall model loss.

[0064] Among them, the loss of the classification network calculates the loss between the predicted candidate interval label and the true candidate interval label, and the loss function uses the commonly used cross entropy loss function, which calculates the cross entropy between the predicted category probability distribution and the true label distribution probability. The formula is as follows:

[0065]

[0066] Among them, N means there are N samples in total, i means the i-th sample, p ic Represents the probability score that the sample belongs to category c; y ic Indicates whether the sample belongs to category c, if it does, it is 1, if it does not, it is 0; then sum all categories, then sum all samples, and find the average.

[0067] Among them, the loss of the regression network is calculated by the loss between the predicted abnormal power consumption time interval and the actual abnormal power consumption time interval. The loss function uses the smooth L1 loss, and the formula is as follows:

[0068]

[0069] Where x is the difference between the predicted abnormal power consumption time interval and the actual abnormal power consumption time interval coordinates.

[0070] The specific training process is shown in Algorithm 1:

[0071]

[0072] In the model application stage, the time series data of abnormal power consumption to be detected is input into the abnormal power consumption time interval detection model that has completed convergence, and the abnormal power consumption time interval detection result is output.

[0073] It should be noted that, in the final output, only the candidate interval with the classification network output label of 1 will be judged as the real abnormal power consumption time interval, and the abnormal power consumption time interval output by the corresponding regression network will be output.

[0074] Application Cases

[0075] Due to the lack of a large number of abnormal power metering data of low-voltage users, the abnormal data modeling is carried out on the CER normal low-voltage user power data set from ISSDA, and the normal user power consumption data is changed into abnormal power consumption data through mathematical modeling, so as to obtain a large number of abnormal power metering data of low-voltage users that can be used for training. The abnormal power consumption data set has a total of 100,000 samples, of which 80,000 are training sets and 20,000 are test sets. The sampling interval is half an hour, and the time span of each sample is one week.

[0076] The criterion for judging whether the time interval generated by the abnormal power consumption time interval detection model is the real abnormal power consumption time interval is to calculate whether the overlap rate between the generated time interval and the real abnormal power consumption time interval, that is, IoU, exceeds the threshold.

[0077] The experimental results show the accuracy of the time intervals generated by the model on the test set under different IoU score thresholds. The experimental results are shown in Table 1 below.

[0078] Table 1. Accuracy of abnormal time information in diagnostic information generated by the end-to-end generative model

[0079]

[0080] It can be seen that with the increase of the IoU score threshold, the accuracy of the generated time information decreases, but the decrease is not much. It can be seen that the time interval generated by the model has a high overlap rate with the actual abnormal power consumption time interval, which proves the effectiveness of the present invention.

[0081] It will be easily understood by those skilled in the art that the above description is only 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 in the protection scope of the present invention.

Claims

1. A method for constructing an abnormal power consumption time interval detection model for smart grids. It is characterized in that The following steps are involved: S1, obtaining multiple abnormal power consumption time series data, wherein each abnormal power consumption time series data corresponds to one or more real abnormal power consumption time intervals; S2, based on expert knowledge, select candidate intervals, and determine whether the candidate interval is a real abnormal power consumption time interval according to whether the overlap rate between the candidate interval and the real abnormal power consumption time interval exceeds a threshold, so as to mark the candidate interval as a real candidate interval label; S3, building an abnormal power consumption time interval detection model including a feature extraction network, a classification network and a regression network; inputting the abnormal power consumption time series data into the feature extraction network to obtain a feature map, and then performing regional weighting through different candidate intervals to obtain a corresponding weighted feature map; inputting the weighted feature map into the classification network and the regression network respectively to obtain a predicted candidate interval label and a predicted abnormal power consumption time interval; S4, using the real candidate interval label and the real abnormal power consumption time interval as the real label to calculate the loss until the abnormal power consumption time interval detection model converges.

2. The method for constructing an abnormal power consumption time interval detection model for smart grid according to claim 1, It is characterized in that In S2, the calculation method of the overlap rate IoU between the candidate interval and the actual abnormal power consumption time interval is as follows: s=min(x 2 ,y 2 )-max(x 1 ,y 1 ) Among them, x 1 、x 2 are the starting and ending coordinates of the candidate interval on the time axis, y 1 ,y 2 are the starting and ending coordinates of the actual abnormal power consumption time interval on the time axis, s inter Indicates the overlap between the two.

3. The method for constructing an abnormal power consumption time interval detection model for a smart grid according to claim 1, It is characterized in that In S3, the formula of the regional weighting mechanism is as follows: A(X mn ,bbox)=alpha X mn ,alpha=[B 1 ,O,B 2 ] B 1 =[a 1 ,…,a i ],a 1 =…=a i =a O=[b 1 ,…,b j ],b 1 =…=b j =b B 2 =[c 1 ,…,c k ],c 1 =…=c k =α i=bbox l ,j=bbox r -bbox l +1,k=n-bbox r +1 Among them, X mn is the input feature map, m represents the number of channels of the feature map, n represents the length of the feature map, alpha represents the weight score vector, bbox is the coordinate of the candidate interval, bbox l is the starting point coordinate value, bbox r is the end point coordinate value, α and β are hyper parameters.

4. The method for constructing an abnormal power consumption time interval detection model for a smart grid according to claim 1, It is characterized in that The feature extraction network is a one-dimensional residual convolutional network.

5. The method for constructing an abnormal power consumption time interval detection model for a smart grid according to claim 1, It is characterized in that The classification network is a three-layer fully connected network plus a layer of Sigmoid function.

6. The method for constructing an abnormal power consumption time interval detection model for a smart grid according to claim 1, It is characterized in that The regression network is a three-layer fully connected network.

7. A method for detecting abnormal power consumption time intervals for smart grids. It is characterized in that include: The abnormal power consumption time series data to be detected is input into the abnormal power consumption time interval detection model constructed by the method for constructing an abnormal power consumption time interval detection model for smart grid according to any one of claims 1 to 6, and the abnormal power consumption time interval detection result is output.

8. A machine-readable storage medium, It is 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 prompt the processor to implement the method for constructing an abnormal power consumption time interval detection model for a smart grid as described in any one of claims 1 to 6 and / or the method for detecting abnormal power consumption time intervals for a smart grid as described in claim 7.