Data set construction method and system for electric quantity anomaly detection deep learning model
By extracting work order information and abnormal data in the smart grid, data preprocessing and feature engineering are carried out, the efficiency and accuracy of abnormal electricity detection in the smart grid are solved, and high-quality data set construction and effective training of deep learning models are realized.
Patent Information
- Application Number
- CN202411877607.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-30
AI Technical Summary
The existing technology in smart grids is difficult to efficiently and accurately identify abnormal electricity use behaviors, and the data set has problems such as category imbalance, limited data sources and insufficient timeliness, which affects the training efficiency and detection accuracy of deep learning models.
By connecting to the metering database of the smart grid information system, work order information and abnormal data are extracted, data preprocessing and characteristic engineering are carried out, characteristic indicators reflecting abnormal electricity use behavior are constructed, and automatic labeling is carried out to generate high-quality data sets.
It improves the efficiency and quality of data set construction, ensures that the deep learning model can accurately identify and detect abnormal battery behaviors, and improves the timeliness and adaptability of the model.
Smart Images

Figure CN120067903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of abnormal power consumption monitoring in smart grids, and specifically to a method and system for constructing a dataset of a deep learning model for detecting abnormal power consumption. Background Art
[0002] The development of smart grids has brought a large amount of meter data. The key challenge lies in how to efficiently and accurately identify abnormal power consumption behaviors from this data to maintain grid security. Currently, deep learning is the main research method, but it is limited by the need for a large amount of labeled datasets. In addition, there is a problem of class imbalance in existing datasets, with fewer abnormal samples, which may lead to underfitting of the model and affect the detection accuracy. The sources of datasets are limited and mainly rely on maintenance records and expert screening, making it difficult to obtain a large amount of labeled training data. The time-varying nature of power grid users' power consumption behaviors also poses higher requirements for the accuracy and adaptability of the model, requiring the model to be able to quickly respond to changes in power consumption behaviors. Existing methods are difficult to ensure the timeliness of data and the accuracy and adaptability of the model, affecting the training efficiency and detection accuracy. Summary of the Invention
[0003] In view of the above existing problems, the present invention is proposed.
[0004] Therefore, the technical problem solved by the present invention is: how to efficiently extract and process abnormal power consumption data in the smart grid information system, improve the efficiency and quality of dataset construction, and ensure that the deep learning model can accurately identify and detect abnormal power consumption behaviors.
[0005] To solve the above technical problems, the present invention provides the following technical solutions: A method for constructing a dataset of a deep learning model for detecting abnormal power consumption, which includes the following steps
[0006] By connecting to the metering database of the smart grid information system, extracting the work order information recorded in the system, and extracting the device numbers and abnormal information of the samples;
[0007] According to the extracted sample abnormal time period information, extract various abnormal and normal power consumption data and export them;
[0008] Perform data preprocessing on the extracted power consumption data;
[0009] Based on the preprocessed data, perform feature processing, construct feature indicators reflecting abnormal power consumption behaviors, and align each indicator in the time dimension;
[0010] Automatically label the device numbers and abnormal information of the samples extracted from the work orders based on the feature indicators to produce a dataset.
[0011] As a preferred solution of the method for constructing a dataset of a power anomaly detection deep learning model according to the present invention, wherein: extracting the work order information recorded in the system by connecting to the metering database of the smart grid information system, and extracting the device number and anomaly information of the sample includes,
[0012] Connect to the metering database in the smart grid information system, extract the sample anomaly work order information recorded in the database, and write an automated program to extract the anomaly sample information according to the obtained work order information, including the device number, anomaly time period, and type of anomaly of the sample in the work order.
[0013] As a preferred solution of the method for constructing a dataset of a power anomaly detection deep learning model according to the present invention, wherein: extracting various types of abnormal and normal power consumption data according to the extracted sample anomaly time period information and exporting includes,
[0014] According to the extracted sample anomaly time information, extract the abnormal power consumption data corresponding to the sample containing the anomaly time with a time length of T acquisition points from the metering database as the abnormal sample data, and the normal power consumption data of M acquisition time points before and after the anomaly time that do not contain the anomaly time;
[0015] Extract various types of power consumption data from the abnormal sample data and normal power consumption data, including the three-phase current, three-phase voltage, power, and power consumption of the power consumption data with an acquisition point once an hour.
[0016] As a preferred solution of the method for constructing a dataset of a power anomaly detection deep learning model according to the present invention, wherein: the data preprocessing for the extracted power consumption data includes,
[0017] Perform data interpolation and sorting on the extracted power consumption data. If a data column is discontinuous in time and the data column with less than N acquisition time points missing in the middle is interpolated with the average value μ, if the extracted power consumption data is missing more than N acquisition time points, it is considered that the data collected in the current sample is invalid, and the sample is discarded;
[0018] Remove the outliers from the sample data. For the extracted sample data X, if it satisfies {X∣X<μ - 3σ or X>μ + 3σ}, where μ is the mean value of the data X and σ is the standard deviation, it is regarded as an outlier, and the mean value μ of the current data in the extraction time period is used for insertion and replacement;
[0019] Perform standardization processing on the data, scale the data to between 0 and 1 by normalization processing, and use a normal random model with a mean of 0 and a variance of 0.1 to add noise to the data for data augmentation.
[0020] As a preferred solution of the method for constructing a dataset of a deep learning model for detecting abnormal power consumption according to the present invention, wherein: performing feature processing on the preprocessed data, constructing feature indicators reflecting abnormal power consumption behaviors, and aligning each indicator in the time dimension includes,
[0021] The feature indicators constructed based on the professional knowledge of power metering include the three-phase average voltage and the three-phase average current. The three-phase average voltage and current are used to replace the original voltage and current data, and the current dispersion degree I sd and the voltage dispersion degree U sd parameters
[0022] Calculation methods of the current dispersion coefficient and the voltage dispersion coefficient:
[0023] The voltage dispersion degree U sd =(U i –U avg ) / U avg
[0024] The current dispersion degree I sd =(I i –I avg ) / I avg (i = 1, 2, …, 23)
[0025] Wherein, U i is the voltage data collected within a day, U avg is the average value of the voltage data within a day, Ii is the current data collected within a day, and σ is the average value of the current data within a day.
[0026] As a preferred solution of the method for constructing a dataset of a deep learning model for detecting abnormal power consumption according to the present invention, wherein: performing feature processing on the preprocessed data, constructing feature indicators reflecting abnormal power consumption behaviors, and further aligning each indicator in the time dimension includes,
[0027] Aligning the extracted power consumption data with the data after feature engineering processing in the time dimension, combining the data in the order of three-phase average voltage, three-phase average current, current dispersion degree, voltage dispersion degree, and power consumption and arranging them in sequence alignment, and integrating various power consumption data of the same sample device into a data table.
[0028] As a preferred solution of the method for constructing a dataset of a deep learning model for detecting abnormal power consumption according to the present invention, wherein: automatically annotating the device numbers and abnormal information of the samples extracted from the work orders based on the feature indicators, and making a dataset includes,
[0029] According to the equipment numbers and abnormal information of the samples extracted from the work orders, label the processed sample data. Label the first type of abnormal type extracted from the work order with label j, and label the subsequent unlabeled types as j + 1, and save the corresponding relationship between the type and the label. According to the abnormal type and the abnormal time period, and considering the time series context information, take the previous period n and the subsequent period n of the abnormal time period as the abnormal time together, and label the electricity consumption data of the samples.
[0030] Another object of the present invention is to provide a dataset construction system for an electricity consumption anomaly detection deep learning model, which can solve the problems of low existing data extraction efficiency, poor data quality, insufficient feature expression ability, and low annotation automation degree by automatically extracting work order information, preprocessing electricity consumption data, generating feature indicators, and completing annotation.
[0031] To solve the above technical problems, the present invention provides the following technical solutions: A dataset construction system for an electricity consumption anomaly detection deep learning model, including: a data extraction module, a data processing module, a feature engineering module, and a data annotation module;
[0032] The data extraction module is connected to the metering database of the smart grid information system to extract abnormal data and equipment numbers related to the work order information in the system;
[0033] The data processing module preprocesses the extracted data, including data interpolation, outlier processing, and standardization;
[0034] The feature engineering module constructs feature indicators reflecting abnormal electricity consumption behavior based on professional knowledge, and converts the original data into representative and discriminative feature data by constructing feature indicators;
[0035] The data annotation module automatically annotates the samples according to the abnormal types and time periods extracted from the work order information, in combination with the feature data.
[0036] A computer device includes a memory and a processor. When the processor executes the computer program, the steps of the above-mentioned method for constructing a dataset of an electricity consumption anomaly detection deep learning model are implemented.
[0037] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for constructing a dataset of an electricity consumption anomaly detection deep learning model are implemented.
[0038] Advantages of the present invention: By automatically extracting data and pre - processing data features, the present invention simplifies the model training process, enabling the data set to be directly used for training. By precisely controlling the proportion of various types of data in the data set and pre - processing the data, the performance of the anomaly detection model is improved. A program is written to automatically annotate the data set, further improving the efficiency. In addition, this method can timely extract the latest data set and continuously update the anomaly detection model to ensure the timeliness and accuracy of detecting abnormal behaviors in the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the following - described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them:
[0040] Figure 1 It is the overall flowchart of a method for constructing a data set of a power consumption anomaly detection deep - learning model provided by the first embodiment of the present invention;
[0041] Figure 2 It is a comparison chart of the load - balancing ratios of multiple algorithms under the same task requests in a method for constructing a data set of a power consumption anomaly detection deep - learning model provided by the second embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] To make the above - mentioned objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention with reference to the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0043] Embodiment 1, referring to Figures 1 to 2 An embodiment of the present invention provides a method for constructing a data set of a power consumption anomaly detection deep - learning model, including:
[0044] S1. By connecting to the metering database of the smart grid information system, extract the equipment numbers and anomaly information of the samples from the work order information recorded in the system;
[0045] S11. Connect to the metering database in the smart grid information system and extract the sample anomaly work order information recorded in the database;
[0046] S12. Based on the work order information extracted in S11, write an automated program to extract the abnormal sample information therefrom, including the equipment number, abnormal time period, and type of abnormality of the samples in the work order;
[0047] S2. For the sample equipment numbers and abnormal information extracted in S1, extract various abnormal and normal power consumption data according to the extracted sample abnormal time period information and export them;
[0048] S21. For the equipment numbers and abnormal information extracted in S1, according to the extracted sample abnormal time information, extract the abnormal power consumption data (i.e., abnormal sample data) of the corresponding samples including the abnormal time with a time length of T acquisition points from the metering database, and the normal power consumption data of M acquisition time points before and after the abnormal time that do not include the abnormal time, as Figure 2 are the power consumption data including abnormalities and normal power consumption data of a certain sample extracted for 30 days.
[0049] S22. For various power consumption data extracted in S21, including daily power consumption data with one acquisition point per day, three-phase current, three-phase voltage, power and other power consumption data acquired once per hour, expand the daily power consumption data so that it is aligned with other power consumption characteristic data in the time dimension, combine the data in an order convenient for subsequent data processing and arrange them in time series alignment, and integrate various data of the same sample equipment into a data table;
[0050] Examples of the extracted daily power consumption data and power consumption data such as current, voltage, and power are shown in Table 1 and Table 2:
[0051] Table 1: Example of the extracted daily power consumption data of users
[0052]
[0053] Table 2: Example of power consumption data such as current, voltage, and power
[0054]
[0055] S3. For the power consumption data extracted in S2, perform data preprocessing steps such as data sorting and data cleaning on these data;
[0056] S31. Perform data interpolation and sorting on the extracted power consumption data. If a data column is not continuous in time and the data column with less than N acquisition time points missing in the middle is interpolated using the average value μ. If the extracted power consumption data is missing more than N acquisition time points, the data collected for this sample is considered invalid and this sample is discarded;
[0057] S32. Remove the outliers from the sample data. For the extracted sample data X, if it satisfies {X∣X<μ - 3σ or X>μ + 3σ} (where μ is the mean of the sample data X and σ is the standard deviation), it is regarded as an outlier, and the average value μ of this data within the extraction time period is used for insertion and replacement.
[0058] S33. To avoid model calculation errors, standardize the data. Use normalization to scale the data between 0 and 1. Add noise to the data for data augmentation, and adopt a normal random model with a mean of 0 and a variance of 0.1 to improve the performance of the model.
[0059] S4. Perform feature index construction processing on the electricity consumption data after S3 processing. Combine the professional knowledge of electric energy metering to construct feature indexes that can accurately reflect abnormal electricity consumption behaviors, and align each index in the time dimension.
[0060] S41. The feature indexes constructed based on the professional knowledge of electric energy metering include the three-phase average voltage and the three-phase average current:
[0061] To uniformly analyze the data of three-phase four-wire and three-phase three-wire users, use the three-phase average voltage and current to replace the original voltage and current data, and avoid the influence caused by one-phase voltage and current being 0 for three-phase three-wire users due to the wiring method.
[0062] S42. Supplement the current dispersion degree and voltage dispersion degree parameters as additional channels:
[0063] Calculation methods of the current dispersion coefficient and voltage dispersion coefficient: U i is the voltage data collected within one day, U avg is the average value of the voltage data within one day, I i is the current data collected within one day, σ is the average value of the current data within one day,
[0064] Voltage dispersion degree = U i –U avg / U avg
[0065] Current dispersion degree = I i –I avg / I avg (i = 1, 2, …, 23);
[0066] S5. For the equipment numbers and abnormal information of the samples extracted from the work orders in S1, perform automated annotation on the sample data processed in S4 to create a dataset.
[0067] S51. The extracted work order information is shown in Table 3. Assign the initial label 1 to the first type of anomaly identified in the work order. For subsequent unlabeled anomaly types that appear in the work order, assign a new label, which is formed by incrementing the previous label by 1.
[0068] Table 3: Work order information
[0069]
[0070] S52. Establish and maintain a mapping relationship database between anomaly types and corresponding labels for recording and querying various anomaly types and their corresponding labels.
[0071] S53. According to the anomaly type and anomaly time period, considering the time series context information, take the adjacent time n before and after the anomaly time period as the anomaly time together, and label the electricity consumption data of the sample.
[0072] The anomaly time period shown in Table 4 is from 20xx-xx-08 to 20xx-xx-09. In this case, set the adjacent time n to one day, that is, the anomaly time period becomes from 20xx-xx-07 to 20xx-xx-10. If the anomaly type is the first type of anomaly extracted, then mark the corresponding anomaly time period of the sample data with the corresponding label 1 to complete the dataset annotation.
[0073] Embodiment 2 is an embodiment of the present invention, which provides a system for constructing a dataset of a deep learning model for detecting electricity anomalies, including: a data extraction module, a data processing module, a feature engineering module, and a data annotation module.
[0074] The data extraction module is connected to the metering database of the smart grid information system to extract the anomaly data and equipment numbers related to the work order information in the system.
[0075] The data processing module preprocesses the extracted data, including data interpolation, outlier processing, and standardization.
[0076] The feature engineering module constructs feature indicators reflecting abnormal electricity consumption behaviors based on professional knowledge. By constructing feature indicators, the original data is transformed into representative and discriminative feature data.
[0077] The data annotation module automatically annotates the samples according to the anomaly types and time periods extracted from the work order information in combination with the feature data.
[0078] If the above-mentioned functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0079] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a predefined sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.
[0080] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), fiber optic device, and portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as necessary, and then storing it in a computer memory.
[0081] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0082] Example 3. In this example, in order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments. In this example, experiments are respectively conducted on the existing traditional method and the method of this example.
[0083] By connecting to the metering database of the smart grid information system, according to the work order information recorded in the system, the equipment numbers and abnormal information of the samples are extracted;
[0084] According to the extracted sample abnormal time period information, various abnormal and normal power consumption data are respectively extracted and exported;
[0085] Perform data preprocessing on the extracted power consumption data;
[0086] Based on the preprocessed data, perform feature engineering processing, construct feature data that fully reflects power consumption behavior, and align each index in the time dimension;
[0087] Based on the abnormal information extracted from the work order, perform automated annotation on the processed sample data to produce a data set.
[0088] For the same samples without preprocessing and feature engineering processing by the method of the present invention and the processed data, using the Python language in the same environment with the same parameters, respectively use the Isolation Forest and KNN models to perform anomaly detection on the sample data, and calculate the performance indicators F1 score and accuracy as shown in Table 4;
[0089] Table 4 Comparison of F1 scores of detection methods before and after processing
[0090]
[0091] The results show that the data processed by the method of the present invention not only reduces the labor input and improves the efficiency through an automated process, but also improves the performance of the anomaly detection model through data processing and feature engineering in the automated process.
[0092] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and all of them should be covered by the scope of the claims of the present invention.
Claims
1. A method for constructing a data set for a deep learning model for power anomaly detection, characterized in that: include: By connecting to the metering database of the smart grid information system, the work order information recorded by the system is extracted, and the equipment number and abnormal information of the sample are extracted; According to the extracted sample abnormal period information, various abnormal and normal power consumption data are extracted and exported; Perform data preprocessing on the extracted electricity consumption data; Perform feature processing based on preprocessed data, construct feature indicators that reflect abnormal power consumption behavior, and align each indicator in the time dimension; Based on feature indicators, the equipment numbers and abnormal information of the samples extracted from the work order are automatically labeled to create a data set.
2. The method for constructing a data set for a deep learning model for power anomaly detection according to claim 1, characterized in that: The method of connecting to the metering database of the smart grid information system, extracting the work order information recorded by the system, and extracting the equipment number and abnormal information of the sample include: Connect to the metering database in the smart grid information system, extract the sample abnormal work order information recorded in the system in the database, and write an automated program to extract the abnormal sample information based on the extracted work order information, including the equipment number and abnormal time period of the sample in the work order, as well as the type of abnormality.
3. The method for constructing a data set for a deep learning model for power anomaly detection according to claim 2, characterized in that: The method of extracting various abnormal and normal power consumption data according to the extracted sample abnormal time period information and exporting them includes: According to the extracted sample abnormal time information, the abnormal power consumption data of the corresponding sample including the abnormal time is extracted from the metering database with the time length of T collection points as the abnormal sample data, and the normal power consumption data of each M collection time points before and after the abnormal time that does not include the abnormal time; Various types of electricity consumption data extracted from abnormal sample data and normal electricity consumption data, including three-phase current, three-phase voltage, power, and electricity consumption collected once every hour.
4. The method for constructing a data set for a deep learning model for power anomaly detection according to claim 3, characterized in that: The data preprocessing for the extracted electricity consumption data includes: The extracted electricity consumption data is interpolated and sorted. If a data column is discontinuous in time and the data column within N collection time points is missing in the middle, the average value μ is used for interpolation. If the extracted electricity consumption data is missing for more than N collection time points, the data collected by the current sample is considered invalid and the sample is discarded. Remove outliers from sample data. For the extracted sample data X, if {X|X<μ-3σor X>μ+3σ} is satisfied, where μ is the mean of the data X and σ is the standard deviation, it is considered as an outlier and replaced with the mean μ of the current data in the extraction time period. The data was standardized and scaled to between 0 and 1 using normalization. A normal random model with a mean of 0 and a variance of 0.1 was used to add noise to the data for data enhancement.
5. The method for constructing a data set for a deep learning model for detecting abnormal power consumption according to claim 4, characterized in that: The feature processing based on the preprocessed data, constructing feature indicators reflecting abnormal power consumption behavior, and aligning the indicators in the time dimension include: The characteristic indicators constructed based on the professional knowledge of electric energy measurement include three-phase average voltage and three-phase average current. The three-phase average voltage and current are used to replace the original voltage and current data to calculate the current dispersion degree I sd , voltage dispersion U sd parameter, The calculation method of current dispersion coefficient and voltage dispersion coefficient is: Voltage dispersion U sd =(U i –U avg ) / U avg Electric current dissipation degree I sd = (I i –I avg ) / I avg (i = 1, 2, ..., 23) Among them, U i is the voltage data collected in one day, U avg is the average voltage data within one day, I i is the current data collected in one day, and σ is the average value of the current data in one day.
6. The method for constructing a data set for a deep learning model for power anomaly detection according to claim 5, characterized in that: The feature processing is performed based on the preprocessed data to construct feature indicators reflecting abnormal power consumption behavior, and the indicators are aligned in the time dimension, including: The extracted electricity consumption data is aligned with the data processed by feature engineering in the time dimension. The data is combined in the order of three-phase average voltage, three-phase average current, current dispersion, voltage dispersion, and electricity consumption, and aligned in time series. Various types of electricity consumption data of the same sample equipment are integrated into one data table.
7. The method for constructing a data set for a deep learning model for power anomaly detection according to claim 6, characterized in that: The device number and abnormal information of the samples extracted from the work order are automatically labeled based on the characteristic indicators, and the data set is prepared, including: According to the equipment number and abnormal information of the sample extracted from the work order, the processed sample data is labeled. The first type of abnormality extracted from the work order is labeled with label j, and the subsequent types that have not been labeled are labeled as j+1, and the correspondence between types and labels is saved. According to the abnormal type and abnormal time period, and considering the time series context information, the time period before and after the abnormal time period are taken as abnormal time to label the sample electricity consumption data.
8. A system using a data set construction method of a deep learning model for power anomaly detection according to any one of claims 1 to 7, characterized in that: It includes data extraction module, data processing module, feature engineering module and data annotation module; The data extraction module is connected to the metering database of the smart grid information system to extract abnormal data and equipment numbers related to the work order information in the system; The data processing module pre-processes the extracted data, including data interpolation, outlier processing and standardization; The feature engineering module constructs feature indicators reflecting abnormal electricity consumption behavior based on professional knowledge, and converts raw data into representative and discriminative feature data by constructing feature indicators; The data annotation module automatically annotates samples based on the anomaly type and time period extracted from the work order information and in combination with feature data.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of a method for constructing a data set of a deep learning model for detecting anomaly in electrical power are implemented as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing a data set of a deep learning model for detecting anomaly in electrical power are implemented as described in any one of claims 1 to 7.