CN115511016B - Incremental active learning-based electric charge anomaly detection method and device - Google Patents

Incremental active learning-based electric charge anomaly detection method and device Download PDF

Info

Publication number
CN115511016B
CN115511016B CN202211479010.9A CN202211479010A CN115511016B CN 115511016 B CN115511016 B CN 115511016B CN 202211479010 A CN202211479010 A CN 202211479010A CN 115511016 B CN115511016 B CN 115511016B
Authority
CN
China
Prior art keywords
user
anomaly
suspected
abnormal
electric charge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211479010.9A
Other languages
Chinese (zh)
Other versions
CN115511016A (en
Inventor
潘熙
祝宇楠
黄奇峰
刘云鹏
左强
蔡奇新
殷勇
江明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Original Assignee
State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Jiangsu Electric Power Co ltd Marketing Service Center filed Critical State Grid Jiangsu Electric Power Co ltd Marketing Service Center
Priority to CN202211479010.9A priority Critical patent/CN115511016B/en
Publication of CN115511016A publication Critical patent/CN115511016A/en
Application granted granted Critical
Publication of CN115511016B publication Critical patent/CN115511016B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4494Execution paradigms, e.g. implementations of programming paradigms data driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of information processing and electric power marketing, and particularly discloses an electric charge abnormity detection method based on incremental active learning, which comprises the following steps: performing primary anomaly detection on the acquired current electric charge data of a plurality of target users, and outputting suspected anomaly users in the plurality of target users if an anomaly rule is triggered; performing secondary anomaly detection on the electric charge data of the suspected anomaly user to obtain a suspected anomaly user detection result, and directly outputting the suspected anomaly user detection result if the uncertainty of the suspected anomaly user detection result is lower than a preset threshold; if the power charge data of the suspected abnormal user with high uncertainty is higher than the preset threshold value, final judgment is carried out on the power charge data of the suspected abnormal user with high uncertainty, and the normal user in the suspected abnormal user with high uncertainty is output. The invention also discloses an electric charge abnormity detection device based on incremental active learning. The invention can solve the problems that the hit rate of the current accounting rule system is low and the iterative updating of the model can not be completed by applying service data autonomously.

Description

Incremental active learning-based electric charge anomaly detection method and device
Technical Field
The invention relates to the technical field of information processing and power marketing, in particular to an electric charge abnormality detection method based on incremental active learning and an electric charge abnormality detection device based on incremental active learning.
Background
The existing electric charge abnormality detection method mainly comprises two types: one is an anomaly detection method based on simple rules, and the other is an anomaly detection algorithm based on data driving.
The anomaly detection algorithm based on the simple rule mainly relies on a business expert to summarize common problems in the business, forms formal language description, and realizes the rule through logic operation in a program language; the anomaly detection algorithm based on data driving is not dependent on business knowledge, a parametric or non-parametric algorithm model is built by introducing various inductive biases, training and tuning of the model are realized by depending on applied data, so that the purpose of anomaly detection is achieved, the common anomaly detection algorithm comprises KNN based on sample distance measurement, OCSVM and the like, HBOS based on sample statistics, MCD based on an integration method, such as IFore, and algorithms of a neural network model, such as AutoEncoder, VAE and the like.
Although the existing anomaly detection algorithm is deeply applied to the business links of power marketing, the existing method has certain defects. The anomaly detection method based on the simple rule is mainly applied to problem discovery in the accounting process, the method is independent of complex model design, the mining of anomaly problems is realized through simple logic judgment, for example, users with suddenly increased and decreased electric quantity are screened out through a design threshold strategy, the method has the characteristics of efficient research and judgment and simple realization, but the flexibility and the expandability of the method are not high, for example, when the cost calculation data of the users are influenced by seasonal or regional factors, the rule cannot be adjusted in a self-adaptive manner according to the current month data, so that a large number of false alarm or missing alarm problems are caused; and the rule-based detection method is often directly embedded in the fee counting code, so that the updating and maintaining costs are high, and the risk cost of iterative optimization is high. Although the anomaly detection algorithm based on data driving can realize the self-adaptive adjustment of the model based on data, the calculation complexity of the calculation cost model is high, the requirement on the calculation time and time efficiency can not be met, and the anomaly detection algorithm based on data driving is more applied to the post-problem checking and attribution. And the algorithm needs to face the influence of the data quality problem, and when the data quality for training is low, the detection performance of the model often cannot meet the practical application requirement. In addition, whether the process problem discovery-based accounting rules or the post-verification-based algorithm models are based, the construction and maintenance of the process problem discovery-based algorithm models are dependent on a large amount of labor cost, for example, iterative optimization of the accounting rules requires business personnel to analyze and attribution to abnormal data of each month and summarize and refine rule optimization contents, and for the data-driven algorithm models, the data acquisition and processing occupy great labor cost, and the conditions limit the performance of the existing detection models and are difficult to meet increasingly complex and variable business application scenes.
Disclosure of Invention
Aiming at the defects and shortcomings in the prior art, the invention provides an electric charge abnormality detection method based on incremental active learning, which aims to solve the problems of low flexibility, high construction and maintenance cost and limited data quality of the existing electric charge abnormality detection algorithm in the prior art.
As a first aspect of the present invention, there is provided an electricity fee anomaly detection method based on incremental active learning, the method including:
step S1: acquiring current electric charge data of a plurality of target users, wherein the current electric charge data of each target user comprises file data, service change data and price measuring data;
step S2: performing primary anomaly detection on the current electric charge data of the target user based on an accounting rule system, and directly outputting a detection result that the target user has no anomaly if the current electric charge data of the target user does not trigger an anomaly rule; if the current electricity charge data of the target users trigger the abnormal rule, outputting suspected abnormal users in a plurality of target users;
step S3: performing secondary anomaly detection on the electric charge data of the suspected anomaly user based on an SVDD anomaly detection model to obtain a suspected anomaly user detection result, and judging the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result;
step S4: if the uncertainty of the detection result of the suspected abnormal user is lower than a preset threshold, directly outputting the detection result of the suspected abnormal user; if the uncertainty of the detection result of the suspected abnormal user is higher than the preset threshold, final abnormal judgment is carried out on the electric charge data of the suspected abnormal user with high uncertainty, and the normal user in the suspected abnormal user with high uncertainty is output.
Further, the system based on the accounting rules carries out primary anomaly detection on the current electric charge data of the target user, and if the current electric charge data of the target user does not trigger an anomaly rule, a detection result that the target user has no anomaly is directly output; if the current electricity charge data of the target user triggers the abnormal rule, outputting suspected abnormal users in a plurality of target users, and further comprising:
according to the definition of each abnormal rule in the accounting rule system, judging whether the abnormal rule is triggered by the current electricity charge data of the target user or not;
and calculating the condition of triggering the abnormal rule of each piece of current electric charge data of the target user, and counting the target user triggering at least one abnormal rule into a suspected abnormal user to wait for secondary abnormal detection.
Further, the method further comprises the following steps:
selecting a plurality of abnormal rules in the accounting rule system to carry out verification;
if it is
Figure 283914DEST_PATH_IMAGE001
The current electricity charge data x of the target user triggers the kth abnormal rule; if->
Figure 942428DEST_PATH_IMAGE002
Then the current electricity rate data x representing the target user does not trigger +.>
Figure 311093DEST_PATH_IMAGE003
A bar anomaly rule; the preliminary detection result of the current electric charge data x of each of the target users is expressed as +.>
Figure 579001DEST_PATH_IMAGE004
Wherein p represents the number of abnormal rules in the accounting rule system.
Further, the performing secondary anomaly detection on the electric charge data of the suspected anomaly user based on the SVDD anomaly detection model to obtain a suspected anomaly user detection result, and determining the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result, and further includes:
according to an anomaly rule triggered by the suspected anomaly user, a corresponding SVDD anomaly detection model is adopted, distance measurement between electric charge data of the suspected anomaly user and a center point of a support vector description model is calculated, and secondary research and judgment are carried out on the suspected anomaly user according to the measurement value, so that a suspected anomaly user detection result is obtained;
and determining the uncertainty of the detection result of the suspected abnormal user according to the abnormal distribution characteristics of the electric charge data of the suspected abnormal user, and manually re-judging the electric charge data of the suspected abnormal user with high uncertainty.
Further, the method further comprises the following steps:
preliminary detection results of the current electric charge data x for each of the target users
Figure 83932DEST_PATH_IMAGE005
If (3)
Figure 178927DEST_PATH_IMAGE006
The method comprises the steps of representing that a suspected abnormal user exists in a plurality of target users, and then performing secondary abnormal detection on electric charge data of the suspected abnormal user; according to each stripAbnormal class corresponding to abnormal rule, realizing SVDD abnormal detection model
Figure 769308DEST_PATH_IMAGE007
Represent the first
Figure 342372DEST_PATH_IMAGE008
The SVDD abnormality detection models corresponding to the strip abnormality rules are p in total;
assuming that all normal electric charge data are surrounded by a minimum boundary in a high-dimensional space, the electric charge data located on the minimum boundary are called support vectors, and judging whether the electric charge data of the suspected abnormal user are located in the minimum boundary or not by using an SVDD abnormality detection model;
and calculating the uncertainty of the SVDD model detection result based on the information entropy formula.
Further, the method further comprises the following steps:
and performing incremental training on the SVDD abnormality detection model based on the electric charge data of the normal user.
Further, the profile data includes a user's electricity type, marketization attribute, voltage level, metering mode, operation capacity, contract capacity, pricing policy type, power factor assessment mode, basic electricity charge calculation mode, power supply quantity, electricity quantity calculation mode, participation power factor calculation mode, temporary electricity use flag, industry category, energy use category and time-sharing electricity use flag.
Further, the service change data comprises new capacity increasing, suspending, capacity reducing, type changing, metering equipment fault processing, pressure changing, metering equipment replacement, suspending recovery, capacity reducing recovery and power receiving facility transformation.
Further, the price data comprises the electricity price type, the electricity transmission and distribution price, the electricity degree electricity price, the additional electricity collection price, the last meter reading indication, the current meter reading indication, the active electricity quantity, the demand indication, the reactive electricity quantity, the basic electricity fee, the electricity degree electricity fee and the power adjustment electricity fee.
As a second aspect of the present invention, there is provided an electric charge abnormality detection device based on incremental active learning, the electric charge abnormality detection device based on incremental active learning including:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring current electric charge data of a plurality of target users, and the current electric charge data of each target user comprises file data, service change data and price measuring data;
the first anomaly detection module is used for carrying out primary anomaly detection on the current electric charge data of the target user based on an accounting rule system, and if the current electric charge data of the target user does not trigger an anomaly rule, directly outputting a detection result that the target user has no anomaly; if the current electricity charge data of the target users trigger the abnormal rule, outputting suspected abnormal users in a plurality of target users;
the second anomaly detection module is used for carrying out secondary anomaly detection on the electric charge data of the suspected anomaly user based on the SVDD anomaly detection model to obtain a suspected anomaly user detection result, and judging the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result;
the third abnormality detection module is used for directly outputting the detection result of the suspected abnormal user if the uncertainty of the detection result of the suspected abnormal user is lower than a preset threshold; if the uncertainty of the detection result of the suspected abnormal user is higher than the preset threshold, final abnormal judgment is carried out on the electric charge data of the suspected abnormal user with high uncertainty, and the normal user in the suspected abnormal user with high uncertainty is output.
The incremental active learning-based electricity fee anomaly detection method provided by the invention has the following advantages:
(1) The anomaly detection model is combined with the existing accounting system, the anomaly research and judgment mode of the existing accounting rules is reserved, and the performance bottleneck that the existing accounting rules are difficult to accurately research and judge on the electric charge anomalies is broken through by introducing the data-driven anomaly detection model;
(2) The method expands the existing abnormal research and judgment mode, is different from purely depending on rule research and judgment or model research and judgment, and provides a new method for combining the two modes, thereby ensuring that the model can realize automatic iterative updating through data, expanding the flexibility of the model, ensuring that the model can acquire the support of business expert knowledge under the active learning technology, and expanding the stability of the model;
(3) The defect that the detection model needs to be retrained in the iterative updating process is avoided through the incremental learning strategy, incremental data only need to be obtained from monthly business work during each model updating, and the data selection process is completed autonomously by the model, so that the workload of manually selecting data is avoided.
Drawings
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate the invention and together with the description serve to explain, without limitation, the invention.
Fig. 1 is a flowchart of an electric charge anomaly detection method based on incremental active learning.
Fig. 2 is a flowchart of a specific implementation of the incremental active learning-based electricity fee anomaly detection method provided by the invention.
Detailed Description
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The invention will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the invention herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this embodiment, an electricity fee anomaly detection method based on incremental active learning is provided, and fig. 1 is a flowchart of the electricity fee anomaly detection method based on incremental active learning provided by the invention. As shown in fig. 1, the method for detecting the abnormal electricity fee based on incremental active learning includes:
step S1: acquiring current electric charge data of a plurality of target users, wherein the current electric charge data of each target user comprises file data, service change data and price measuring data;
step S2: performing primary anomaly detection on the current electric charge data of the target user based on an accounting rule system, and directly outputting a detection result that the target user has no anomaly if the current electric charge data of the target user does not trigger an anomaly rule; if the current electricity charge data of the target users trigger the abnormal rule, outputting suspected abnormal users in a plurality of target users;
it should be noted that, not triggering an abnormal rule refers to not triggering any abnormal rule in the accounting rule system, and triggering an abnormal rule refers to triggering any one or more abnormal rules in the accounting rule system.
Step S3: performing secondary anomaly detection on the electric charge data of the suspected anomaly user based on an SVDD anomaly detection model to obtain a suspected anomaly user detection result, and judging the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result;
step S4: if the uncertainty of the detection result of the suspected abnormal user is lower than a preset threshold, directly outputting the detection result of the suspected abnormal user; if the uncertainty of the detection result of the suspected abnormal user is higher than the preset threshold, final abnormal judgment is carried out on the electric charge data of the suspected abnormal user with high uncertainty, and the normal user in the suspected abnormal user with high uncertainty is output.
It should be noted that, based on the active learning strategy, the abnormal user with high uncertainty further carries out manual research and judgment (a set of research and judgment mechanism operated according to expert experience) to obtain the final abnormal user.
The following describes in detail the implementation process of the incremental active learning-based power fee anomaly detection method provided by the invention with reference to fig. 2.
Preferably, the system based on the accounting rules performs primary anomaly detection on the current electric charge data of the target user, and if the current electric charge data of the target user does not trigger an anomaly rule, the system directly outputs a detection result that the target user has no anomaly; if the current electricity charge data of the target user triggers the abnormal rule, outputting suspected abnormal users in a plurality of target users, and further comprising:
according to the definition of each abnormal rule in the accounting rule system, judging whether the abnormal rule is triggered by the current electricity charge data of the target user or not;
and calculating the condition of triggering the abnormal rule of each piece of current electric charge data of the target user, and counting the target user triggering at least one abnormal rule into a suspected abnormal user to wait for secondary abnormal detection.
Preferably, the method further comprises:
selecting a plurality of abnormal rules in the accounting rule system to carry out verification;
it should be noted that, 12 abnormal rules with top triggering times per month in the existing accounting rule system are selected to carry out algorithm verification.
If it is
Figure 967388DEST_PATH_IMAGE001
The current electricity charge data x of the target user triggers the kth abnormal rule; if->
Figure 466240DEST_PATH_IMAGE002
The current electricity charge data x of the target user does not trigger the kth abnormal rule; the preliminary detection result of the current electric charge data x of each of the target users is expressed as +.>
Figure 278338DEST_PATH_IMAGE004
Wherein p represents the number of abnormal rules in the accounting rule system.
Preferably, the performing secondary anomaly detection on the electric charge data of the suspected anomaly user based on the SVDD anomaly detection model to obtain a suspected anomaly user detection result, and determining the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result, further includes:
according to an anomaly rule triggered by the suspected anomaly user, a corresponding SVDD anomaly detection model is adopted, distance measurement between electric charge data of the suspected anomaly user and a center point of a support vector description model is calculated, and secondary research and judgment are carried out on the suspected anomaly user according to the measurement value, so that a suspected anomaly user detection result is obtained;
meanwhile, in order to ensure that the abnormal user is not misjudged, even if the abnormal user is judged as abnormal by the model, the uncertainty of the detection result of the suspected abnormal user is determined according to the abnormal distribution characteristics of the electric charge data of the suspected abnormal user, and the electric charge data of the suspected abnormal user with high uncertainty is required to be manually re-judged.
Because the model research and judgment process is accompanied with the actual business work, the mode of manual re-research and judgment of the abnormal sample is consistent with the mode of re-research and judgment of the business personnel based on the accounting rule, and the model research and judgment process has the advantages that the introduced uncertainty measure further reduces the abnormal quantity required to be manually researched and judged, and simultaneously, the model is expanded and perfected, and the sample with unknown abnormal distribution can be memorized by the model through the mode of adding the model into the support vector set, so that the workload of manual research and judgment can be continuously reduced.
Preferably, the method further comprises:
preliminary detection results of the current electric charge data x for each of the target users
Figure 389514DEST_PATH_IMAGE005
If->
Figure 869037DEST_PATH_IMAGE009
The method comprises the steps of representing that a suspected abnormal user exists in a plurality of target users, and then performing secondary abnormal detection on electric charge data of the suspected abnormal user; according to the abnormality category corresponding to each abnormality rule, an SVDD abnormality detection model is realized by using F k Representing SVDD abnormality detection models corresponding to the kth abnormality rule, wherein p SVDD abnormality detection models are altogether provided>
Figure 305834DEST_PATH_IMAGE010
The SVDD abnormality detection model includes a set of support vectors +.>
Figure 870808DEST_PATH_IMAGE011
And model parameters->
Figure 51254DEST_PATH_IMAGE012
Assuming that all normal electric charge data are surrounded by a minimum boundary in a high-dimensional space, the electric charge data located on the minimum boundary are called support vectors, and judging whether the electric charge data of the suspected abnormal user are located in the minimum boundary or not by using an SVDD abnormality detection model; the above process is formally described as
Figure 155257DEST_PATH_IMAGE013
Where z denotes the electricity rate data sample for training, if
Figure 497376DEST_PATH_IMAGE014
The suspected foreign matterElectricity charge data of normal users
Figure 284067DEST_PATH_IMAGE015
Is an abnormal point, wherein
Figure 268203DEST_PATH_IMAGE016
Electric charge data representing the suspected abnormal user in a high-dimensional space
Figure 722318DEST_PATH_IMAGE017
The smallest boundary encloses the sum-of-squares distance measure between the centers,
Figure 500919DEST_PATH_IMAGE018
radius measure representing minimum bounding volume, R 2 Can be obtained according to the support vector solution;
the abnormal user detection results correspondingly output by the p detection models can obtain a vector set
Figure 509326DEST_PATH_IMAGE019
Wherein
Figure 530109DEST_PATH_IMAGE020
Then calculating the detection result based on the information entropy formula
Figure 838731DEST_PATH_IMAGE021
Uncertainty of (2)
Figure 522653DEST_PATH_IMAGE022
Wherein
Figure 549515DEST_PATH_IMAGE023
If the uncertainty H (q) is greater than the set empirical threshold
Figure 609875DEST_PATH_IMAGE024
The final research and judgment are carried out by a manual research and judgment link, and the research and judgment result is marked as +.>
Figure 38582DEST_PATH_IMAGE025
Wherein->
Figure 893406DEST_PATH_IMAGE026
. If->
Figure 640519DEST_PATH_IMAGE027
The electric charge data of the normal user is +.>
Figure 504570DEST_PATH_IMAGE015
Add to collection X k Is a kind of medium. After each completion of a new user test, p sample sets { + }, will be obtained>
Figure 787784DEST_PATH_IMAGE028
}。X k And the electricity charge data of all normal users which do not trigger the k-th abnormal rule are referred.
Preferably, the method further comprises:
and performing incremental training on the SVDD abnormality detection model based on the electric charge data of the normal user.
Specifically, according to set X k Incremental training is carried out on p SVDD abnormal detection models, a FISVDD algorithm is adopted in the training mode, and for a single SVDD model, the feature vector set of an original model is assumed to be S t k The similarity matrix of the composition is denoted as A t Wherein t is the index of training round, and the parameter vector is recorded as
Figure 813509DEST_PATH_IMAGE012
For each from sample set X k The training process of the SVDD abnormality detection model is as follows:
(1) According to
Figure 549384DEST_PATH_IMAGE029
Determining whether the current sample z is determined to be an abnormal sample under the current detection model parameters, if
Figure 217125DEST_PATH_IMAGE014
If sample z is an abnormal sample, the process proceeds to step (2), if
Figure 354846DEST_PATH_IMAGE030
Directly continuing to examine the next sample;
(2) Adding the current abnormal sample z into the support vector set, and updating the similarity matrix:
Figure 50007DEST_PATH_IMAGE031
simultaneously updating model parameters
Figure 7599DEST_PATH_IMAGE032
Updating the formula to
Figure 744611DEST_PATH_IMAGE033
Wherein
Figure 471258DEST_PATH_IMAGE034
Representing an all 1 vector. In order to simplify the calculation process,
Figure 104365DEST_PATH_IMAGE035
can pass through
Figure 814832DEST_PATH_IMAGE036
And
Figure 824376DEST_PATH_IMAGE015
incremental calculation is realized:
Figure 671109DEST_PATH_IMAGE037
wherein
Figure 991231DEST_PATH_IMAGE038
While
Figure 923415DEST_PATH_IMAGE039
Figure 736650DEST_PATH_IMAGE040
And
Figure 437890DEST_PATH_IMAGE041
is an intermediate variable for simplifying the model representation.
(3) If it is
Figure 412799DEST_PATH_IMAGE042
If the current parameters do not meet the assumption of the minimum surrounding of the model, at least one support vector is inside the current surrounding, the model needs to be adjusted, the support vector set is removed from the support vector which does not meet the requirements, and the model parameters in the step (2) are recalculated>
Figure 832279DEST_PATH_IMAGE032
The detailed training flow is as follows:
input: SVDD model parameter alpha t k Support vector set S t k Incremental training sample set T k
And (3) outputting: updated model parameters alpha t+1 k And support vector set S t+1 k
Step 1, sequentially obtaining single samples z in a training sample set according to a sample storage sequence;
step 2 based on the support vector set S t k Calculating whether the training sample z is positioned in a sample space formed by the support vector set;
step 3, generating an extended sample set according to the judging result in the Step 2: discarding the sample if the sample z falls in the sample space, otherwise forming an extended sample set by the sample and the original support vector set;
step 4, calculating model parameters alpha according to the similarity matrix formed by the extended sample set t+1 k The modification of the extended sample set is completed through the numerical constraint of the model parameters, and the extended sample set is divided into a new support vector set and a reserved set;
step 5, carrying out secondary data check on samples in the reserved set, and re-adding samples meeting the conditions into the support vector set to form a final support vector set S t+1 k And updating the corresponding model parameter alpha according to the latest support vector set t+1 k
Preferably, the profile data includes a user electricity type, marketization attribute, voltage level, metering mode, operation capacity, contract capacity, pricing policy type, power factor checking mode, basic electricity charge calculation mode, power supply quantity, electricity quantity calculation mode, participation power factor calculation mode, temporary electricity consumption sign, industry category, energy consumption category, time-sharing electricity consumption sign, and the like.
Preferably, the service change data comprises new capacity increasing, pause, capacity reducing, type changing, metering equipment fault processing, pressure changing, metering equipment replacement, pause recovery, capacity reducing recovery, power receiving facility reconstruction and the like.
Preferably, the electricity price data includes electricity price type, electricity distribution price, electricity degree electricity price, electricity charge, last meter reading indication, this meter reading indication, active electricity quantity (total), active electricity quantity (peak), active electricity quantity (flat), active electricity quantity (valley), demand indication, reactive electricity quantity (total), basic electricity charge, electricity degree electricity charge, power adjustment electricity charge, and the like.
As another embodiment of the present invention, there is provided an electric charge abnormality detection device based on incremental active learning, including:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring current electric charge data of a plurality of target users, and the current electric charge data of each target user comprises file data, service change data and price measuring data;
the first anomaly detection module is used for carrying out primary anomaly detection on the current electric charge data of the target user based on an accounting rule system, and if the current electric charge data of the target user does not trigger an anomaly rule, directly outputting a detection result that the target user has no anomaly; if the current electricity charge data of the target users trigger the abnormal rule, outputting suspected abnormal users in a plurality of target users;
the second anomaly detection module is used for carrying out secondary anomaly detection on the electric charge data of the suspected anomaly user based on the SVDD anomaly detection model to obtain a suspected anomaly user detection result, and judging the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result;
the third abnormality detection module is used for directly outputting the detection result of the suspected abnormal user if the uncertainty of the detection result of the suspected abnormal user is lower than a preset threshold; if the uncertainty of the detection result of the suspected abnormal user is higher than the preset threshold, final abnormal judgment is carried out on the electric charge data of the suspected abnormal user with high uncertainty, and the normal user in the suspected abnormal user with high uncertainty is output.
In summary, the incremental active learning-based electricity fee anomaly detection method combines the existing accounting rule system and the mainstream anomaly detection model SVDD, and solves the problems that the current accounting rule system has low hit rate and cannot automatically complete model iterative updating by applying business data.
It is to be understood that the above embodiments are merely illustrative of the application of the principles of the present invention, but not in limitation thereof. Various modifications and improvements may be made by those skilled in the art without departing from the spirit and substance of the invention, and are also considered to be within the scope of the invention.

Claims (5)

1. The electric charge abnormality detection method based on the incremental active learning is characterized by comprising the following steps of:
step S1: acquiring current electric charge data of a plurality of target users, wherein the current electric charge data of each target user comprises file data, service change data and price measuring data;
step S2: performing primary anomaly detection on the current electric charge data of the target user based on an accounting rule system, and directly outputting a detection result that the target user has no anomaly if the current electric charge data of the target user does not trigger an anomaly rule; if the current electricity charge data of the target users trigger the abnormal rule, outputting suspected abnormal users in a plurality of target users;
step S3: performing secondary anomaly detection on the electric charge data of the suspected anomaly user based on an SVDD anomaly detection model to obtain a suspected anomaly user detection result, and judging the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result;
step S4: if the uncertainty of the detection result of the suspected abnormal user is lower than a preset threshold, directly outputting the detection result of the suspected abnormal user; if the uncertainty of the detection result of the suspected abnormal user is higher than the preset threshold, carrying out final abnormal judgment on the electric charge data of the suspected abnormal user with high uncertainty, and outputting a normal user in the suspected abnormal user with high uncertainty;
the system comprises a verification rule system, a target user and a verification rule system, wherein the verification rule system is based on the verification rule system, and if the verification rule system is not triggered by the current electric charge data of the target user, the verification result that the target user has no abnormality is directly output; if the current electricity charge data of the target user triggers the abnormal rule, outputting suspected abnormal users in a plurality of target users, and further comprising:
according to the definition of each abnormal rule in the accounting rule system, judging whether the abnormal rule is triggered by the current electricity charge data of the target user or not;
calculating the condition of triggering an abnormal rule for each piece of current electricity charge data of the target user, and counting the target user triggering at least one abnormal rule into a suspected abnormal user to wait for secondary abnormal detection;
wherein, still include:
selecting a plurality of abnormal rules in the accounting rule system to carry out verification;
if R is K (x) =1, indicating that the current electricity charge data x of the target user triggers a kth abnormal rule; if R is K (x) =0, the current electricity charge data x representing the target user does not trigger the first
Figure 210125DEST_PATH_IMAGE001
A bar anomaly rule; the preliminary detection result of the current electric charge data x of each of the target users is expressed as +.>
Figure 658424DEST_PATH_IMAGE002
Wherein->
Figure 470784DEST_PATH_IMAGE003
Representing the number of abnormal rules in the accounting rule system;
the method includes the steps of performing secondary anomaly detection on the electric charge data of the suspected anomaly user based on the SVDD anomaly detection model to obtain a suspected anomaly user detection result, judging uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result, and further comprising:
according to an anomaly rule triggered by the suspected anomaly user, a corresponding SVDD anomaly detection model is adopted, distance measurement between electric charge data of the suspected anomaly user and a center point of a support vector description model is calculated, and secondary research and judgment are carried out on the suspected anomaly user according to the measurement value, so that a suspected anomaly user detection result is obtained;
according to the abnormal distribution characteristics of the electric charge data of the suspected abnormal users, determining the uncertainty of the detection result of the suspected abnormal users, and manually re-judging the electric charge data of the suspected abnormal users with high uncertainty;
wherein, for each target user, the preliminary detection result of the current electric charge data x
Figure 397152DEST_PATH_IMAGE004
If (3)
Figure 742683DEST_PATH_IMAGE005
The method comprises the steps of representing that a suspected abnormal user exists in a plurality of target users, and then performing secondary abnormal detection on electric charge data of the suspected abnormal user; according to the abnormality category corresponding to each abnormality rule, an SVDD abnormality detection model is realized>
Figure 96304DEST_PATH_IMAGE006
Indicate->
Figure 894496DEST_PATH_IMAGE007
The SVDD abnormality detection models corresponding to the strip abnormality rules are p in total; />
Figure 624554DEST_PATH_IMAGE008
The SVDD abnormality detection model includes a set of support vectors +.>
Figure 90171DEST_PATH_IMAGE009
And model parameters->
Figure 614693DEST_PATH_IMAGE010
Assuming that all normal electric charge data are surrounded by a minimum boundary in a high-dimensional space, the electric charge data located on the minimum boundary are called support vectors, and judging whether the electric charge data of the suspected abnormal user are located in the minimum boundary or not by using an SVDD abnormality detection model; the above process is formally described as
Figure 398716DEST_PATH_IMAGE011
Wherein z denotes an electric charge data sample for training, and if Q (z) > 0, the electric charge data of the suspected abnormal user +.>
Figure 666886DEST_PATH_IMAGE012
Is an abnormal point, wherein->
Figure 455851DEST_PATH_IMAGE013
Electric charge data representing the suspected abnormal user in a high-dimensional space>
Figure 416853DEST_PATH_IMAGE014
The smallest boundary encloses the sum-of-squares distance measure between the centers,
Figure 189637DEST_PATH_IMAGE015
radius measure representing minimum bounding volume, R 2 Can be obtained according to the support vector solution;
the abnormal user detection results correspondingly output by the p SVDD abnormal detection models obtain a vector set
Figure 995919DEST_PATH_IMAGE016
Wherein->
Figure 436128DEST_PATH_IMAGE017
The uncertainty of the vector set q is then calculated on the basis of the information entropy formula +.>
Figure 302453DEST_PATH_IMAGE018
Wherein->
Figure 798418DEST_PATH_IMAGE019
If the uncertainty H (q) is greater than the set empirical thresholdδThe final research and judgment are carried out by a manual research and judgment link, and the research and judgment result is recorded as
Figure 408391DEST_PATH_IMAGE020
Wherein->
Figure 437527DEST_PATH_IMAGE021
If t k =0 means that the electricity charge data of the end abnormal user does not existAbnormal under the kth rule exists, and the electric charge data Z of the normal user is added to the collection X k In (a) and (b); after each completion of a new user test, p sample sets will be obtained>
Figure 740332DEST_PATH_IMAGE022
,X k The electricity charge data of all normal users which do not trigger the k-th abnormal rule are referred to;
wherein, still include:
and performing incremental training on the SVDD abnormality detection model based on the electric charge data of the normal user.
2. The incremental active learning-based electricity fee anomaly detection method of claim 1 wherein the profile data includes a user's electricity type, marketized attributes, voltage levels, metering mode, operating capacity, contract capacity, pricing strategy type, power factor assessment mode, basic electricity fee calculation mode, power supply quantity, electricity quantity calculation mode, participation power factor calculation mode, temporary electricity use flag, industry category, energy use category, and time-sharing electricity use flag.
3. The incremental active learning-based electricity fee anomaly detection method of claim 1 wherein the business change data comprises new capacity increase, suspension, capacity reduction, change, metering equipment fault handling, voltage change, metering equipment replacement, suspension resumption, capacity reduction resumption, and power receiving facility modification.
4. The incremental active learning-based electricity fee anomaly detection method according to claim 1, wherein the electricity fee data includes electricity fee type, electricity transmission and distribution price, electricity price, additional electricity price, last meter reading indication, current meter reading indication, active electricity quantity, demand indication, reactive electricity quantity, basic electricity fee, electricity fee and power adjustment electricity fee.
5. An electric charge abnormality detection device based on incremental active learning for implementing the electric charge abnormality detection method based on incremental active learning according to any one of claims 1 to 4, characterized in that the electric charge abnormality detection device based on incremental active learning includes:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring current electric charge data of a plurality of target users, and the current electric charge data of each target user comprises file data, service change data and price measuring data;
the first anomaly detection module is used for carrying out primary anomaly detection on the current electric charge data of the target user based on an accounting rule system, and if the current electric charge data of the target user does not trigger an anomaly rule, directly outputting a detection result that the target user has no anomaly; if the current electricity charge data of the target users trigger the abnormal rule, outputting suspected abnormal users in a plurality of target users;
the second anomaly detection module is used for carrying out secondary anomaly detection on the electric charge data of the suspected anomaly user based on the SVDD anomaly detection model to obtain a suspected anomaly user detection result, and judging the uncertainty of the suspected anomaly user detection result to determine whether to output the suspected anomaly user detection result;
the third abnormality detection module is used for directly outputting the detection result of the suspected abnormal user if the uncertainty of the detection result of the suspected abnormal user is lower than a preset threshold; if the uncertainty of the detection result of the suspected abnormal user is higher than the preset threshold, final abnormal judgment is carried out on the electric charge data of the suspected abnormal user with high uncertainty, and the normal user in the suspected abnormal user with high uncertainty is output.
CN202211479010.9A 2022-11-24 2022-11-24 Incremental active learning-based electric charge anomaly detection method and device Active CN115511016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211479010.9A CN115511016B (en) 2022-11-24 2022-11-24 Incremental active learning-based electric charge anomaly detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211479010.9A CN115511016B (en) 2022-11-24 2022-11-24 Incremental active learning-based electric charge anomaly detection method and device

Publications (2)

Publication Number Publication Date
CN115511016A CN115511016A (en) 2022-12-23
CN115511016B true CN115511016B (en) 2023-04-28

Family

ID=84513773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211479010.9A Active CN115511016B (en) 2022-11-24 2022-11-24 Incremental active learning-based electric charge anomaly detection method and device

Country Status (1)

Country Link
CN (1) CN115511016B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2116168A1 (en) * 1993-03-02 1994-09-03 Gregory Cmar Process for identifying patterns of electric energy consumption and demand in a facility, predicting and verifying the effects of proposed changes, and implementing such changes in the facility to conserve energy
CN110866035A (en) * 2019-10-31 2020-03-06 国网福建省电力有限公司厦门供电公司 Method and system for detecting abnormal electricity quantity and electricity charge
CN113643113A (en) * 2021-08-06 2021-11-12 国网山东省电力公司营销服务中心(计量中心) Automatic electric charge auditing method, system, medium and electronic equipment
CN113743894A (en) * 2021-08-30 2021-12-03 深圳供电局有限公司 Method and system for establishing rechecking rule model for rechecking electric bill
CN114328625A (en) * 2021-12-29 2022-04-12 深圳供电局有限公司 Electric charge data rescreening method and system
CN114897064A (en) * 2022-05-05 2022-08-12 华北电力大学(保定) Abnormal electricity consumption behavior detection device based on BiGAN and SVDD

Also Published As

Publication number Publication date
CN115511016A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
CN107329088A (en) The health status diagnostic device and method of battery
KR102238248B1 (en) Battery diagnostic methods using machine learning
CN106569030A (en) Alarm threshold optimizing method and device in electric energy metering abnormity diagnosis
CN106649919A (en) Method and system for predicting carbon content of fly ash in coal-fired power plant boiler
CN109033513A (en) Method for diagnosing fault of power transformer and diagnosing fault of power transformer device
CN105956798A (en) Sparse random forest-based method for assessing running state of distribution network device
CN108304567A (en) High-tension transformer regime mode identifies and data classification method and system
CN112180279A (en) Retired battery health state diagnostic expert system
CN114565038A (en) Intelligent electric meter fault diagnosis method based on improved capsule network
CN107589391A (en) A kind of methods, devices and systems for detecting electric power meter global error
CN115422788B (en) Power distribution network line loss analysis management method, device, storage medium and system
CN110874685A (en) Intelligent electric energy meter running state distinguishing method and system based on neural network
CN110443481B (en) Power distribution automation terminal state evaluation system and method based on hybrid K-nearest neighbor algorithm
CN111612149A (en) Main network line state detection method, system and medium based on decision tree
CN115511016B (en) Incremental active learning-based electric charge anomaly detection method and device
CN117251814A (en) Method for analyzing electric quantity loss abnormality of highway charging pile
CN109634854B (en) Method for detecting configuration abnormity of software engineering algorithm
CN110348094A (en) Petroleum pipeline leakage detection method and system based on influence network
CN113033845B (en) Construction method and device for power transmission resource co-construction and sharing
CN109342862A (en) Based on Non-surveillance clustering with and svm classifier Diagnosis Method of Transformer Faults
CN115146715A (en) Power utilization potential safety hazard diagnosis method, device, equipment and storage medium
CN115128468A (en) Chemical energy storage battery PHM undervoltage fault prediction method
CN112395167A (en) Operation fault prediction method and device and electronic equipment
CN117499817B (en) Distributed ammeter acquisition system and acquisition method
CN117330987B (en) Method, system, medium and apparatus for time-based battery state of health assessment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant