User electricity consumption anomaly diagnosis method, device and medium under an under-data scenario

CN118820919BActive Publication Date: 2026-10-23NORTH CHINA GRID MEASUREMENT CENT +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410968086.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2026-10-23
Estimated Expiration
2044-07-18

AI Technical Summary

Technical Problem

[0004]针对现有技术的上述不足,本申请提供一种欠数据场景下用户用电异常诊断方法、设备及介质,以解决现有的方案涉及的异常用电数据缺失、数据缺失导致的异常用电数据集与正常用电数据集的完整性不平衡、常规的用电异常诊断方法未能有效考虑序列中的时序信息以及静态信息,进而容易导致用电异常判断准确率低的问题

Benefits of technology

本申请通过将第一训练数据集作为对抗插补网络方法的输入数据,进而通过训练好的生成器模型与辨别器模型,对第一训练数据集进行数据插补,以获得无缺失值的第一训练数据集,解决现有的方案涉及的异常用电数据缺失的问题以及解决了数据缺失导致的异常用电数据集与正常用电数据集的完整性不平衡的问题。通过将异常用电静态特征和异常用电时序特征映射为特征向量,通过典型故障标签、特征向量,训练Bi-GRU神经网络模型,获得训练好的Bi-GRU神经网络模型,解决了常规的用电异常诊断方法未能有效考虑序列中的时序信息以及静态信息,进而容易导致用电异常判断准确率低的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820919B_ABST
    Figure CN118820919B_ABST
Patent Text Reader

Abstract

The application discloses a user power consumption anomaly diagnosis method and device under an under-data scenario and a medium, mainly relates to the power consumption anomaly diagnosis technical field, and is used to solve the problems that the existing scheme involves missing of abnormal power consumption data, the data missing completion method fails to consider the time sequence information and the static information in the sequence, and further easily leads to low accuracy of power consumption anomaly judgment. Including: data interpolation is performed on the first training data set to obtain the first training data set without missing values; abnormal power consumption static features and abnormal power consumption time sequence features are mapped into feature vectors; a neural network model is trained to obtain a trained neural network model; the trained neural network model is used to determine a predicted fault state corresponding to test power consumption data; a mean value fluctuation threshold and a standard deviation fluctuation threshold are calculated; when the actual mean value is higher than the mean value fluctuation threshold and the actual standard deviation is higher than the standard deviation fluctuation threshold, a predicted fault state early warning process is performed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electrical safety hazard diagnosis technology, and in particular to a method, device and medium for diagnosing abnormal user electricity consumption in scenarios with insufficient data. Background Technology

[0002] With the continuous development of smart distribution networks and advanced metering systems, power distribution and consumption data are gradually exhibiting characteristics of large volume, diverse types, and rapid growth. However, due to factors such as equipment failures, communication failures, power grid fluctuations, and power management, this data includes abnormal power consumption data. Timely detection and accurate identification of these abnormal data can help identify potential problems before a fault occurs, allowing for proactive measures to protect users' power safety and thus improve the quality of power services.

[0003] Traditional methods for identifying abnormal electricity consumption (potential electricity hazards) can be categorized into mechanistic model-based methods, signal identification-based methods, and artificial intelligence-based methods. Mechanism-based methods require extensive domain knowledge to establish relevant physical models, while signal identification and artificial intelligence methods require large amounts of accurate datasets. Currently, with the rapid increase in the number of power installations and renewable energy grid connections, grid stability faces challenges. Power monitoring equipment suffers from network instability and sensor malfunctions, leading to missing training data and rendering raw measurement data unusable. Furthermore, normal electricity consumption data is complete, while abnormal electricity consumption data is generally incomplete, resulting in an imbalance between the abnormal and normal electricity consumption datasets used in existing solutions. Additionally, conventional methods for diagnosing abnormal electricity consumption, including KNN and isolated forest algorithms, fail to adequately consider temporal and static information within the sequence, potentially leading to reduced accuracy. Summary of the Invention

[0004] To address the aforementioned shortcomings of existing technologies, this application provides a method, device, and medium for diagnosing abnormal power consumption in scenarios with insufficient data. This addresses the problems of missing abnormal power consumption data, imbalance between the abnormal power consumption dataset and the normal power consumption dataset caused by missing data, and the failure of conventional power consumption anomaly diagnosis methods to effectively consider temporal and static information in the sequence, which easily leads to low accuracy in judging power consumption anomalies.

[0005] Firstly, this application provides a method for diagnosing abnormal user electricity consumption in a data-deficient scenario. The method includes: acquiring actual abnormal user electricity consumption data within a preset historical time period as an initial training dataset; performing data standardization on the initial training dataset to obtain a first training dataset with consistent electricity consumption units; labeling the abnormal electricity consumption data in the first training dataset that contain preset typical abnormal electricity consumption conditions with typical fault labels; employing a generative adversarial interpolation network method to randomly sample a preset number of abnormal electricity consumption data from the first training dataset, and then training the generator model and discriminator model in the adversarial interpolation network using the preset number of abnormal electricity consumption data; using the first training dataset as input data for the adversarial interpolation network method, and then performing data interpolation on the first training dataset using the trained generator model and discriminator model to obtain a first training dataset without missing values; extracting static features and temporal features of abnormal electricity consumption from the final training data; and utilizing... The Bi-GRU neural network model maps the static and temporal characteristics of abnormal power consumption into feature vectors; it determines the feature vectors corresponding to typical fault labels; using these typical fault labels and feature vectors, it trains the Bi-GRU neural network model until the weighted sum between the generative adversarial loss and the adaptive learning loss of the first training dataset corresponding to the Bi-GRU neural network model is minimized, thus obtaining a trained Bi-GRU neural network model; after obtaining test power consumption data, it uses the trained Bi-GRU neural network model to determine the predicted fault state corresponding to the test power consumption data; it obtains the set weights corresponding to the predicted fault state; it calculates the actual mean and actual standard deviation; based on the set weights and the fluctuation time range corresponding to the test power consumption data, it calculates the mean fluctuation threshold and standard deviation fluctuation threshold; when the actual mean is higher than the mean fluctuation threshold and the actual standard deviation is higher than the standard deviation fluctuation threshold, it performs a predicted fault state early warning process.

[0006] Furthermore, before labeling the abnormal power consumption data in the first training dataset that exhibit pre-defined typical abnormal power consumption conditions with typical fault labels, the method also includes: Based on a preset front time window and a preset back time window, obtain the forward abnormal power consumption data and the backward abnormal power consumption data corresponding to each abnormal power consumption data in the first training dataset; wherein, the abnormal power consumption data includes the power consumption, and the preset front time window = the preset back time window; Through the formula: Calculate and obtain electricity consumption trends; in, This is used to represent the electricity consumption trend on day i, where i ranges from [1, a+a+1], d is the date of the time window, and a represents the preset before and after time windows. The electricity consumption on day d is... ;when < When the cumulative total value is greater than the preset cumulative value, it is determined that the current abnormal power consumption data is true abnormal power consumption data. When the current abnormal electricity consumption data is a genuine abnormal electricity consumption data, the formula is used: Calculate the line loss rate; where, This represents the line loss rate on day i. This represents the total electricity consumption of n users on the line on day i. This represents the line power supply on day i, and n represents the number of users on the line; retrieve all users within the range [1, a+a+1]. The average value is used to determine the current abnormal power consumption data. When the average value is greater than the preset value, the abnormal power consumption data is determined to be the abnormal power consumption data of the preset typical abnormal power consumption condition, and a typical fault label needs to be marked.

[0007] Furthermore, a generative adversarial interpolation network method is employed. A predetermined number of abnormal electricity consumption data points are randomly sampled from the first training dataset. These abnormal electricity consumption data points are then used to train the generator and discriminator models within the adversarial interpolation network. Specifically, this includes: Through the formula: , , Construct the initial interpolation matrix and the estimation matrix of the generator model; Where Z represents a random matrix, M represents a mask matrix, X represents abnormal power consumption data with missing fault values; G represents a generator network, and b represents a preset constant; the mask matrix is ​​used to record the missing data positions in the first training dataset, and then the missing data at the missing data positions is imputed with 0, and the missing data at non-missing data positions is imputed with 1. Through the formula: , Construct the initial discriminator model; in, The matrix represents missing data indication. Represents a random vector. This represents a discriminator network. It belongs to [0,1] and The value is inversely proportional to the probability of missing data at the current location; the generator and discriminator models in the adversarial interpolation network are trained using a preset number of abnormal electricity consumption data.

[0008] Furthermore, before using the first training dataset as input data for the adversarial interpolation network method, and then passing it through the trained generator and discriminator models, the method also includes: Using a predetermined amount of abnormal electricity consumption data, the generator and discriminator models in the adversarial interpolation network are iteratively trained; the optimization objective during the iteration process is: , in, This represents the mathematical expectation distribution of the adversarial learning interpolation network. The output data represents the abnormal power consumption data; when the number of iterations reaches the set iteration threshold, the trained generator model and discriminator model are obtained.

[0009] Furthermore, from the final training data, static features and time-series features of abnormal electricity consumption are extracted, specifically including: By pre-setting an embedded time self-attention module, static features and temporal features of abnormal power consumption are extracted from the final training data.

[0010] Furthermore, the feature vector includes temporal feature vectors and static feature vectors, and the typical fault label content is the fault state; A Bi-GRU neural network model is trained using typical fault labels and feature vectors until the weighted sum between the generative adversarial loss and the adaptive learning loss of the first training dataset corresponding to the Bi-GRU neural network model is minimized. This process includes: By generating the adversarial loss formula: Generative adversarial loss is obtained; in, Let J represent the generative adversarial loss, and J represent the number of abnormal electricity consumption data in the first training dataset. {} represents a preset indicator function, Y represents a preset fault category, and y represents the y-th type of fault state. This represents the j-th abnormal electricity consumption data. This represents the time-series feature vector of the j-th abnormal electricity consumption data. This represents the static feature vector of the j-th abnormal electricity consumption data. Let represent the conditional probability that the j-th abnormal power consumption data belongs to the y-th type of fault state. The temporal feature vector representing the y-th type of fault state is extracted from the feature vector whose typical fault label content is the y-th type of fault state. ; Through the adaptive learning loss formula: Calculate the adaptive learning loss; in, This indicates that the Bi-GRU neural network model encodes feature vectors into corresponding virtual vectors; Until the weighted sum is minimized: A well-trained Bi-GRU neural network model is obtained; among which, This indicates the preset balance parameters.

[0011] Furthermore, the set weights corresponding to the predicted fault states are obtained, specifically including: Based on the preset mapping relationship between the predicted fault state and the preset weight, the preset weight corresponding to the current predicted fault state is determined.

[0012] Furthermore, the actual mean and actual standard deviation are calculated; based on the set weights and the fluctuation time range corresponding to the test electricity consumption data, the mean fluctuation threshold and standard deviation fluctuation threshold are calculated, specifically including: according to the formula: , , Calculation obtained and ;in, This represents the actual mean. Standard deviation, c represents day c, C represents the range of fluctuation data, and c belongs to C.

[0013] According to the formula: , , Calculation obtained and ;in, Indicates the threshold for mean fluctuation. Indicates the standard deviation fluctuation threshold. and This indicates that a weight is set.

[0014] Secondly, this application provides a diagnostic device for abnormal power consumption of users in a data shortage scenario. The device includes: a processor; and a memory storing executable code thereon. When the executable code is executed, the processor performs a diagnostic method for abnormal power consumption of users in a data shortage scenario as described above.

[0015] Thirdly, this application provides a non-volatile computer storage medium storing computer instructions thereon, which, when executed, implement a method for diagnosing abnormal power consumption in a data shortage scenario as described above.

[0016] Those skilled in the art will understand that this application has at least the following beneficial effects: This application addresses the problem of missing abnormal power consumption data in existing solutions by using a first training dataset as input to an adversarial interpolation network method. The first training dataset is then interpolated using a trained generator and discriminator model to obtain a first training dataset without missing values. This resolves the issue of incomplete abnormal power consumption data and the imbalance between the abnormal and normal power consumption datasets caused by missing data. Furthermore, by mapping the static and temporal features of abnormal power consumption to feature vectors, a Bi-GRU neural network model is trained using typical fault labels and feature vectors. This results in a well-trained Bi-GRU neural network model, addressing the problem that conventional power consumption anomaly diagnosis methods fail to effectively consider temporal and static information in the sequence, leading to low accuracy in power consumption anomaly detection.

[0017] In addition, after obtaining the predicted fault state through the trained Bi-GRU neural network model, this application can calculate the actual mean, actual standard deviation, mean fluctuation threshold, and standard deviation fluctuation threshold to further verify the accuracy of the predicted fault state and further ensure the accuracy of electrical anomaly judgment. Attached Figure Description

[0018] The following description refers to some embodiments of this disclosure, in which: Figure 1 This is a flowchart of a method for diagnosing abnormal power consumption in a data shortage scenario provided in an embodiment of this application.

[0019] Figure 2 This is a schematic diagram of the internal structure of a user power consumption anomaly diagnostic device in a data shortage scenario provided in an embodiment of this application. Detailed Implementation

[0020] Those skilled in the art should understand that the embodiments described below are merely preferred embodiments of this disclosure and do not imply that this disclosure can only be implemented through these preferred embodiments. These preferred embodiments are merely used to explain the technical principles of this disclosure and are not intended to limit the scope of protection of this disclosure. Based on the preferred embodiments provided by this disclosure, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of this disclosure.

[0021] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0022] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0023] This application provides a method for diagnosing abnormal user power consumption in scenarios with insufficient data, such as... Figure 1 As shown in the embodiments of this application, the method mainly includes the following steps: Step 110: Obtain actual user abnormal electricity consumption data within a preset historical time period as the initial training dataset; perform data standardization processing on the initial training dataset to obtain a first training dataset with consistent electricity consumption units; label the abnormal electricity consumption data in the first training dataset that have preset typical abnormal electricity consumption conditions with typical fault labels.

[0024] It should be noted that the electricity consumption data from abnormal power usage may differ in magnitude. Therefore, the initial training dataset is standardized to obtain a first training dataset with consistent electricity consumption units. The typical fault labels here refer to specific types of fault states.

[0025] In addition, before labeling the abnormal power consumption data with preset typical abnormal power consumption conditions in the first training dataset with typical fault labels, this application can also obtain the abnormal power consumption data with preset typical abnormal power consumption conditions from the first training dataset. The specific process can be as follows: Based on a preset front time window and a preset back time window, obtain the forward abnormal power consumption data and the backward abnormal power consumption data corresponding to each abnormal power consumption data in the first training dataset; wherein, the abnormal power consumption data includes the power consumption, and the preset front time window = the preset back time window; Through the formula: The electricity consumption trend is calculated.

[0026] in, This is used to represent the electricity consumption trend on day i, where i ranges from [1, a+a+1], d is the date of the time window, and a represents the preset before and after time windows. The electricity consumption on day d is... .

[0027] when < When the cumulative total value is increased by 1, the total value from the preset previous time window to the preset next time window is obtained; when the cumulative total value is greater than the preset cumulative value, the current abnormal power consumption data is determined to be true abnormal power consumption data.

[0028] When the current abnormal electricity consumption data is a genuine abnormal electricity consumption data Through the formula: Calculate the line loss rate.

[0029] in, This represents the line loss rate on day i. This represents the total electricity consumption of n users on the line on day i. Let n represent the power supply to the line on day i, and n represent the number of users on the line.

[0030] Get all values ​​in the range [1, a+a+1]. The average value is used to determine the current abnormal power consumption data. When the average value is greater than the preset value, the abnormal power consumption data is determined to be the abnormal power consumption data of the preset typical abnormal power consumption condition, and a typical fault label needs to be marked.

[0031] It should be noted that the preset time window and the preset time window can be 5, and the range [1, a+a+1] is [1, 11].

[0032] Based on step 110, those skilled in the art will understand that the electricity consumption of normal users is relatively stable within a cycle, while the electricity consumption of abnormal users shows a continuous decline. This application is approved... The comparison of accumulated values ​​enables the acquisition of abnormal electricity consumption data showing a continuous decline. To further refine the abnormal electricity consumption data, since users' daily electricity consumption has a certain periodic fluctuation, using the day as the statistical unit for line loss rate may pose an error risk. Therefore, the average line loss rate of the previous 5 days is used for evaluation. If this value is greater than a preset value (e.g., 1%), the current abnormal electricity consumption data is determined to be abnormal electricity consumption data under a preset typical abnormal electricity consumption condition, and a typical fault label needs to be marked.

[0033] Step 120: Using the generative adversarial interpolation network method, a preset number of abnormal power consumption data are randomly sampled from the first training dataset, and then the generator model and discriminator model in the adversarial interpolation network are trained using the preset number of abnormal power consumption data.

[0034] Specifically, a generative adversarial interpolation network method is employed. A predetermined number of abnormal electricity consumption data points are randomly sampled from the first training dataset. These abnormal electricity consumption data points are then used to train the generator and discriminator models within the adversarial interpolation network. Specifically, this can be achieved by: Through the formula: , , Construct the initial interpolation matrix and the estimation matrix of the generator model.

[0035] Where Z represents a random matrix, M represents a mask matrix, and X represents abnormal power consumption data with missing fault values; G represents a generator network, and b represents a preset constant; the mask matrix is ​​used to record the missing data positions in the first training dataset, and then the missing data at the missing data positions is imputed with 0, and the missing data at non-missing data positions is imputed with 1.

[0036] Through the formula: , Construct the initial discriminator model.

[0037] in, The matrix represents missing data indication. Represents a random vector. This represents a discriminator network. Belongs to [0,1], and The value is inversely proportional to the probability of missing data at the current location.

[0038] The generator and discriminator models in the adversarial interpolation network are trained using a preset number of abnormal electricity consumption data.

[0039] Furthermore, the training steps in this application can be specifically described as follows: By using a preset number of abnormal electricity consumption data, the generator model and discriminator model in the adversarial interpolation network are iteratively trained.

[0040] The optimization objective during the iteration process is:

[0041] in, This represents the mathematical expectation distribution of the adversarial learning interpolation network. The output data represents the abnormal power consumption data; when the number of iterations reaches the set iteration threshold, the trained generator model and discriminator model are obtained.

[0042] Based on step 120, those skilled in the art will understand that after training the generator model and the discriminator model, this application can synthesize missing data at missing data locations, thus solving the problem of missing abnormal electricity consumption data and the problem of imbalance between the completeness of the abnormal electricity consumption dataset and the normal electricity consumption dataset caused by missing data.

[0043] Step 130: Use the first training dataset as input data for the adversarial imputation network method, and then use the trained generator model and discriminator model to imput the first training dataset to obtain a first training dataset without missing values.

[0044] Step 140: Extract the static features and time-series features of abnormal power consumption from the final training data; use the Bi-GRU neural network model to map the static features and time-series features of abnormal power consumption into feature vectors; determine the feature vectors corresponding to typical fault labels.

[0045] Specifically, from the final training data, static features and time-series features of abnormal electricity consumption are extracted, which can be: By pre-setting an embedded time self-attention module, static features and temporal features of abnormal power consumption are extracted from the final training data.

[0046] In this process, the Bi-GRU neural network model is used to map the static characteristics and time-series characteristics of abnormal power consumption into feature vectors. The specific process can be implemented by existing technologies, and this application does not limit it.

[0047] Step 150: Train the Bi-GRU neural network model using typical fault labels and feature vectors until the weighted sum between the generative adversarial loss of the first training dataset and the adaptive learning loss of the first training dataset corresponding to the Bi-GRU neural network model is minimized, thus obtaining the trained Bi-GRU neural network model.

[0048] It should be noted that the feature vector includes time-series feature vectors and static feature vectors, and the typical fault label content is the fault status.

[0049] Specifically, a Bi-GRU neural network model is trained using typical fault labels and feature vectors until the weighted sum between the generative adversarial loss and the adaptive learning loss of the first training dataset corresponding to the Bi-GRU neural network model is minimized, thus obtaining a trained Bi-GRU neural network model. This can be achieved by: By generating the adversarial loss formula: , thus generating adversarial loss.

[0050] in, Let J represent the generative adversarial loss, and J represent the number of abnormal electricity consumption data in the first training dataset. {} represents a preset indicator function, Y represents a preset fault category, and y represents the y-th type of fault state. This represents the j-th abnormal electricity consumption data. This represents the time-series feature vector of the j-th abnormal electricity consumption data. Let represent the static feature vector of the j-th abnormal electricity consumption data.

[0051] Let represent the conditional probability that the j-th abnormal power consumption data belongs to the y-th type of fault state. The temporal feature vector representing the y-th type of fault state is extracted from the feature vector whose typical fault label content is the y-th type of fault state. .

[0052] Through the adaptive learning loss formula: The adaptive learning loss is calculated.

[0053] in, This indicates that the Bi-GRU neural network model encodes feature vectors into corresponding virtual vectors; until the weighted sum is minimized: A well-trained Bi-GRU neural network model is obtained; among which, This indicates the preset balance parameters.

[0054] Step 160: After obtaining the test power consumption data, determine the predicted fault state corresponding to the test power consumption data through the trained Bi-GRU neural network model; obtain the set weights corresponding to the predicted fault state; calculate the actual mean and actual standard deviation; based on the set weights and the fluctuation time range corresponding to the test power consumption data, calculate the mean fluctuation threshold and standard deviation fluctuation threshold; when the actual mean is higher than the mean fluctuation threshold and the actual standard deviation is higher than the standard deviation fluctuation threshold, perform predictive fault state early warning processing.

[0055] The specific process for obtaining the set weights corresponding to the predicted fault states can be as follows: Based on the preset mapping relationship between the predicted fault state and the preset weight, the preset weight corresponding to the current predicted fault state is determined.

[0056] Specifically, the actual mean and actual standard deviation are calculated; based on the set weights and the fluctuation time range corresponding to the test electricity consumption data, the mean fluctuation threshold and standard deviation fluctuation threshold are calculated, which can be: According to the formula: , Calculation obtained and .

[0057] in, This represents the actual mean. Standard deviation, c represents day c, C represents the range of fluctuation data, and c belongs to C.

[0058] According to the formula: , Calculation obtained and .

[0059] in, Indicates the threshold for mean fluctuation. Indicates the standard deviation fluctuation threshold. and This indicates that a weight is set.

[0060] Based on step 160, those skilled in the art will understand that, in real-time health monitoring, this application extracts hidden layer features from the real-time monitored data using a trained Bi-GRU neural network model to obtain... Similarly, similarity calculations based on the characteristics of the original fault prototype are used to determine whether the current equipment operating state belongs to a fault state, and the specific fault state type. Furthermore, in actual monitoring, the residual value between the on-site monitoring data and historical learning data will fluctuate within a certain range. Simply judging the similarity with historical fault prototypes can lead to false alarms. Using fluctuation threshold comparison can handle fluctuations within the dynamic threshold range, further improving the accuracy of power anomaly judgment.

[0061] The above are method embodiments of this application. Based on the same inventive concept, this application also provides a device for diagnosing abnormal power consumption in scenarios with insufficient data. Figure 2 As shown, the device includes: a processor; and a memory storing executable code thereon, which, when executed, causes the processor to perform a user power consumption anomaly diagnosis method in a data shortage scenario as described in the above embodiment.

[0062] Specifically, the server obtains actual abnormal electricity consumption data of users within a preset historical time period as the initial training dataset; performs data standardization processing on the initial training dataset to obtain a first training dataset with consistent electricity consumption units; and labels the abnormal electricity consumption data in the first training dataset that have preset typical abnormal electricity consumption conditions with typical fault labels. A generative adversarial interpolation (GAI) network method is adopted. A predetermined number of abnormal power consumption data points are randomly sampled from the first training dataset. These data points are then used to train the generator and discriminator models within the GAI network. The first training dataset is used as input data for the GAI network method. The trained generator and discriminator models then interpolate the first training dataset to obtain a first training dataset without missing values. From the final training data, static and temporal features of abnormal power consumption are extracted. A Bi-GRU neural network model is used to map these static and temporal features into feature vectors. Feature vectors corresponding to typical fault labels are determined. Using these typical fault labels and feature vectors... Train the Bi-GRU neural network model until the weighted sum between the generative adversarial loss and the adaptive learning loss of the first training dataset corresponding to the Bi-GRU neural network model is minimized, thus obtaining a trained Bi-GRU neural network model. After obtaining test power consumption data, determine the predicted fault state corresponding to the test power consumption data through the trained Bi-GRU neural network model. Obtain the set weights corresponding to the predicted fault state. Calculate the actual mean and actual standard deviation. Based on the set weights and the fluctuation time range corresponding to the test power consumption data, calculate the mean fluctuation threshold and standard deviation fluctuation threshold. When the actual mean is higher than the mean fluctuation threshold and the actual standard deviation is higher than the standard deviation fluctuation threshold, perform a predicted fault state early warning process.

[0063] In addition, this application embodiment also provides a non-volatile computer storage medium storing executable instructions, which, when executed, implement the above-described method for diagnosing abnormal power consumption in a data shortage scenario.

[0064] The technical solutions of this disclosure have been described in conjunction with the preceding embodiments. However, it will be readily understood by those skilled in the art that the scope of protection of this disclosure is not limited to these specific embodiments. Without departing from the technical principles of this disclosure, those skilled in the art can disassemble and combine the technical solutions in the above embodiments, and can also make equivalent changes or substitutions to the relevant technical features. Any changes, equivalent substitutions, improvements, etc., made within the technical concept and / or technical principles of this disclosure will fall within the scope of protection of this disclosure.

Claims

1. A method for diagnosing abnormal user power consumption in scenarios with insufficient data, characterized in that, The method includes: Obtain actual abnormal electricity consumption data of users within a preset historical time period as the initial training dataset; perform data standardization processing on the initial training dataset to obtain a first training dataset with consistent electricity consumption units; label the abnormal electricity consumption data in the first training dataset that have preset typical abnormal electricity consumption conditions with typical fault labels. The generative adversarial interpolation network method is adopted. A preset number of abnormal power consumption data are randomly sampled from the first training dataset. Then, the generator model and discriminator model in the adversarial interpolation network are trained using the preset number of abnormal power consumption data. The first training dataset is used as the input data for the adversarial imputation network method. Then, the trained generator model and discriminator model are used to imput the first training dataset to obtain a first training dataset without missing values. From the final training data, extract the static features and time-series features of abnormal power consumption; use the Bi-GRU neural network model to map the static features and time-series features of abnormal power consumption into feature vectors; determine the feature vectors corresponding to typical fault labels; By using typical fault labels and feature vectors, a Bi-GRU neural network model is trained until the weighted sum between the generative adversarial loss of the first training dataset and the adaptive learning loss of the first training dataset corresponding to the Bi-GRU neural network model is minimized, thus obtaining a well-trained Bi-GRU neural network model. After obtaining the test power consumption data, the predicted fault state corresponding to the test power consumption data is determined through the trained Bi-GRU neural network model; the set weights corresponding to the predicted fault state are obtained; the actual mean and actual standard deviation are calculated; based on the set weights and the fluctuation time range corresponding to the test power consumption data, the mean fluctuation threshold and standard deviation fluctuation threshold are calculated; when the actual mean is higher than the mean fluctuation threshold and the actual standard deviation is higher than the standard deviation fluctuation threshold, the predicted fault state early warning processing is performed.

2. The method for diagnosing abnormal user power consumption in a data shortage scenario according to claim 1, characterized in that, Before labeling the abnormal power consumption data in the first training dataset that exhibit pre-defined typical abnormal power consumption conditions with typical fault labels, the method further includes: Based on a preset front time window and a preset back time window, obtain the forward abnormal power consumption data and the backward abnormal power consumption data corresponding to each abnormal power consumption data in the first training dataset; wherein, the abnormal power consumption data includes the power consumption, and the preset front time window = the preset back time window; Through the formula: Calculate and obtain electricity consumption trends; in, This is used to represent the electricity consumption trend on day i, where i ranges from [1, a+a+1], d is the date of the time window, and a represents the preset before and after time windows. The electricity consumption on day d is... ; when < When the cumulative total value is greater than the preset cumulative value, it is determined that the current abnormal power consumption data is true abnormal power consumption data. When the current abnormal electricity consumption data is a genuine abnormal electricity consumption data Through the formula: Calculate the line loss rate; in, This represents the line loss rate on day i. This represents the total electricity consumption of n users on the line on day i. This represents the power supply to the line on day i, and n represents the number of users on the line. Get all values ​​in the range [1, a+a+1]. The average value is used to determine the current abnormal power consumption data. When the average value is greater than the preset value, the abnormal power consumption data is determined to be the abnormal power consumption data of the preset typical abnormal power consumption condition, and a typical fault label needs to be marked.

3. The method for diagnosing abnormal user power consumption in a data shortage scenario according to claim 1, characterized in that, A generative adversarial interpolation network method is adopted. A predetermined number of abnormal electricity consumption data are randomly sampled from the first training dataset. Then, the generator model and discriminator model in the adversarial interpolation network are trained using the predetermined number of abnormal electricity consumption data. Specifically, this includes: Through the formula: , , Construct the initial interpolation matrix and the estimation matrix of the generator model; Where Z represents a random matrix, M represents a mask matrix, X represents abnormal power consumption data with missing fault values; G represents a generator network, and b represents a preset constant; the mask matrix is ​​used to record the missing data positions in the first training dataset, and then the missing data at the missing data positions is imputed with 0, and the missing data at non-missing data positions is imputed with 1. Through the formula: , Construct the initial discriminator model; in, The matrix represents missing data indication. Represents a random vector. This represents a discriminator network. Belongs to [0,1], and The value is inversely proportional to the probability of missing data at the current location; The generator and discriminator models in the adversarial interpolation network are trained using a preset number of abnormal electricity consumption data.

4. The method for diagnosing abnormal user power consumption in a data shortage scenario according to claim 3, characterized in that, Before using the first training dataset as input data for the adversarial interpolation network method, and then passing it through the trained generator model and discriminator model, the method further includes: The generator and discriminator models in the adversarial interpolation network are iteratively trained using a preset number of abnormal electricity consumption data. The optimization objective during the iteration process is: , in, This represents the mathematical expectation distribution of the adversarial learning interpolation network. This indicates the output data corresponding to abnormal power consumption data; When the number of iterations reaches the set threshold, the trained generator model and discriminator model are obtained.

5. The method for diagnosing abnormal user power consumption in a data shortage scenario according to claim 1, characterized in that, From the final training data, static features and time-series features of abnormal electricity consumption are extracted, specifically including: By pre-setting an embedded time self-attention module, static features and temporal features of abnormal power consumption are extracted from the final training data.

6. The method for diagnosing abnormal user power consumption in a data shortage scenario according to claim 1, characterized in that, Feature vectors include temporal feature vectors and static feature vectors, and typical fault label content is the fault state; A Bi-GRU neural network model is trained using typical fault labels and feature vectors until the weighted sum between the generative adversarial loss and the adaptive learning loss of the first training dataset corresponding to the Bi-GRU neural network model is minimized. This process includes: By generating the adversarial loss formula: Generative adversarial loss is obtained; in, Let J represent the generative adversarial loss, and J represent the number of abnormal electricity consumption data in the first training dataset. {} represents a preset indicator function, Y represents a preset fault category, and y represents the y-th type of fault state. This represents the j-th abnormal electricity consumption data. This represents the time-series feature vector of the j-th abnormal electricity consumption data. This represents the static feature vector of the j-th abnormal electricity consumption data. Let represent the conditional probability that the j-th abnormal power consumption data belongs to the y-th type of fault state. The temporal feature vector representing the y-th type of fault state is extracted from the feature vector whose typical fault label content is the y-th type of fault state. ; Through the adaptive learning loss formula: Calculate the adaptive learning loss; in, This indicates that the Bi-GRU neural network model encodes feature vectors into corresponding virtual vectors; Until the weighted sum is minimized: A well-trained Bi-GRU neural network model is obtained; among which, This indicates the preset balance parameters.

7. The method for diagnosing abnormal user power consumption in a data shortage scenario according to claim 1, characterized in that, Obtain the set weights corresponding to the predicted fault states, specifically including: Based on the preset mapping relationship between the predicted fault state and the preset weight, the preset weight corresponding to the current predicted fault state is determined.

8. The method for diagnosing abnormal user power consumption in a data shortage scenario according to claim 1, characterized in that, The actual mean and actual standard deviation are calculated; based on the set weights and the fluctuation time range corresponding to the test electricity consumption data, the mean fluctuation threshold and standard deviation fluctuation threshold are calculated, specifically including: According to the formula: 、 , Calculation obtained and ; in, This represents the actual mean. Standard deviation, where c represents day c, C represents the range of fluctuation data, and c belongs to C; According to the formula: 、 , Calculation obtained and ; in, Indicates the threshold for mean fluctuation. Indicates the standard deviation fluctuation threshold. and This indicates that a weight is set.

9. A diagnostic device for abnormal user power consumption in scenarios with insufficient data, characterized in that, The device includes: processor; And a memory storing executable code, which, when executed, causes the processor to perform a method for diagnosing abnormal power consumption in a data shortage scenario as described in any one of claims 1-8.

10. A non-volatile computer storage medium, characterized in that, It stores computer instructions, which, when executed, implement a method for diagnosing abnormal power consumption in a data shortage scenario as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Detection method and system for abnormal electricity users

    CN115293257A

  • Method and system for classifying electricity users and monitoring abnormal behaviors in high-energy-consumption industry

    CN115718861A