Electricity consumption abnormal behavior identification method, device and equipment and storage medium
By combining the two-layer particle swarm algorithm with labeled and unlabeled electricity usage information data sets for outlier mining, the problems of low efficiency and low accuracy in identifying abnormal electricity usage behavior in the existing technology are solved, and efficient and accurate electricity usage anomaly identification is achieved.
Patent Information
- Application Number
- CN202510679235.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-05
AI Technical Summary
Existing technologies cannot accurately identify abnormal electricity usage behavior, traditional manual analysis is inefficient and costly, and machine learning algorithms require large amounts of labeled data or have low accuracy.
A two-layer particle swarm algorithm is used to combine labeled and unlabeled electricity consumption information datasets for outlier mining. Abnormal electricity consumption information is determined by outlier proportion and outlier distance. The two-layer particle swarm algorithm is used to optimize mining parameters to improve recognition accuracy.
It improves the accuracy of identifying abnormal power consumption behavior, reduces the cost and time of manual analysis, and is suitable for situations with less labeled data.
Smart Images

Figure CN120597153A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of abnormal electricity usage behavior analysis, and in particular to a method, device, equipment, and storage medium for identifying abnormal electricity usage behavior. Background Art
[0002] During marketing audits of abnormal electricity usage, it's necessary to determine whether users are engaging in abnormal behavior. For example, a municipal power supply company typically has a large user base to analyze within its jurisdiction, with the majority of users performing normal operations. Traditional manual analysis combined with on-site inspections to verify a small number of abnormal users presents challenges in timeliness and accuracy.
[0003] Existing machine learning analysis methods often directly employ supervised learning algorithms, such as support vector machines and extreme learning machines. However, this approach requires a large amount of data with verified labels (e.g., normal or abnormal) and consumes significant costs and resources. Alternatively, unsupervised learning algorithms, such as cluster analysis, can be employed. However, these algorithms lack verified labeled data and have low accuracy. Therefore, existing approaches combining machine learning algorithms are still unable to accurately identify abnormal user electricity usage. Summary of the Invention
[0004] The present invention provides a method, device, equipment and storage medium for identifying abnormal electricity usage behavior to solve the problem in the prior art that abnormal electricity usage behavior cannot be accurately identified.
[0005] According to one aspect of the present invention, a method for identifying abnormal electricity usage behavior is provided, the method comprising:
[0006] Obtain the electricity consumption information dataset to be analyzed;
[0007] Based on the double-layer particle swarm algorithm, outlier mining is performed on the power consumption information dataset to be analyzed and the labeled power consumption information dataset to obtain target mining parameters, wherein the target mining parameters include outlier ratio and outlier distance;
[0008] Based on the outlier ratio and the outlier distance, abnormal electricity usage information in the electricity usage information dataset to be analyzed is determined.
[0009] According to another aspect of the present invention, a device for identifying abnormal electricity usage behavior is provided, the device comprising:
[0010] An acquisition module is used to obtain the electricity consumption information data set to be analyzed;
[0011] A mining module, configured to perform outlier mining based on a double-layer particle swarm algorithm, combining the power consumption information dataset to be analyzed and the labeled power consumption information dataset, and obtain target mining parameters, wherein the target mining parameters include an outlier ratio and an outlier distance;
[0012] A determination module is configured to determine abnormal electricity usage information in the electricity usage information data set to be analyzed based on the outlier ratio and the outlier distance.
[0013] According to another aspect of the present invention, there is provided an electronic device, comprising: at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for identifying abnormal electricity usage behavior described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for identifying abnormal power consumption behavior according to any embodiment of the present invention when executed.
[0017] Embodiments of the present invention provide a method, apparatus, device, and storage medium for identifying abnormal electricity usage behavior. The method comprises: obtaining an electricity usage information dataset to be analyzed; performing outlier mining based on a two-layer particle swarm algorithm, combining the electricity usage information dataset to be analyzed with a labeled electricity usage information dataset, to obtain target mining parameters, wherein the target mining parameters include an outlier ratio and an outlier distance; and determining abnormal electricity usage information in the electricity usage information dataset to be analyzed based on the outlier ratio and the outlier distance. This method determines the target mining parameters using a two-layer particle swarm algorithm, thereby obtaining abnormal electricity usage information in the electricity usage information dataset to be analyzed based on the target mining parameters. This method can improve the accuracy of identifying abnormal electricity usage behavior and solves the problem of the inability to accurately identify abnormal electricity usage behavior in the prior art.
[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A flowchart of a method for identifying abnormal electricity usage behavior provided in Example 1 of the present invention;
[0021] Figure 2 A schematic diagram of the structure of a device for identifying abnormal electricity usage behavior provided in the second embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the structure of an electronic device for a method for identifying abnormal electricity usage behavior according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention. It should be understood that the various steps described in the method implementation mode of the present invention can be performed in different orders and / or in parallel. In addition, the method implementation mode may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0024] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0025] It should be noted that the terms "first," "second," and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variations of the terms "including" and "having" are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0026] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0028] In actual work, for the analysis of a certain type of abnormal electricity consumption behavior, some prior knowledge has generally been accumulated, including some verified labeled data and most unverified unlabeled data. If an unsupervised learning strategy is directly adopted (directly performing clustering analysis and outlier mining analysis), the role of prior information will be ignored; if labeled data is directly used, due to the limitation of quantity and scale, the labeled data may only represent local conditions, which will affect the subsequent prediction effect.
[0029] Aiming at the current situation in which the identification of users with large number of indicators or complex quantification in power marketing audits involves manual analysis combined with on-site inspections, which has low timeliness and accuracy, and the lack of labeled data when applying machine learning algorithms for identification, this paper proposes a method for identifying abnormal power consumption behavior based on semi-supervised double-layer particle swarm and outlier mining.
[0030] Example 1
[0031] Figure 1 This is a flow chart of a method for identifying abnormal electricity usage behavior provided in Example 1 of the present invention. The method can be applied to situations where abnormal electricity usage behavior is identified. The method can be performed by an abnormal electricity usage behavior identification device, where the device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes but is not limited to: computers and other devices.
[0032] like Figure 1As shown, a method for identifying abnormal electricity usage behavior provided by the first embodiment of the present invention includes the following steps:
[0033] S110: Obtain a data set of electricity consumption information to be analyzed.
[0034] The electricity usage information data set to be analyzed may include multiple pieces of electricity usage information data.
[0035] In this embodiment, the data to be identified may be used as the electricity usage information data set to be analyzed.
[0036] In one embodiment, obtaining the electricity usage information dataset to be analyzed includes: obtaining electricity usage indicators of each user; normalizing the electricity usage indicators to obtain normalized electricity usage indicators; and constructing the electricity usage information dataset to be analyzed based on the normalized electricity usage indicators.
[0037] User indicators can be indicators associated with the type of abnormal power usage experienced by the user. Different abnormality types correspond to different user indicators, and specific settings can be made based on actual circumstances. For example, taking the case of abnormal power usage by users using temporary power for production as an example, power usage indicators can include user type information, capacity information, percentage of time spent using temporary power, average daily full-capacity hours, percentage of off-peak hours in a given month, monthly power fluctuation rate, and abnormal events. User type information can be used to distinguish different user types. User types can include industrial, commercial, residential, and agricultural users. Capacity information can include the total capacity of the user's electrical equipment connected to the grid or the capacity of the transformer. The percentage of time spent using temporary power can be the ratio of the user's applied temporary power time to the total duration of the statistical period. The average daily full-capacity hours can refer to the total number of hours a user uses electricity at full capacity divided by the number of days in a given statistical period, resulting in the average. The percentage of off-peak hours in a given month can refer to the proportion of off-peak hours to the total monthly power consumption. The monthly electricity consumption fluctuation rate can be used to measure the magnitude of the change in electricity consumption over the month. This can be calculated by calculating the ratio of the standard deviation of daily electricity consumption to the monthly average electricity consumption. Abnormal events can include whether a user is in transit or has terminated the formal electricity application process.
[0038] In this embodiment, the electricity consumption indicators of each user can be obtained, the electricity consumption indicators are normalized, and the electricity consumption information data set to be analyzed is constructed based on the normalized electricity consumption indicators. For example, the electricity consumption indicators such as user type information, capacity information, proportion of temporary electricity use time applied for, average daily full-capacity electricity use hours, proportion of off-peak electricity use in a certain month, electricity consumption fluctuation rate in a certain month, abnormal events, etc. are obtained. The total number of user samples is defined as N. For any user, any user can be represented as a 1*7-dimensional matrix X i :
[0039] X i=[x i1 ... x ik ... x i7 ];
[0040] Among them, x ik Indicates the corresponding value of the kth indicator of the i-th user.
[0041] After obtaining the user indicators, the above indicators can be normalized through different normalization methods. Different indicators have different dimensions. For example, user type information, capacity information, and abnormal events are discrete data indicators. The average daily full-capacity electricity consumption hours and electricity fluctuation rate are continuous data indicators, and the value range is between 0 and +∞. The proportion of temporary electricity time applied for and the proportion of off-peak electricity are continuous data indicators, and the value range is between 0 and 1. For the above three types of data, in order to avoid a certain type of indicator from being too heavy and causing calculation imbalance, unified normalization processing is required before data analysis. Define the normalized user as A i , then A i With X i The relationship is as follows:
[0042] For discrete data indicators such as user type information, capacity information, and abnormal events, the normalization method of piecewise function is adopted:
[0043]
[0044] Among them, a ik For user A i The kth user index, k = 1, 2, 7, num is the number of segment intervals, and 1 to num-1 is the value range of the corresponding segment interval.
[0045] For continuous data indicators such as the daily average full-capacity electricity consumption hours and electricity fluctuation rate, whose values range between 0 and +∞, the maximum value normalization method is adopted:
[0046]
[0047] Among them, k=4,6.
[0048] For continuous data indicators such as the proportion of temporary electricity use time and off-peak electricity consumption, which range from 0 to 1, you can directly use:
[0049] a ik =x ik ;
[0050] Among them, k=3,5.
[0051] S120 . Based on a double-layer particle swarm algorithm, outlier mining is performed on the power information dataset to be analyzed and the labeled power information dataset to obtain target mining parameters, where the target mining parameters include outlier ratio and outlier distance.
[0052] The two-layer particle swarm algorithm (PSO) refers to an improved PSO algorithm structure that constructs two layers of particle swarms (an outer global particle swarm and an inner local particle swarm) to collaboratively perform optimization searches. Labels can be identifiers indicating whether data in a dataset is anomalous. If the data is anomalous, it can be considered abnormal electricity usage behavior. Labeled electricity usage information datasets can be pre-constructed datasets based on historical user data. Outlier mining refers to a data analysis algorithm commonly used in cluster analysis, primarily used to detect suspicious data that differs significantly from other data, aiming to eliminate contaminants or discover hidden, meaningful knowledge. The target mining parameters can be the optimal mining parameters obtained through optimization. The outlier ratio refers to the ratio of the number of outliers to the total number of data points in a dataset. The outlier distance describes the degree of difference between a data point and other data points in the dataset, and can be measured by calculating a distance metric. Outliers are observations in a dataset that significantly deviate from the rest of the data.
[0053] In this embodiment, a labeled electricity usage information dataset can be obtained, and target mining parameters can be obtained by performing outlier mining on the labeled electricity usage information dataset and the electricity usage information dataset to be analyzed, and combining the mining results with a double-layer particle swarm algorithm to optimize the mining.
[0054] In one embodiment, the method is based on a double-layer particle swarm algorithm, combined with the electricity information data set to be analyzed and the labeled electricity information data set to perform outlier mining to obtain target mining parameters, including: initializing the mining parameters, optimizing the mining parameters based on the labeled electricity information data set in combination with the particle swarm algorithm and the outlier mining algorithm to obtain the optimized first mining parameters; adding a pseudo-label to each data in the electricity information data set to be analyzed based on the optimized first mining parameters to obtain a pseudo-labeled electricity information data set with pseudo-labels; based on the combined data set composed of the labeled electricity information data set and the pseudo-labeled electricity information data set, continuing to optimize the optimized first mining parameters in combination with the particle swarm algorithm and the outlier mining algorithm to obtain the target mining parameters.
[0055] Among them, pseudo labels can be used to indicate whether the data is an outlier.
[0056] In this embodiment, the particle swarm algorithm and the outlier mining algorithm can be combined to optimize the mining parameters. Specifically, the mining parameters can be initialized first, and then the mining parameters are optimized based on the labeled electricity information data set combined with the above algorithm to obtain the first mining parameters. Then, the electricity information data set with pseudo labels is constructed using the first mining parameters. The labeled electricity information data set and the pseudo-labeled electricity information data set are used as a combined data set. The first mining parameters are optimized again based on the combined data set combined with the above algorithm to obtain the final target mining parameters. This embodiment uses a double-layer particle swarm algorithm to find the optimal mining parameters for outlier mining suitable for the new data set. In the optimization process, the influence of the original labeled data and the gradually accurate pseudo-labeled data are simultaneously taken into account, so that the best outliers based on prior knowledge (labeled data) can be obtained, providing a strong basis for on-site inspections.
[0057] S130: Determine abnormal electricity usage information in the electricity usage information dataset to be analyzed based on the outlier ratio and the outlier distance.
[0058] In this embodiment, after obtaining the target mining parameters, outlier mining can be performed on the electricity information data set to be analyzed based on the outlier ratio and outlier distance in the target mining parameters to obtain the outliers in the electricity information data set to be analyzed. The outliers are the abnormal data in the electricity information data set to be analyzed, and abnormal electricity information can be obtained based on the outliers.
[0059] A method for identifying abnormal electricity usage behavior provided in a first embodiment of the present invention includes: obtaining an electricity usage information dataset to be analyzed; performing outlier mining based on a two-layer particle swarm algorithm, combining the electricity usage information dataset to be analyzed with a labeled electricity usage information dataset, to obtain target mining parameters, wherein the target mining parameters include an outlier ratio and an outlier distance; and determining abnormal electricity usage information in the electricity usage information dataset to be analyzed based on the outlier ratio and the outlier distance. This method determines the target mining parameters using a two-layer particle swarm algorithm, thereby obtaining abnormal electricity usage information in the electricity usage information dataset to be analyzed based on the target mining parameters. This method can improve the accuracy of identifying abnormal electricity usage behavior and solves the problem of the inability to accurately identify abnormal electricity usage behavior in the prior art.
[0060] Based on the above embodiment, a modified embodiment of the above embodiment is proposed. It should be noted that, in order to simplify the description, only the differences from the above embodiment are described in the modified embodiment.
[0061] In one embodiment, the mining parameters are optimized based on the labeled electricity information data set in combination with the particle swarm algorithm and the outlier mining algorithm to obtain the optimized first mining parameters, including: predicting the predicted outlier set in the labeled electricity information data set through the mining parameters and the outlier mining algorithm; analyzing the predicted outlier set and the actual outlier set corresponding to the labeled electricity information data set through the target optimization function to obtain the accuracy of the predicted outliers; if the accuracy does not meet the preset threshold, optimizing the mining parameters through the particle swarm algorithm, and re-iterating based on the optimized mining parameters until the accuracy of the current predicted outliers meets the preset threshold, and using the mining parameters at this time as the first mining parameters.
[0062] Among them, the mining ratio p in the mining parameter act and outlier distance d cons In the first iteration, the parameters can be set manually or randomly generated from a preset range. If the parameters are not set properly, too many outliers may be detected or important outliers may be missed. The distance-based outlier mining algorithm requires that if there are at least p act The distance between some objects and object ο is greater than d cons , then the object ο is a distance-based parameter p act and d cons outliers.
[0063] In this embodiment, in order to ensure the accuracy of setting pseudo labels for unlabeled data, a predicted outlier set can be obtained in the prediction. When it is determined that the current accuracy does not meet the preset threshold based on the current predicted outlier set and the actual outlier set, the first-level particle swarm optimization algorithm is introduced to use the labeled data set to set the pseudo labels for the p act and d cons The parameters are optimized and the optimized results are used as the initial parameters of the unlabeled dataset. If the current accuracy meets the preset threshold, the current mining parameters can be directly used as the first mining parameters.
[0064] Exemplarily, this embodiment can adopt an outlier mining algorithm based on Euclidean distance, and predict the predicted outlier set in the labeled electricity information data set through mining parameters and outlier mining algorithm, and analyze the predicted outlier set and the actual outlier set through the target optimization function to obtain the accuracy of the predicted outliers. If the accuracy meets the customized preset threshold, the mining parameters are optimized through the particle swarm algorithm, and it is re-iterated according to the optimized mining parameters. The re-iteration process is the step of reconstructing the predicted outlier set and re-determining the accuracy until the accuracy of the current predicted outliers meets the preset threshold. The mining parameters at this time can be used as the first mining parameters. The specific process is as follows:
[0065] Calculate the Euclidean distance of each data point in the labeled electricity consumption information dataset. Define two users A i , A j The Euclidean distance between ij :
[0066]
[0067] Among them, a ik For user A i The kth user index, a jk For user A j The kth user index, k = 1, 2, 3, 4, 5, 6, 7. When two users A i , A j When close, d ij Close to 0; when the difference is greater, d ij The larger the value, the larger the value. At this time, define p i For the data set with user A i The distance is greater than d cons The proportion of:
[0068]
[0069] in, If p i ≥p act , then user A i It is an outlier in the data set.
[0070] In one embodiment, the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information data set are analyzed through the objective optimization function to obtain the accuracy of the predicted outliers, including: determining the outlier intersection of the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information data set; based on the number of outliers in the predicted outlier set, the actual outlier set and the outlier intersection, determining the accuracy of the predicted outliers in combination with the objective optimization function.
[0071] In this embodiment, the actual outlier set corresponding to the labeled electricity consumption information data set can be obtained, and an intersection operation can be performed on the predicted outlier set and the actual outlier set to obtain the outlier intersection. The accuracy of the predicted outlier can be determined by combining the target optimization function with the number of outliers in the predicted outlier set, the actual outlier set and the outlier intersection.
[0072] For example, to find the optimal d cons and p act , define the identified predicted outlier set as S pr , the number of elements is b, and the actual outlier set is Sfa , with c as the number of elements, and the intersection of the identified outlier set and the actual outlier set as S, with m as the number of elements. Precision and recall are introduced. In practice, when analyzing abnormal users, it is desirable to ensure completeness, but it is also undesirable to analyze too many users, which would reduce accuracy and waste too much effort during on-site inspections. For this purpose, the F-measure function can be selected as the target optimization function:
[0073]
[0074] In view of the actual work, the number of abnormal users is smaller than that of normal users. At the same time, more emphasis is placed on recall rate. When taking into account both accuracy and failure rate, the F3-measure function can be selected, that is, β = 3.
[0075]
[0076] Among them, Precision = m / b, Recall = m / c.
[0077] The number of outliers in the predicted outlier set, the actual outlier set, and the outlier intersection can be calculated as follows:
[0078]
[0079] c=Card(S fa );
[0080] m=Card(S pr ∩S fa );
[0081]
[0082] Then we can get the F3-measure, which is an indicator of accuracy:
[0083]
[0084] Based on the particle swarm algorithm iterative optimization, the optimal parameter p for outlier monitoring based on the labeled data set is obtained. act and d cons , then find the optimal d cons and p act The problem is transformed into the maximum value function Max(F3-measure). From this, the optimization steps of mining parameters can be formulated:
[0085] (1) Parameter initialization: Let the number of iterations k = 0, and give the maximum number of iterations T max And the preset threshold (deviation convergence criterion ε), given the parameter pact and d cons The deviation convergence criterion can be a preset allowable error range, usually a small positive number.
[0086] (2) For the kth iteration, the set of outliers identified at this time is S pr (k), and the actual outlier set is S fa By comparison, we can obtain the number of outliers b(k) in the predicted outlier set and the number of outliers m(k) in the outlier intersection at the kth iteration.
[0087] (3) Calculate the accuracy F3-measure(k) at this time and compare it with the deviation convergence criterion ε: If F3-measure(k)>ε, it means that the precision and recall rates have met the requirements at this time, and the calculation is completed. The mining parameter p at the kth iteration is act (k) and d cons (k) as the final result, and obtain the current outlier as the final abnormal power consumption identification result; if F3-measure(k)<=ε, the particle swarm optimization algorithm is used, combined with its correction strategy, for the mining parameter p at the kth iteration act (k) and d cons (k) is corrected to obtain its new value.
[0088] Particle swarm optimization algorithm is a kind of swarm intelligence algorithm. It simulates the migration and aggregation behavior of birds during foraging and relies on the collaboration between individuals to find the optimal solution of the group in the solution space. For a group of N-dimensional particles (i.e., each data in the data set), let the position of the kth particle be X i , the speed is V i , the objective function is F(X i ). For each generation of particles, the speed and position can be updated using the following formula:
[0089]
[0090] in, and denote the velocity and position of the d-th dimension of the i-th particle at the k-th iteration respectively; and denote the velocity and position of the d-th dimension of the i-th particle at the k+1-th iteration respectively; is the optimal position of the d-th dimension of the i-th particle in the first k iterations; is the optimal position of the d-th dimension of all particles in the first k iterations; w is the weight coefficient considering the velocity of the previous generation on the velocity of the next generation, and its value is generally between 0.8 and 1.2. c1 and c2 are the influence factors of individual optimality and overall optimality on velocity, respectively, and are usually selected as c1=c2=2. ξ and η are random numbers between 0 and 1.
[0091] (4) The number of iterations is increased by one, k=k+1, and the process goes to step (2) for a new round of calculation and correction.
[0092] In one embodiment, the method adds a pseudo-label to each data in the electricity information data set to be analyzed based on the optimized first mining parameter to obtain a pseudo-labeled electricity information data set with a pseudo-label, including: performing outlier mining on the electricity information data set to be analyzed based on the first mining parameter and the outlier mining algorithm to obtain an outlier identifier corresponding to each data in the electricity information data set to be analyzed; and using the outlier identifier as a pseudo-label for the corresponding data to obtain a pseudo-labeled electricity information data set with a pseudo-label.
[0093] In this embodiment, outlier mining can be performed on the power information dataset to be analyzed based on the first mining parameter and the outlier mining algorithm to obtain the outlier identification of each data and set a pseudo label for it. For example, the Euclidean distance of each data point in the power information dataset to be analyzed is calculated, and the p after the first layer optimization is used. act and d cons , outlier mining is performed on the electricity information dataset to be analyzed, and the mined outlier labels are set to 1 and the non-outlier labels are set to 0 to complete the pseudo-label setting.
[0094] In one embodiment, the first mining parameter after optimization is further optimized based on the combined dataset consisting of the labeled electricity usage information dataset and the pseudo-labeled electricity usage information dataset, in combination with the particle swarm optimization algorithm and the outlier mining algorithm to obtain the target mining parameter, including:
[0095] Based on the first mining parameters and the outlier mining algorithm, outlier mining is performed on a combined data set consisting of the labeled electricity usage information data set and the pseudo-labeled electricity usage information data set to obtain a predicted outlier set of the combined data set;
[0096] Determining the accuracy of the current predicted outlier based on the predicted outlier set of the combined data set, the pseudo labels, and the actual outlier set corresponding to the labeled electricity usage information data set in combination with the objective optimization function;
[0097] If the accuracy does not meet the preset threshold, optimizing the first mining parameter by using a particle swarm algorithm to obtain an optimized first mining parameter;
[0098] Re-adding a pseudo-label to each piece of data in the electricity usage information dataset to be analyzed based on the optimized first mining parameter to obtain an updated pseudo-label electricity usage information dataset;
[0099] Iteration is performed again according to the optimized first mining parameter and the updated pseudo-label electricity usage information dataset until the obtained accuracy meets the preset threshold, and the first mining parameter at this time is used as the target mining parameter.
[0100] In this embodiment, the mining parameters can be optimized at the second level. In this optimization process, the data set targeted is a combined data set consisting of a labeled electricity information data set and a pseudo-labeled electricity information data set corresponding to the electricity information data set to be analyzed. During the optimization process, outlier mining can be performed on the combined data set based on the first mining parameters and the outlier mining algorithm to obtain a predicted outlier set of the combined data set, and the accuracy of the current predicted outliers can be determined through the target optimization function based on the predicted outlier set, the pseudo-labels, and the actual outlier set corresponding to the labeled electricity information data set. For example, the predicted outliers can be compared with the pseudo-labels and the actual outlier set, and the accuracy of the predicted outliers can be calculated in combination with the target optimization function. The way in which the accuracy is determined in this embodiment is similar to the way in which the accuracy is calculated using actual outliers and predicted outliers, and will not be elaborated here.
[0101] If the accuracy meets the preset threshold, the first mining parameter at this time is used as the target mining parameter. Otherwise, the first mining parameter is optimized by the particle swarm algorithm to obtain the optimized first mining parameter. Then, a new pseudo-label electricity usage information data set is re-determined based on the optimized first mining parameter, and iteration is continued based on the optimized first mining parameter and the updated pseudo-label electricity usage information data set until the obtained accuracy meets the preset threshold or the number of iterations reaches the maximum number of iterations, and the first mining parameter at this time is used as the target mining parameter.
[0102] Exemplarily, using the first mining parameter to evaluate the mining effect of the power consumption information dataset to be analyzed may include:
[0103] (1) The electricity usage information dataset to be analyzed with pseudo labels (i.e., pseudo-labeled electricity usage information dataset) and the labeled electricity usage information dataset are combined into a new labeled dataset;
[0104] (2) Using the p obtained by the first layer optimization act and d cons , outlier mining is performed on the new label data set, and the identified predicted outlier set is compared with the actual outlier set corresponding to the pseudo label and the labeled electricity information data set, and the objective function value that can indicate the prediction accuracy is calculated using the formula.
[0105] During the training process using both labeled and unlabeled data, the pseudo-labels are continuously updated as the optimization weights change. Due to the credibility of the pseudo-labels and the disparity in the amount of labeled and unlabeled data, the balance between the two objective functions is crucial for the optimization results. Therefore, this embodiment can use the following objective optimization function to determine the final accuracy by comparing the accuracy of the pseudo-labeled electricity usage information dataset and the labeled electricity usage information dataset:
[0106] H(x)=F3-measure 有 +β(t)*F3-measure 伪 ;
[0107] Among them, F3-measure is the F3 value corresponding to the labeled electricity consumption information dataset, and F3-measure pseudo is the F3 value corresponding to the pseudo-labeled electricity consumption information dataset. During the training process, β(t) determines the proportion of the unlabeled data target value in the overall target value. In the initial stage of training, because the accuracy of the assigned pseudo-label value is relatively low, if the β(t) value is too large, increasing the unlabeled data target value will lead to degradation of the optimization performance, but if the β(t) value is too small, the benefits of unlabeled data cannot be fully utilized. Therefore, β(t) can be set by optimization methods such as simulated annealing algorithm. For example, the initial value is set to 0, and then slowly increases and eventually becomes fixed as the number of training iterations increases, and the mining ability will also be enhanced. β(t) can be determined by the following formula:
[0108]
[0109] T1 is the starting round value when adding unlabeled loss, T2 is the round value with fixed weight, β f The weights of the final unlabeled objective function are fixed. The three values should be set according to the specific application scenario. The annealing process can avoid poor local minima during optimization and make the pseudo-labels of the unlabeled data as similar as possible to the true labels.
[0110] This embodiment combines an unlabeled dataset with pseudo labels and an original labeled dataset to form a new dataset. By mining outliers in the new dataset and comparing it with the dataset that has been pseudo-labeled, the accuracy of the pseudo labels and the adaptability of the parameters to the original labels can be determined.
[0111] (3) Evaluate the mining effect and evaluate whether the accuracy meets the preset threshold. When the accuracy does not meet the preset threshold, the particle swarm optimization algorithm is used, combined with its correction strategy, to determine the mining parameter p based on the new label data set. act and d cons Make corrections to get its new value.
[0112] (4) Use the updated mining parameters to re-mine outliers on the electricity consumption information dataset to be analyzed, correct the pseudo-labels, and obtain an updated pseudo-label electricity consumption information dataset.
[0113] (5) Re-execute steps (1) and (3) to construct a new label data set, and use the updated mining parameters to evaluate the mining effect of the new label data set until the accuracy meets the requirements or the iteration is terminated when the number of iterations reaches the maximum number of iterations, and the optimal mining parameters are obtained. The corresponding outlier is returned and the current outlier is used as the identification result of abnormal power consumption behavior.
[0114] In traditional algorithms, the values of mining parameters are generally based on expert experience, while in this embodiment, mining parameters are updated through a particle swarm optimization algorithm. A labeled electricity consumption information dataset (including two types, anomalies and no anomalies) is constructed through data verified on site in the early stage for supervised learning. The labeled electricity consumption information dataset is used as the first layer, and the labeled electricity consumption information dataset and the pseudo-labeled dataset marked after mining are used as the second layer. Using the first-layer particle swarm optimization algorithm, the best outlier mining parameters suitable for this abnormal scenario are trained, and the best outlier mining parameters are used as the initial values for mining outliers in unlabeled data. The optimized mining parameters are used to perform the first outlier mining on the unlabeled dataset to ensure the relative accuracy of the first mining, and pseudo-labels are set for the unlabeled data, thereby expanding the labeled data set and ensuring a more accurate reflection of data patterns. Then, the initial mining parameters are optimized again through the second-layer particle swarm algorithm to obtain the optimal parameters and outliers in the group suitable for the new labeled data set. This method is suitable for situations where there is less labeled data. At the same time, it takes into account the role of prior knowledge. By iterating the pseudo-labels of unlabeled data, the outliers in the group are gradually mined, thereby providing a basis for on-site inspection work and improving the accuracy of manual analysis.
[0115] Example 2
[0116] Figure 2 This is a structural diagram of a device for identifying abnormal electricity usage behavior provided in Example 2 of the present invention. The device can be used to identify abnormal electricity usage behavior, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device.
[0117] like Figure 2 As shown, the device includes:
[0118] An acquisition module 210 is used to acquire a data set of electricity usage information to be analyzed;
[0119] A mining module 220 is configured to perform outlier mining based on a two-layer particle swarm algorithm, combining the power consumption information dataset to be analyzed and the labeled power consumption information dataset to obtain target mining parameters, wherein the target mining parameters include an outlier ratio and an outlier distance;
[0120] The determination module 230 is configured to determine abnormal electricity usage information in the electricity usage information dataset to be analyzed based on the outlier ratio and the outlier distance.
[0121] This embodiment provides a device for identifying abnormal electricity usage behavior, including: an acquisition module for acquiring a data set of electricity usage information to be analyzed; a mining module for performing outlier mining based on a two-layer particle swarm algorithm, combining the electricity usage information data set to be analyzed and a labeled electricity usage information data set to obtain target mining parameters, wherein the target mining parameters include an outlier ratio and an outlier distance; and a determination module for determining abnormal electricity usage information in the electricity usage information data set to be analyzed based on the outlier ratio and the outlier distance.
[0122] Furthermore, the mining module 220 includes:
[0123] Initializing mining parameters, optimizing the mining parameters based on a labeled electricity usage information dataset using a particle swarm optimization algorithm and an outlier mining algorithm to obtain optimized first mining parameters;
[0124] Adding a pseudo label to each piece of data in the electricity usage information dataset to be analyzed based on the optimized first mining parameter to obtain a pseudo-labeled electricity usage information dataset with pseudo labels;
[0125] Based on the combined data set consisting of the labeled electricity usage information data set and the pseudo-labeled electricity usage information data set, the optimized first mining parameters are further optimized in combination with the particle swarm algorithm and the outlier mining algorithm to obtain target mining parameters.
[0126] Furthermore, the mining parameters are optimized based on the labeled electricity usage information dataset by combining a particle swarm optimization algorithm and an outlier mining algorithm to obtain the optimized first mining parameters, including:
[0127] Predicting a set of predicted outliers in a labeled electricity usage information dataset using the mining parameters and the outlier mining algorithm;
[0128] Analyzing the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information data set through the objective optimization function to obtain the accuracy of the predicted outlier;
[0129] If the accuracy does not meet the preset threshold, the mining parameters are optimized by the particle swarm algorithm, and re-iteration is performed based on the optimized mining parameters until the accuracy of the current predicted outlier meets the preset threshold, and the mining parameters at this time are used as the first mining parameters.
[0130] Furthermore, the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information dataset are analyzed by the objective optimization function to obtain the accuracy of the predicted outliers, including:
[0131] Determining an outlier intersection of the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information dataset;
[0132] The accuracy of the predicted outlier points is determined based on the predicted outlier set, the actual outlier set, and the number of outliers in the outlier intersection, in combination with a target optimization function.
[0133] Furthermore, the step of adding a pseudo label to each piece of data in the electricity usage information dataset to be analyzed based on the optimized first mining parameter to obtain a pseudo-labeled electricity usage information dataset with pseudo labels includes:
[0134] Performing outlier mining on the electricity usage information dataset to be analyzed based on the first mining parameter and the outlier mining algorithm to obtain an outlier identifier corresponding to each piece of data in the electricity usage information dataset to be analyzed;
[0135] The outlier identifiers are used as pseudo labels for corresponding data to obtain a pseudo-labeled electricity usage information dataset with pseudo labels.
[0136] Furthermore, the optimized first mining parameter is further optimized based on the combined dataset consisting of the labeled electricity usage information dataset and the pseudo-labeled electricity usage information dataset, in combination with the particle swarm algorithm and the outlier mining algorithm to obtain the target mining parameter, including:
[0137] Based on the first mining parameters and the outlier mining algorithm, outlier mining is performed on a combined data set consisting of the labeled electricity usage information data set and the pseudo-labeled electricity usage information data set to obtain a predicted outlier set of the combined data set;
[0138] Determining the accuracy of the current predicted outlier based on the predicted outlier set of the combined data set, the pseudo labels, and the actual outlier set corresponding to the labeled electricity usage information data set in combination with the objective optimization function;
[0139] If the accuracy does not meet the preset threshold, optimizing the first mining parameter by using a particle swarm algorithm to obtain an optimized first mining parameter;
[0140] Re-adding a pseudo-label to each piece of data in the electricity usage information dataset to be analyzed based on the optimized first mining parameter to obtain an updated pseudo-label electricity usage information dataset;
[0141] Iteration is performed again according to the optimized first mining parameter and the updated pseudo-label electricity usage information dataset until the obtained accuracy meets the preset threshold, and the first mining parameter at this time is used as the target mining parameter.
[0142] Furthermore, the acquisition module 210 includes:
[0143] Obtain electricity consumption indicators for each user;
[0144] Normalizing the electricity consumption index to obtain a normalized electricity consumption index;
[0145] The electricity consumption information dataset to be analyzed is constructed based on the normalized electricity consumption indicators.
[0146] The above-mentioned abnormal electricity usage behavior identification device can execute the abnormal electricity usage behavior identification method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0147] Example 3
[0148] Figure 3 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0149] like Figure 3As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0150] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0151] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for identifying abnormal electricity usage behavior.
[0152] In some embodiments, the method for identifying abnormal electricity usage behavior may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for identifying abnormal electricity usage behavior described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for identifying abnormal electricity usage behavior in any other appropriate manner (e.g., by means of firmware).
[0153] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0154] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0155] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0156] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0157] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0158] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0159] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0160] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for identifying abnormal electricity usage behavior, characterized in that: The method comprises: Obtain the electricity consumption information dataset to be analyzed; Based on the double-layer particle swarm algorithm, outlier mining is performed on the power consumption information dataset to be analyzed and the labeled power consumption information dataset to obtain target mining parameters, wherein the target mining parameters include outlier ratio and outlier distance; Based on the outlier ratio and the outlier distance, abnormal electricity usage information in the electricity usage information dataset to be analyzed is determined.
2. The method according to claim 1, characterized in that The two-layer particle swarm algorithm is used to perform outlier mining in combination with the power consumption information dataset to be analyzed and the labeled power consumption information dataset to obtain target mining parameters, including: Initializing mining parameters, optimizing the mining parameters based on a labeled electricity usage information dataset using a particle swarm optimization algorithm and an outlier mining algorithm to obtain optimized first mining parameters; Adding a pseudo label to each piece of data in the electricity usage information dataset to be analyzed based on the optimized first mining parameter to obtain a pseudo-labeled electricity usage information dataset with pseudo labels; Based on the combined data set consisting of the labeled electricity usage information data set and the pseudo-labeled electricity usage information data set, the optimized first mining parameters are further optimized in combination with the particle swarm algorithm and the outlier mining algorithm to obtain target mining parameters.
3. The method according to claim 2, characterized in that The method of optimizing the mining parameters based on the labeled electricity consumption information dataset by combining the particle swarm optimization algorithm and the outlier mining algorithm to obtain the optimized first mining parameters includes: Predicting a set of predicted outliers in a labeled electricity usage information dataset using the mining parameters and the outlier mining algorithm; Analyzing the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information data set through the objective optimization function to obtain the accuracy of the predicted outlier; If the accuracy does not meet the preset threshold, the mining parameters are optimized by the particle swarm algorithm, and re-iteration is performed based on the optimized mining parameters until the accuracy of the current predicted outlier meets the preset threshold, and the mining parameters at this time are used as the first mining parameters.
4. The method according to claim 3, characterized in that The objective optimization function is used to analyze the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information data set to obtain the accuracy of the predicted outliers, including: Determining an outlier intersection of the predicted outlier set and the actual outlier set corresponding to the labeled electricity usage information dataset; The accuracy of the predicted outlier points is determined based on the predicted outlier set, the actual outlier set, and the number of outliers in the outlier intersection, in combination with a target optimization function.
5. The method according to claim 2, characterized in that The step of adding a pseudo label to each piece of data in the electricity usage information dataset to be analyzed based on the optimized first mining parameter to obtain a pseudo-labeled electricity usage information dataset with pseudo labels includes: Performing outlier mining on the electricity usage information dataset to be analyzed based on the first mining parameter and the outlier mining algorithm to obtain an outlier identifier corresponding to each piece of data in the electricity usage information dataset to be analyzed; The outlier identifiers are used as pseudo labels for corresponding data to obtain a pseudo-labeled electricity usage information dataset with pseudo labels.
6. The method according to claim 2, characterized in that The step of further optimizing the optimized first mining parameters based on the combined dataset consisting of the labeled electricity usage information dataset and the pseudo-labeled electricity usage information dataset in combination with the particle swarm optimization algorithm and the outlier mining algorithm to obtain target mining parameters includes: Based on the first mining parameters and the outlier mining algorithm, outlier mining is performed on a combined data set consisting of the labeled electricity usage information data set and the pseudo-labeled electricity usage information data set to obtain a predicted outlier set of the combined data set; Determining the accuracy of the current predicted outlier based on the predicted outlier set of the combined data set, the pseudo labels, and the actual outlier set corresponding to the labeled electricity usage information data set in combination with the objective optimization function; If the accuracy does not meet the preset threshold, optimizing the first mining parameter by using a particle swarm algorithm to obtain an optimized first mining parameter; Re-adding a pseudo-label to each piece of data in the electricity usage information dataset to be analyzed based on the optimized first mining parameter to obtain an updated pseudo-label electricity usage information dataset; Iteration is performed again according to the optimized first mining parameter and the updated pseudo-label electricity usage information dataset until the obtained accuracy meets the preset threshold, and the first mining parameter at this time is used as the target mining parameter.
7. The method according to claim 1, characterized in that The step of obtaining a data set of electricity consumption information to be analyzed includes: Obtain electricity consumption indicators for each user; Normalizing the electricity consumption index to obtain a normalized electricity consumption index; The electricity consumption information dataset to be analyzed is constructed based on the normalized electricity consumption indicators.
8. A device for identifying abnormal electricity usage behavior, characterized in that: The device comprises: An acquisition module is used to obtain the electricity consumption information data set to be analyzed; A mining module, configured to perform outlier mining based on a double-layer particle swarm algorithm, combining the power consumption information dataset to be analyzed and the labeled power consumption information dataset, and obtain target mining parameters, wherein the target mining parameters include an outlier ratio and an outlier distance; A determination module is configured to determine abnormal electricity usage information in the electricity usage information data set to be analyzed based on the outlier ratio and the outlier distance.
9. An electronic device, characterized in that: The device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for identifying abnormal electricity usage behavior according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for identifying abnormal electricity usage behavior according to any one of claims 1 to 7 when executed.