Disclosure of Invention
In view of this, embodiments of the present invention provide an electricity stealing user identification method and terminal device based on gaussian distribution, so as to solve the problems of low identification accuracy and efficiency of an electricity stealing user in the prior art.
The first aspect of the embodiment of the invention provides a power stealing user identification method based on Gaussian distribution, which comprises the following steps:
acquiring all users under a selected line, acquiring the daily power consumption of the users in a preset time period aiming at any user in all the users, and generating a user power matrix Pc;
Acquiring the line loss electric quantity of the selected line every day in the preset time period to obtain a linePath loss power consumption matrix Pl;
Aiming at any user in all the users, according to the user electric quantity matrix PcAcquiring the difference between the electricity consumption of the user on the i +1 th day and the electricity consumption of the user on the i th day in the preset time period to obtain a user fluctuation electricity quantity matrix delta PcWherein the preset time period comprises t days, i is more than or equal to 1 and less than or equal to t-1;
according to the line loss electric quantity matrix PlObtaining the difference between the line loss electric quantity of the selected line on the (i + 1) th day and the line loss electric quantity of the selected line on the i th day to obtain a line loss fluctuation electric quantity matrix delta Pl,1≤i≤t-1;
According to the user fluctuation electric quantity matrix delta PcAnd the line loss fluctuation electric quantity matrix delta PlConstructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity;
respectively calculating the average value of each row of the relation matrix R to obtain an average value matrix R of the relation matrix Rμ;
Respectively solving the standard deviation of each row of the relation matrix R to obtain a standard deviation matrix R of the relation matrix Rσ;
According to RμAnd RσConstructing an upper limit matrix U and a lower limit matrix L, wherein U ═ Rμ+kRσ,L=Rμ-kRσK is a first preset constant;
according to the user fluctuation electric quantity matrix delta PcConstructing a discrimination matrix P by the upper limit matrix U and the lower limit matrix L;
constructing a user evaluation matrix Q according to the discrimination matrix P;
and according to any element in the user evaluation matrix Q, if the value of the element is greater than a preset value, judging that the user corresponding to the element is a power stealing user.
A second aspect of embodiments of the present invention provides a computer-readable storage medium storing computer-readable instructions, which when executed by a processor implement the steps of:
acquiring all users under a selected line, acquiring the daily power consumption of the users in a preset time period aiming at any user in all the users, and generating a user power matrix Pc;
Obtaining the line loss electric quantity of the selected line every day in the preset time period to obtain a line loss electric quantity matrix Pl;
Aiming at any user in all the users, according to the user electric quantity matrix PcAcquiring the difference between the electricity consumption of the user on the i +1 th day and the electricity consumption of the user on the i th day in the preset time period to obtain a user fluctuation electricity quantity matrix delta PcWherein the preset time period comprises t days, i is more than or equal to 1 and less than or equal to t-1;
according to the line loss electric quantity matrix PlObtaining the difference between the line loss electric quantity of the selected line on the (i + 1) th day and the line loss electric quantity of the selected line on the i th day to obtain a line loss fluctuation electric quantity matrix delta Pl,1≤i≤t-1;
According to the user fluctuation electric quantity matrix delta PcAnd the line loss fluctuation electric quantity matrix delta PlConstructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity;
respectively calculating the average value of each row of the relation matrix R to obtain an average value matrix R of the relation matrix Ru;
Respectively solving the standard deviation of each row of the relation matrix R to obtain a standard deviation matrix R of the relation matrix Rσ;
According to RμAnd RσConstructing an upper limit matrix U and a lower limit matrix L, wherein U ═ Rμ+kRσ,L=Rμ-kRσK is a first preset constant;
according to the user fluctuation electric quantity matrix delta PcConstructing a discrimination matrix P by the upper limit matrix U and the lower limit matrix L;
constructing a user evaluation matrix Q according to the discrimination matrix P;
and according to any element in the user evaluation matrix Q, if the value of the element is greater than a preset value, judging that the user corresponding to the element is a power stealing user.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, where the processor executes the computer-readable instructions to implement the following steps:
acquiring all users under a selected line, acquiring the daily power consumption of the users in a preset time period aiming at any user in all the users, and generating a user power matrix Pc;
Obtaining the line loss electric quantity of the selected line every day in the preset time period to obtain a line loss electric quantity matrix Pl;
Aiming at any user in all the users, according to the user electric quantity matrix PcAcquiring the difference between the electricity consumption of the user on the i +1 th day and the electricity consumption of the user on the i th day in the preset time period to obtain a user fluctuation electricity quantity matrix delta PcWherein the preset time period comprises t days, i is more than or equal to 1 and less than or equal to t-1;
according to the line loss electric quantity matrix PlObtaining the difference between the line loss electric quantity of the selected line on the (i + 1) th day and the line loss electric quantity of the selected line on the i th day to obtain a line loss fluctuation electric quantity matrix delta Pl,1≤i≤t-1;
According to the user fluctuation electric quantity matrix delta PcAnd the line loss fluctuation electric quantity matrix delta PlConstructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity;
respectively calculating the average value of each row of the relation matrix R to obtain an average value matrix R of the relation matrix Ru;
Respectively solving the standard deviation of each row of the relation matrix R to obtain a standard deviation matrix R of the relation matrix Rσ;
According to RμAnd RσConstructing an upper limit matrix U and a lower limit matrix L, wherein U ═ Rμ+kRσ,L=Rμ-kRσK is a first preset constant;
according to the user fluctuation electric quantity matrix delta PcConstructing a discrimination matrix P by the upper limit matrix U and the lower limit matrix L;
constructing a user evaluation matrix Q according to the discrimination matrix P;
and according to any element in the user evaluation matrix Q, if the value of the element is greater than a preset value, judging that the user corresponding to the element is a power stealing user.
The invention provides a method for identifying electricity stealing users based on Gaussian distribution and terminal equipment, wherein a user electricity quantity matrix P is obtained by acquiring electricity consumption data of users of a selected line in a preset time periodcObtaining a line loss electric quantity matrix P according to the line loss of the selected line every day in a preset time periodlCalculating daily electric quantity fluctuation by adopting a slip mode for each row of data in the user electric quantity matrix, and constructing a user fluctuation electric quantity matrix delta Pc(ii) a Similarly, the line loss matrix is processed in the same way to obtain a line loss fluctuation electric quantity matrix delta Pl. According to Δ PcAnd Δ PlAnd constructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity, and calculating an average value matrix and a standard deviation matrix of the R according to a Lauda criterion. And according to the average value matrix and the standard deviation matrix of the R, an upper limit matrix and a lower limit matrix are constructed by setting a coefficient k, a judgment matrix is further constructed, a user evaluation matrix is obtained from the judgment matrix, and the electricity stealing users are identified by setting a reasonable evaluation coefficient. The invention realizes the screening of the users with abnormal electricity consumption based on the incidence relation between the line loss electricity quantity and the user electricity quantity, and improves the identification efficiency and the accuracy of electricity stealing users.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
The embodiment of the invention provides a power stealing user identification method based on Gaussian distribution. With reference to fig. 1, the method comprises:
s101, acquiring all users under a selected line, acquiring the daily electricity consumption of any user in the all users within a preset time period, and generating a user electricity quantity matrix Pc。
Specifically, in the embodiment of the present invention, all users in the selected line include m users, the preset time period includes t days, and the user electric quantity matrix P includescIs defined by the following equation:
wherein, PcijI is more than or equal to 1 and less than or equal to t, and j is more than or equal to 1 and less than or equal to m.
S102, obtaining the line loss electric quantity of the selected line every day in the preset time period, and obtaining a line loss electric quantity matrix Pl。
Specifically, the method comprises the following steps:
for the ith day in the preset time period, the selected line is powered by n power supplies, and if the power supply quantity of each power supply is PsiCalculating the line power supply P of said selected line on day i by the following formulaig:
If all the users under the selected line comprise m users, the electricity consumption of each user in the m users on the ith day is PcjCalculating the power consumption P of the selected line on the ith day by the following formulaiy:
Calculating the line loss electric quantity P of the selected line on the ith day through the following formulailWherein i is more than or equal to 1 and less than or equal to t:
Pil=Pig-Piy
then the line loss power matrix PlComprises the following steps:
Pl=[P1l,P2l,…P(t-1)l,Ptl]T
wherein, PilAnd i is more than or equal to 1 and less than or equal to t for the line power loss of the selected line on the ith day.
S103, aiming at any user in all users, according to the user electric quantity matrix PcAcquiring the difference between the electricity consumption of the user on the i +1 th day and the electricity consumption of the user on the i th day in the preset time period to obtain a user fluctuation electricity quantity matrix delta PcWherein the preset time period comprises t days, and i is more than or equal to 1 and less than or equal to t-1.
Specifically, in step S101, defining a user fluctuation electric quantity matrix delta P by the following formulac:
Wherein, Δ Pcij=Pc(i+1)j-Pcij,1≤i≤t-1,1≤j≤m。
S104, according to the line loss electric quantity matrix PlObtaining the difference between the line loss electric quantity of the selected line on the (i + 1) th day and the line loss electric quantity of the selected line on the i th day to obtain a line loss fluctuation electric quantity matrix delta Pl。
Specifically, on the basis of step S102, the line loss fluctuation electric quantity matrix Δ P is defined by the following formulal:
ΔPl=[ΔP1l,ΔP2l,…ΔP(t-1)l]T
Wherein, Δ Pil=P(i+1)l-Pil,1≤i≤t-1。
S105, according to the user fluctuation electric quantity matrix delta PcAnd the line loss fluctuation electric quantity matrix delta PlAnd constructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity.
Specifically, on the basis of steps S101 to S104, the relationship matrix R is defined by the following formula:
R=ΔPc-ΔPlI
wherein I is an identity matrix of the order of t-1.
S106, respectively obtaining the average value of each row of the relation matrix R to obtain an average value matrix R of the relation matrix Rμ。
Specifically, the method comprises the following steps:
Rμ=[R1μ,R2μ,…R(t-1)μ]T
wherein the content of the first and second substances,
s107, respectively obtaining the standard deviation of each row of the relation matrix R to obtain the standard deviation matrix R of the relation matrix Rσ。
Specifically, the method comprises the following steps:
Rσ=[R1σ,R2σ,…R(t-1)σ]T
wherein the content of the first and second substances,
s108, according to RμAnd RσConstructing an upper limit matrix U and a lower limit matrix L, wherein U ═ Rμ+kRσ,L=Rμ-kRσAnd k is a first preset constant.
Gaussian distribution (Gaussian distribution), also known as Normal distribution (Normal distribution), is a very important probability distribution in the fields of mathematics, physics, engineering, etc., and has a significant influence on many aspects of statistics. If the random variable obeys a probability distribution of a position parameter and a scale parameter, the probability distribution is recorded as: the probability density function is that the mathematical expected value or the expected value of the normal distribution is equal to the position parameter, and the position of the distribution is determined; the square of the square or standard deviation of its variance is equal to the scale parameter, determining the magnitude of the distribution. The probability density function curve of a normal distribution is bell-shaped.
Expression of gaussian distribution:
where μ is the mean and σ is the standard deviation.
The following table shows the corresponding areas of the different horizontal axis intervals under the normal curve.
Interval of horizontal axis
|
Area of
|
(μ-σ,μ+σ)
|
68.27%
|
(μ-1.96σ,μ+1.96σ)
|
95.00%
|
(μ-2σ,μ+2σ)
|
95.44%
|
(μ-2.58σ,μ+2.58σ)
|
99.00%
|
(μ-3σ,μ+3σ)
|
99.73% |
According to the central limit theorem, the distribution of a large number of samples is close to Gaussian distribution, so that an abnormal threshold value can be set through the method, abnormal power utilization users are judged, and the work of preventing electricity stealing is supported.
According to the above principle, in the embodiment of the present invention, the first predetermined constant k is preset according to RμAnd RσConstructing an upper limit matrix U and a lower limit matrix L, wherein U ═ Rμ+kRσ,L=Rμ-kRσ。
Optionally, k is 3.
S109, according to the user fluctuation electric quantity matrix delta PcAnd constructing a discrimination matrix P by the upper limit matrix U and the lower limit matrix L.
Specifically, the discrimination matrix P is defined by the following formula:
wherein:
s1010, constructing a user evaluation matrix Q according to the discrimination matrix P.
Specifically, for any column element of the discrimination matrix P, the sum of all elements in the column is obtained to obtain a user evaluation matrix Q ═ Q
1,Q
2,…Q
m]Wherein, in the step (A),
and S1011, according to any element in the user evaluation matrix Q, if the value of the element is greater than a preset value, judging that the user corresponding to the element is a power stealing user.
Specifically, a second predetermined constant, i.e., the evaluation coefficient e, is preset, if QjIf > et, the element Q is judgedjThe corresponding user j is a power stealing user.
Optionally, e is 0.5.
Further, in order to quantify the suspicion of electricity stealing of the user, after the electricity stealing user under the selected line is obtained in step S1011, the method provided in the embodiment of the present invention further includes:
obtaining all electricity stealing users under the selected line, and calculating electricity stealing index I of each electricity stealing user in turn by the following formulaj:
And sorting the electricity stealing indexes of all the electricity stealing users in a descending order.
The higher the electricity stealing index of the user is, the greater the suspicion of electricity stealing of the user is, and the electricity stealing indexes of all the electricity stealing users are sorted in descending order and used as the basis for the power grid staff to check and confirm the electricity stealing users.
Further, embodiments of the present invention provide the following examples:
the power consumption of all users and the daily line power supply for 5 consecutive days under a selected line are shown in the following table:
|
1 day
|
2 days
|
3 days
|
4 days
|
For 5 days
|
User 1
|
408
|
391
|
381
|
393
|
380
|
User 2
|
402
|
404
|
382
|
408
|
400
|
User 3
|
408
|
380
|
415
|
417
|
405
|
User 4
|
398
|
406
|
388
|
387
|
411
|
User 5
|
800
|
905
|
1003
|
798
|
705
|
User 6
|
388
|
412
|
401
|
397
|
406
|
User 7
|
383
|
382
|
403
|
404
|
416
|
User 8
|
393
|
403
|
404
|
409
|
389
|
User 9
|
418
|
406
|
380
|
406
|
418
|
User 10
|
100
|
90
|
80
|
100
|
110
|
User 11
|
420
|
399
|
403
|
392
|
404
|
User 12
|
392
|
410
|
395
|
417
|
415
|
User 13
|
380
|
419
|
391
|
391
|
384
|
User 14
|
403
|
419
|
407
|
380
|
380
|
User 15
|
404
|
408
|
418
|
416
|
383
|
User 16
|
393
|
406
|
392
|
381
|
409
|
Subscriber 17
|
393
|
402
|
385
|
414
|
380
|
User 18
|
399
|
396
|
390
|
382
|
410
|
User 19
|
411
|
395
|
387
|
417
|
412
|
User 20
|
384
|
399
|
390
|
393
|
402
|
Amount of power supply
|
8477
|
8732
|
8795
|
8502
|
8319 |
Then the user power matrix PcComprises the following steps:
then the line loss power matrix PlComprises the following steps:
Pl=[400,500,600,400,300]T
then the user fluctuates the electric quantity matrix delta PcComprises the following steps:
then the line loss fluctuates by an amount of power matrix Δ PlComprises the following steps:
ΔPl=[100,100,-200,-100]T
the relationship matrix R is then:
then the average matrix R of RμComprises the following steps:
Rμ=[-92.25,-101.85,195.35,95.85]T
then the standard deviation matrix R of RσComprises the following steps:
Rσ=[27.5534,27.3336,48.3780,26.6857]T
setting a threshold coefficient, namely a first preset constant k is 3, obtaining an upper limit matrix U and a lower limit matrix L:
U=Rμ+kRσ=[-9.5899,-19.8491,340.4839,175.9072]T
L=Rμ-kRσ=[-174.9101,-183.8509,50.2161,15.7929]T
according to the user fluctuation electric quantity matrix delta PcAnd constructing a discrimination matrix P by the upper limit matrix U and the lower limit matrix L:
obtaining an evaluation matrix Q of the user:
Q=[0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
assuming a second predetermined constant, i.e. the evaluation factor e is 0.5, Q is equal to 5 since t5And if the current situation is more than et, the user 5 is deemed to be suspected of electricity stealing.
The invention provides a method for identifying electricity stealing users based on Gaussian distribution, which obtains a user electricity quantity matrix P by acquiring electricity consumption data of users of a selected line in a preset time periodcObtaining a line loss electric quantity matrix P according to the line loss of the selected line every day in a preset time periodlCalculating daily electric quantity fluctuation by adopting a slip mode for each row of data in the user electric quantity matrix, and constructing a user fluctuation electric quantity matrix delta Pc(ii) a Similarly, the line loss matrix is processed in the same way to obtain the line loss waveDynamic electricity quantity matrix delta Pl. According to Δ PcAnd Δ PlAnd constructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity, and calculating an average value matrix and a standard deviation matrix of the R according to a Lauda criterion. And according to the average value matrix and the standard deviation matrix of the R, an upper limit matrix and a lower limit matrix are constructed by setting a coefficient k, a judgment matrix is further constructed, a user evaluation matrix is obtained from the judgment matrix, and the electricity stealing users are identified by setting a reasonable evaluation coefficient. The invention realizes the screening of the users with abnormal electricity consumption based on the incidence relation between the line loss electricity quantity and the user electricity quantity, and improves the identification efficiency and the accuracy of electricity stealing users.
Fig. 2 is a schematic diagram of a device for identifying a power stealing subscriber based on gaussian distribution according to an embodiment of the present invention, and with reference to fig. 2, the device includes: a user power matrix generating unit 21, a line loss power matrix generating unit 22, a user fluctuation power matrix generating unit 23, a line loss fluctuation power matrix generating unit 24, a relation matrix generating unit 25, an average value matrix generating unit 26, a standard deviation matrix generating unit 27, an upper limit matrix and lower limit matrix generating unit 28, a discrimination matrix generating unit 29, a user evaluation matrix generating unit 210 and an electricity stealing user identifying unit 211;
the user electricity quantity matrix generating unit 21 is configured to obtain all users on a selected line, obtain, for any user among the all users, a daily electricity consumption of the user in a preset time period, and generate a user electricity quantity matrix Pc;
The line loss electric quantity matrix generating unit 22 is configured to obtain the line loss electric quantity of the selected line every day in the preset time period, and obtain a line loss electric quantity matrix Pl;
The user fluctuation electric quantity matrix generating unit 23 is configured to generate, for any user of all users, the user electric quantity matrix P according to the user electric quantity matrix PcAcquiring the difference between the electricity consumption of the user on the i +1 th day and the electricity consumption of the user on the i th day in the preset time period to obtain a user fluctuation electricity quantity matrix delta PcWherein the preset time period comprises t days, i is more than or equal to 1 and less than or equal to t-1;
the line loss fluctuation electric quantity matrix generation unit 24 is configured to generate the line loss electric quantity matrix P according to the line loss electric quantity matrix PlObtaining the difference between the line loss electric quantity of the selected line on the (i + 1) th day and the line loss electric quantity of the selected line on the i th day to obtain a line loss fluctuation electric quantity matrix delta Pl;
The relation matrix generating unit 25 is configured to generate a relation matrix Δ P according to the user fluctuation electric quantity matrix Δ PcAnd the line loss fluctuation electric quantity matrix delta PlConstructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity;
the average matrix generating unit 26 is configured to respectively obtain an average value of each row of the relationship matrix R to obtain an average matrix R of the relationship matrix Rμ;
The standard deviation matrix generating unit 27 is configured to separately obtain the standard deviation of each row of the relationship matrix R to obtain the standard deviation matrix R of the relationship matrix Rσ;
The upper limit matrix and lower limit matrix generation unit 28 is used for generating the upper limit matrix and the lower limit matrix according to RμAnd RσConstructing an upper limit matrix U and a lower limit matrix L, wherein U ═ Rμ+kRσ,L=Rμ-kRσK is a first preset constant;
the decision matrix generating unit 29 is configured to generate a user fluctuation electric quantity matrix Δ P according to the user fluctuation electric quantity matrix Δ PcConstructing a discrimination matrix P by the upper limit matrix U and the lower limit matrix L;
the user evaluation matrix generating unit 210 is configured to construct a user evaluation matrix Q according to the decision matrix P;
the electricity stealing subscriber identifying unit 211 is configured to determine, according to any element in the subscriber evaluation matrix Q, that the subscriber corresponding to the element is an electricity stealing subscriber if the value of the element is greater than a preset value.
Specifically, the user electricity quantity matrix PcComprises the following steps:
wherein, all users under the selected line comprise m users, and the preset time period comprises t days, PcijI is more than or equal to 1 and less than or equal to t, and j is more than or equal to 1 and less than or equal to m for the electricity consumption of the user j in the ith day;
then the user fluctuation electric quantity matrix delta P is obtainedcComprises the following steps:
wherein, Δ Pcij=Pc(i+1)j-Pcij,1≤i≤t-1,1≤j≤m。
Specifically, the line loss power matrix generating unit 22 is configured to:
for the ith day in the preset time period, the selected line is powered by n power supplies, and if the power supply quantity of each power supply is PsjCalculating the line power supply P of said selected line on day i by the following formulaig:
If all the users under the selected line comprise m users, the electricity consumption of each user in the m users on the ith day is PcjCalculating the power consumption P of the selected line on the ith day by the following formulaiy:
Calculating the line loss electric quantity P of the selected line on the ith day through the following formulailWherein i is more than or equal to 1 and less than or equal to t:
Pil=Pig-Piy
then the line loss power matrix PlComprises the following steps:
Pl=[P1l,P2l,…P(t-1)l,Ptl]T
wherein, PilI is more than or equal to 1 and less than or equal to t for the line power loss of the selected line on the ith day;
specifically, the line loss fluctuation electric quantity matrix generating unit 24 is configured to:
ΔPl=[ΔP1l,ΔP2l,…ΔP(t-1)l]T
wherein, Δ Pil=P(i+1)l-Pil,1≤i≤t-1。
Specifically, the relationship matrix generating unit 25 is configured to:
R=ΔPc-ΔPlI
wherein I is a t-1 order identity matrix;
the average matrix generation unit 26 is configured to:
respectively calculating the average value of each row of the relation matrix R to obtain an average value matrix R of the relation matrix RuThe method comprises the following steps:
Rμ=[R1μ,R2μ,…R(t-1)μ]T
wherein the content of the first and second substances,
the standard deviation matrix generating unit 27 is configured to:
respectively solving the standard deviation of each row of the relation matrix R to obtain a standard deviation matrix R of the relation matrix RσThe method comprises the following steps:
Rσ=[R1σ,R2σ,…R(t-1)σ]T
wherein the content of the first and second substances,
specifically, the decision matrix generating unit 29 is configured to:
wherein:
the user evaluation matrix generation unit 210 is configured to:
for any column element of the discrimination matrix P, the sum of all elements in the column is obtained to obtain a user evaluation matrix Q ═ Q
1,Q
2,…Q
m]Wherein, in the step (A),
specifically, the electricity stealing subscriber identifying unit 211 is configured to:
if QjIf > et, the element Q is judgedjThe corresponding user j is a power stealing user, wherein e is a second preset constant.
Specifically, the electricity stealing subscriber identifying unit 211 is further configured to:
obtaining all electricity stealing users under the selected line, and calculating electricity stealing index I of each electricity stealing user in turn by the following formulaj:
And sorting the electricity stealing indexes of all the electricity stealing users in a descending order.
Optionally, the first preset constant k is 3, and the second preset constant e is 0.5.
The invention provides a device for identifying electricity stealing users based on Gaussian distribution, which obtains a user electricity quantity matrix P by acquiring electricity consumption data of users of a selected line in a preset time periodcObtaining a line loss electric quantity matrix P according to the line loss of the selected line every day in a preset time periodlCalculating daily electric quantity fluctuation by adopting a slip mode for each row of data in the user electric quantity matrix, and constructing the user fluctuation electric quantity matrixArray Δ Pc(ii) a Similarly, the line loss matrix is processed in the same way to obtain a line loss fluctuation electric quantity matrix delta Pl. According to Δ PcAnd Δ PlAnd constructing a relation matrix R of the user fluctuation electric quantity and the line loss fluctuation electric quantity, and calculating an average value matrix and a standard deviation matrix of the R according to a Lauda criterion. And according to the average value matrix and the standard deviation matrix of the R, an upper limit matrix and a lower limit matrix are constructed by setting a coefficient k, a judgment matrix is further constructed, a user evaluation matrix is obtained from the judgment matrix, and the electricity stealing users are identified by setting a reasonable evaluation coefficient. The invention realizes the screening of the users with abnormal electricity consumption based on the incidence relation between the line loss electricity quantity and the user electricity quantity, and improves the identification efficiency and the accuracy of electricity stealing users.
Fig. 3 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 3, the terminal device 3 of this embodiment includes: a processor 30, a memory 31 and a computer program 32 stored in said memory 31 and executable on said processor 30, such as a electricity stealing user identification program based on a gaussian distribution. The processor 30, when executing the computer program 32, implements the steps in the above-described respective embodiments of the gaussian-distribution-based electricity stealing user identification method, such as the steps 101 to 1011 shown in fig. 1. Alternatively, the processor 30, when executing the computer program 32, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 21 to 211 shown in fig. 2.
Illustratively, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 32 in the terminal device 3.
The terminal device 3 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 30, a memory 31. It will be understood by those skilled in the art that fig. 3 is only an example of the terminal device 3, and does not constitute a limitation to the terminal device 3, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may also include an input-output device, a network access device, a bus, etc.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or a memory of the terminal device 3. The memory 31 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 31 is used for storing the computer program and other programs and data required by the terminal device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the electricity stealing user identification method based on gaussian distribution according to any of the above embodiments are implemented.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.