Tampering Detection Method, Device, Computer Equipment and Storage Medium for an Electric Meter

By calculating the difference in electricity consumption and mutual information of electricity meters and using isolated forest detection algorithms, the applicability and accuracy of smart meter tamper detection in the prior art are solved, and more efficient identification and prevention of electricity theft behavior is achieved.

CN114066261BActive Publication Date: 2025-05-27GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111367099.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2025-05-27
Estimated Expiration
2041-11-18

AI Technical Summary

Technical Problem

The prior art has low applicability and low accuracy when detecting tampering of smart meters, making it difficult to effectively identify and prevent power theft.

Method used

By reading electricity consumption from the total meter in the station area and the electricity distribution meter of the electricity user, calculating the electricity consumption difference and mutual information, combined with the isolated forest detection algorithm, the target coefficient of electricity consumption of the electricity users tampering with the electricity distribution meter is calculated to determine potential electricity theft.

Benefits of technology

It improves the accuracy and applicability of detecting the behavior of electric users tampering with power distribution meters, can identify many different types of power theft behavior, and enhances the safety and management efficiency of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114066261B_ABST
    Figure CN114066261B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, computer device and storage medium for detecting tampering of an electricity meter. The method includes: respectively reading the electricity consumption from the main electricity meter of the power distribution area as the target total electricity consumption, and reading the electricity consumption from the sub-electricity meters of each electricity user in the power distribution area as the target sub-electricity consumption; calculating the difference between the target total electricity consumption and all target sub-electricity consumptions as the target electricity consumption difference; calculating the mutual information between the target sub-electricity consumption and the target electricity consumption difference as the first target probability of the electricity user tampering with the electricity consumption in the sub-electricity meter; inputting the target sub-electricity consumption of the same electricity user into an isolation forest and outputting the second target probability of the electricity user tampering with the electricity consumption in the sub-electricity meter; calculating the target coefficient of the electricity user tampering with the electricity consumption in the sub-electricity meter according to the first target probability and the second target probability; and determining the electricity user who tampers with the electricity consumption in the sub-electricity meter according to the target coefficient. The accuracy of detecting the behavior of an electricity user tampering with the sub-electricity meter is improved, and the applicability is relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of power grids, and in particular, to a method, device, computer device, and storage medium for detecting tampering of an electric meter. Background Art

[0002] Intelligent electric meters can play a great role in optimizing energy use, but there are also more problems of tampering and power theft. In addition to some old forms of physical tampering, intelligent electric meters also face more complex forms of attacks, such as tampering with the readings of the electric meters.

[0003] Currently, the detection of the behavior of tampering with the readings of electric meters mainly relies on marked data sets or additional power system status information, which is difficult to obtain in reality, has low applicability, and there are large errors between these data and the actual values, resulting in low detection accuracy. Summary of the Invention

[0004] The embodiments of the present invention propose a method, device, computer device, and storage medium for detecting tampering of an electric meter to solve the problems of low applicability and low accuracy in detecting the behavior of tampering with the readings of electric meters.

[0005] In a first aspect, the embodiments of the present invention provide a method for detecting tampering of an electric meter, including:

[0006] Read the electricity consumption from the main electric meter of the substation area as the target total electricity consumption, and read the electricity consumption from the sub-electric meters of each electricity user in the substation area as the target sub-electricity consumption;

[0007] Calculate the difference between the target total electricity consumption and all the target sub-electricity consumptions as the target electricity consumption difference;

[0008] Calculate the mutual information between the target sub-electricity consumption and the target electricity consumption difference as the first target probability that the electricity user tampers with the electricity consumption in the sub-electric meter;

[0009] Input the target sub-electricity consumption of the same electricity user into the isolation forest, and output the second target probability that the electricity user tampers with the electricity consumption in the sub-electric meter;

[0010] Calculate the target coefficient for the electricity user to tamper with the electricity consumption in the sub-electric meter according to the first target probability and the second target probability;

[0011] Determine the electricity user who tampers with the electricity consumption in the sub-electric meter according to the target coefficient.

[0012] In a second aspect, the embodiments of the present invention also provide a device for detecting tampering of an electric meter, including:

[0013] An electricity meter reading module, configured to respectively read the electricity consumption from the main electricity meter of the substation area as the target total electricity consumption, and read the electricity consumption from the sub - electricity meters of each electricity user in the substation area as the target sub - electricity consumption;

[0014] An electricity consumption difference calculation module, configured to calculate the difference between the target total electricity consumption and all the target sub - electricity consumptions as the target electricity consumption difference;

[0015] A first target probability calculation module, configured to calculate the mutual information between the target sub - electricity consumption and the target electricity consumption difference as the first target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter;

[0016] A second target probability calculation module, configured to input the target sub - electricity consumption of the same electricity user into an isolation forest and output the second target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter;

[0017] A target coefficient calculation module, configured to calculate the target coefficient for the electricity user to tamper with the electricity consumption in the sub - electricity meter according to the first target probability and the second target probability;

[0018] An electricity user detection module, configured to determine the electricity user who tampers with the electricity consumption in the sub - electricity meter according to the target coefficient.

[0019] In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:

[0020] One or more processors;

[0021] A memory, configured to store one or more programs,

[0022] When the one or more programs are executed by the one or more processors, the one or more processors implement the electricity meter tampering detection method as described in the first aspect.

[0023] 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 electricity meter tampering detection method as described in the first aspect is implemented.

[0024] In this embodiment, the power consumption is read from the main meter of the power distribution area as the target total power consumption, and the power consumption is read from the sub-meter of each electricity user in the power distribution area as the target sub-power consumption; the difference between the target total power consumption and all target sub-power consumptions is calculated as the target power consumption difference; the mutual information between the target sub-power consumption and the target power consumption difference is calculated as the first target probability that the electricity user tampers with the power consumption in the sub-meter; the target sub-power consumption of the same electricity user is input into the isolation forest, and the second target probability that the electricity user tampers with the power consumption in the sub-meter is output; the target coefficient that the electricity user tampers with the power consumption in the sub-meter is calculated according to the first target probability and the second target probability; the electricity user who tampers with the power consumption in the sub-meter is determined according to the target coefficient. Combining mutual information and isolation forest to detect the behavior of electricity users tampering with sub-meters can overcome the deficiencies of a single method, improve the accuracy of detecting the behavior of electricity users tampering with sub-meters. Mutual information and isolation forest apply low-dimensional data, which are easy to obtain in practice and have high applicability, and can detect various types of electricity theft behaviors. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 FIG. is a flowchart of a method for detecting meter tampering provided in Embodiment 1 of the present invention;

[0026] Figure 2 FIG. is an example diagram of an electricity theft type provided in Embodiment 1 of the present invention;

[0027] Figure 3 FIG. is a schematic structural diagram of a device for detecting meter tampering provided in Embodiment 2 of the present invention;

[0028] Figure 4 FIG. is a schematic structural diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only for explaining the present invention, rather than limiting the present invention. In addition, it should be noted that for the sake of description, only parts related to the present invention are shown in the drawings rather than all structures.

[0030] Embodiment 1

[0031] Figure 1 FIG. is a flowchart of a method for detecting meter tampering provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of detecting the behavior of meter tampering through mutual information and isolation forest. This method can be executed by a device for detecting meter tampering, and the device for detecting meter tampering can be implemented by software and / or hardware and can be configured in a computer device, such as a server, a workstation, a personal computer, etc. The specific steps are as follows:

[0032] Step 101: Read the power consumption from the main meter of the substation area as the target total power consumption, and read the power consumption from the sub-meter of each electricity user in the substation area as the target sub-power consumption.

[0033] In the power grid, it can be divided into multiple substation areas, and each substation area provides power distribution services for multiple electricity users. Among them, the substation area refers to the power supply range or area of (one) transformer.

[0034] There is a meter set in the substation area and a meter for each electricity user. For the convenience of distinction, the meter in the substation area is recorded as the main meter, and the meter of the electricity user is recorded as the sub-meter.

[0035] When detecting tampering behavior, on the one hand, read the power consumption from the main meter of the substation area as the target total power consumption, and on the other hand, read the power consumption from the sub-meter of each electricity user in the substation area as the target sub-power consumption.

[0036] The common feature of different tampering behaviors is that the measured data (i.e., readings) of the meter do not match the actual power consumption situation. The influence of these tampering methods on the measured data of the meter can be abstracted as injecting false data into the measured data. Regarding the electricity users in the substation area as different metering units, these metering units can be affected by false data, that is, tampering behavior occurs. The main meter of the substation area is the sum of the true measured values of the metering units, and it is difficult to have tampering behavior and is generally not easily affected by false data. Each tampering behavior of the electricity users in the substation area will affect the correlation between the measured data (i.e., the target total power consumption) of the main meter in the substation area and the measured data (i.e., the target sub-power consumption) of the sub-meter. By analyzing the correlation between the measured data (i.e., the target total power consumption) of the main meter and the measured data (i.e., the target sub-power consumption) of the sub-meter, the metering units with false data, that is, the electricity users with electricity theft behavior, can be detected.

[0037] Step 102: Calculate the difference between the target total power consumption and all target sub-power consumptions as the target power consumption difference.

[0038] Tampering behavior usually tampers with the true value of the power consumption to achieve the purpose of under-measuring or non-measuring. Therefore, tampering behavior will cause an error between the measurement sum of the main meter and the sub-meter in the substation area.

[0039] Let the target power consumption difference caused by tampering behavior at the t-th moment be error t , and its calculation formula is as follows:

[0040]

[0041] Among them, U represents the set of all electricity users in the substation area, and M t represents the target total power consumption of the substation area, represents the target sub-power consumption of the i-th electricity user in the substation area.

[0042] Considering that normal electricity users will not affect the target electricity consumption difference error t Then the above formula can be further transformed into:

[0043]

[0044] where C is the set of electricity users who have committed tampering behavior, and m i,t is the actual electricity consumption of user i.

[0045] Step 103: Calculate the mutual information between the target sub - electricity consumption and the target electricity consumption difference, and use it as the first target probability that an electricity user tampers with the electricity consumption in the sub - meter.

[0046] Mutual Information is a useful information measure in information theory. It can be used to measure the degree of mutual dependence between random variables. It can be regarded as the amount of information about another random variable contained in a random variable, or the reduction in uncertainty of a random variable due to knowing another random variable.

[0047] Regarding the target sub - electricity consumption and the target electricity consumption difference as vectors, the mutual information between the two vectors has a wider application range in measuring correlation because it does not make any assumptions about the nature of the relationship between feature words and categories. It is not limited to the scope of linear correlation and is used to detect various types of correlations. As the first target probability that an electricity user tampers with the electricity consumption in the sub - meter, the stronger the correlation, the greater the first target probability that an electricity user tampers with the electricity consumption in the sub - meter.

[0048] In a specific implementation, given two random variables x and y, their mutual information is defined by their probability density functions p(x) and p(y).

[0049] This embodiment can calculate the mutual information between the target sub - electricity consumption and the target electricity consumption difference through the following formula, and use it as the first target probability that an electricity user tampers with the electricity consumption in the sub - meter:

[0050]

[0051] where I(x, y) is the first target probability, x is the target sub - electricity consumption, y is the target electricity consumption difference, p(x) is the probability that the target sub - electricity consumption appears, and p(x) is equivalent to p(y) is the probability that the target electricity consumption difference appears, and p(x, y) is the probability that the target sub - electricity consumption and the target electricity consumption difference appear simultaneously;

[0052]

[0053] N is the number of electricity users, x (i)is the power consumption of the i-th target sub-usage, δ is the Parzen window, and h is the width of the Parzen window δ.

[0054] Furthermore, by selecting an appropriate Parzen window δ and its width h, when N approaches infinity, the approximate probability density function can converge to the true probability density function p(x).

[0055] The definition of the Parzen window δ is as follows:

[0056]

[0057] where z = x - x (i) , d is the dimension of the target sub-usage power consumption, and ε is the covariance of z. When d = 1, the Parzen window δ is equivalent to the estimation of the marginal density.

[0058] I(x, y) falls within the interval [0, 1]. The larger the value of I(x, y), the stronger the correlation between the target sub-usage power consumption and the difference in target power consumption.

[0059] Step 104: Input the target sub-usage power consumption of the same electricity user into the Isolation Forest, and output the second target probability of the electricity user tampering with the power consumption in the sub-meter.

[0060] Since the types of tampering behaviors of electricity users are uncertain, using correlation detection for tampering behaviors may result in the inability to identify tampering behaviors with randomly varying tampering amounts. If the power consumption of a certain type of electricity user with tampering behavior is random, this will cause the waveforms of the curves formed by the power consumption of such users to be various. That is, if the power consumption in n second periods within each first period (such as one day) is regarded as an n-dimensional vector, then the vectors generated by random power consumption must have different directions and be scattered; while the vectors of normal power consumption are more concentrated.

[0061] Therefore, in this embodiment, an Isolation Forest iForest can be pre-trained for electricity users, and this Isolation Forest is used to detect the probability of electricity users tampering with the power consumption in the electricity meter. Then, in this embodiment, outlier detection is performed on the target sub-usage power consumption of each electricity user using the Isolation Forest to determine the part with abnormal line loss.

[0062] Furthermore, there are many definitions of anomaly. In the Isolation Forest, an anomaly is defined as a more likely to be separated outlier, which can be understood as a point that is sparsely distributed and far from the group with high density. In the feature space, the sparsely distributed area indicates that the probability of an event occurring in this area is very low. Therefore, it can be considered that the data falling in these areas is abnormal. It can be seen that the power consumption conforms to this characteristic.

[0063] Isolation Forest is an unsupervised anomaly detection method applicable to continuous numerical data, that is, it does not require labeled samples for training, but the features need to be continuous. Regarding how to find out which points are easy to be isolated, in the Isolation Forest, the dataset is recursively and randomly split until all sample points are isolated. Under this random splitting strategy, outlier points usually have shorter paths. Intuitively speaking, those clusters with high density need to be cut many times to be isolated, but those points with low density can be easily isolated.

[0064] In the specific implementation, multiple sub-power consumptions read from the sub-meter of the same electricity user within multiple second periods (such as 1 hour) in the first period (such as 1 day) can be queried, and the multiple sub-power consumptions are used as multiple vectors to be input into the Isolation Forest. The second target probability of the electricity user tampering with the power consumption in the sub-meter is calculated through the following formula:

[0065]

[0066] c(n) = 2H(n - 1) - (2(n - 1) / n)

[0067] H(n - 1) = ln(n - 1) + τ

[0068] Where s(x, n) is the second target probability, x is the leaf node on the isolation tree in the Isolation Forest, n is the number of second periods, E(h(x)) is the expected value of the height h(x) of the leaf node x on multiple isolation trees in the Isolation Forest, c is the average path length of multiple isolation trees in the Isolation Forest, H is the harmonic number, and τ is the Euler constant (such as 0.577).

[0069] The basic principle of using the Isolation Forest for the target sub-power consumption of each electricity user is to cut the data space with a random hyperplane, divide it into two sub-spaces, and then cut the sub-spaces until there is only one data node in each sub-space. The resulting isolation tree has only one data node in each leaf node. The data density at the outlier points is very low, so it will quickly stop in a sub-space. Whether the data x is an outlier is judged according to the length of the height h(x) of the leaf node x to the root node. The Isolation Forest consists of multiple isolation trees. For a dataset containing n data points, the maximum height of the constructed isolation tree is n - 1, the minimum height is log(n), the maximum possible height of the path h(x) increases linearly with n, and the average possible height increases with log(n). According to the similarity between the isolation tree and the binary search tree, h(x) is normalized: the Isolation Forest performs outlier detection to determine the part where line loss anomalies occur.

[0070] The second probability s(x,n) is a monotonically decreasing function of the height h(x), and its value range is [0,1]. The closer s is to 1, the greater the possibility that the electricity consumption situation of the electricity user is abnormal.

[0071] Step 105: Calculate the target coefficient of the electricity user's tampering with the electricity consumption in the sub-meter according to the first target probability and the second target probability.

[0072] Mutual information and isolation forest are independent of each other. Mutual information and isolation forest each have their own advantages and disadvantages. If the first target probability or the second target probability is sorted separately, in fact, it is meaningless to sort the electricity users who have not committed tampering behavior.

[0073] In this embodiment, the mutually independent mutual information and isolation forest are combined, so that the first target probability and the second target probability are mapped to the target coefficient of the electricity user's tampering with the electricity consumption in the sub-meter. This target coefficient represents the amplitude of the electricity user's tampering with the electricity consumption in the sub-meter, thereby overcoming the deficiencies brought by using mutual information or isolation forest alone.

[0074] In an embodiment of the present invention, step 105 may include the following steps:

[0075] Step 1051: Determine the least squares support vector regression machine.

[0076] Step 1052: Input the first target probability and the second target probability into the least squares support vector regression machine for processing to output the target coefficient of the electricity user's tampering with the electricity consumption in the sub-meter.

[0077] Support vector machine (SVM, support vector machine) is an algorithm in the field of machine learning. The result obtained by using the support vector machine with kernel method is not inferior to that based on deep learning method. SVM is proposed for classification problems and can also solve regression problems, which is called support vector machine regression (SVR, Support Vector Regression). Least squares support vector machine (LSSVR, Least Squares Support Vector Regression) is a special form of support vector machine, which can convert the inequality constraint problem into an equality constraint problem.

[0078] In this embodiment, the least squares support vector regression machine can be pre-trained, and the combined detection of the fusion of mutual information and isolation forest is realized through the least squares support vector regression machine. That is, the first target probability and the second target probability are used as the input of the least squares support vector regression machine, and the least squares support vector regression machine processes the first target probability and the second target probability according to its structure, and outputs the target coefficient of the electricity user's tampering with the electricity consumption in the sub-meter.

[0079] In this embodiment, the least squares support vector regression machine can be trained in the following manner:

[0080] S1. Obtain the total sample power consumption and the sub-sample power consumption.

[0081] Among them, the total sample power consumption is the power consumption read from the main meter of the substation area, and the sub-sample power consumption is the non-tampered power consumption read from the sub-meters of each electricity user in the substation area.

[0082] Suppose there is electricity consumption data of i users in a certain substation area for j days. For the convenience of data processing, the sub-sample power consumption of each user can be normalized to obtain an i×j-dimensional matrix, which is the data source for subsequent training.

[0083] For the training data, the electricity users do not tamper with the electricity meters, that is, the sum of the sub-sample power consumption is equal to the total sample power consumption.

[0084] For both the total sample power consumption and the sub-sample power consumption, noise can be added to achieve data enhancement. Among them, adding noise modifies the total sample power consumption and the sub-sample power consumption according to a certain ratio.

[0085] S2. Simulate the behavior of tampering with the power consumption in the sub-meter and modify the sub-sample power consumption to obtain new sub-sample power consumption.

[0086] In a specific implementation, the behaviors of electricity users tampering with electricity meters in reality can be summarized to obtain various types of electricity theft. The sub-sample power consumption is modified according to the specifications of partial or all electricity theft behaviors, so as to simulate the behavior of tampering with the power consumption in the sub-meter and obtain new sub-sample power consumption.

[0087] Exemplarily, let the true sub-sample power consumption (i.e., the original sub-sample power consumption) be m i,t , and the tampered sub-sample power consumption (i.e., the new sub-sample power consumption) be Then, the types of electricity theft include at least one of the following:

[0088] Type 1:

[0089] Multiply the sub-sample power consumption by a first tampering coefficient as the new sub-sample power consumption.

[0090] In Type 1, m i,t and are in a proportional relationship, that is, where α is the first tampering coefficient, α is greater than 0 and less than 1, and is preferably a value randomly selected from (0.1, 0.8).

[0091] Type 2:

[0092] Take the maximum value between the sub-sample power consumption and the first cut-off point as the new sub-sample power consumption.

[0093] In type 2, where γ is the first cut-off point, and γ is less than the maximum value in the original sub-sample power consumption, that is, γ < maxm i,t .

[0094] Type 3:

[0095] Take the maximum value between the difference obtained by subtracting the second cut-off point from the sub-sample power consumption and the second cut-off point as the new sub-sample power consumption.

[0096] In type 3, where γ is the second cut-off point, and γ is less than the maximum value in the original sub-sample power consumption, that is, γ < maxm i,t .

[0097] Type 4:

[0098] Take the maximum value between the difference obtained by subtracting the third cut-off point from the sub-sample power consumption and 0 as the candidate value; take the minimum value between the candidate value and the fourth cut-off point as the new sub-sample power consumption.

[0099] In type 4, where γ 1 is the third cut-off point, γ 2 is the fourth cut-off point, γ 1 , γ 2 are both less than the maximum value in the original sub-sample power consumption, that is, γ 1 , γ 2 < maxm i,t .

[0100] Type 5:

[0101] Set and assign the sub-sample power consumption measured in part of the second period within the first period as the new sub-sample power consumption, and set the sub-sample power consumption measured in part of the second period within the first period to 0 and assign it as the new sub-sample power consumption.

[0102] In type 5, It is related to time t and fluctuates between 0 and m i,t , that is, where, if t ∈ (t 1 , t 2 ), then f(y) = 0, otherwise, f(t) = 1, and t 1 - t 2 is the second period (1 hour) randomly generated within the first period (1 day), and the number is generally less than 4 second periods (1 hour).

[0103] Type 6:

[0104] Set a second tampering coefficient for each second period within the first period, and multiply the measured sample sub - electricity consumption within each second period by the second tampering coefficient to obtain the new sample sub - electricity consumption.

[0105] In Type 6, m i,t is in a proportional relationship with and the proportional relationship changes with time y, that is, t where α t is the second tampering coefficient, α i,t is greater than 0 and less than 1, preferably a value randomly selected from (0.1, 0.8).

[0106] Type 7:

[0107] Set a third tampering coefficient for each second period within the first period; multiply the third tampering coefficient by the average value of the sample sub - electricity consumption respectively to obtain the new sample sub - electricity consumption.

[0108] In Type 7, m t is in a proportional relationship with the average value of and the proportional relationship changes with time t, that is, where α t is the third tampering coefficient, α (i) is greater than 0 and less than 1, preferably a value randomly selected from (0.1, 0.8).

[0109] As shown, in the coordinate system on the left, the vertical axis 0 represents the true sample sub - electricity consumption (i.e., the original sample sub - electricity consumption), 1 - 7 represents the sample sub - electricity consumption tampered according to the above tampering behavior (i.e., the new sample sub - electricity consumption), the horizontal axis represents the sample sub - electricity consumption within multiple second periods (0.5 hours) within the first period (1 day), and the sample sub - electricity consumption corresponds to the color blocks on the right, ranging from 0 - 16 kWh.

[0110] The color difference between the true sample sub - electricity consumption (i.e., the original sample sub - electricity consumption) and the tampered sample sub - electricity consumption (i.e., the new sample sub - electricity consumption) can reflect the severity of the tampering behavior.

[0111] For example, the second row represents the sample sub - electricity consumption tampered corresponding to electricity theft type 2, which is within the interval of the second period from 6 - 21. Since the true sample sub - electricity consumption has been greater than the first cut - off point, the tampered sample sub - electricity consumption within this time period remains at the size of the first cut - off point, and the color of the color block remains unchanged.

[0112] Of course, the above types of electricity theft are only examples. When implementing the embodiments of the present invention, other types of electricity theft can be set according to actual situations, and the embodiments of the present invention do not limit this. In addition, in addition to the above types of electricity theft, those skilled in the art can also adopt other types of electricity theft according to actual needs, and the embodiments of the present invention do not limit this either.

[0113] S3. Calculate the difference between the total electricity consumption of the samples and the electricity consumption of all sample sub - usages as the sample electricity consumption difference.

[0114] S4. Calculate the mutual information between the sample electricity consumption difference and the sample sub - electricity consumption as the first sample probability that the electricity user tampers with the electricity consumption in the sub - electricity meter.

[0115] In a specific implementation, the mutual information between the sample sub - electricity consumption and the sample electricity consumption difference can be calculated through the following formula as the first sample probability that the electricity user tampers with the electricity consumption in the sub - electricity meter:

[0116]

[0117] Among them, I(x, y) is the first sample probability, x is the sample sub - electricity consumption, y is the sample electricity consumption difference, p(x) is the probability that the sample sub - electricity consumption appears, and p(x) is equivalent to p(y) is the probability that the sample electricity consumption difference appears, and p(x, y) is the probability that the sample sub - electricity consumption and the sample electricity consumption difference appear simultaneously;

[0118]

[0119] N is the number of electricity users, x (i) is the electricity consumption of the i - th sample sub - usage, δ is the Pearson window, and h is the width of the Pearson window.

[0120] S5. Input the sample sub - electricity consumption of the same electricity user into the isolation forest and output the second sample probability that the electricity user tampers with the electricity consumption in the sub - electricity meter.

[0121] In a specific implementation, multiple sub - electricity consumptions read from the sub - electricity meter of the same electricity user in multiple second periods within the first period can be queried;

[0122] Take multiple sub - electricity consumptions as multiple vectors and input them into the isolation forest. Calculate the second sample probability s(x, n) that the electricity user tampers with the electricity consumption in the sub - electricity meter through the following formula:

[0123]

[0124] c(n) = 2H(n - 1)-(2(n - 1) / n)

[0125] H(n - 1) = ln(n - 1)+τ

[0126] Among them, s(x,n) is the second sample probability, x is the leaf node on the isolation tree in the isolation forest, n is the number of the second cycle, E(h(x)) is the expected value of the height h(x) of the leaf node x on multiple isolation trees in the isolation forest, c is the average path length of multiple isolation trees in the isolation forest, H is the harmonic number, and τ is the Euler constant.

[0127] In this embodiment, since the applications of S3, S4, and S5 are basically similar to those of step 102, step 103, and step 104, the description is relatively simple. For the relevant parts, refer to the descriptions of step 102, step 103, and step 104. The embodiments of the present invention will not be elaborated herein.

[0128] S6. Calculate the ratio between the tampering value and the electricity consumption of the untampered sample sub - user as the sample coefficient of the electricity consumption of the electricity user who tampers with the sub - electricity meter.

[0129] Among them, the tampering value is the difference between the electricity consumption of the untampered sample sub - user and the electricity consumption of the tampered sample sub - user.

[0130] For user i, the process of calculating the sample coefficient is expressed as follows:

[0131]

[0132] Among them, let the true sample sub - electricity consumption (i.e., the original sample sub - electricity consumption) of electricity user i be x i,t , and the tampered sample sub - electricity consumption (i.e., the new sample sub - electricity consumption) of electricity user i be

[0133] S7. Use the first sample probability and the second sample probability as samples and the sample coefficient as the label to train the least squares support vector regression machine.

[0134] In this embodiment, with the first sample probability and the second sample probability as samples and the sample coefficient as the label label, under the supervision of the label label, the parameters in the least squares support vector regression machine are trained.

[0135] For the training sample D = {(x 1 , y 1 ), (x 2 , y 2 ), …, (x m , y m )}, LSSVR can obtain a model in the form of , where is the kernel function, and w and b are parameters.

[0136] The description of LSSVR is:

[0137]

[0138] γ is the regularization parameter.

[0139] It is transformed into a dual problem by the method of Lagrange multipliers, and then the solution of the original problem is obtained by solving the dual problem. The dual problem is:

[0140]

[0141] Using the KKT conditions, the coordinate rotation method is used to solve the dual problem. Compared with the standard support vector machine, the least squares support vector machine transforms the inequality constraint into an equality constraint, which speeds up the calculation speed.

[0142] Step 106: Determine the electricity users with electricity consumption in the tampered sub-meter according to the target coefficient.

[0143] In this embodiment, the electricity users with electricity consumption in the tampered sub-meter can be screened with reference to the target coefficient, so as to perform an alarm operation on the electricity user.

[0144] In a specific implementation, the electricity users can be sorted in descending order according to the target coefficient to configure the order of the electricity users, and the electricity users with electricity consumption in the tampered sub-meter are screened in order.

[0145] Let the first target probability be pro 1 , and the second target probability be pro 2 , apply LSSVR to map the first target probability pro 1 and the second target probability pro 2 to the target coefficient, then the sorting process is expressed as rank(LSSVR(pro 1 , pro 2 ))

[0146] In the descending order sorting, the higher the order of the electricity user, the higher the target coefficient, and the more likely it is to screen the electricity consumption in the tampered sub-meter. Therefore, some conditions can be set to screen the electricity users who meet the conditions for electricity consumption in the tampered sub-meter. For example, the top k (k is a positive integer) or r (r is a positive integer)% of the electricity users with the highest order tamper with the electricity consumption in the sub-meter, or the top k or r%, and the electricity users with the target coefficient greater than the threshold tamper with the electricity consumption in the sub-meter, and so on.

[0147] In this embodiment, the power consumption is read from the main meter of the power distribution area as the target total power consumption, and the power consumption is read from the sub-meter of each electricity user in the power distribution area as the target sub-power consumption; the difference between the target total power consumption and all the target sub-power consumptions is calculated as the target power consumption difference; the mutual information between the target sub-power consumption and the target power consumption difference is calculated as the first target probability that the electricity user tampers with the power consumption in the sub-meter; the target sub-power consumption of the same electricity user is input into the isolation forest, and the second target probability that the electricity user tampers with the power consumption in the sub-meter is output; the target coefficient that the electricity user tampers with the power consumption in the sub-meter is calculated according to the first target probability and the second target probability; and the electricity user who tampers with the power consumption in the sub-meter is determined according to the target coefficient. By combining mutual information and isolation forest to detect the behavior of electricity users tampering with sub-meters, the deficiencies of a single method can be overcome, the accuracy of detecting the behavior of electricity users tampering with sub-meters is improved, and the mutual information and isolation forest use low-dimensional data, which is easy to obtain in practice and has high applicability, and can detect various different types of electricity theft behaviors.

[0148] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequences, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0149] Embodiment 2

[0150] Figure 3 The following is a structural block diagram of a tampering detection device for an electric meter provided in Embodiment 2 of the present invention, which specifically may include the following modules:

[0151] The electric meter reading module 301 is configured to read the power consumption from the main meter of the power distribution area as the target total power consumption, and read the power consumption from the sub-meter of each electricity user in the power distribution area as the target sub-power consumption;

[0152] The power consumption difference calculation module 302 is configured to calculate the difference between the target total power consumption and all the target sub-power consumptions as the target power consumption difference;

[0153] The first target probability calculation module 303 is configured to calculate the mutual information between the target sub-power consumption and the target power consumption difference as the first target probability that the electricity user tampers with the power consumption in the sub-meter;

[0154] The second target probability calculation module 304 is configured to input the target sub - electricity consumption of the same electricity user into the isolation forest and output the second target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter;

[0155] The target coefficient calculation module 305 is configured to calculate the target coefficient that the electricity user tampers with the electricity consumption in the sub - electricity meter according to the first target probability and the second target probability;

[0156] The electricity user detection module 306 is configured to determine the electricity user who tampers with the electricity consumption in the sub - electricity meter according to the target coefficient.

[0157] In an embodiment of the present invention, the first target probability calculation module 303 is further configured to:

[0158] Calculate the mutual information between the target sub - electricity consumption and the difference between the target electricity consumptions through the following formula as the first target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter:

[0159]

[0160] Wherein, I(x,y) is the first target probability, x is the target sub - electricity consumption, y is the difference between the target electricity consumptions, p(x) is the probability that the target sub - electricity consumption appears, and p(x) is equivalent to p(y) is the probability that the difference between the target electricity consumptions appears, and p(x,y) is the probability that the target sub - electricity consumption and the difference between the target electricity consumptions appear simultaneously;

[0161]

[0162] N is the number of electricity users, x (i) is the i - th target sub - electricity consumption, δ is the Pearson window, and h is the width of the Pearson window.

[0163] In an embodiment of the present invention, the second target probability calculation module 304 is further configured to:

[0164] Query multiple sub - electricity consumptions read from the sub - electricity meter of the same electricity user in multiple second periods within the first period;

[0165] Take the multiple sub - electricity consumptions as multiple vectors and input them into the isolation forest, and calculate the second target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter through the following formula:

[0166]

[0167] c(n) = 2H(n - 1)-(2(n - 1) / n)

[0168] H(n - 1) = ln(n - 1) + τ

[0169] Where s(x, n) is the second target probability, x is the leaf node on the isolation tree in the isolation forest, n is the number of the second period, E(h(x)) is the expected value of the height h(x) of the leaf node x on multiple isolation trees in the isolation forest, c is the average path length of multiple isolation trees in the isolation forest, H is the harmonic number, and τ is the Euler constant.

[0170] In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:

[0171] Determine a least squares support vector regression machine;

[0172] Input the first target probability and the second target probability into the least squares support vector regression machine for processing to output the target coefficient of the electricity user tampering with the electricity consumption in the sub - electricity meter.

[0173] In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:

[0174] Obtain the total sample electricity consumption and the sub - sample electricity consumption. The total sample electricity consumption is the electricity consumption read from the main electricity meter of the sub - station, and the sub - sample electricity consumption is the non - tampered electricity consumption read from the sub - electricity meters of each electricity user in the sub - station;

[0175] Simulate the behavior of tampering with the electricity consumption in the sub - electricity meter, modify the sub - sample electricity consumption, and obtain a new sub - sample electricity consumption;

[0176] Calculate the difference between the total sample electricity consumption and all the sub - sample electricity consumptions as the sample electricity consumption difference;

[0177] Calculate the mutual information between the sample electricity consumption difference and the sub - sample electricity consumption as the first sample probability of the electricity user tampering with the electricity consumption in the sub - electricity meter;

[0178] Input the sub - sample electricity consumption of the same electricity user into the isolation forest and output the second sample probability of the electricity user tampering with the electricity consumption in the sub - electricity meter;

[0179] Calculate the ratio between the tampering value and the non - tampered sub - sample electricity consumption as the sample coefficient of the electricity user tampering with the electricity consumption in the sub - electricity meter, where the tampering value is the difference between the non - tampered sub - sample electricity consumption and the tampered sub - sample electricity consumption;

[0180] Train the least squares support vector regression machine with the first sample probability and the second sample probability as samples and the sample coefficient as the label.

[0181] In one embodiment of the present invention, the target coefficient calculation module 305 is further configured to:

[0182] Multiply the sample sub - electricity consumption by a first tampering coefficient to obtain a new sample sub - electricity consumption;

[0183] And / or

[0184] Take the maximum value between the sample sub - electricity consumption and a first cut - off point as the new sample sub - electricity consumption;

[0185] And / or

[0186] Take the maximum value between the difference obtained by subtracting a second cut - off point from the sample sub - electricity consumption and the second cut - off point as the new sample sub - electricity consumption;

[0187] And / or

[0188] Take the maximum value between the difference obtained by subtracting a third cut - off point from the sample sub - electricity consumption and 0 as a candidate value;

[0189] Take the minimum value between the candidate value and a fourth cut - off point as the new sample sub - electricity consumption;

[0190] And / or

[0191] Set and assign the sample sub - electricity consumption measured in some second periods within the first period as the new sample sub - electricity consumption, and set and assign the sample sub - electricity consumption measured in some second periods within the first period to 0 and then as the new sample sub - electricity consumption;

[0192] And / or

[0193] Set a second tampering coefficient for each second period within the first period;

[0194] Multiply the sample sub - electricity consumption measured in each of the second periods by the second tampering coefficient as the new sample sub - electricity consumption;

[0195] And / or

[0196] Set a third tampering coefficient for each second period within the first period;

[0197] Multiply the third tampering coefficient by the average value of the sample sub - electricity consumption as the new sample sub - electricity consumption.

[0198] In one embodiment of the present invention, the target coefficient calculation module 305 is further configured to:

[0199] Calculate the mutual information between the sample sub-power consumption and the difference in the sample power consumption through the following formula, as the first sample probability that the electricity user tampers with the power consumption in the sub-meter:

[0200]

[0201] Among them, I(x,y) is the first sample probability, x is the sample sub-power consumption, y is the difference in the sample power consumption, p(x) is the probability that the sample sub-power consumption appears, and p(x) is equivalent to p(y) is the probability that the difference in the sample power consumption appears, and p(x,y) is the probability that the sample sub-power consumption and the difference in the sample power consumption appear simultaneously;

[0202]

[0203] N is the number of electricity users, x (i) is the i-th sample sub-power consumption, δ is the Pearson window, and h is the width of the Pearson window.

[0204] In an embodiment of the present invention, the target coefficient calculation module 305 is further configured to:

[0205] Query a plurality of sub-power consumptions read from the sub-meter of the same electricity user in a plurality of second periods within the first period;

[0206] Take the plurality of sub-power consumptions as a plurality of vectors and input them into the isolation forest, and calculate the second sample probability that the electricity user tampers with the power consumption in the sub-meter through the following formula:

[0207]

[0208] c(n) = 2H(n - 1) - (2(n - 1) / n)

[0209] H(n - 1) = ln(n - 1) + τ

[0210] Among them, s(x,n) is the second sample probability, x is the leaf node on the isolation tree in the isolation forest, n is the number of the second periods, E(h(x)) is the expected value of the height h(x) of the leaf node x on multiple isolation trees in the isolation forest, c is the average path length of multiple isolation trees in the isolation forest, H is the harmonic number, and τ is the Euler constant.

[0211] In an embodiment of the present invention, the electricity user detection module 306 is further configured to:

[0212] Sort the electricity users in descending order according to the target coefficient to configure an order for the electricity users;

[0213] Screen the electricity users who tamper with the electricity consumption in the sub - electricity meters in the said order.

[0214] The tampering detection device of the electricity meter provided by the embodiment of the present invention can execute the tampering detection method of the electricity meter provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0215] Embodiment III

[0216] Figure 4 It is a schematic structural diagram of a computer device provided by Embodiment III of the present invention. Figure 4 It shows a block diagram of an exemplary computer device 12 suitable for implementing the embodiments of the present invention. Figure 4 The shown computer device 12 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.

[0217] As Figure 4 shown, the computer device 12 is presented in the form of a general - purpose computing device. The components of the 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 connecting different system components (including the system memory 28 and the processing unit 16).

[0218] The bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the multiple bus structures. For example, these 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.

[0219] The computer device 12 typically includes a variety of computer system - readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non - volatile media, removable and non - removable media.

[0220] 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. The computer device 12 may further include other removable / non - removable, volatile / non - volatile computer system storage media. By way of example only, a storage system 34 can be used to read and write non - removable, non - volatile magnetic media ( Figure 4 not shown, commonly referred to as a "hard disk drive"). Although Figure 4Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) can be provided. In these cases, each drive can be connected to the bus 18 through one or more data medium interfaces. The memory 28 may include at least one program product having a set (such as at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0221] A program / utility 40 having a set (at least one) of program modules 42 can be stored, for example, in the memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. The program modules 42 generally perform the functions and / or methods in the embodiments described in the present invention.

[0222] The computer device 12 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), and can also communicate with one or more devices that enable a user to interact with the computer device 12, and / or communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 22. Moreover, the computer device 12 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the computer device 12 through the bus 18. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the 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, etc.

[0223] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the tamper detection method of the electric meter provided by the embodiments of the present invention.

[0224] Embodiment Four

[0225] Embodiment Four of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, it realizes each process of the above-mentioned tamper detection method of the electric meter and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0226] Among them, the computer-readable storage medium can, for example, include but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component.

[0227] Note that the above is only the preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, it can also include more other equivalent embodiments, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for detecting tampering of an electricity meter, characterized in that, it includes: Read the electricity consumption from the main electricity meter of the substation area as the target total electricity consumption, and read the electricity consumption from the sub - electricity meters of each electricity user in the substation area as the target sub - electricity consumption; Calculate the difference between the target total electricity consumption and all the target sub - electricity consumptions as the target electricity consumption difference; Calculate the mutual information between the target sub - electricity consumption and the target electricity consumption difference as the first target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; Input the target sub - electricity consumption of the same electricity user into an isolation forest and output the second target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; Calculate the target coefficient for the electricity user to tamper with the electricity consumption in the sub - electricity meter according to the first target probability and the second target probability; Determine the electricity user who tampers with the electricity consumption in the sub - electricity meter according to the target coefficient; Among them, the calculating the target coefficient for the electricity user to tamper with the electricity consumption in the sub - electricity meter according to the first target probability and the second target probability includes: Determine a least - squares support vector regression machine; Input the first target probability and the second target probability into the least - squares support vector regression machine for processing to output the target coefficient for the electricity user to tamper with the electricity consumption in the sub - electricity meter; The determining the least - squares support vector regression machine includes: Obtain the sample total electricity consumption and sample sub - electricity consumption. The sample total electricity consumption is the electricity consumption read from the main electricity meter of the substation area, and the sample sub - electricity consumption is the non - tampered electricity consumption read from the sub - electricity meters of each electricity user in the substation area; Simulate the behavior of tampering with the electricity consumption in the sub - electricity meter, modify the sample sub - electricity consumption to obtain new sample sub - electricity consumption; Calculate the difference between the sample total electricity consumption and all the sample sub - electricity consumptions as the sample electricity consumption difference; Calculate the mutual information between the sample electricity consumption difference and the sample sub - electricity consumption as the first sample probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; Input the sample sub - electricity consumption of the same electricity user into an isolation forest and output the second sample probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; Calculate the ratio of the tampering value to the non - tampered sample sub - electricity consumption as the sample coefficient for the electricity user to tamper with the electricity consumption in the sub - electricity meter. The tampering value is the difference between the non - tampered sample sub - electricity consumption and the tampered sample sub - electricity consumption; Use the first sample probability and the second sample probability as samples and the sample coefficient as the label to train the least - squares support vector regression machine.

2. The method according to claim 1, characterized in that, the calculating the mutual information between the target sub - electricity consumption and the target electricity consumption difference as the first target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter includes: Calculate the mutual information between the target sub - electricity consumption and the target electricity consumption difference through the following formula as the first target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter: Among them, I(x, y) is the first target probability, x is the target sub - electricity consumption, y is the target electricity consumption difference, p(x) is the probability of the occurrence of the target sub - electricity consumption, and p(x) is equivalent to p(y) is the probability of the occurrence of the target electricity consumption difference, and p(x, y) is the probability of the simultaneous occurrence of the target sub - electricity consumption and the target electricity consumption difference; N is the number of the electricity users, and x (i) is the i-th target sub-electricity consumption, δ is the Pearson window, and h is the width of the Pearson window.

3. The method according to claim 1, wherein, inputting the target sub - electricity consumption of the same electricity user into the Isolation Forest, and outputting a second target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter, includes: querying multiple sub - electricity consumptions read from the sub - electricity meter of the same electricity user in multiple second periods within a first period; taking the multiple sub - electricity consumptions as multiple vectors and inputting them into the Isolation Forest, and calculating the second target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter through the following formula: c(n) = 2H(n - 1)-(2(n - 1) / n) H(n - 1)=ln(n - 1)+τ where s(x,n) is the second target probability, x is the leaf node on the isolation tree in the Isolation Forest, n is the number of the second periods, E(h(x)) is the expected value of the height h(x) of the leaf node x on multiple isolation trees in the Isolation Forest, c is the average path length of multiple isolation trees in the Isolation Forest, H is the harmonic number, and τ is the Euler's constant.

4. The method according to claim 1, wherein, simulating the behavior of tampering with the electricity consumption in the sub - electricity meter, modifying the sample sub - electricity consumption, and obtaining a new sample sub - electricity consumption, includes: multiplying the sample sub - electricity consumption by a first tampering coefficient as the new sample sub - electricity consumption; and / or, taking the maximum value between the sample sub - electricity consumption and a first cut - off point as the new sample sub - electricity consumption; and / or, taking the maximum value between the difference obtained by subtracting a second cut - off point from the sample sub - electricity consumption and the second cut - off point as the new sample sub - electricity consumption; and / or, taking the maximum value between the difference obtained by subtracting a third cut - off point from the sample sub - electricity consumption and 0 as a candidate value; taking the minimum value between the candidate value and a fourth cut - off point as the new sample sub - electricity consumption; and / or, setting and assigning the sample sub - electricity consumption measured in some second periods within the first period as the new sample sub - electricity consumption, and setting and assigning the sample sub - electricity consumption measured in some second periods within the first period to 0 and then as the new sample sub - electricity consumption; and / or, setting a second tampering coefficient for each second period within the first period; multiplying the sample sub - electricity consumption measured in each second period by the second tampering coefficient as the new sample sub - electricity consumption; and / or, setting a third tampering coefficient for each second period within the first period; multiplying the third tampering coefficient by the average value of the sample sub - electricity consumption as the new sample sub - electricity consumption.

5. The method according to any one of claims 1 - 4, wherein, determining the electricity user who tampers with the electricity consumption in the sub - electricity meter according to the target coefficient, includes: sorting the electricity users in descending order according to the target coefficient to configure an order for the electricity users; screening the electricity users who tamper with the electricity consumption in the sub - electricity meter according to the order.

6. A tampering detection device for an electricity meter, wherein, comprising: An electricity meter reading module, configured to respectively read the electricity consumption from the main electricity meter of the substation area as the target total electricity consumption, and read the electricity consumption from the sub - electricity meters of each electricity user in the substation area as the target sub - electricity consumption; An electricity consumption difference calculation module, configured to calculate the difference between the target total electricity consumption and all the target sub - electricity consumptions as the target electricity consumption difference; A first target probability calculation module, configured to calculate the mutual information between the target sub - electricity consumption and the target electricity consumption difference as the first target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; A second target probability calculation module, configured to input the target sub - electricity consumption of the same electricity user into an isolation forest and output the second target probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; A target coefficient calculation module, configured to calculate the target coefficient that the electricity user tampers with the electricity consumption in the sub - electricity meter according to the first target probability and the second target probability; An electricity user detection module, configured to determine the electricity user who tampers with the electricity consumption in the sub - electricity meter according to the target coefficient; Wherein, the target coefficient calculation module is further configured to: Determine a least squares support vector regression machine; Input the first target probability and the second target probability into the least squares support vector regression machine for processing to output the target coefficient that the electricity user tampers with the electricity consumption in the sub - electricity meter; The target coefficient calculation module is further configured to: Obtain a sample total electricity consumption and sample sub - electricity consumptions. The sample total electricity consumption is the electricity consumption read from the main electricity meter of the substation area, and the sample sub - electricity consumptions are the non - tampered electricity consumptions read from the sub - electricity meters of each electricity user in the substation area; Simulate the behavior of tampering with the electricity consumption in the sub - electricity meter, modify the sample sub - electricity consumptions to obtain new sample sub - electricity consumptions; Calculate the difference between the sample total electricity consumption and all the sample sub - electricity consumptions as the sample electricity consumption difference; Calculate the mutual information between the sample electricity consumption difference and the sample sub - electricity consumptions as the first sample probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; Input the sample sub - electricity consumptions of the same electricity user into an isolation forest and output the second sample probability that the electricity user tampers with the electricity consumption in the sub - electricity meter; Calculate the ratio of the tampering value to the non - tampered sample sub - electricity consumption as the sample coefficient that the electricity user tampers with the electricity consumption in the sub - electricity meter, where the tampering value is the difference between the non - tampered sample sub - electricity consumption and the tampered sample sub - electricity consumption; Train the least squares support vector regression machine with the first sample probability and the second sample probability as samples and the sample coefficient as the label.

7. A computer device, Characterized in that, The computer device includes: One or more processors; A memory, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the electricity meter tampering detection method according to any one of claims 1 - 5.

8. A computer - readable storage medium, Characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the tampering detection method of the electricity meter described in any one of claims 1-5.

Citation Information

Patent Citations

  • A power consumption data anomaly detection model based on isolated forest algorithm

    CN108985632A

  • Electricity stealing detection method and device and computer readable storage medium

    CN113128596A