CN114066261A - Tampering detection method and device for electric meter, computer equipment and storage medium - Google Patents

Tampering detection method and device for electric meter, computer equipment and storage medium Download PDF

Info

Publication number
CN114066261A
CN114066261A CN202111367099.5A CN202111367099A CN114066261A CN 114066261 A CN114066261 A CN 114066261A CN 202111367099 A CN202111367099 A CN 202111367099A CN 114066261 A CN114066261 A CN 114066261A
Authority
CN
China
Prior art keywords
electricity
target
power consumption
sub
consumption
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.)
Pending
Application number
CN202111367099.5A
Other languages
Chinese (zh)
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.)
Guangdong Power Grid Co Ltd
Shantou Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Shantou Power Supply Bureau of Guangdong Power Grid Co Ltd
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 Guangdong Power Grid Co Ltd, Shantou Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202111367099.5A priority Critical patent/CN114066261A/en
Publication of CN114066261A publication Critical patent/CN114066261A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • 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/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Strategic Management (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Pure & Applied Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Operations Research (AREA)
  • Mathematical Physics (AREA)
  • Primary Health Care (AREA)
  • Algebra (AREA)
  • Probability & Statistics with Applications (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)

Abstract

The invention provides a method and a device for detecting tampering of an electric meter, computer equipment and a storage medium, wherein the method comprises the following steps: respectively reading the electricity consumption from the total electricity meter of the platform area as target total electricity consumption, and reading the electricity consumption from the sub-electricity meters of each electricity consumer in the platform area as target sub-electricity consumption; calculating the difference between the target total electricity consumption and all the target sub-electricity consumptions to serve as the target electricity consumption difference; calculating mutual information between the target electronic electricity consumption and the difference of the target electricity consumption to serve as a first target probability of electricity consumption in a power consumption user tampering sub-ammeter; inputting the target electronic power consumption of the same power consumption into the solitary forest, and outputting a second target probability that the power consumption of the power consumption is tampered in the sub-electric meter; calculating a target coefficient of electricity consumption in the electricity consumption tampering sub-meter of the electricity consumer according to the first target probability and the second target probability; and determining the electricity consumption user for tampering the electricity consumption in the electricity distribution table according to the target coefficient. The accuracy of detecting the behavior of tampering the electricity distribution meter by the electricity consumer is improved, and the applicability is high.

Description

Tampering detection method and device for electric meter, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of power grids, in particular to a method and a device for detecting tampering of an electric meter, computer equipment and a storage medium.
Background
The intelligent electric meter can exert great flexibility in optimizing the use of energy, but has more problems of tampering and electric power theft, and besides some old forms of physical tampering, the intelligent electric meter is also subjected to attacks in more complex forms, and the reading of the electric meter is tampered.
At present, the behavior of detecting the degree of a tampered electric meter mainly depends on a marked data set or additional power system state information, which is difficult to obtain in reality and low in applicability, and the data and an actual value have large errors, so that the detection accuracy is low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting tampering of an ammeter, computer equipment and a storage medium, and aims to solve the problems of low behavior applicability and low accuracy in detecting the degree of a tampered ammeter.
In a first aspect, an embodiment of the present invention provides a method for detecting tampering of an electric meter, including:
respectively reading power consumption from a total electric meter of a platform area as target total power consumption, and reading power consumption from a sub-electric meter of each power consumer in the platform area as target sub-power consumption;
calculating the difference value between the target total electricity consumption and all the target sub-electricity consumption as a target electricity consumption difference;
calculating mutual information between the target sub-electricity consumption and the target electricity consumption difference to serve as a first target probability that the electricity consumption user tampers with the electricity consumption in the electricity distribution meter;
inputting the target sub-power consumption of the same power consumption into an solitary forest, and outputting a second target probability that the power consumption in the branch electric meter is tampered by the power consumption;
calculating a target coefficient of the electricity consumption amount in the electricity distribution meter tampered by the electricity consumer according to the first target probability and the second target probability;
and determining a power consumption user for tampering the power consumption in the electricity distribution meter according to the target coefficient.
In a second aspect, an embodiment of the present invention further provides a tampering detection device for an electricity meter, including:
the electric meter reading module is used for respectively reading power consumption from a total electric meter of the distribution area as target total power consumption, and reading the power consumption from a sub-electric meter of each power consumer in the distribution area as target sub-power consumption;
the power consumption difference calculation module is used for calculating the difference value between the target total power consumption and all the target sub-power consumption to serve as the target power consumption difference;
the first target probability calculation module is used for calculating mutual information between the target sub-power consumption and the target power consumption difference, and the mutual information is used as a first target probability that the power consumption user tampers with the power consumption in the electricity distribution meter;
the second target probability calculation module is used for inputting the target sub-electricity consumption of the same electricity consumer into an soliton forest and outputting a second target probability that the electricity consumer tampers the electricity consumption in the electricity distribution meter;
the target coefficient calculation module is used for calculating a target coefficient of the electricity consumption amount in the electricity distribution meter tampered by the electricity consumer according to the first target probability and the second target probability;
and the electricity consumption user detection module is used for determining electricity consumption users tampering with the electricity consumption amount in the electricity distribution meter according to the target coefficient.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for tamper detection of an electricity meter according to the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for detecting tampering of an electric meter according to the first aspect is implemented.
In the embodiment, the electricity consumption is respectively read from the total electricity meter of the platform area as the target total electricity consumption, and the electricity consumption is read from the sub-electricity meters of each electricity consumer in the platform area as the target sub-electricity consumption; calculating the difference between the target total electricity consumption and all the target sub-electricity consumptions to serve as the target electricity consumption difference; calculating mutual information between the target electronic electricity consumption and the difference of the target electricity consumption to serve as a first target probability of electricity consumption in a power consumption user tampering sub-ammeter; inputting the target electronic power consumption of the same power consumption into the solitary forest, and outputting a second target probability that the power consumption of the power consumption is tampered in the sub-electric meter; calculating a target coefficient of electricity consumption in the electricity consumption tampering sub-meter of the electricity consumer according to the first target probability and the second target probability; and determining the electricity consumption user for tampering the electricity consumption in the electricity distribution table according to the target coefficient. The behavior that the branch electric meter is tampered by the power consumer is detected by combining the mutual information and the isolated forest, the defect of a single mode can be overcome, the accuracy of the behavior that the branch electric meter is tampered by the power consumer is improved, the mutual information and the isolated forest are low-dimensional data, the mutual information and the isolated forest are easy to obtain in practice, the applicability is high, and the electricity stealing behaviors of various different types can be detected.
Drawings
Fig. 1 is a flowchart of a tampering detection method for an electricity meter according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an example of a type of electricity stealing provided by an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a tampering detection device for an electricity meter according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a tampering detection method for an electric meter according to an embodiment of the present invention, where the present embodiment is applicable to a situation where a behavior of tampering with an electric meter is detected through mutual information and isolated forest, the method may be executed by a tampering detection device for an electric meter, the tampering detection device for an electric meter may be implemented by software and/or hardware, and may be configured in a computer device, such as a server, a workstation, a personal computer, and the like, and specifically includes the following steps:
step 101, reading the electricity consumption from the total electricity meter of the platform area as the target total electricity consumption, and reading the electricity consumption from the sub electricity meters of each electricity consumer in the platform area as the target sub electricity consumption.
The power grid may be divided into a plurality of areas, each of which provides power distribution services for a plurality of power consumers, where an area refers to a power supply range or area of a (single) transformer.
The electric meters are arranged in the distribution area, and each electric user is provided with an electric meter.
When tampering is detected, on the one hand, the electricity consumption is read from the total electricity meter of the station area as the target total electricity consumption, and on the other hand, the electricity consumption is read from the sub-electricity meters of each electricity consumer in the station area as the target sub-electricity consumption.
The common characteristic of different tampering behaviors is that the measurement data (namely, reading) of the electricity meter is inconsistent with the actual electricity utilization condition, and the influence of the tampering modes on the measurement data of the electricity meter can be abstracted into the injection of false data into the measurement data. Regarding electricity consumers in a platform area as different metering units, these metering units may be affected by spurious data, i.e. tampering occurs. The total electric meter of the transformer area is the sum of the real measurement values of the metering units, so that tampering behaviors are difficult to generate, and the influence of false data is difficult to generate. Each tampering action of the power consumers in the distribution area can affect the correlation between the measurement data (namely the standard total power consumption) of the total power meter and the measurement data (namely the target sub power consumption) of the branch power meters, and the metering units with false data, namely the power consumers with electricity stealing actions, can be detected by analyzing the correlation between the measurement data (namely the standard total power consumption) of the total power meter and the measurement data (namely the target sub power consumption) of the branch power meters.
And 102, calculating the difference value between the target total electricity consumption and all the target sub electricity consumption as the target electricity consumption difference.
The tampering action is to tamper the real value of the electricity consumption to achieve the purpose of little metering or no metering. Therefore, the tampering action causes errors between the metering sums of the district total electric meter and the sub-electric meter.
Setting the difference of target electricity consumption caused by tampering behaviors at the t-th moment as errortThe calculation formula is as follows:
Figure BDA0003361237670000051
wherein, U represents the set of all power consumers in the platform area, MtA target total power usage amount of the station area is indicated,
Figure BDA0003361237670000052
and the target sub electricity consumption of the ith electricity consumer in the platform area is represented.
Considering that normal power consumers cannot differ from target power consumption errortThe effect is then again:
Figure BDA0003361237670000053
wherein C is the set of power consumers with tampering behaviors, mi,tIs the actual power consumption of the user i.
And 103, calculating mutual information between the target electronic electricity consumption and the target electricity consumption difference to serve as a first target probability of electricity consumption in the electricity consumption meter tampered by the electricity consumer.
Mutual Information (Mutual Information) is a useful Information measure in Information theory, and can be used as a measure for measuring the degree of interdependence between random variables, which can be regarded as the amount of Information contained in one random variable about another random variable, or the uncertainty that one random variable decreases because another random variable is known.
The difference between the target electronic power consumption and the target power consumption is regarded as a vector, mutual information of the two vectors does not make any assumption on the property of the relationship between the characteristic words and the categories, the application range in the aspect of measuring the correlation is wider, the mutual information is not limited to the linear correlation category, the correlation is used for detecting various types of correlation, the correlation is used as a first target probability of the power consumption in the power consumption user tampering electric distribution table, and the stronger the correlation is, the larger the first target probability of the power consumption in the power consumption user tampering electric distribution table is.
In a specific implementation, given two random variables x and y, their mutual information is defined by their probability density functions p (x), p (y).
In this embodiment, mutual information between the target electronic power consumption and the target power consumption difference may be calculated as a first target probability that the power consumption is tampered by the power consumer in the electricity distribution table according to the following formula:
Figure BDA0003361237670000061
wherein I (x, y) is a first target probability, x is a target sub-power consumption, y is a target power consumption difference, p (x) is a probability of occurrence of the target sub-power consumption, and p (x) is equivalent to
Figure BDA0003361237670000062
p (y) is the probability of the occurrence of the difference of the target electricity consumption, and p (x, y) is the probability of the occurrence of the difference of the target sub-electricity consumption and the target electricity consumption at the same time;
Figure BDA0003361237670000063
n is the number of power consumers, x(i)For the ith target electron power usage, δ is the Parzen window and h is the width of the Parzen window δ.
Further, a proper Parson window delta and a proper width h of the window delta are selected, and when N approaches infinity, an approximate probability density function is obtained
Figure BDA0003361237670000071
It is possible to converge to the true probability density function p (x).
The palerson window δ is defined as follows:
Figure BDA0003361237670000072
wherein z is x-x(i)D is the dimension of the target sub-electricity consumption, and epsilon is the covariance of z. When d is 1, the palson window δ corresponds to an estimate of the edge density.
I (x, y) falls in the section [0,1], and the larger the value of I (x, y), the stronger the correlation between the target sub power usage and the target power usage difference.
And 104, inputting the target sub power consumption of the same power consumption into the solitary forest, and outputting a second target probability that the power consumption in the power consumption meter is tampered by the power consumption.
Since the type of the tampering behavior of the power consumer is uncertain, the application of the correlation to detect the tampering behavior may result in that the tampering behavior with randomly changing tampering amount cannot be identified. If the electricity consumption of a certain type of user who has a tampering behavior is random, the waveform shape of a curve formed by the electricity consumption of the user is different, that is, if the electricity consumption of n second periods in each first period (such as one day) is regarded as an n-dimensional vector, the vectors generated by the random electricity consumption are different in direction and distributed dispersedly; and the vector of normal electricity utilization is more concentrated.
Therefore, in this embodiment, an isolated forest iForest may be trained in advance for the power consumers, where the isolated forest is used to detect the probability that the power consumers tamper the power consumption in the electricity meter, and then, in this embodiment, the isolated forest is used to perform outlier detection on the target sub-power consumption of each power consumer, and a part with abnormal line loss is determined.
Further, there are many definitions of an anomaly (anomaly detection), and in an isolated forest, an anomaly is defined as an outlier (more likely to be isolated) that is easily isolated, which can be understood as a point that is sparsely distributed and is far from a population with a high density. In the feature space, the sparsely distributed areas indicate that the probability of the event occurring in the areas is low, and thus the data falling in the areas can be considered as abnormal, and it can be seen that the power consumption conforms to the characteristics.
Isolated forest is an unsupervised anomaly detection method suitable for Continuous data (Continuous numerical data), i.e. marked samples are not needed for training, but features need to be Continuous. For how to find which points are easily isolated (isolated), in an isolated forest, the data set is recursively randomly partitioned until all sample points are isolated. Under this strategy of random segmentation, outliers typically have shorter paths. Intuitively, the clusters with high density need to be cut many times to be isolated, but the points with low density can be easily isolated.
In a specific implementation, a plurality of sub power consumptions read from a power consumption meter of the same power consumer in a plurality of second periods (e.g. 1 hour) within a first period (e.g. 1 day) may be queried, and the plurality of sub power consumptions are input into soliton forest as a plurality of vectors, and a second target probability that the power consumption meter is tampered by the power consumer is calculated according to the following formula:
Figure BDA0003361237670000081
c(n)=2H(n-1)-(2(n-1)/n)
H(n-1)=ln(n-1)+τ
wherein s (x, n) is a second target probability, x is a leaf node on an isolated tree in the isolated forest, n is the number of second periods, E (H (x)) is an expected value of the height H (x) of the leaf node x on a plurality of isolated trees in the isolated forest, c is an average path length of the plurality of isolated trees in the isolated forest, H is a key sum, and τ is an euler constant (e.g., 0.577).
The basic principle of using the isolated forest for the target sub-electricity consumption of each electricity consumer is to cut a data space by a random hyperplane, divide the data space into two subspaces, cut the subspaces until only one data node exists in each subspace, and form an isolated tree in which each leaf node only contains one data node. The data density at the outlier is low, so that the data can be stopped in a subspace quickly, and whether the data x is the outlier is judged according to the height h (x) from the leaf node x to the root node. An isolated forest consists of a plurality of isolated trees. For a data set containing n data points, the height of the constructed isolated tree has a maximum value of n-1 and a minimum value of log (n), the maximum possible height of the path h (x) increases linearly with n, and the average possible height increases with log (n). Normalizing h (x) according to the similarity of the isolated tree and the binary search tree: and (4) carrying out outlier detection on the isolated forest, and judging the part with abnormal line loss.
The second probability s (x, n) is a monotone decreasing function of the height h (x), the value range is [0,1], and the closer s is to 1, the higher the possibility that the electricity utilization condition of the power consumer is abnormal is.
And 105, calculating a target coefficient of the electricity consumption in the electricity consumption tampering part meter of the electricity consumption user according to the first target probability and the second target probability.
Mutual information and the isolated forest are mutually independent, the mutual information and the isolated forest have advantages and disadvantages respectively, and if the first target probability or the second target probability is singly sequenced, the sequencing of the power consumers without tampering is meaningless in practice.
In this embodiment, mutually independent mutual information is combined with an isolated forest, so that the first target probability and the second target probability are mapped to a target coefficient of electricity consumption in the electric power consumption tampering part meter of the electric power consumer, and the target coefficient represents the amplitude of electricity consumption in the electric power consumption tampering part meter of the electric power consumer, so that the defects caused by singly using the mutual information or the isolated forest can be overcome.
In one embodiment of the present invention, step 105 may include the steps of:
and 1051, determining a least squares support vector regression machine.
And 1052, inputting the first target probability and the second target probability into a least square support vector regression machine for processing so as to output a target coefficient of the power consumption in the power consumption meter tampered by the user.
A Support Vector Machine (SVM) is an algorithm in the field of machine learning, and the result obtained by using the SVM with kernel is not inferior to that based on the deep learning method. The SVM is proposed for the classification problem, and can also solve the Regression problem, which is called Support Vector Regression (SVR). The Least square Support Vector machine (LSSVR) is a special form of the LSSVR and can convert inequality constraint problem into equality constraint problem.
In this embodiment, a least square support vector regression may be trained in advance, and the combined detection of the fusion of the mutual information and the isolated forest is realized through the least square support vector regression, that is, the first target probability and the second target probability are used as the input of the least square support vector regression, and the least square support vector regression processes the first target probability and the second target probability according to the structure thereof, and outputs the target coefficient of the power consumption in the power consumption falsification sub-meter by the power consumer.
In this embodiment, the least squares support vector regression machine may be trained as follows:
and S1, acquiring the total power consumption of the sample and the sub power consumption of the sample.
The total sample electricity consumption is the electricity consumption read from the total electricity meter of the platform area, and the sample electronic electricity consumption is the electricity consumption which is read from the sub-electricity meters of each electricity consumer in the platform area and is not tampered.
Assuming that j days of electricity consumption data of i users in a certain area are provided, in order to facilitate data processing, the sub-electricity consumption of each user sample can be normalized, and an i x j dimensional matrix is obtained and is a data source for subsequent training.
For the trained data, the power consumer does not tamper with the electricity meter, i.e., the sum of the sample sub-power consumptions is equal to the sample total power consumption.
And noise can be added to the total power consumption of the sample and the sub power consumption of the sample to realize data enhancement, wherein the total power consumption of the sample and the sub power consumption of the sample are modified according to a certain proportion by adding the noise.
And S2, simulating and tampering the behavior of the power consumption in the electricity distribution meter, and modifying the sample sub power consumption to obtain new sample sub power consumption.
In the concrete implementation, the behavior of tampering the electric meter by an electric user in reality can be summarized to obtain a plurality of electricity stealing types, and the sample sub-electricity consumption is modified according to the specifications of part or all electricity stealing behaviors, so that the behavior of tampering the electricity consumption in the electric meter is simulated, and the new sample sub-electricity consumption is obtained.
Illustratively, let the real sample sub-power usage (i.e., the original sample sub-power usage) be mi,tThe tampered sample sub-power usage (i.e., new sample sub-power usage) is
Figure BDA0003361237670000111
Then, the electricity stealing type includes at least one of:
type 1:
the sample sub-power usage is multiplied by a first tampering factor as a new sample sub-power usage.
In type 1, mi,tAnd
Figure BDA0003361237670000112
in a proportional relationship, that is,
Figure BDA0003361237670000113
wherein α is a first tamper factor, α is greater than 0 and less than 1, preferably a randomly selected value of (0.1, 0.8).
Type 2:
and taking the maximum value between the sample sub-power consumption and the first cutoff point as new sample sub-power consumption.
In the case of the type 2, it is,
Figure BDA0003361237670000114
where γ is the first cutoff point, and γ is less than the maximum value of the raw sample sub-power usage, i.e., γ<maxmi,t
Type 3:
and taking the maximum value between the difference obtained by subtracting the second interception point from the sample sub-power consumption and the second interception point as the new sample sub-power consumption.
In the case of the type 3, it is,
Figure BDA0003361237670000115
where γ is the second truncation point, and γ is less than the maximum value of the raw sample sub-power usage, i.e., γ<maxmi,t
Type 4:
taking the maximum value between the difference obtained by subtracting the third truncation point from the sample sub-electricity consumption and 0 as a candidate value; and taking the minimum value between the candidate value and the fourth truncation point as the new sample sub-power consumption.
In the case of the type 4, it is,
Figure BDA0003361237670000121
wherein, γ1Is a third truncation point, γ2Is a fourth truncation point, γ1、γ2Are all smaller than the original sampleMaximum value in the electron consumption, i.e. gamma12<maxmi,t
Type 5:
and setting and assigning the sample sub power consumption measured in the part of the second period in the first period as new sample sub power consumption, adjusting the sample sub power consumption measured in the part of the second period in the first period to be 0, and assigning as new sample sub power consumption.
In the case of the type 5, it is,
Figure BDA0003361237670000122
in relation to time t, at 0 and mi,tIn the form of a wave between, i.e.,
Figure BDA0003361237670000123
wherein if t e (t)1,t2) If f (t) is 0, otherwise f (t) is 1, t1-t2Are randomly generated second cycles (1 hour) within the first cycle (1 day), the number of which is generally less than 4 second cycles (1 hour).
Type 6:
and setting a second tampering coefficient for each second period in the first period, and multiplying the sample sub power consumption measured in each second period by the second tampering coefficient respectively to obtain new sample sub power consumption.
In type 6, mi,tAnd
Figure BDA0003361237670000124
in a proportional relationship and the proportional relationship varies with time t, i.e.,
Figure BDA0003361237670000125
Figure BDA0003361237670000126
wherein alpha istIs a second tamper factor, αtGreater than 0 and less than 1, preferably (0.1, 0.8).
Type 7:
setting a third tampering coefficient for each second period in the first period; and multiplying the third tampering coefficients by the average value of the sample sub-electricity consumptions respectively to obtain new sample sub-electricity consumptions.
In type 7, mi,tAnd
Figure BDA0003361237670000127
average value of (2)
Figure BDA0003361237670000128
In a proportional relationship and the proportional relationship varies with time t, i.e.,
Figure BDA0003361237670000131
wherein alpha istIs a third tamper factor, αtGreater than 0 and less than 1, preferably (0.1, 0.8).
As shown in fig. 2, in the left coordinate system, the vertical axis 0 represents the actual sample sub-power consumption (i.e., the original sample sub-power consumption), 1-7 represents the sample sub-power consumption tampered with according to the above-mentioned tampering behavior (i.e., the new sample sub-power consumption), the horizontal axis represents the sample sub-power consumption in a plurality of second periods (0.5 hour) in the first period (1 day), and the sample sub-power consumption corresponds to the color blocks on the right side and varies from 0 to 16 kWh.
The difference in color between the actual sample sub-power usage (i.e., the original sample sub-power usage) and the tampered sample sub-power usage (i.e., the new sample sub-power usage) may reflect the severity of the tampering.
For example, the 2 nd row represents the tampered sample sub-power consumption corresponding to the electricity stealing type 2, and in the interval of the second period 6-21, because the real sample sub-power consumption is already larger than the first cut-off point, the tampered sample sub-power consumption is maintained at the size of the first cut-off point in the period of time, and the color of the cut-off block is unchanged.
Of course, the above-mentioned electricity stealing types are only examples, and when implementing the embodiment of the present invention, other electricity stealing types may be set according to practical situations, and the embodiment of the present invention is not limited thereto. In addition, besides the above-mentioned electricity stealing types, those skilled in the art may also adopt other electricity stealing types according to actual needs, and the embodiment of the present invention is not limited thereto.
And S3, calculating the difference between the total power consumption of the sample and the sub power consumption of all samples to be used as the difference of the sample power consumption.
And S4, calculating mutual information between the power consumption difference and the sample sub power consumption difference to serve as a first sample probability of the power consumption in the power consumption user tampering electric meter.
In a specific implementation, mutual information between the sample sub power consumption and the difference between the sample power consumption can be calculated through the following formula, and the mutual information is used as a first sample probability of the power consumption in the power consumption user tampering sub-electric meter:
Figure BDA0003361237670000132
wherein, I (x, y) is the first sample probability, x is the sample sub-power consumption, y is the sample power consumption difference, p (x) is the probability of the sample sub-power consumption, and p (x) is equivalent to
Figure BDA0003361237670000141
p (y) is the probability of the occurrence of the difference of the sample power consumption, and p (x, y) is the probability of the simultaneous occurrence of the sample sub-power consumption and the sample power consumption difference;
Figure BDA0003361237670000142
n is the number of power consumers, x(i)For the ith sample electron power usage, δ is the Parrson window and h is the width of the Parrson window.
And S5, inputting the sample sub power consumption of the same power consumption into the soliton forest, and outputting the second sample probability of the power consumption in the power consumption tampering part electric meter of the power consumption.
In a specific implementation, a plurality of sub power consumption read from the sub electricity meters of the same power consumer in a plurality of second periods in the first period can be inquired;
and inputting the plurality of electronic electricity consumption quantities into the soliton forest as a plurality of vectors, and calculating a second sample probability s (x, n) of electricity consumption quantity in the electric power consumption user tampering part ammeter through the following formula:
Figure BDA0003361237670000143
c(n)=2H(n-1)-(2(n-1)/n)
H(n-1)=ln(n-1)+τ
wherein s (x, n) is a second sample probability, x is a leaf node on an isolated tree in the isolated forest, n is the number of the second period, E (H (x)) is an expected value of the height H (x) of the leaf node x on a plurality of isolated trees in the isolated forest, c is an average path length of the plurality of isolated trees in the isolated forest, H is a sum of sums, and τ is an euler constant.
In the present embodiment, since the applications of S3, S4, and S5 are substantially similar to the applications of step 102, step 103, and step 104, the description is relatively simple, and for the relevant points, reference is made to the description of step 102, step 103, and step 104, and the embodiment of the present invention is not described in detail herein.
And S6, taking the ratio of the tamper value to the sample sub power consumption which is not tampered as the sample coefficient of the power consumption in the user tampering part electric meter.
Wherein the tampered value is a difference between the untampered sample sub power usage and the tampered sample sub power usage.
For user i, the process of calculating the sample coefficients is represented as follows:
Figure BDA0003361237670000151
wherein, let the actual sample sub-power consumption (i.e. the original sample sub-power consumption) of the user i be xi,tWith the sample sub-power usage tampered with by customer i (i.e., the new sample sub-power usage) as
Figure BDA0003361237670000152
And S7, training a least square support vector regression machine by taking the first sample probability and the second sample probability as samples and the sample coefficient as a label.
In this embodiment, the first sample probability and the second sample probability are samples, the sample coefficient is a label, and the parameters in the least squares support vector regression are trained under the supervision of the label.
For the trained sample D { (x)1,y1),(x2,y2),…,(xm,ym) The LSSVR can be obtained in a form such as
Figure BDA0003361237670000153
Model of (1), wherein
Figure BDA0003361237670000154
Is a kernel function, and w and b are parameters.
The description of LSSVR is:
Figure BDA0003361237670000155
Figure BDA0003361237670000156
gamma is a regularization parameter.
And converting the dual problem into a dual problem by a Lagrange multiplier method, and solving the dual problem to obtain a solution of the original problem. The dual problem is:
Figure BDA0003361237670000161
and solving the dual problem by using a coordinate rotation method under the KKT condition. Compared with a standard support vector machine, the least square support vector machine converts inequality constraint into equality constraint, and the calculation speed is accelerated.
And 106, determining a power consumption user for tampering the power consumption in the electricity distribution table according to the target coefficient.
In this embodiment, the target coefficient may be referred to screen the power consumption user tampering with the power consumption in the electricity distribution meter, so as to perform an alarm operation on the power consumption user.
In a specific implementation, the power consumers can be sorted in a descending order according to the target coefficient, so that the power consumers with the power consumption falsified in the sub-electric meter can be screened according to the configuration order of the power consumers.
Let the first target probability be pro1The second target probability is pro2Applying LSSVR to assign the first target probability pro1With a second target probability pro2Mapping to the target coefficient, the sorting process is denoted as rank (LSSVR (pro)1,pro2))
In the descending sort, the higher the order of the power consumers is, the higher the target coefficient is, the more likely to screen the power consumption in the tampered power consumption table, and therefore, some conditions may be set so as to screen the power consumers which meet the conditions as the power consumption in the tampered power consumption table, for example, the power consumer with the highest order k (k is a positive integer) bit or r (r is a positive integer)% tampers the power consumption in the tampered power consumption table, or the power consumer with the highest order k bit or r% and the target coefficient is greater than the threshold value tampers the power consumption in the tampered power consumption table, and so on.
In the embodiment, the electricity consumption is respectively read from the total electricity meter of the platform area as the target total electricity consumption, and the electricity consumption is read from the sub-electricity meters of each electricity consumer in the platform area as the target sub-electricity consumption; calculating the difference between the target total electricity consumption and all the target sub-electricity consumptions to serve as the target electricity consumption difference; calculating mutual information between the target electronic electricity consumption and the difference of the target electricity consumption to serve as a first target probability of electricity consumption in a power consumption user tampering sub-ammeter; inputting the target electronic power consumption of the same power consumption into the solitary forest, and outputting a second target probability that the power consumption of the power consumption is tampered in the sub-electric meter; calculating a target coefficient of electricity consumption in the electricity consumption tampering sub-meter of the electricity consumer according to the first target probability and the second target probability; and determining the electricity consumption user for tampering the electricity consumption in the electricity distribution table according to the target coefficient. The behavior that the branch electric meter is tampered by the power consumer is detected by combining the mutual information and the isolated forest, the defect of a single mode can be overcome, the accuracy of the behavior that the branch electric meter is tampered by the power consumer is improved, the mutual information and the isolated forest are low-dimensional data, the mutual information and the isolated forest are easy to obtain in practice, the applicability is high, and the electricity stealing behaviors of various different types can be detected.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Example two
Fig. 3 is a block diagram of a structure of a tampering detection device for an electric meter according to a second embodiment of the present invention, which may specifically include the following modules:
an electric meter reading module 301, configured to read electricity consumption from a total electric meter in a distribution area as target total electricity consumption, and read electricity consumption from a sub-electric meter of each electricity consumer in the distribution area as target sub-electricity consumption;
a power consumption difference calculating module 302, configured to calculate a difference between the target total power consumption and all the target sub power consumptions as a target power consumption difference;
a first target probability calculation module 303, configured to calculate mutual information between the target sub power consumption and the target power consumption difference, where the mutual information is used as a first target probability that the power consumer tampers with the power consumption in the electricity distribution meter;
a second target probability calculation module 304, configured to input the target sub-power consumption of the same power consumer into an soliton forest, and output a second target probability that the power consumer tampers with the power consumption in the electricity distribution meter;
a target coefficient calculation module 305, configured to calculate a target coefficient for tampering the electricity consumption amount in the electricity distribution meter by the electricity consumer according to the first target probability and the second target probability;
and the power consumption detecting module 306 is configured to determine a power consumption which tampers with the power consumption in the electricity distribution meter according to the target coefficient.
In an embodiment of the present invention, the first target probability calculating module 303 is further configured to:
calculating mutual information between the target sub-electricity consumption and the target electricity consumption difference through the following formula to serve as a first target probability that the electricity consumption user tampers the electricity consumption in the electricity distribution meter:
Figure BDA0003361237670000181
wherein I (x, y) is a first target probability, x is the target sub-power consumption, y is the target power consumption difference, p (x) is the probability of occurrence of the target sub-power consumption, and p (x) is equivalent to
Figure BDA0003361237670000182
p (y) is the probability of the target power consumption difference occurring, and p (x, y) is the probability of the target sub power consumption and the target power consumption difference occurring at the same time;
Figure BDA0003361237670000183
n is the number of electricity consumers, x(i)And delta is the Parson window, and h is the width of the Parson window for the ith target electron power consumption.
In an embodiment of the present invention, the second target probability calculation module 304 is further configured to:
inquiring a plurality of sub electricity consumption amounts read from the electricity distribution meter of the same electricity consumer in a plurality of second periods in the first period;
inputting a plurality of sub-electricity consumption quantities into an soliton forest as a plurality of vectors, and calculating a second target probability that the electricity consumption quantity in the electricity distribution meter is tampered by the electricity consumer according to the following formula:
Figure BDA0003361237670000191
c(n)=2H(n-1)-(2(n-1)/n)
H(n-1)=ln(n-1)+τ
wherein s (x, n) is a second target probability, x is a leaf node on an isolated tree in the isolated forest, n is the number of the second periods, E (H (x)) is an expected value of the height H (x) of the leaf node x on a plurality of isolated trees in the isolated forest, c is an average path length of the plurality of isolated trees in the isolated forest, H is a key sum, and τ is an euler constant.
In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:
determining a least squares support vector regression machine;
and inputting the first target probability and the second target probability into the least square support vector regression machine for processing so as to output a target coefficient of the power consumption amount in the electricity distribution meter tampered by the power consumption user.
In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:
acquiring total sample power consumption and sample sub-power consumption, wherein the total sample power consumption is the power consumption read from a total ammeter in a station area, and the sample sub-power consumption is the power consumption which is read from a sub-ammeter of each power consumer in the station area and is not tampered;
simulating the behavior of tampering the electricity consumption in the electricity distribution meter, and modifying the sample sub electricity consumption to obtain new sample sub electricity consumption;
calculating the difference between the total power consumption of the sample and all the sub-power consumptions of the sample to serve as the difference of the power consumptions of the sample;
calculating mutual information between the power consumption difference and the sample sub-power consumption difference to serve as a first sample probability of the power consumption in the electricity distribution meter tampered by the power consumer;
inputting the sub-power consumption of the sample of the same power consumer into an solitary forest, and outputting a second sample probability that the power consumer tampers with the power consumption in the electricity distribution meter;
calculating a ratio of a tampering value to the sample sub-electricity consumption which is not tampered, as a sample coefficient of the electricity consumption in the electricity distribution meter tampered by the user, wherein the tampering value is a difference value between the sample sub-electricity consumption which is not tampered and the sample sub-electricity consumption which is tampered;
and training a least square support vector regression machine by taking the first sample probability and the second sample probability as samples and the sample coefficient as a label.
In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:
multiplying the sample sub-power consumption by a first tampering coefficient to serve as a new sample sub-power consumption;
and/or the presence of a gas in the gas,
taking the maximum value between the sample sub-power consumption and the first cutoff point as new sample sub-power consumption;
and/or the presence of a gas in the gas,
taking the maximum value between the difference obtained by subtracting the second interception point from the sample sub-power consumption and the second interception point as new sample sub-power consumption;
and/or the presence of a gas in the gas,
taking the maximum value between the difference obtained by subtracting the third truncation point from the sample sub-electricity consumption and 0 as a candidate value;
taking the minimum value between the candidate value and the fourth truncation point as the new sample sub-power consumption;
and/or the presence of a gas in the gas,
assigning the sample sub-power consumption setting measured in a part of second periods within the first period to be a new sample sub-power consumption, adjusting the sample sub-power consumption measured in the part of second periods within the first period to be 0, and assigning the sample sub-power consumption setting to be a new sample sub-power consumption;
and/or the presence of a gas in the gas,
setting a second tampering coefficient for each second period in the first period;
multiplying the sample sub power consumption measured in each second period by the second tampering coefficient respectively to serve as new sample sub power consumption;
and/or the presence of a gas in the gas,
setting a third tampering coefficient for each second period in the first period;
and multiplying the third tampering coefficients by the average value of the sample sub-electricity consumptions respectively to obtain new sample sub-electricity consumptions.
In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:
calculating mutual information between the sample sub-power consumption and the sample power consumption difference through the following formula, and taking the mutual information as a first sample probability of the power consumption in the electricity distribution meter tampered by the power consumer:
Figure BDA0003361237670000211
wherein I (x, y) is a first sample probability, x is the sample sub-power consumption, y is the sample power consumption difference, p (x) is the probability of the sample sub-power consumption, and p (x) is equivalent to
Figure BDA0003361237670000213
p (y) is the probability of the occurrence of the sample power consumption difference, and p (x, y) is the probability of the occurrence of the sample sub-power consumption and the sample power consumption difference at the same time;
Figure BDA0003361237670000212
n is the number of electricity consumers, x(i)For the ith sample electron power usage, δ is the Pearson window and h is the width of the Pearson window.
In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:
inquiring a plurality of sub electricity consumption amounts read from the electricity distribution meter of the same electricity consumer in a plurality of second periods in the first period;
inputting a plurality of the sub-electricity consumption quantities into an soliton forest as a plurality of vectors, and calculating a second sample probability of tampering the electricity consumption quantities in the electricity distribution meter by the electricity consumer according to the following formula:
Figure BDA0003361237670000221
c(n)=2H(n-1)-(2(n-1)/n)
H(n-1)=ln(n-1)+τ
wherein s (x, n) is a second sample probability, x is a leaf node on an isolated tree in the isolated forest, n is the number of the second period, E (H (x)) is an expected value of the height H (x) of the leaf node x on a plurality of isolated trees in the isolated forest, c is an average path length of the plurality of isolated trees in the isolated forest, H is a key sum, and τ is an euler constant.
In an embodiment of the present invention, the power consumption detection module 306 is further configured to:
sorting the power consumers in a descending order according to the target coefficient so as to configure the order of the power consumers;
and screening and tampering the power consumption users of the electricity consumption in the electricity distribution meter according to the sequence.
The tampering detection device for the ammeter provided by the embodiment of the invention can execute the tampering detection method for the ammeter provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing a tampering detection method for an electric meter provided by an embodiment of the present invention.
Example four
The fourth embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the tampering detection method for an electric meter, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
A computer readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of tampering detection of an electricity meter, comprising:
respectively reading power consumption from a total electric meter of a platform area as target total power consumption, and reading power consumption from a sub-electric meter of each power consumer in the platform area as target sub-power consumption;
calculating the difference value between the target total electricity consumption and all the target sub-electricity consumption as a target electricity consumption difference;
calculating mutual information between the target sub-electricity consumption and the target electricity consumption difference to serve as a first target probability that the electricity consumption user tampers with the electricity consumption in the electricity distribution meter;
inputting the target sub-power consumption of the same power consumption into an solitary forest, and outputting a second target probability that the power consumption in the branch electric meter is tampered by the power consumption;
calculating a target coefficient of the electricity consumption amount in the electricity distribution meter tampered by the electricity consumer according to the first target probability and the second target probability;
and determining a power consumption user for tampering the power consumption in the electricity distribution meter according to the target coefficient.
2. The method of claim 1, wherein the calculating mutual information between the target sub-power usage and the target power usage difference as a first target probability that the power consumer tampers with the power usage in the electricity distribution meter comprises:
calculating mutual information between the target sub-electricity consumption and the target electricity consumption difference through the following formula to serve as a first target probability that the electricity consumption user tampers the electricity consumption in the electricity distribution meter:
Figure FDA0003361237660000011
wherein I (x, y) is a first target probability, x is the target sub-power consumption, y is the target power consumption difference, p (x) is the probability of occurrence of the target sub-power consumption, and p (x) is equivalent to
Figure FDA0003361237660000012
p (y) is the probability of the target power consumption difference occurring, and p (x, y) is the probability of the target sub power consumption and the target power consumption difference occurring at the same time;
Figure FDA0003361237660000021
n is the number of electricity consumers, x(i)And delta is the Parson window, and h is the width of the Parson window for the ith target electron power consumption.
3. The method of claim 1, wherein the inputting the target sub-power usage of the same power consumer into soliton and outputting a second target probability that the power consumer tampers with the power usage in the electricity distribution meter comprises:
inquiring a plurality of sub electricity consumption amounts read from the electricity distribution meter of the same electricity consumer in a plurality of second periods in the first period;
inputting a plurality of sub-electricity consumption quantities into an soliton forest as a plurality of vectors, and calculating a second target probability that the electricity consumption quantity in the electricity distribution meter is tampered by the electricity consumer according to the following formula:
Figure FDA0003361237660000022
c(n)=2H(n-1)-(2(n-1)/n)
H(n-1)=ln(n-1)+τ
wherein s (x, n) is a second target probability, x is a leaf node on an isolated tree in the isolated forest, n is the number of the second periods, E (H (x)) is an expected value of the height H (x) of the leaf node x on a plurality of isolated trees in the isolated forest, c is an average path length of the plurality of isolated trees in the isolated forest, H is a key sum, and τ is an euler constant.
4. The method according to any one of claims 1-3, wherein the calculating a target coefficient for the power consumer to tamper with the power usage in the electricity distribution meter according to the first target probability and the second target probability comprises:
determining a least squares support vector regression machine;
and inputting the first target probability and the second target probability into the least square support vector regression machine for processing so as to output a target coefficient of the power consumption amount in the electricity distribution meter tampered by the power consumption user.
5. The method of claim 4, wherein determining a least squares support vector regression machine comprises:
acquiring total sample power consumption and sample sub-power consumption, wherein the total sample power consumption is the power consumption read from a total ammeter in a station area, and the sample sub-power consumption is the power consumption which is read from a sub-ammeter of each power consumer in the station area and is not tampered;
simulating the behavior of tampering the electricity consumption in the electricity distribution meter, and modifying the sample sub electricity consumption to obtain new sample sub electricity consumption;
calculating the difference between the total power consumption of the sample and all the sub-power consumptions of the sample to serve as the difference of the power consumptions of the sample;
calculating mutual information between the power consumption difference and the sample sub-power consumption difference to serve as a first sample probability of the power consumption in the electricity distribution meter tampered by the power consumer;
inputting the sub-power consumption of the sample of the same power consumer into an solitary forest, and outputting a second sample probability that the power consumer tampers with the power consumption in the electricity distribution meter;
calculating a ratio of a tampering value to the sample sub-electricity consumption which is not tampered, as a sample coefficient of the electricity consumption in the electricity distribution meter tampered by the user, wherein the tampering value is a difference value between the sample sub-electricity consumption which is not tampered and the sample sub-electricity consumption which is tampered;
and training a least square support vector regression machine by taking the first sample probability and the second sample probability as samples and the sample coefficient as a label.
6. The method of claim 5, wherein the simulating acts of tampering with the power usage in the electricity distribution meter, modifying the sample sub-power usage, and obtaining a new sample sub-power usage comprises:
multiplying the sample sub-power consumption by a first tampering coefficient to serve as a new sample sub-power consumption;
and/or the presence of a gas in the gas,
taking the maximum value between the sample sub-power consumption and the first cutoff point as new sample sub-power consumption;
and/or the presence of a gas in the gas,
taking the maximum value between the difference obtained by subtracting the second interception point from the sample sub-power consumption and the second interception point as new sample sub-power consumption;
and/or the presence of a gas in the gas,
taking the maximum value between the difference obtained by subtracting the third truncation point from the sample sub-electricity consumption and 0 as a candidate value;
taking the minimum value between the candidate value and the fourth truncation point as the new sample sub-power consumption;
and/or the presence of a gas in the gas,
assigning the sample sub-power consumption setting measured in a part of second periods within the first period to be a new sample sub-power consumption, adjusting the sample sub-power consumption measured in the part of second periods within the first period to be 0, and assigning the sample sub-power consumption setting to be a new sample sub-power consumption;
and/or the presence of a gas in the gas,
setting a second tampering coefficient for each second period in the first period;
multiplying the sample sub power consumption measured in each second period by the second tampering coefficient respectively to serve as new sample sub power consumption;
and/or the presence of a gas in the gas,
setting a third tampering coefficient for each second period in the first period;
and multiplying the third tampering coefficients by the average value of the sample sub-electricity consumptions respectively to obtain new sample sub-electricity consumptions.
7. The method according to any one of claims 1-3 and 5-6, wherein the determining electricity consumers tampering with the electricity consumption in the electricity distribution meter according to the target coefficient comprises:
sorting the power consumers in a descending order according to the target coefficient so as to configure the order of the power consumers;
and screening and tampering the power consumption users of the electricity consumption in the electricity distribution meter according to the sequence.
8. A tampering detection device for an electricity meter, comprising:
the electric meter reading module is used for respectively reading power consumption from a total electric meter of the distribution area as target total power consumption, and reading the power consumption from a sub-electric meter of each power consumer in the distribution area as target sub-power consumption;
the power consumption difference calculation module is used for calculating the difference value between the target total power consumption and all the target sub-power consumption to serve as the target power consumption difference;
the first target probability calculation module is used for calculating mutual information between the target sub-power consumption and the target power consumption difference, and the mutual information is used as a first target probability that the power consumption user tampers with the power consumption in the electricity distribution meter;
the second target probability calculation module is used for inputting the target sub-electricity consumption of the same electricity consumer into an soliton forest and outputting a second target probability that the electricity consumer tampers the electricity consumption in the electricity distribution meter;
the target coefficient calculation module is used for calculating a target coefficient of the electricity consumption amount in the electricity distribution meter tampered by the electricity consumer according to the first target probability and the second target probability;
and the electricity consumption user detection module is used for determining electricity consumption users tampering with the electricity consumption amount in the electricity distribution meter according to the target coefficient.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of tamper detection for an electricity meter of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out a method of tamper detection of an electricity meter according to any one of claims 1-7.
CN202111367099.5A 2021-11-18 2021-11-18 Tampering detection method and device for electric meter, computer equipment and storage medium Pending CN114066261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111367099.5A CN114066261A (en) 2021-11-18 2021-11-18 Tampering detection method and device for electric meter, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111367099.5A CN114066261A (en) 2021-11-18 2021-11-18 Tampering detection method and device for electric meter, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114066261A true CN114066261A (en) 2022-02-18

Family

ID=80278396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111367099.5A Pending CN114066261A (en) 2021-11-18 2021-11-18 Tampering detection method and device for electric meter, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114066261A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116346638A (en) * 2023-05-30 2023-06-27 南方电网数字电网研究院有限公司 Data tampering inference method based on power grid power and alarm information interaction verification
CN117147959A (en) * 2023-08-23 2023-12-01 广东电网有限责任公司佛山供电局 Electricity larceny prevention analysis method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116346638A (en) * 2023-05-30 2023-06-27 南方电网数字电网研究院有限公司 Data tampering inference method based on power grid power and alarm information interaction verification
CN116346638B (en) * 2023-05-30 2023-09-15 南方电网数字电网研究院有限公司 Data tampering inference method based on power grid power and alarm information interaction verification
CN117147959A (en) * 2023-08-23 2023-12-01 广东电网有限责任公司佛山供电局 Electricity larceny prevention analysis method and device

Similar Documents

Publication Publication Date Title
CN110223196B (en) Anti-electricity-stealing analysis method based on typical industry feature library and anti-electricity-stealing sample library
CN113792825B (en) Fault classification model training method and device for electricity information acquisition equipment
CN103370722B (en) The system and method that actual volatility is predicted by small echo and nonlinear kinetics
CN114066261A (en) Tampering detection method and device for electric meter, computer equipment and storage medium
CN110222733B (en) High-precision multi-order neural network classification method and system
Zhao R and data mining: Examples and case studies
CN111340086A (en) Method, system, medium and terminal for processing label-free data
CN112949721A (en) Power equipment static data quality assessment method and system
Park et al. A machine learning-based early warning system for the housing and stock markets
CN113516417A (en) Service evaluation method and device based on intelligent modeling, electronic equipment and medium
CN106708729A (en) Code defect predicting method and device
CN115563477A (en) Harmonic data identification method and device, computer equipment and storage medium
Angenent et al. Large-scale machine learning for business sector prediction
CN117155771B (en) Equipment cluster fault tracing method and device based on industrial Internet of things
Liao et al. Simple data augmentation tricks for boosting performance on electricity theft detection tasks
Tsakalos et al. comspat: an R package to analyze within‐community spatial organization using species combinations
Lee et al. An entropy decision model for selection of enterprise resource planning system
CN111950623A (en) Data stability monitoring method and device, computer equipment and medium
CN116894687A (en) Power consumption analysis method and system based on machine learning and electronic equipment
CN115617784A (en) Data processing system and processing method for informationized power distribution
CN115423159A (en) Photovoltaic power generation prediction method and device and terminal equipment
CN115063143A (en) Account data processing method and device, computer equipment and storage medium
CN112433952A (en) Method, system, device and medium for testing fairness of deep neural network model
CN113591881A (en) Intention recognition method and device based on model fusion, electronic equipment and medium
CN115081932B (en) Method and device for detecting fairness of artificial intelligence model

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