Electric energy occupation anomaly detection method and system based on genetic algorithm

Through the electric energy occupancy anomaly detection method based on genetic algorithm, combined with the artificial bee colony algorithm and denoising autoencoder, the over-fitting and computational overhead problems of electric energy occupancy anomaly detection in the existing technology are solved, and more efficient detection efficiency and Lower false alarm rates reduce operating costs for power companies.

CN118797541APending Publication Date: 2024-10-18YANTAI UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411288147.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing power occupancy anomaly detection methods suffer from overfitting, computational overhead, memory constraints, and false alarm problems, resulting in low efficiency and high cost for power companies in detecting non-technical losses.

Method used

An electric energy occupancy anomaly detection method based on genetic algorithm is used to synthesize new features through data preprocessing, statistics and electrical parameters. It combines artificial bee colony algorithm and denoising autoencoder to extract high variance features, and inputs them into a support vector machine for detection. Reduce computing and storage requirements and improve classification performance.

Benefits of technology

It significantly improves the efficiency of abnormal power occupancy detection, reduces the rate of false positives and false negatives, helps power companies reduce operating costs, and improves the security of the power grid and the stability of smart grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797541A_ABST
    Figure CN118797541A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to an electric energy occupation anomaly detection method and system based on a genetic algorithm. The method comprises the steps of performing data preprocessing on power utilization measurement data; new features are synthesized from the electricity utilization measurement data by using statistics and electrical parameters; selecting prominent features based on an artificial bee colony algorithm and a genetic algorithm; extracting a high variance feature from the prominent features of the power consumption data by using a de-noising auto-encoder; and inputting the extracted features into a support vector machine to detect an electric energy occupation abnormal behavior. According to the method and the system, the big data and the genetic algorithm are integrated, the effective electric energy occupancy anomaly detection method and the system are provided, and the efficiency of non-technical loss detection can be remarkably improved by the method and the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for detecting abnormal power occupancy based on a genetic algorithm. Background Art

[0002] Power systems suffer from technical losses and non-technical losses (NTLs) during the transmission and distribution of electricity. Technical losses are caused by energy dissipation in transmission lines, transformers, and electrical equipment, while NTLs are caused by direct connection to transmission lines, tampering with meters, meter failures, and changes in meter readings through communication links. Among them, NTLs are mainly caused by abnormal behaviors such as power occupation, which has a serious impact on the economic and social benefits of power companies. The secure flow of information is a challenging issue, and smart meters are full of several security vulnerabilities. Consumers can manipulate smart meter data through digital tools or cyber attacks. Smart meter security vulnerabilities that lead to non-technical losses can be divided into three main categories: meter tampering, network intrusion, and metering interruption. Meter tampering includes attacks such as key forgery, password cracking, and meter firmware modification. Network intrusion includes interception of communications and data injection attacks. Finally, meter interruption includes bypassing the meter completely or partially and placing a strong magnet near the meter.

[0003] Hardware-based, game theory-based, and data-driven approaches are used to detect NTLs using electricity consumption (EC) data. Hardware-based approaches use specific devices such as wireless sensors and RFID tags to achieve high detection rates (DR) and low false positive rates (FPR). However, they require high installation and monitoring costs to deploy hardware devices at the distribution and consumer ends, making them unsuitable for real-world smart grid applications. Moreover, their performance degrades under adverse weather conditions. Game theory-based approaches set up a game between the power company and the thief to reach an equilibrium state and then extract various features from the EC data. However, they produce low DR and high FPR. Moreover, designing an appropriate utility function between the power company, stakeholders, distributors, and thieves remains a challenge. The consumption pattern of a normal consumer follows a statistical pattern, while the abnormal pattern of a thief does not follow any pattern. Machine learning (ML) and deep learning (DL) techniques are trained on EC measurements to detect normal and abnormal patterns. These approaches use existing data from IoT-based smart meters and are less expensive than the above approaches. However, they suffer from low DR and high FPR due to the lack or infrequent availability of energy occupancy anomaly samples and dimensionality corruption. Although ML classifiers are widely used, they suffer from dimensionality issues, which lead to overfitting, computational overhead, and memory limitations. There is also an EC energy occupancy anomaly detection method based on support vector machines (SVM) and hardware devices to distinguish normal and abnormal patterns. Both of the above problems will generate false alarms, which are unsustainable for power companies due to limited budgets for on-site inspections. Summary of the invention

[0004] In order to solve the above-mentioned problems, the present invention provides a method and system for detecting abnormal power occupancy based on a genetic algorithm to solve the problems of overfitting, computational overhead, memory constraints, and false alarms in the prior art.

[0005] In a first aspect, the present invention provides a method for detecting abnormal power occupancy based on a genetic algorithm, which adopts the following technical solution: A method for detecting abnormal power occupancy based on a genetic algorithm, comprising: Obtain electricity consumption measurement data; Perform data preprocessing on electricity consumption measurement data; Synthesize new features from electricity usage measurement data using statistical and electrical parameters; Select salient features based on artificial bee colony algorithm and genetic algorithm; Denoising autoencoders are used to extract high-variance features from salient features of electricity consumption data; The extracted features are input into the support vector machine to detect abnormal power usage behavior.

[0006] Furthermore, the data preprocessing of the power consumption measurement data includes adjusting the sampling rate of the power consumption measurement data and performing minimum-maximum normalization processing, which is expressed as: in, is the normalized data, X is the original data, and are the minimum and maximum values ​​in the data set, respectively.

[0007] Furthermore, the method of synthesizing new features from electricity consumption measurement data using statistics and electrical parameters includes synthesizing 11 new features from electricity consumption measurement data using statistics and electrical parameters. After all features are calculated, feature screening is performed to remove irrelevant or redundant features, and the features are standardized or normalized to eliminate dimensional effects between different features.

[0008] Furthermore, the method of selecting prominent features based on artificial bee colony algorithm and genetic algorithm includes randomly generating an initial feature subset as a population, using support vector machine SVM as an evaluation tool, calculating the F1 score of each feature subset as a fitness value; according to the fitness value, selecting a feature subset with good performance for crossover and mutation operations, and obtaining the optimal solution through iterative estimation.

[0009] Furthermore, the use of the denoising autoencoder to extract high variance features from the prominent features of the power consumption data includes converting the power consumption data into a low-dimensional feature representation through an encoding layer, and the formula is: in, g is the activation function, and are the weights and biases of the encoding layer, respectively.

[0010] Furthermore, the method of extracting high variance features from prominent features of power consumption data using a denoising autoencoder also includes reconstructing data from the encoding using a decoder and mapping it to the original data. The encoded feature representation is reconstructed into the form of the original data through the decoding layer, and the formula is: in, and are the weights and biases of the decoding layer respectively.

[0011] Furthermore, the extracted features are input into a support vector machine to detect abnormal power occupancy behavior, including using the features extracted by the denoising autoencoder to train an SVM classifier, wherein the SVM classifier distinguishes different categories by finding the optimal boundary between data points, and uses the F1 score as a performance evaluation indicator of the SVM classifier.

[0012] In a second aspect, a power occupancy anomaly detection system based on a genetic algorithm comprises: A data acquisition module is configured to acquire electricity consumption measurement data; The preprocessing module is configured to perform data preprocessing on the electricity consumption measurement data; The feature module is configured to synthesize new features from the electricity usage measurement data using statistical and electrical parameters; The algorithm module is configured to select salient features based on an artificial bee colony algorithm and a genetic algorithm; A denoising module, configured to extract high variance features from salient features of the electricity consumption data using a denoising autoencoder; The detection module is configured to input the extracted features into a support vector machine to detect abnormal power occupancy behavior.

[0013] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device for the method for detecting abnormal power occupancy based on a genetic algorithm.

[0014] In a fourth aspect, the present invention provides a terminal device comprising a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the method for detecting abnormal power occupancy based on a genetic algorithm.

[0015] In summary, the present invention has the following beneficial technical effects: The present invention proposes an effective method and system for detecting abnormal power occupancy by integrating big data and genetic algorithms. The method and system can significantly improve the efficiency of detecting non-technical losses. It synthesizes and selects optimal features and uses denoising autoencoders to extract high-variance features, thereby enhancing the generalization ability of machine learning classifiers, reducing computing and storage requirements, and reducing the risk of overfitting. The method and system demonstrate superior classification performance over existing methods, reducing false positives and false negatives, helping power companies reduce operating costs, and improving the security of power grids and the stability of smart grids. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of a method for detecting abnormal power occupancy based on a genetic algorithm according to Example 1 of the present invention.

[0017] Figure 2 It is a schematic diagram of the performance analysis of the artificial bee colony algorithm (ABC) and the genetic algorithm (GA) on the PRECON data set according to Example 1 of the present invention.

[0018] Figure 3 It is a schematic diagram of performance analysis of the artificial bee colony algorithm (ABC) and the genetic algorithm (GA) of Example 1 of the present invention on the SGCC data set.

[0019] Figure 4 It is a schematic diagram of the performance analysis of the denoising autoencoder of Example 1 of the present invention on the PRECON dataset.

[0020] Figure 5 It is a schematic diagram of the performance analysis of the denoising autoencoder of Example 1 of the present invention on the SGCC dataset. DETAILED DESCRIPTION

[0021] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0022] Example 1 Reference Figure 1 , a method for detecting abnormal power occupancy based on a genetic algorithm in this embodiment includes: Obtain electricity consumption measurement data; Perform data preprocessing on electricity consumption measurement data; Synthesize new features from electricity usage data using statistical and electrical parameters; Meta-heuristic techniques (artificial bee colony algorithm and genetic algorithm) are used to select salient features, while denoising autoencoders are used to extract high-variance features from electricity consumption data; The acquired features are input into the support vector machine to detect abnormal power usage behavior.

[0023] Specifically, the following steps are included: S1. Obtain electricity consumption measurement data.

[0024] S2. Perform data preprocessing on the electricity consumption measurement data, including adjusting the sampling rate of the original electricity consumption measurement data from once per second to once every half hour. The purpose of this is to reduce the complexity and storage requirements of the data while maintaining the representativeness of the data and key information on consumption patterns. Subsequently, the minimum-maximum normalization process is performed to meet the requirements of the support vector machine (SVM) classifier for data diversity. The formula is: in, is the normalized data, X is the original data, and are the minimum and maximum values ​​in the data set, respectively.

[0025] S3. Synthesize 11 new features from the electricity consumption data using statistics and electrical parameters, including selecting a series of features from the pre-processed electricity consumption measurement data and electrical parameters. These features can reflect the user's electricity consumption behavior. The selected features include but are not limited to: Minimum consumption: The minimum amount of electricity a user consumes on a specific day.

[0026] Maximum consumption: The highest electricity consumption of a user on a specific day.

[0027] Average consumption: The average value of a user's electricity consumption throughout the day, reflecting the user's general consumption behavior.

[0028] Standard deviation: measures the degree of dispersion of electricity consumption data distribution.

[0029] Skewness: A statistic used to measure the symmetry or skewness of the distribution of electricity consumption data.

[0030] Mean Absolute Deviation (MAD): Measures the deviation of electricity consumption at each time interval from the average consumption.

[0031] For each selected characteristic, use the appropriate mathematical formula to calculate. For example, average consumption Calculated by the following formula: in, n is the number of records, It is i The power consumption value for a time interval.

[0032] Standard Deviation s The calculation formula is: Skewness provides information about the shape of the data distribution and can be used to identify anomalies in consumption patterns. MAD is calculated using the following formula: After all features are calculated, feature screening is performed to remove irrelevant or redundant features. This is done through correlation analysis, feature importance assessment, and statistical tests. Features are standardized or normalized to eliminate the dimensional effects between different features. The screened features are synthesized into a feature vector, which will be used as input data for subsequent machine learning models.

[0033] Among them, correlation analysis is used to measure the linear relationship between two variables. The present invention uses the Pearson correlation coefficient to calculate the correlation between the feature and the target variable. The steps of correlation analysis calculation are as follows: 1. Calculate the Pearson correlation coefficient between each feature and the target variable. The Pearson correlation coefficient calculation formula is as follows: in: Representation characteristics Target variable Pearson correlation coefficient between ; and Respectively represent characteristics and the target variable No. Sample values; and denote the means of the feature and target variables, respectively.

[0034] 2. Set a correlation threshold (W); if the correlation of a feature is lower than the threshold, the feature is considered unimportant for the prediction of the target variable and is removed.

[0035] The value range of the correlation threshold W is 0.3-0.7. In this embodiment, 0.5 is selected as the correlation threshold and adjusted according to the actual performance of the model.

[0036] The specific selection criteria are as follows: 1. Statistical knowledge basis: Correlation analysis usually uses the Pearson Correlation Coefficient, which ranges from [-1,1]: Positive correlation: close to 1, indicating that the feature is highly positively correlated with the target variable.

[0037] Negative correlation: close to -1, indicating that the feature is highly negatively correlated with the target variable.

[0038] Irrelevant: Close to 0, indicating that the feature has no linear relationship with the target variable.

[0039] 2. Threshold selection basis: Below 0.3: It is generally believed that the correlation between the feature and the target variable is weak and may not contribute much to the prediction effect. Therefore, choosing 0.3 as the threshold means eliminating features that have no significant linear relationship with the target variable.

[0040] Higher than 0.7: indicates strong correlation, but if the correlation of all retained features is very high, it may cause multicollinearity problems (i.e., multiple features are highly correlated), which will affect the stability and generalization ability of the model. Therefore, the threshold is usually not set too high.

[0041] 3. Actual model performance basis: Experimental verification: Evaluate the performance of the model at different correlation thresholds through multiple experiments and cross-validation. If the model overfits or fails to effectively extract useful features at a lower threshold (such as 0.3), the threshold may need to be increased; conversely, if the threshold is too high (such as 0.7), weakly correlated features that contribute to the target variable may be lost. Therefore, the final threshold needs to be determined through experiments.

[0042] 4. Dataset characteristics: The amount of data is large and the features are complex: the threshold can be appropriately increased, such as 0.5 or higher, to reduce the number of features, simplify the model, and prevent overfitting.

[0043] The amount of data is small and the features are sparse: the threshold can be lowered, such as 0.3, to retain more features and prevent the loss of potentially useful information.

[0044] The present invention uses a random forest tree model to perform feature importance assessment, and the feature importance assessment calculation steps are as follows: 1. Using the training dataset, train a random forest based tree model.

[0045] 2. Calculate the feature importance and get the feature importance score. In the tree model, each node is split based on a specific feature. The feature importance is usually determined by the contribution of the feature in all trees. The feature importance calculation formula is as follows: in, It is a feature , is the number of trees, It is The set of all nodes for feature splits, It is at the node n The reduction in losses.

[0046] 3. Sort the features according to their importance scores and set the threshold to 0.5 to remove features with lower importance in order to retain features with importance above a certain value.

[0047] Statistical tests are used to evaluate the significant relationship between each feature and the target variable. The present invention uses the chi-square test to perform statistical tests to measure the impact of each feature on the target variable. The statistical test calculation steps are as follows: 1. Construct a chi-square table: Calculate the observed frequency and expected frequency between each feature and the target variable.

[0048] 2. Calculate the chi-square statistic using the following formula: in: is the observed value, is the expected value.

[0049] 3. Calculate the p-value and find the corresponding p-value from the chi-square distribution table based on the degrees of freedom and the chi-square statistic.

[0050] 4. Perform feature screening. If the p-value is less than the significance level (such as 0.05), reject the null hypothesis and retain the feature; otherwise, it is considered that the feature has no significant relationship with the target variable and can be removed.

[0051] S4. Use meta-heuristic techniques (artificial bee colony algorithm and genetic algorithm) to select salient features, including randomly generating an initial feature subset as a population at the beginning of the algorithm, using support vector machine (SVM) as an evaluation tool, and calculating the F1 score of each feature subset as the fitness value. The F1 score calculation formula is as follows: in, and They are precision and recall, which measure the ability of the classifier to correctly identify positive and negative classes, respectively.

[0052] According to the fitness value, individuals (feature subsets) with good performance are selected for crossover and mutation operations. In genetic algorithms, new offspring are generated by exchanging certain parts of two individuals to explore new solution spaces. Some features of certain individuals are randomly changed to increase the diversity of the population. In the ABC algorithm, feature subsets are updated through the modification rate (MR) to simulate the information exchange of bees in the bee colony. The selection, crossover, mutation and update steps are repeated until the predetermined number of iterations is reached or a satisfactory solution is found.

[0053] Among them, the ABC algorithm, or Artificial Bee Colony Algorithm, is a swarm intelligence optimization algorithm that simulates the foraging behavior of bees. It was proposed by Dervis Karaboga in 2005. The algorithm mainly includes three types of bees: employed bees, onlooker bees, and scout bees. The basic principle of the ABC algorithm is to find the optimal solution by simulating the foraging behavior of bees.

[0054] In the ABC algorithm, each food source represents a potential solution. Employed bees are responsible for searching for new and potentially better solutions around their current location. Observer bees wait in the hive and select food sources for search based on the information provided by the employed bees. Scout bees are responsible for randomly searching for new food sources when a food source is deemed no longer valuable.

[0055] The steps of using the ABC algorithm in this embodiment are: 1. Initialization: Randomly generate a group of bees and their corresponding food source locations. The random initialization formula is as follows: in, It is A solution, is the minimum value of the solution, is the maximum value of the solution, r is a random number between [0,1].

[0056] 2. Hired bee stage: Each hired bee searches for new food sources around its food source according to predetermined rules (such as Euclidean distance), and decides whether to replace the original food source based on fitness evaluation. The hired bee search formula is as follows: in, A new food source. is the current food source, A source of food for neighbors. is a random number between [-1,1].

[0057] The fitness calculation formula is as follows: in, It is the objective function defined according to the specific problem.

[0058] 3. Observer bee stage: Observer bees select a food source based on the information provided by employed bees (such as the fitness of the food source) and search around the food source.

[0059] The selection probability formula is as follows: in, Is to select The probability of a food source, It is The fitness value of a food source, N is the amount of food source.

[0060] 4. Update: If the observer bee finds a better food source, the original food source will be updated.

[0061] 5. Scouting bee stage: If a food source has not been updated within a certain number of times, it is considered that the food source is no longer valuable, and scout bees are sent out to search for new food sources. The formula for generating new food sources is: Same as the initialization phase.

[0062] 6. Loop: Repeat steps 2-5 until the termination condition is met (such as reaching the maximum number of iterations or the quality of the solution meets the requirements).

[0063] Among them, the feature subset is updated through the modification rate (MR), the steps are as follows: 1. Initialize feature subset: Assign a feature subset to each food source, where each feature is represented in binary form (0 or 1), 1 means the feature is selected, and 0 means it is not selected. The initialization formula is as follows: in, Indicates whether the jth feature is selected, and N is the total number of features.

[0064] 2. Calculate fitness: Input each feature subset into the classifier and calculate its fitness value. The fitness calculation formula is as follows: in, It is the objective function defined according to the specific problem.

[0065] 3. Generate new solution: For each feature subset, decide whether to modify a feature by using the modification rate MR. The specific formula is: in, is the updated feature subset elements, is the first subset of the original features elements, r is a random number between [0,1], and MR is the modification rate. r If it is less than MR, the feature selection is reversed (1 becomes 0 or 0 becomes 1), otherwise it remains unchanged.

[0066] 4. Calculate the fitness of the new solution: Input the updated feature subset into the classifier and calculate the fitness value of the new solution. If the fitness of the new solution is better than the original solution, replace the original solution with the new solution. Fitness update formula: If ,but .

[0067] 5. Iterative update: Repeat the above steps until the maximum number of iterations is reached or the convergence condition is met.

[0068] By introducing MR, the ABC algorithm can dynamically adjust the search strategy during the search process, increase the algorithm's exploration ability and avoid premature convergence.

[0069] S5. Feature extraction using denoising autoencoders involves extracting features from data, especially recovering useful information from noisy data. The autoencoder consists of an input layer, an encoding layer (bottleneck layer), a decoding layer, and an output layer. It converts the original data into a low-dimensional code, and then tries to reconstruct the original data from the encoded data with minimal differences. The working process of the autoencoder includes two steps: encoding and decoding. In the first step, the input data is converted into a low-dimensional space called a code. The input data is converted into a low-dimensional feature representation through the encoding layer, and the formula is: in, g is the activation function, and are the weights and biases of the encoding layer, respectively.

[0070] In the second step, the decoder reconstructs the data from the encoding and maps it to the original data. The encoded feature representation is reconstructed into the form of the original data through the decoding layer, and the formula is: in, and are the weights and biases of the decoding layer respectively.

[0071] After adjusting the encoder and decoder parameter settings, the error between the original input data and the reconstructed data is minimized by the mean square error. The mean square error formula is: in, n is the sample size, and They are i The original data and reconstructed data of samples.

[0072] The network weights are adjusted using gradient descent or other optimization algorithms to minimize the loss function. In denoising autoencoders, the input data is slightly corrupted by adding some random noise and passed to the autoencoder, making it insensitive to the training data. This modification increases the generalization properties of the autoencoder, thereby enhancing its feature extraction capabilities.

[0073] Among them, gradient descent is used to adjust the network weights. The steps are: 1. Initialize weights: First, randomly initialize the weights and biases in the network. These initial values ​​are randomly chosen to break the symmetry and provide a starting point for the training process.

[0074] The initialization weight formula is as follows: in Indicates The weight matrix of the layer, represents a uniform distribution, where n is the number of neurons in the previous layer.

[0075] 2. Forward propagation: Feed the input data into the network and perform calculations through the neurons in each layer until the last layer to obtain the predicted output. Layer, the formula for forward propagation is: in It is The weight matrix of the layer, It is The activation output of the layer, It is The bias of the layer, is the activation function, It is The activation output of the layer.

[0076] 3. Calculate loss: Use loss function (such as mean square error, cross entropy, etc.) to calculate the difference between the network prediction output and the true label. This difference value is called loss.

[0077] The loss function calculation formula is as follows: in is the true label, is the predicted output, N is the sample size.

[0078] 4. Back propagation: Calculate the gradient of the loss function with respect to each weight and bias. This process starts from the output layer and goes backwards through each layer of the network until the input layer. In this process, the chain rule is used to calculate the gradient of each weight and bias.

[0079] No. The weight gradient calculation formula of the layer is as follows: in, is the error term of this layer, is the activation value of the previous layer, and m is the number of samples.

[0080] No. The bias gradient of the layer is calculated as follows: No. The error term of the layer is calculated as follows: in, It is The activation output of the layer.

[0081] 5. Update weights: Use the calculated gradient and the pre-set learning rate to update each weight. The formula for weight update is as follows: in is the updated weight, is the weight before updating, is the learning rate, is the gradient of the weight.

[0082] 6. Iteration process: Repeat the above steps until the loss function converges or the preset number of iterations is reached.

[0083] S6. The acquired features are input into a support vector machine to detect abnormal power consumption behavior, including using the features extracted by the denoising autoencoder to train the SVM classifier during the classifier training phase. SVM is a supervised learning algorithm used for classification and regression analysis, which distinguishes different categories by finding the optimal boundary between data points. At this stage, the F1 score is used as a performance evaluation indicator. The F1 score is the harmonic mean of precision and recall, which is particularly useful for unbalanced data sets. The calculation formula for the F1 score is: in, and They are precision and recall, which measure the ability of the classifier to correctly identify positive and negative classes, respectively.

[0084] Experimental verification: like Figure 2 This figure shows the performance analysis of the artificial bee colony algorithm (ABC) and the genetic algorithm (GA) on the PRECON dataset. The two algorithms are used to select the optimal subset from a large number of features to improve the accuracy and efficiency of power occupancy anomaly detection. The feature selection process is optimized by simulating natural selection and genetic mechanisms.

[0085] On the PRECON dataset, the GA algorithm shows higher fitness than ABC during the iteration process, indicating that GA is more effective in feature selection and model performance. The fast convergence and higher accuracy of GA make it perform better on this specific dataset.

[0086] As shown in Figure 3, the performance analysis of the artificial bee colony algorithm (ABC) and the genetic algorithm (GA) on the SGCC dataset. This figure analyzes the performance of applying the ABC and GA algorithms on the SGCC dataset. Similar to the PRECON dataset, the two algorithms were used to select features from the SGCC dataset that are helpful for power occupancy anomaly detection. On the SGCC dataset, GA also showed higher fitness and accuracy than ABC. This shows that GA can more effectively select features that help improve model performance when dealing with datasets with a large number of missing values ​​and outliers.

[0087] As shown in Figure 4, the performance analysis of the denoising autoencoder on the PRECON dataset shows the feature extraction performance of the denoising autoencoder on the PRECON dataset.

[0088] In FIG4 (a), train means training; test means testing; Figure 4 Meaning of PR-AUC in (b): PR-AUC (Precision-Recall Area Under the Curve) is an indicator for evaluating the performance of a classification model, especially when dealing with unbalanced data sets. It comprehensively considers the precision (Precision) and recall (Recall) of the classifier, and calculates the average performance of these two indicators under different threshold settings.

[0089] Denoising autoencoders enhance the model's ability to generalize data by adding noise to the input data and training the model to reconstruct the original data from the noisy data.

[0090] The denoising autoencoder successfully extracted features that are helpful for classification on the PRECON dataset, improving the model's fitness and accuracy. This shows that the autoencoder can effectively process complex power consumption data and extract features that are helpful for improving the performance of power occupancy anomaly detection.

[0091] Figure 5 shows the performance analysis of the denoising autoencoder on the SGCC dataset. This figure analyzes the feature extraction performance of the denoising autoencoder on the SGCC dataset. Figure 5 In (a) of the figure, train means: training model; test means: testing model; Figure 5PR-AUC in (b) Meaning: PR-AUC (Precision-Recall Area Under the Curve) is an indicator for evaluating the performance of a classification model, especially when dealing with unbalanced data sets. It takes into account the precision (Precision) and recall (Recall) of the classifier and calculates the average performance of these two indicators under different threshold settings.

[0092] Similar to the application on the PRECON dataset, a denoising autoencoder is used to process the SGCC dataset to extract features that are helpful in classifying normal and abnormal power consumption patterns.

[0093] Although the SGCC dataset contains more missing values ​​and outliers, the denoising autoencoder is still able to extract effective features, thereby improving the classification performance of the model. However, due to the complexity of the data, the performance of the autoencoder on the SGCC dataset is slightly lower than that on the PRECON dataset.

[0094] The PRECON dataset is collected by an energy informatics group and contains electricity measurement data from households with smart meters installed. This dataset contains electricity measurement data from 42 households recorded every half hour from July 15, 2018 to May 31, 2019. The sampling rate of the dataset was reduced to once every half hour because too high a sampling rate would bring problems of storage complexity and computational complexity. In addition, although a high sampling rate can provide fine-grained information about consumer behavior, it may also raise privacy issues.

[0095] The characteristics of the PRECON dataset include: 1. Contains electricity measurement data of normal consumers.

[0096] 2. The dataset contains a large amount of measurement data and provides information on different types of consumers.

[0097] 3. It provides an excellent data source for analyzing users' electricity consumption history.

[0098] The power measurement data in the dataset is used for research to detect non-technical losses and abnormal behavior of power consumption through machine learning / deep learning methods. In the present invention, the dataset is used to train and test models to identify normal and abnormal power consumption patterns.

[0099] Example 2 This embodiment provides a power occupancy abnormality detection system based on a genetic algorithm, comprising: A data acquisition module is configured to acquire electricity consumption measurement data; The preprocessing module is configured to perform data preprocessing on the electricity consumption measurement data; The feature module is configured to synthesize new features from the electricity usage measurement data using statistical and electrical parameters; The algorithm module is configured to select salient features based on an artificial bee colony algorithm and a genetic algorithm; A denoising module, configured to extract high variance features from salient features of the electricity consumption data using a denoising autoencoder; The detection module is configured to input the extracted features into a support vector machine to detect abnormal power occupancy behavior.

[0100] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, for a method for detecting abnormal power occupancy based on a genetic algorithm.

[0101] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the power occupancy abnormality detection method based on a genetic algorithm.

[0102] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting abnormal power occupancy based on genetic algorithm. It is characterized in that include: Obtain electricity consumption measurement data; Perform data preprocessing on electricity consumption measurement data; Synthesize new features from electricity usage measurement data using statistical and electrical parameters; Select salient features based on artificial bee colony algorithm and genetic algorithm; Denoising autoencoders are used to extract high-variance features from salient features of electricity consumption data; The extracted features are input into the support vector machine to detect abnormal power usage behavior.

2. According to claim 1, a method for detecting abnormal power occupancy based on genetic algorithm, It is characterized in that The data preprocessing of the power consumption measurement data includes adjusting the sampling rate of the power consumption measurement data and performing minimum-maximum normalization processing, which is expressed as: in, is the normalized data, X is the original data, and are the minimum and maximum values ​​in the data set, respectively.

3. According to claim 2, a method for detecting abnormal power occupancy based on genetic algorithm, It is characterized in that The method of synthesizing new features from the electricity consumption measurement data using statistics and electrical parameters includes synthesizing 11 new features from the electricity consumption measurement data using statistics and electrical parameters, and after all the features are calculated, performing feature screening to remove irrelevant or redundant features, and standardizing or normalizing the features to eliminate dimensional effects between different features.

4. The method for detecting abnormal power occupancy based on genetic algorithm according to claim 3, It is characterized in that The method of selecting prominent features based on artificial bee colony algorithm and genetic algorithm includes randomly generating an initial feature subset as a population, using support vector machine SVM as an evaluation tool, calculating the F1 score of each feature subset as a fitness value; according to the fitness value, selecting a feature subset with good performance for crossover and mutation operations, and obtaining the optimal solution through iteration.

5. The method for detecting abnormal power occupancy based on genetic algorithm according to claim 4, It is characterized in that The method of extracting high variance features from the prominent features of the power consumption data by using a denoising autoencoder includes converting the power consumption data into a low-dimensional feature representation through an encoding layer, and the formula is: Among them, g is the activation function, and are the weights and biases of the encoding layer, respectively.

6. The method for detecting abnormal power occupancy based on genetic algorithm according to claim 5, It is characterized in that The method of extracting high variance features from prominent features of power consumption data using a denoising autoencoder also includes reconstructing data from the encoding using a decoder and mapping it to the original data. The encoded feature representation is reconstructed into the form of the original data through a decoding layer, and the formula is: in, and are the weights and biases of the decoding layer respectively.

7. The method for detecting abnormal power occupancy based on genetic algorithm according to claim 6, It is characterized in that The extracted features are input into a support vector machine to detect abnormal power occupancy behavior, including using the features extracted by the denoising autoencoder to train an SVM classifier, wherein the SVM classifier distinguishes different categories by finding the optimal boundary between data points, and uses the F1 score as a performance evaluation indicator of the SVM classifier.

8. A power occupancy anomaly detection system based on genetic algorithm, It is characterized in that include: A data acquisition module is configured to acquire electricity consumption measurement data; The preprocessing module is configured to perform data preprocessing on the electricity consumption measurement data; The feature module is configured to synthesize new features from the electricity usage measurement data using statistical and electrical parameters; The algorithm module is configured to select salient features based on an artificial bee colony algorithm and a genetic algorithm; A denoising module, configured to extract high variance features from salient features of the electricity consumption data using a denoising autoencoder; The detection module is configured to input the extracted features into a support vector machine to detect abnormal power occupancy behavior.

9. A computer-readable storage medium having a plurality of instructions stored therein, It is characterized in that The instructions are suitable for being loaded by a processor of a terminal device and executing the method according to claim 1 .

10. A terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement each instruction; and the computer-readable storage medium is used to store multiple instructions. It is characterized in that The instructions are suitable for being loaded by a processor and executing the method as claimed in claim 1 .

Citation Information

Patent Citations

  • Abnormal power consumption behavior identification method based on improved deep self-encoding network

    CN110929843A

  • Abnormal power consumption behavior identification method based on power consumption data

    CN113128567A

  • Low-voltage power distribution network electricity stealing user detection method and device

    CN113988178A

  • High-dimensional data abnormal subspace detection method based on auto-encoder and genetic algorithm

    CN114036992A