Method and system for constructing a measurement anomaly diagnosis information generation model for smart grids
By building a metering abnormal diagnosis information generation model for the smart grid, the shortcomings of automatic generation of diagnostic reports are solved, expert resources are reduced, on-site inspection efficiency is improved, detailed abnormal diagnosis information is generated, and the interpretability of power metering abnormal detection is improved.
Patent Information
- Application Number
- CN202211151363.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-09-21
AI Technical Summary
In the prior art, insufficient research on metering abnormal diagnosis of smart grids has led to the generation of diagnostic reports that rely on a large number of expert resources and lack of methods to automatically generate text diagnostic information, which affects the efficiency and success rate of on-site audits.
A model for metering abnormal diagnosis information generation of smart power grids is constructed, including an abnormal day detection module, an abnormal electricity data judgment module and two classification networks. Anomaly diagnosis information is generated through the training data set, and a residual module with attention mechanism and a full-connection layer network are used to output detailed abnormal data phenomena and type speculations.
It reduces the demand for expert resources and improves the interpretability of machine learning in power measurement abnormality detection. The generated diagnostic information can effectively improve the success probability of on-site audits and output accurate abnormal diagnosis text reports.
Smart Images

Figure CN115564194B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of abnormal electricity consumption detection, and more specifically, relates to a method and system for constructing a metering anomaly diagnosis information generation model for a smart grid. Background Art
[0002] Advances in science and technology have significantly improved people's living standards. Traditional power grids are increasingly unable to meet the growing demand for electricity. Consequently, power grids are embarking on a journey of informatization, digitization, and intelligentization. With the gradual establishment of smart grids, a vast amount of electricity metering data has also grown, providing a foundation for big data and artificial intelligence technologies to address power sector challenges.
[0003] One of the key issues of concern to scholars in the power sector is the diagnosis of abnormal electricity usage, such as electricity theft. These behaviors undoubtedly cause significant economic losses to the power grid and also impact its safe operation. However, current research lacks understanding of the interpretability of abnormal electricity usage, thus providing insufficient support for on-site inspections. Extensive practical experience shows that anomaly detection results alone are insufficient for effective and detailed diagnosis. A more informative written diagnostic report can significantly improve the success rate of on-site inspections of abnormal electricity usage. Since on-site inspections by inspectors are often unavoidable, power experts must carefully analyze the metering data of users diagnosed as abnormal and then produce a written diagnostic report. This report plays an indispensable role in on-site inspections. This report allows staff to roughly estimate the type of abnormal electricity usage and also contains information that can improve the success rate of on-site inspections, such as the regularity or timing of abnormal electricity usage.
[0004] In summary, the current research on power metering anomaly diagnosis lacks relevant research on the automatic generation of diagnostic text information, and a large amount of expert resources are still needed to generate diagnostic reports. The industry lacks an automatic generation method for metering data anomaly diagnostic information for smart grids. Summary of the Invention
[0005] In response to the shortcomings of the existing technology and the need for improvement, the present invention provides a method and system for constructing a metering anomaly diagnostic information generation model for smart grids. Its purpose is to automatically generate diagnostic text information based on the metering data of the smart grid, reduce the expert resources required when generating diagnostic reports, and improve the interpretability of machine learning in power metering anomaly detection.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for constructing a model for generating metering anomaly diagnosis information for a smart grid is provided, comprising:
[0007] Build an abnormal day detection module to estimate the number of abnormal electricity usage days corresponding to the abnormal electricity usage data of a user in a week in the training data set; use the abnormal electricity usage data of the user in a week as input and the abnormal electricity usage days as labels to train the abnormal day detection module, wherein the training data set includes the abnormal electricity usage data of the user in a week;
[0008] Build an abnormal electricity consumption data judgment module to determine whether the abnormal electricity consumption data of a user in a week is completely abnormal data or partially abnormal data. If the number of abnormal electricity consumption days is 7, it is completely abnormal data, otherwise it is partially abnormal data;
[0009] Building two first classification networks with identical structures, training the two first classification networks using the complete abnormal data and the partial abnormal data, respectively, and outputting predicted text templates, wherein the text templates include abnormal data phenomena and corresponding abnormal type inferences, wherein the abnormal data phenomena include descriptions of overall power consumption, background load, power consumption curve, and power consumption peak;
[0010] Building an abnormal diagnosis information generation module, which is used to fill the abnormal days generated by the abnormal days detection module into the text template to generate abnormal diagnosis information;
[0011] The measurement abnormality diagnosis information generation model of the smart grid includes an abnormal day detection module, an abnormal electricity consumption data judgment module, two first classification networks and an abnormal diagnosis information generation module.
[0012] Furthermore, each first classification network includes three residual modules with attention mechanisms connected in series, a drouout layer and a fully connected layer. The completely abnormal data and the partially abnormal data are respectively input into the two first classification networks to train the first classification networks and output predicted text templates.
[0013] Furthermore, the channel attention weight score M of each residual module with attention mechanism c (F) and the spatial attention weight score M s (F) are:
[0014] M c (F)=σ(Flatten(AvgPool(F))+Flatten(MaxPool(F)))
[0015] M s (F)=σ(f i ([AvgPool(F);MaxPool(F)]))
[0016] Where F represents the input feature map, σ represents the sigmoid function, AvgPool represents the average pooling operation, MaxPool represents the maximum pooling operation, Flatten represents the flattening operation, and f i Represents the convolution calculation with convolution kernel i.
[0017] Furthermore, the abnormal days detection module includes a feature extraction network and a second classification network connected in series; the feature extraction network is a one-dimensional residual convolutional network.
[0018] Furthermore, the second classification network is a three-layer fully connected layer network plus a Sigmoid function layer.
[0019] Furthermore, the training data set includes completely abnormal data and partially abnormal data;
[0020] The completely abnormal data is constructed by one or more methods of FDI7-FDI13;
[0021] Wherein, FDI7-FDI13 are respectively:
[0022] FDI7:
[0023] FDI8:
[0024] FDI9:
[0025] FDI10:
[0026] FDI11:
[0027] FDI12:
[0028] FDI13:
[0029] Where, X is the electric energy metering displayed after the power is abnormal, and x is the normal power consumption. is the average power consumption, a, k, c are random numbers, a t A random number that is different for each sampling point, ax represents the a percentile point of x, and t is the time.
[0030] Furthermore, the complete abnormal data may be constructed by one or more methods among FDI1-FDI6, and the partial abnormal data may be constructed by one or more methods among FDI1-FDI6;
[0031] Wherein, the FDI1-FDI6 are respectively:
[0032] FDI1:X=ax,0.2 <a<0.8;
[0033] FDI2:
[0034] FDI3:X=max((xy),0),y=ax,0.5 <a<0.75
[0035] FDI4:
[0036] FDI5:X=a t x,0.2 t <0.8
[0037] FDI6:
[0038] Where, X is the electric energy metering displayed after the abnormal power consumption, and x is the normal power consumption. is the average power consumption, a, k, c are random numbers, a t A random number that is different for each sampling point, ax represents the a percentile point of x, and t is the time.
[0039] According to a second aspect of the present invention, a method for generating metering abnormality diagnostic information for a smart grid is provided, comprising: inputting abnormal electricity consumption data of a user to be detected for one week into an abnormality diagnostic information generation model constructed using the method for constructing a metering abnormality diagnostic information generation model for a smart grid according to any one of the first aspects, and outputting abnormality diagnostic information.
[0040] According to a third aspect of the present invention, a system for generating metering abnormality diagnosis information for a smart grid is provided, comprising:
[0041] Abnormal day detection module, used to detect the abnormal power consumption days corresponding to the user's abnormal power consumption data in a week;
[0042] The abnormal electricity consumption data judgment module is used to judge whether the abnormal electricity consumption data of the user in a week is completely abnormal data or partially abnormal data. If the number of abnormal electricity consumption days is 7, it is completely abnormal data, otherwise it is partially abnormal data;
[0043] A classification network module includes two first classification networks with identical structures. The completely abnormal data and the partially abnormal data are respectively input into the two first classification networks, and a predicted text template is output. The text template includes abnormal data phenomena and corresponding abnormal type inferences, wherein the abnormal data phenomena include descriptions of overall power consumption, background load, power consumption curve, and power consumption peak.
[0044] The abnormality diagnosis information generating module is used to fill the abnormality days generated by the abnormality day detection module into the text template to generate abnormality diagnosis information.
[0045] According to a fourth aspect of the present invention, a machine-readable storage medium is provided, wherein the machine-readable storage medium 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 a model for generating metering anomaly diagnostic information for a smart grid as described in any one of the first aspects and / or the method for generating metering anomaly diagnostic information for a smart grid as described in the second aspect.
[0046] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:
[0047] (1) The present invention constructs an abnormal day detection module through a constructed data set, and determines whether the abnormal electricity consumption data of a user in a week is completely abnormal data or partially abnormal data. The completely abnormal data and the partially abnormal data are respectively input into two first classification networks for training. The abnormal diagnosis information finally output includes abnormal data phenomena and corresponding abnormal type speculations, wherein the abnormal data phenomena include descriptions of overall electricity consumption, background load, electricity consumption curve and electricity consumption peak; the present invention can automatically generate diagnostic text information based on the metering data of the smart grid, reduce the expert resources required when generating diagnostic reports, and improve the interpretability of machine learning in power metering anomaly detection.
[0048] (2) Furthermore, in the process of training the two first-classification networks, the residual module with attention mechanism is used to focus on more effective channel features and spatial features in feature expression, which can improve the accuracy of model prediction.
[0049] (3) Furthermore, the present invention proposes a new method for constructing an abnormal electricity consumption dataset. Compared with FDI1-FDI6 in the prior art, the dataset constructed by the present invention is richer and more comprehensive. In actual situations, the types of abnormal electricity consumption are far more than the six types of FDI1-FDI6 in the prior art, and the situation is more complex and changeable. Based on the idea of game theory, the present invention stands from the perspective of electricity theft users, and constructs new 7 types of datasets from the perspective of increasing the benefits of electricity theft and reducing the risks of electricity theft. These 7 types are all related to the users' electricity consumption behavior, covering the abnormal electricity consumption types of all low-voltage residential users to the greatest extent possible, enriching the abnormal electricity metering-text diagnostic information dataset, so that when the final model converges, the output abnormal diagnostic information is richer and more accurate.
[0050] (4) Furthermore, the present invention proposes a method for calculating the channel attention weight score. The existing channel attention module can extract more features on multi-channel data such as images, but it is prone to overfitting on one-dimensional long time series data and is not suitable. After the present invention improves it, it achieves better results on one-dimensional time series data.
[0051] (5) The present invention takes into account the different distribution characteristics of completely abnormal data and partially abnormal data, and uses two classification networks for training completely abnormal data and partially abnormal data respectively. Compared with using a single classification network for simultaneous training, the accuracy is higher.
[0052] In summary, the model and method provided by the present invention can provide effective abnormality diagnosis text information, effectively improve the success rate of on-site investigations, and reduce the expert resources required when generating diagnostic reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a framework diagram of the model building method provided by an embodiment of the present invention.
[0054] Figure 2 This is a structural diagram of the abnormal days detection module provided by an embodiment of the present invention.
[0055] Figure 3 This is a structural diagram of a classifier model provided by an embodiment of the present invention.
[0056] Figure 4 This is a structural diagram of a residual block with attention in a classifier model provided by an embodiment of the present invention.
[0057] Figure 5 A schematic diagram of abnormal data phenomena is provided for an embodiment of the present invention, where (a)-(e) in the figure represent different abnormal data phenomena respectively.
[0058] Figure 6 This is an overall test flow chart provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to illustrate 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 may be combined with each other as long as they do not conflict with each other.
[0060] like Figure 1 As shown, the method for constructing a measurement abnormality diagnosis information generation model for a smart grid provided by the present invention includes:
[0061] A training dataset is constructed using a week's worth of abnormal electricity usage data. Labels are the number of days with abnormal electricity usage, abnormal data phenomena, and corresponding anomaly type predictions. The abnormal data phenomena include descriptions of overall electricity usage, background load, electricity usage curves, and peak electricity usage.
[0062] Build an abnormal day detection module to estimate the number of abnormal electricity usage days corresponding to the abnormal electricity usage data of a user in a week in the training dataset; use the abnormal electricity usage data of a user in a week as input and the abnormal electricity usage days as labels to train the abnormal day detection module;
[0063] Build an abnormal electricity consumption data judgment module to determine whether the abnormal electricity consumption data of a user in a week is completely abnormal data or partially abnormal data. Among them, if the number of abnormal electricity consumption days in a week is 7, it is completely abnormal data, otherwise it is partially abnormal data. That is, every day in a week is an abnormal electricity consumption day, and the electricity consumption data with abnormal electricity consumption behavior every day is called completely abnormal data, otherwise it is called partially abnormal data;
[0064] Two first classification networks with identical structures are constructed. Completely abnormal data is input into one of the first classification networks to train the classification network, and partially abnormal data is input into the other first classification network to train the classification network. Predicted text templates are output for each network, the loss is calculated, and the parameters of the two first classification networks are reversely adjusted to converge the loss. The output predicted text templates contain abnormal data phenomena and corresponding abnormal type inferences. The abnormal data phenomena include descriptions of overall power consumption, background load, power consumption curve, and power consumption peak.
[0065] Build an abnormal diagnosis information generation module to fill the abnormal days generated by the abnormal days detection module into the generated text template to complete the generation of abnormal diagnosis information;
[0066] Among them, the metering abnormality diagnosis information generation model of the smart grid includes an abnormal day detection module, an abnormal electricity consumption data judgment module, two first classification networks and an abnormal diagnosis information generation module.
[0067] Specifically, if Figure 2 As shown, in the process of building the abnormal day detection module, the abnormal day detection module includes a feature extraction network and a second classification network connected in series; the feature extraction network is preferably a one-dimensional residual convolutional network, and the sampling frequency is preferably half an hour. After the abnormal electricity consumption data sample is input into the feature extraction network, a feature map is output; a regional weighting mechanism is adopted for the output feature map, and the weights are strengthened according to the starting coordinates of each day of the 7 days of the week, and the weights of the feature maps of other days are weakened, thereby obtaining seven different feature maps corresponding to seven days from Monday to Sunday; and then they are input into the second classification network respectively to obtain classification results.
[0068] In the present invention, the data set input into the feature extraction network is a week's abnormal electricity consumption data. Unlike the general single-day abnormal electricity consumption judgment model, the abnormal day detection module in the present invention actually detects whether there is abnormal electricity consumption behavior every day, but the input is a week's data. The input of data over a longer time period means an increase in adjacent background information, which is better than the general single-day abnormal electricity consumption judgment model.
[0069] In step S2, the second classification network is a three-layer fully connected layer network plus a Sigmoid function layer. In this embodiment, the number of channels output by the three-layer fully connected layer network is 2048, 512, and 2 respectively, and the final output is a label of 0 or 1, where 1 represents the presence of abnormal electricity usage behavior on that day, and 0 represents the absence of abnormal electricity usage behavior on that day. The loss function is the cross entropy loss function:
[0070]
[0071] 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, 1 if it does, 0 if it does not, then sum all categories, then sum all samples, and find the average.
[0072] The regional weighted mechanism formula is as follows:
[0073] A(X mn ,bbox)=alpha·X mn ,alpha=[B1,O,B2]
[0074] Where B1=[a1,…,a i ],a1=…=a i =α
[0075] O=[b1,…,b j ],b1=…=b j =β
[0076] B2=[c1,…,c k ],c1=…=c k =α
[0077] i=bbox l ,j=bbox r -bbox l +1,k=n-bbox r +1
[0078] Among them, X mnis 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 area, bbox l is the left coordinate value, bbox r is the right coordinate value, α and β are hyper parameters, and the preferred α is 0.6 and β is 1.2.
[0079] Specifically, in the process of building two first classification networks with the same structure, each first classification network includes three residual modules with attention mechanisms connected in series, a drouout layer, and a fully connected layer; the completely abnormal data or partially abnormal data are input into the corresponding first classification network respectively, and pass through the three residual modules with attention mechanisms connected in series, the drouout layer, and the fully connected layer in sequence to obtain the predicted text template;
[0080] Among them, each residual module uses channel attention and spatial attention mechanism to calculate the channel attention weight score and spatial attention weight score, the channel attention weight score M c (F) and spatial attention weight score M s (F) is calculated as follows:
[0081] M c (F)=σ(Flatten(AvgPool(F))+Flatten(MaxPool(F)))
[0082] M s (F)=σ(f i ([AvgPool(F);MaxPool(F)]))
[0083] In the formula, F represents the input feature map, σ represents the sigmoid function, AvgPool represents the average pooling operation, MaxPool represents the maximum pooling operation, and Flatten represents the flattening operation, which compresses the original two-dimensional data into one dimension. i represents the convolution calculation with the convolution kernel i. In this embodiment, i=7 is preferred.
[0084] In this embodiment, during the process of building two first classification networks with the same structure, the structure of each first classification network is as follows: Figure 3 As shown in the figure, the sample input is of size 1x336. After three residual convolution modules with attention, the output size is 256x42. The dropout layer inactivates some neural network units, which can effectively suppress overfitting. The final output dimension of the fully connected layer is the number of classified categories to complete the output of the classification score. Among them, the loss function still uses the above-mentioned cross entropy loss function.
[0085] like Figure 4 As shown in the figure, there are three residual convolution modules with attention. Each module has three residual layers with attention. The three convolution modules are all one-dimensional convolution modules with convolution kernel sizes of 1, 3, and 1 respectively. Each attention residual convolution module is weighted by channel attention and spatial attention mechanisms respectively. The input samples plus the output of the convolution module and the attention module constitute a residual module with a total of 27 layers.
[0086] Specifically, due to the lack of a large amount of low-voltage abnormal electricity metering data during the dataset construction process, abnormal data modeling was performed on the CER normal low-voltage user electricity dataset from ISSDA. Normal user electricity usage data was converted into abnormal electricity usage data through mathematical modeling. In the prior art, datasets were constructed using mathematical models based on FDI. In the present invention, a partial abnormal dataset was constructed using this mathematical model, and a complete abnormal dataset was constructed using both the FDI-based and improved FDI mathematical models.
[0087] Among them, there are 6 mathematical models based on FDI, as shown in Table 1:
[0088] Table 1 Mathematical model based on FDI
[0089]
[0090] There are seven improved FDI mathematical models proposed in this invention, as shown in Table 2 below:
[0091] Table 2 Improved FDI mathematical model of the present invention
[0092]
[0093]
[0094] In the table: X is the electric energy metering displayed after the power consumption is abnormal, and x is the normal power consumption. is the average power consumption, a, k, c are random numbers, a t A random number that is different for each sampling point, ax represents the a percentile point of x, and t is the time.
[0095] That is, when constructing a user's abnormal electricity usage data for a week, the abnormal electricity usage data for the user for a week includes complete abnormal data and partial abnormal data. The complete abnormal data can be constructed using one or more methods from FDI7 to FDI13; alternatively, the complete abnormal data can be constructed using one or more methods from FDI1 to 13, and the partial abnormal data can be constructed using one or more methods from FDI1 to 6. In this embodiment, the complete abnormal data is preferably constructed using 13 methods from FDI1 to 13, and the partial abnormal data is preferably constructed using 6 methods from FDI1 to 6. The abnormal electricity usage dataset contains a total of 110,000 samples, of which 77,000 are training sets and 33,000 are test sets.
[0096] In the embodiment of the present invention, when constructing some abnormal data, 2-6 consecutive days are randomly selected and constructed in the form of FDI1-6, while the original data are used for the other days.
[0097] The text diagnostic information mainly focuses on the different data manifestations of abnormal power consumption and normal power consumption, which can be divided into two parts: one is the description of the abnormal data phenomenon, and the other is the speculation of the abnormal type.
[0098] The description of abnormal data phenomena mainly includes the description of overall power consumption, background load, power consumption curve, and power consumption peak, such as Figure 5 As shown in (a)-(e), the corresponding abnormal data phenomena are described as follows: the overall power consumption is low and the background load is low; the power consumption curve is irregular and there is forced truncation; the background load is significantly reduced; the overall power consumption is low and there is no power consumption peak, which does not conform to the general power consumption law; the background load is low and irregular.
[0099] The inference of the abnormality type mainly depends on the different types of FDI. The specific abnormality diagnosis text information description specifications are shown in Table 3 below:
[0100] Table 3 Abnormal diagnosis text information description
[0101]
[0102] Combining the abnormal data phenomenon and the inferred abnormal type is the complete text diagnostic information. In this invention, FDI1, FDI5, and FDI8 are divided into two categories, corresponding to two different text templates: one category shows that the abnormal data still has a large power consumption after being constructed using the corresponding FDI method, and the other category shows that the power consumption is small after being constructed using FDI. For other FDI types, each category corresponds to a text template. The specific correspondence between the complete abnormal data (i.e., the text diagnostic information) is shown in Table 4 below:
[0103] Table 4 Abnormal diagnosis text information description corresponding to completely abnormal data
[0104]
[0105]
[0106] In the table, x m is the median of the input samples, is the median mean of all samples.
[0107] The abnormal diagnosis text information corresponding to some abnormal data is described in Table 5 below, where X and Y are both placeholders. Y is the position identifier for inserting abnormal days, and X is the position identifier for inserting normal days. Except for abnormal days, all other days in a week are normal days, with a format such as "Monday to Friday".
[0108] Table 5 Description of abnormal diagnosis text information corresponding to some abnormal data
[0109]
[0110]
[0111] The overall testing process of the present invention is as follows Figure 6 As shown, the input abnormal electricity metering data is first normalized and fed into the abnormal day detection module to obtain the predicted abnormal days. Whether abnormal electricity usage occurs every day of the week is used as a criterion to determine whether the data is abnormal for the entire week. If so, it is fed into the convolution-based complete anomaly classifier network (i.e., one of the first classification networks); if not, it is fed into the convolution-based partial anomaly classifier network (i.e., another first classification network). After the classification result is obtained, it is matched with the corresponding text template, in which the abnormal day information is replaced by a placeholder. The abnormal day information is output by the abnormal day detection network and then filled into the text template to complete the generation of complete abnormal diagnosis information.
[0112] The present invention also provides a method for generating metering abnormality diagnosis information for smart grids, comprising: inputting abnormal electricity consumption data of the user to be detected for one week into an abnormality diagnosis information generation model constructed using the above-mentioned method for constructing a metering abnormality diagnosis information generation model for smart grids, and outputting abnormality diagnosis information.
[0113] The present invention also provides a system for generating measurement abnormality diagnosis information for a smart grid, comprising:
[0114] Abnormal day detection module, used to detect the abnormal power consumption days corresponding to the user's abnormal power consumption data in a week;
[0115] The abnormal electricity consumption data judgment module is used to judge whether the abnormal electricity consumption data of the user in a week is completely abnormal data or partially abnormal data. If the number of abnormal electricity consumption days is 7, it is completely abnormal data, otherwise it is partially abnormal data;
[0116] The classification network module includes two first classification networks with the same structure. The completely abnormal data and the partially abnormal data are input into the two first classification networks respectively, and the predicted text templates are output. The text templates include the abnormal data phenomenon and the corresponding abnormal type speculation, wherein the abnormal data phenomenon includes the description of the overall power consumption, background load, power consumption curve and power consumption peak;
[0117] The abnormal diagnosis information generation module is used to fill the abnormal days generated by the abnormal day detection module into the text template to generate abnormal diagnosis information.
[0118] It is easy for those skilled in the art to understand that the above 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 scope of protection of the present invention.
Claims
1. A method for constructing a measurement anomaly diagnosis information generation model for a smart grid, characterized in that: include: Build an abnormal day detection module to estimate the number of abnormal electricity consumption days corresponding to the abnormal electricity consumption data of users in a week in the training dataset; Taking the abnormal electricity usage data of a user for a week as input and the abnormal electricity usage days as labels, the abnormal day detection module is trained, wherein the training data set includes the abnormal electricity usage data of the user for a week; Build an abnormal electricity consumption data judgment module to determine whether the abnormal electricity consumption data of a user in a week is completely abnormal data or partially abnormal data. If the number of abnormal electricity consumption days is 7, it is completely abnormal data, otherwise it is partially abnormal data; Building two first classification networks with identical structures, training the two first classification networks using the complete abnormal data and the partial abnormal data, respectively, and outputting predicted text templates, wherein the text templates include abnormal data phenomena and corresponding abnormal type inferences, wherein the abnormal data phenomena include descriptions of overall power consumption, background load, power consumption curve, and power consumption peak; Building an abnormal diagnosis information generation module, which is used to fill the abnormal days generated by the abnormal days detection module into the text template to generate abnormal diagnosis information; The measurement abnormality diagnosis information generation model of the smart grid includes an abnormal day detection module, an abnormal power consumption data judgment module, two first classification networks and an abnormal diagnosis information generation module; The training data set includes completely abnormal data and partially abnormal data; The completely abnormal data is constructed by one or more methods of FDI7-FDI13; Wherein, FDI7-FDI13 are respectively: <h2 style=";text-align:left;direction:ltr">FDI7:<h2 style=";text-align:left;direction:ltr"> FDI8: <h2 style=";text-align:left;direction:ltr">FDI9:<h2 style=";text-align:left;direction:ltr"> FDI10: FDI11: FDI12: FDI13: Where, It is the electric energy metering displayed after the power is abnormal. For normal power consumption, is the average power consumption, , , is a random number, A different random number for each sampling point. express of percentile, For time.
2. The model building method according to claim 1, characterized in that Each first classification network includes three residual modules with attention mechanisms connected in series, a drouout layer and a fully connected layer. The completely abnormal data and the partially abnormal data are respectively input into the two first classification networks to train the first classification networks and output predicted text templates.
3. The model building method according to claim 2, characterized in that: Channel attention weight score of each residual module with attention mechanism And the spatial attention weight score They are: Where, represents the input feature map, represents the sigmoid function, represents the average pooling operation, represents the maximum pooling operation, Indicates a flattening operation. The representative convolution kernel is Convolution calculation.
4. The model building method according to claim 1, characterized in that The abnormal days detection module includes a feature extraction network and a second classification network connected in series; the feature extraction network is a one-dimensional residual convolutional network.
5. The model building method according to claim 4, characterized in that: The second classification network is a three-layer fully connected layer network plus a Sigmoid function layer.
6. The model building method according to claim 1, characterized in that: The complete abnormal data can also be constructed by one or more methods of FDI1-FDI6, and the partial abnormal data can be constructed by one or more methods of FDI1-FDI6; Wherein, the FDI1-FDI16 are respectively: FDI1: ; FDI 2: <h2 style=";text-align:left;direction:ltr">FDI3:<h2 style=";text-align:left;direction:ltr"> FDI4: FDI5: FDI6: Where, It is the electric energy metering displayed after the power is abnormal. For normal power consumption, is the average power consumption, , , is a random number, A different random number for each sampling point, express of percentile, For time.
7. A method for generating measurement abnormality diagnosis information for a smart grid, characterized in that: include: The abnormal electricity consumption data of the user to be detected for one week is input into the abnormal diagnosis information generation model constructed by the method for constructing a metering abnormal diagnosis information generation model for a smart grid according to any one of claims 1 to 6, and the abnormal diagnosis information is output.
8. A system for generating measurement abnormality diagnosis information for a smart grid, characterized in that: include: The abnormal day detection module is used to estimate the number of abnormal electricity consumption days corresponding to the abnormal electricity consumption data of users in a week in the training dataset; The abnormal electricity consumption data judgment module is used to judge whether the abnormal electricity consumption data of the user in a week is completely abnormal data or partially abnormal data. If the number of abnormal electricity consumption days is 7, it is completely abnormal data, otherwise it is partially abnormal data; A classification network module includes two first classification networks with identical structures. The completely abnormal data and the partially abnormal data are respectively input into the two first classification networks, and a predicted text template is output. The text template includes abnormal data phenomena and corresponding abnormal type inferences, wherein the abnormal data phenomena include descriptions of overall power consumption, background load, power consumption curve, and power consumption peak. an abnormality diagnosis information generating module, configured to fill the abnormality days generated by the abnormality days detecting module into the text template to generate abnormality diagnosis information; The training data set includes completely abnormal data and partially abnormal data; The completely abnormal data is constructed by one or more methods of FDI7-FDI13; Wherein, FDI7-FDI13 are respectively: <h2 style=";text-align:left;direction:ltr">FDI7:<h2 style=";text-align:left;direction:ltr"> FDI8: <h2 style=";text-align:left;direction:ltr">FDI9:<h2 style=";text-align:left;direction:ltr"> FDI10: FDI11: FDI12: FDI13: Where, It is the electric energy metering displayed after the power is abnormal. For normal power consumption, is the average power consumption, , , is a random number, A different random number for each sampling point. express of percentile, For time.
9. 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 prompt the processor to implement the method for constructing a measurement abnormality diagnosis information generation model for a smart grid as described in any one of claims 1 to 6 and / or the method for generating measurement abnormality diagnosis information for a smart grid as described in claim 7.
Citation Information
Patent Citations
Gateway electric energy meter data anomaly detection method and system based on pseudo abnormal point identification
CN112213687A
Industrial machine pump fault prediction method and system based on federated learning framework
CN114580546A