Meter code data processing method and device and storage medium
By establishing and processing the daily frozen table code data set and daily electricity consumption data set of user table code data, filling in missing data and correcting duplicate data, the problem of line loss rate calculation error caused by the low quality of user table code data is solved, and the accuracy of daily line loss analysis is improved.
Patent Information
- Application Number
- CN202411820515.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, there are a large number of false alarms and missed reports in user table code data, resulting in excessive error in line loss rate calculation and low accuracy of daily loss analysis.
By establishing a daily frozen table code data group and daily electricity consumption data group, filling in the missing table code and missing electricity, correcting the daily electricity of the repeated table code, and then conducting line loss analysis to improve the accuracy of the analysis.
The impact of missing table codes and repeated table codes on line loss analysis is reduced, the accuracy of line loss analysis is improved, and the occurrence of false alarms and missed alarms is reduced.
Smart Images

Figure CN119646404A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of power metering, and in particular to a table code data processing method, device and storage medium. Background Art
[0002] For low-voltage substations or feeders, under the conditions of correct topology, correct metering, and no electricity theft by users, the line loss rate is relatively stable from the long-term data, and its change is mainly caused by the fluctuation of load distribution, so it is relatively gentle; while the electricity theft by users will cause drastic changes in the line loss rate. Based on this principle, the analysis of abnormal electricity consumption behavior of users based on line loss data (i.e. long-term data of user electricity consumption and total meter electricity consumption) can locate electricity theft users.
[0003] The essence of daily line loss analysis is to match the line loss rate sequence and line loss power sequence with the user power sequence (or some transformation results such as differential sequence). There are many ways to achieve matching, and feature point matching and correlation matching are two commonly used matching methods. Both theoretical analysis and simulation data testing have proved that daily line loss analysis is effective and has the advantages of low cost and high accuracy. However, since user power data generally has a large number of false positives and false negatives, the data quality is low, the line loss rate calculation error is too large, and the implementation effect of daily line loss analysis is poor. Summary of the invention
[0004] The present invention provides a table code data processing method, device and storage medium, so as to reduce the influence of missing table codes and repeated table codes on line loss analysis and improve the accuracy of line loss analysis.
[0005] In a first aspect, an embodiment of the present invention provides a table code data processing method, the method comprising:
[0006] Establish a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data;
[0007] Filling the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group;
[0008] Filtering the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, calculating the total daily power consumption of the repeated table code day in the daily power consumption data group, and modifying the daily power consumption of the repeated table code day in the daily power consumption data group according to the total daily power consumption of the repeated table code day;
[0009] Line loss analysis is performed on the processed daily power consumption data group.
[0010] Further, the filling of the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group includes:
[0011] Obtaining a table code difference between a table code of a previous day and a table code of a next day corresponding to a missing table code in the daily frozen table code data group;
[0012] If the table code difference is 0, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to the first filling preset rule;
[0013] If the table code difference is less than the first gap threshold, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to a second filling preset rule;
[0014] If the table code difference is greater than or equal to the first gap threshold, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group will not be filled, and the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group will be marked.
[0015] Furthermore, if the table code difference is 0, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to a first filling preset rule, including:
[0016] If the table code difference is 0, the missing electricity in the daily electricity consumption data group is filled with 0, and the missing table code in the daily frozen table code data group is filled with the table code of the previous day or the table code of the next day corresponding to the missing table code in the daily frozen table code data group.
[0017] Furthermore, if the table code difference is less than the first gap threshold, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to a second filling preset rule, including:
[0018] If the table code difference is less than the first gap threshold, obtaining the number of missing days of the missing table code in the daily frozen table code data group, and calculating the average daily power consumption of the missing days;
[0019] The missing electricity in the daily electricity consumption data group is filled with the average daily electricity of the missing days, and the missing table code in the daily frozen table code data group is filled according to the filling result of the missing electricity in the daily electricity consumption data group.
[0020] Further, the calculating the total daily power consumption of the repeated table code day in the daily power consumption data group, and modifying the daily power consumption of the repeated table code day in the daily power consumption data group according to the total daily power consumption of the repeated table code day, includes:
[0021] Calculating the total daily electricity consumption of the repeated table code day in the daily electricity consumption data group;
[0022] If the total daily power consumption of the repeating table code day is less than the first power threshold, the average daily power consumption of the repeating table code day is calculated according to the total daily power consumption of the repeating table code day, and the average daily power consumption of the repeating table code day is used as the daily power consumption of the repeating table code day in the daily power consumption data group;
[0023] If the total daily power consumption of the repeated table code day is greater than or equal to the first power threshold, the daily power consumption of the repeated table code day in the daily power consumption data group is marked.
[0024] Furthermore, the performing line loss analysis on the processed daily power consumption data group includes:
[0025] Determining whether there is marked data in the daily power consumption data group;
[0026] If not present, performing daily line loss analysis on the daily power consumption data group;
[0027] If yes, and if the number of marked data in the daily power consumption data group is less than the marking threshold, then performing dynamic granular line loss analysis on the daily power consumption data group;
[0028] If so, and if the number of marked data in the daily power consumption data group is greater than or equal to the marking threshold, the line loss analysis of the daily power consumption data group is abandoned.
[0029] Furthermore, the dynamic granular line loss analysis is performed on the daily power consumption data group, including:
[0030] Determine whether the daily power consumption data group can be equally divided into a first preset number of data segments, and each of the data segments contains k days of daily power consumption, and the table codes corresponding to the first daily power consumption and the last daily power consumption in each of the data segments exist;
[0031] If yes, the daily power consumption data group is equally divided into the first preset number of data segments, the average power consumption of each user in each data segment is calculated to obtain a first line loss analysis data group, and daily line loss analysis is performed on the first line loss analysis data group;
[0032] If not, the daily electricity consumption data group is divided into a second preset number of unequal data segments, and the table codes corresponding to the first daily electricity consumption and the last daily electricity consumption in each of the unequal data segments exist; the average electricity consumption of each user in each of the unequal data segments is calculated to obtain a second line loss analysis data group, and daily line loss analysis is performed on the second line loss analysis data group.
[0033] Optionally, the step of establishing a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data includes:
[0034] Establishing the daily frozen table code data group according to the acquired user table code data, and establishing the daily power consumption data group according to the acquired user table code data;
[0035] Among them, the user table code data includes M users and N days of data, the daily frozen table code data group is an array B of M+1 rows and N+1 columns, and the daily electricity consumption data group is an array W of M+1 rows and N columns; the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are both marked as nan.
[0036] In a second aspect, an embodiment of the present invention further provides a table code data processing device, the table code data processing device is used to execute the table code data processing method described in any embodiment of the present invention, the device comprising:
[0037] A data preprocessing module, used to establish a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data;
[0038] A missing data filling module, used to fill the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group;
[0039] a repeated data correction module, used for screening repeated table codes and corresponding repeated table code days in the daily frozen table code data group, calculating the total daily power consumption of the repeated table code day in the daily power consumption data group, and modifying the daily power consumption of the repeated table code day in the daily power consumption data group according to the total daily power consumption of the repeated table code day;
[0040] The line loss analysis module is used to perform line loss analysis on the processed daily power consumption data group.
[0041] In a third aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the table code data processing method as described in any embodiment of the present invention.
[0042] The present invention provides a table code data processing method, device and storage medium, which establish a daily frozen table code data group and a daily electricity consumption data group according to acquired user table code data; fill in the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group, so as to avoid the influence of the missing table codes in the frozen table code data group and the missing electricity in the daily electricity consumption data group on line loss analysis; screen the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, calculate the total daily electricity consumption of the repeated table code days in the daily electricity consumption data group, modify the daily electricity consumption of the repeated table code days in the daily electricity consumption data group according to the total daily electricity consumption of the repeated table code days, so as to avoid the influence of the daily electricity consumption of the repeated table code days in the daily electricity consumption data group on line loss analysis; perform line loss analysis on the processed daily electricity consumption data group, so as to reduce the influence of the missing table codes and the repeated table codes on the line loss analysis and improve the accuracy of the line loss analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 The present invention provides a flowchart of a table code data processing method according to an embodiment of the present invention.
[0044] Figure 2 A flowchart of a method for filling missing table codes and missing power provided in an embodiment of the present invention.
[0045] Figure 3 The figure is a flowchart of another table code data processing method in an embodiment of the present invention.
[0046] Figure 4 Schematic diagram of the structure of a table code data processing device in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0048] At present, the user meter code data obtained generally has a large number of false alarms and omissions, resulting in low data quality and excessive errors in line loss rate calculation. The false alarm and omission problems usually include: 1) Missing user daily electricity due to meter reading failure. Failure to read the frozen meter code (zero-point meter code) on a certain day will result in the inability to calculate the daily electricity of the previous and next days. Similarly, if the frozen meter code fails to read the meter for n consecutive days, the daily electricity of the n+1 day cannot be calculated. If the total electricity of these n+1 days is very low, the total electricity can be evenly distributed to n+1 days without significantly affecting the accuracy of line loss analysis. However, this situation is rare, and the general missing daily electricity of users will significantly affect the accuracy of line loss analysis. 2) User daily electricity data errors caused by meter reading errors. Due to the inconsistency between the concentrator and the meter clock, the meter code read by the concentrator is not the meter code of the day, that is, in two consecutive days, one day's meter code is read and copied twice, while the other day's meter code is not read and copied. This will result in the electricity calculation result that one of the two consecutive days has a power of 0, and the other day is the sum of the power of two days. If the total electricity consumption in these two days is very low, the total electricity consumption can be evenly distributed to the two days without significantly affecting the accuracy of line loss analysis. However, this situation is rare, and general meter reading errors will significantly affect the accuracy of line loss analysis.
[0049] The purpose of this method is to provide a table code data processing method that can be applied to line loss analysis to deal with the above two data quality problems. The daily electricity data processed by this method can be used to perform line loss analysis of feature point matching or correlation matching schemes.
[0050] In order to solve the problems in the prior art, an embodiment of the present invention provides a table code data processing method, which is applicable to line loss analysis, thereby solving the above two data quality problems and reducing the problem of excessive error in line loss rate calculation. The power data processed by this method can be used to perform line loss analysis of feature point matching or correlation matching schemes. The method can be executed by a table code data processing device, which can be implemented in the form of hardware and / or software. Figure 1 A flowchart of a table code data processing method provided by an embodiment of the present invention, such as Figure 1 As shown, the table code data processing method includes:
[0051] S110: Establish a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data.
[0052] The acquired user meter code data includes the user's electric meter code data, the electric meter code is a number displayed in a row of windows on the electric meter dial, indicating the user's cumulative power consumption, and the user's daily power consumption is the difference between the meter codes of two consecutive days, indicating the user's daily power consumption. Optionally, the user meter code data can be obtained by freezing the meter code at zero o'clock every day.
[0053] Specifically, the user table code data includes table code data for multiple days corresponding to multiple users. The daily frozen table code data group and the daily power consumption data group are established through the acquired user table code data. The daily frozen table code data group can be established according to the number of users and the table code data for N days, and the daily power consumption data group can be established according to the number of users and the daily power consumption of the users. For example, assuming that there are M users and table code data for N days, the daily frozen table code data group is established with an M+1 row and N+1 column array B, and the daily power consumption data group is established with an M+1 row and N column array W. Optionally, the missing table code\power in the daily frozen table code data group and the daily power consumption data group is recorded as nan, and the repeated table code and the erroneous power caused by it will not be explicitly reflected in the array.
[0054] S120, filling in the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group.
[0055] Specifically, when one or more adjacent missing table codes appear in the daily frozen table code data group, how to fill in is determined according to the size of the table codes of the dates before and after the one or more adjacent missing table codes. For example, when the size of the table codes of the dates before and after the missing table code is the same, it indicates that the user did not use electricity during the period of the missing table code, and the missing table code is filled in with the previous and next table codes; when the size difference of the table codes of the dates before and after the missing table code is small, it indicates that the average power consumption during the period of the missing table code is low, and the total power consumption of the missing power in the daily power consumption data group can be calculated, and the missing power consumption in the daily power consumption data group can be filled according to the average value of the total power consumption, and the missing table codes in the daily frozen table code data group can be filled according to the filled daily power consumption data group, thereby reducing the impact of missing table codes and missing power consumption on line loss analysis and improving the accuracy of line loss analysis.
[0056] It should be noted that when filling the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group, there may be missing table codes that do not meet the filling conditions. For example, there are missing table codes for many consecutive days in the daily frozen table code data group, and the difference between the table codes before and after the missing table codes is large, and the specific values of the missing table codes for many consecutive days cannot be determined. Even if the missing table codes are filled, it will still affect the line loss analysis and make the line loss analysis error larger. Therefore, in some special cases, there is no need to fill the missing table codes.
[0057] S130, screening repeated table codes and corresponding repeated table code days in the daily frozen table code data group, calculating the total daily power consumption of the repeated table code days in the daily power consumption data group, and modifying the daily power consumption of the repeated table code days in the daily power consumption data group according to the total daily power consumption of the repeated table code days.
[0058] Specifically, after filtering the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, the total daily electricity consumption of the repeated table code days in the daily electricity consumption data group is calculated, and the daily electricity consumption of the repeated table code days in the daily electricity consumption data group is modified according to the total daily electricity consumption of the repeated table code days. Exemplarily, the total daily electricity consumption of the repeated table code days can be evenly distributed to each repeated table code day, and the daily electricity consumption of the repeated table code days in the daily electricity consumption data group is modified, thereby reducing the impact of the repeated table codes on the line loss analysis and improving the accuracy of the line loss analysis.
[0059] It should be noted that when the daily electricity consumption of the repeated table code day in the daily electricity consumption data group is modified according to the total daily electricity consumption of the repeated table code day, if the total daily electricity consumption of the repeated table code day is large, then even if the total daily electricity consumption of the repeated table code day is evenly distributed to each repeated table code day, the actual daily electricity consumption of each repeated table code day cannot be reflected. Therefore, when the total daily electricity consumption of the repeated table code day is large, there is no need to modify the daily electricity consumption of the repeated table code day in the daily electricity consumption data group, but the daily electricity consumption of the repeated table code day in the daily electricity consumption data group needs to be marked.
[0060] S140: Perform line loss analysis on the processed daily power consumption data group.
[0061] Specifically, different analysis methods can be selected for the processed daily power consumption data group according to whether there is a mark in the daily power consumption data group. When there is no mark data in the processed daily power consumption data group, it can be analyzed according to the existing normal daily line loss analysis method. When there is mark data in the processed daily power consumption data group, the processed daily power consumption data group can be further processed to perform line loss analysis, thereby reducing the error of line loss analysis. In the embodiment of the present invention, by filling in missing table codes and repeated table codes, the influence of missing table codes and repeated table codes on line loss analysis is reduced, and the accuracy of line loss analysis is improved.
[0062] The embodiment of the present invention provides a table code data processing method, which establishes a daily frozen table code data group and a daily electricity consumption data group according to the acquired user table code data; fills the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group, so as to avoid the influence of the missing table codes in the frozen table code data group and the missing electricity in the daily electricity consumption data group on the line loss analysis; screens the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, calculates the total daily electricity consumption of the repeated table code days in the daily electricity consumption data group, modifies the daily electricity consumption of the repeated table code days in the daily electricity consumption data group according to the total daily electricity consumption of the repeated table code days, so as to avoid the influence of the daily electricity consumption of the repeated table code days in the daily electricity consumption data group on the line loss analysis; performs line loss analysis on the processed daily electricity consumption data group, so as to reduce the influence of the missing table codes and the repeated table codes on the line loss analysis, and improve the accuracy of the line loss analysis.
[0063] In order to further improve the accuracy of line loss analysis, the embodiment of the present invention also provides another meter code data processing method, further, according to the acquired user meter code data, a daily frozen meter code data group and a daily power consumption data group are established, including:
[0064] A daily frozen meter code data group is established according to the acquired user meter code data, and a daily power consumption data group is established according to the acquired user meter code data.
[0065] Among them, the user table code data includes M users and N days of data, the daily frozen table code data group is an array B with M+1 rows and N+1 columns, and the daily electricity consumption data group is an array W with M+1 rows and N columns; the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are both marked as nan.
[0066] Specifically, the user meter code data includes M users and N days of data. The M+1 row and N+1 column array B is used to record the daily frozen meter code, and B is used as the daily frozen meter code data group; the M+1 row and N column array W is used to record the daily power consumption, and W is used as the daily power consumption data group. 0≤i≤M represents the i-th user, where i=0 represents the total meter. Arrays B and W have been preprocessed to exclude the influence of abnormal factors such as "changing the meter and changing the multiplier" and "the meter flies away\reversed". Therefore, if 0≤j≤N-1 is used to represent the j-th day, then W i,j =R i (B i,j+1 -B i,j ), where R i is the magnification of user i. For the convenience of description, it is assumed that arrays B and W have been magnified so that R i =1, That is, satisfy W i,j =B i,j+1 -B i,j , Missing table codes\power records are recorded as nan, and duplicate table codes and the resulting erroneous power will not be explicitly reflected in the array.
[0067] The table code data processing method provided in the embodiment of the present invention specifically provides a process for filling the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group. Figure 2 A flowchart of a method for filling missing table codes and missing power provided by an embodiment of the present invention, such as Figure 2 As shown, according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group, the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled, including:
[0068] S210: Obtain the table code difference between the table code of the previous day and the table code of the next day corresponding to the missing table code in the daily frozen table code data group.
[0069] Specifically, the missing table code in the daily frozen table code data set may be one, and the table code of the previous day and the table code of the next day corresponding to the missing table code in the daily frozen table code data set are obtained, and the table code difference is obtained by subtracting the two.
[0070] S220: If the table code difference is 0, fill in the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the first preset filling rule.
[0071] Optionally, the first filling preset rule is: if the table code difference is 0, the missing electricity in the daily electricity consumption data group is filled with a value of 0, and the missing table code in the daily frozen table code data group is filled with the table code of the previous day or the table code of the next day corresponding to the missing table code in the daily frozen table code data group.
[0072] Specifically, if there is a missing meter code in the daily frozen meter code data group but the meter codes before and after the missing meter code are equal, the missing electricity is filled with 0, and the missing meter code is filled with the meter codes before and after. That is, if B i,j+1 =…=B i,j+k-1 =nan andB i,j =B i,j+k Then let W i,j =…=W i,j+k-1 = 0 and let B i,j+1 =…=B i,j+k-1 =B i,j For the missing meter codes from day 0 to day j and the meter codes on day j+1 exist and are 0, the missing electricity and missing meter codes are filled with 0. This data filling is error-free and reliable and will not affect the feasibility and accuracy of line loss analysis.
[0073] S230: If the table code difference is less than the first gap threshold, fill in the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the second filling preset rule.
[0074] Optionally, the second filling preset rule is: if the table code difference is less than the first gap threshold, then obtain the missing days of the missing table code in the daily frozen table code data group, and calculate the average daily electricity consumption of the missing days; fill the missing electricity in the daily electricity consumption data group with the average daily electricity consumption of the missing days, and fill the missing table codes in the daily frozen table code data group according to the filling result of the missing electricity in the daily electricity consumption data group.
[0075] Specifically, if there are several users (i∈I) with missing table codes in a continuous time period J=[j+1, j+2,…, j+k], but the table code difference is less than the first gap threshold, that is, the difference between the previous and next table codes is small (the average power consumption during the missing period is low), and all users have complete table codes on day j and day j+k+1, and the average power consumption of these users with missing table codes on any day in time period J is low, then the missing power consumption of these users is filled with the average power consumption during the missing period, and the missing table codes are calculated and filled according to the power filling result, by obtaining the missing days of the missing table codes in the daily frozen table code data group, calculating the average daily power consumption of the missing days, filling the missing power consumption in the daily power consumption data group with the average daily power consumption of the missing days, and filling the missing table codes in the daily frozen table code data group according to the filling result of the missing power consumption in the daily power consumption data group. That is, if the data in the jth column and the j+k+1th column of array B are complete, and there is at least one nan in each column from the j+1th column to the j+kth column, then try to fill the missing table codes in the subarray B. ′ =B[i∈I, j∈J] and W ′ = W[i∈I, j∈J] performs low error filling. Let B i,t+1 =…=B i,t+s =nan and B i,t+s+1 -B i,t <p, t≥j, t+s≤j+k, calculate the filling value k∈[t+1,t+2,...,t+s]. I k = {i∈I|i tries to fill in on the kth day}, then let W i,t+1 =…=W i,j+s =w(i,k) and calculate and fill in the corresponding meter code according to the power filling value. In the above formula, p and q are parameters determined according to the average daily power consumption of all users on that day, which are used to limit the impact of missing data filling on the accuracy of line loss analysis. For the table code missing from day 0 to day j and the table code on day j+1 exists and is smaller, try to use Missing power and corresponding filling missing table code, and participate in judge.
[0076] S240: If the table code difference is greater than or equal to the first gap threshold, the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are not filled, and the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are marked.
[0077] Specifically, if the meter code difference is greater than or equal to the first gap threshold, the missing meter codes in the daily frozen meter code data group and the missing electricity in the daily electricity consumption data group will not be filled, that is, users with missing meter codes in time period J but whose meter code difference does not meet the condition of being less than the first gap threshold will not be filled in time period J and will not participate in the The missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are judged and marked. Through the above missing table codes and missing electricity filling process, the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group can be made closer to the actual situation, avoiding the phenomenon that the filled electricity obviously does not conform to the metering law of the electricity meter, and solving the technical problem of excessive error in the calculation of line loss rate in the prior art.
[0078] Further, the total daily electricity consumption of the repeated table code days in the daily electricity consumption data group is calculated, and the daily electricity consumption of the repeated table code days in the daily electricity consumption data group is modified according to the total daily electricity consumption of the repeated table code days, including:
[0079] Calculate the total daily electricity consumption for the repeated table code days in the daily electricity consumption data group.
[0080] If the total daily power consumption of the repeated table code day is less than the first power threshold, the average daily power consumption of the repeated table code day is calculated according to the total daily power consumption of the repeated table code day, and the average daily power consumption of the repeated table code day is used as the daily power consumption of the repeated table code day in the daily power consumption data group.
[0081] If the total daily power consumption of the repeated table code day is greater than or equal to the first power threshold, the daily power consumption of the repeated table code day in the daily power consumption data group is marked.
[0082] Specifically, by calculating the total daily electricity consumption of the repeated table code day in the daily electricity consumption data group, if the total daily electricity consumption of the repeated table code day is less than the first electricity threshold, it indicates that on a certain table code repeated day, the electricity consumption of each table code repeated user is low, and the total electricity consumption of each table code repeated user is low, then the average daily electricity consumption of the repeated table code day is calculated according to the total daily electricity consumption of the repeated table code day, and the average daily electricity consumption of the repeated table code day is used as the daily electricity consumption of the repeated table code day in the daily electricity consumption data group. If the total daily electricity consumption of the repeated table code day is greater than or equal to the first electricity threshold, that is, the total daily electricity consumption of the repeated table code day is large, then even if the total daily electricity consumption of the repeated table code day is evenly distributed to each repeated table code day, the actual daily electricity consumption of each repeated table code day cannot be reflected. Therefore, when the total daily electricity consumption of the repeated table code day is large, there is no need to modify the daily electricity consumption of the repeated table code day in the daily electricity consumption data group, but it is necessary to mark the daily electricity consumption of the repeated table code day in the daily electricity consumption data group.
[0083] Furthermore, the processed daily power consumption data set is subjected to line loss analysis, including:
[0084] Determine whether there is marked data in the daily power consumption data group.
[0085] If it does not exist, perform daily line loss analysis on the daily electricity consumption data group.
[0086] If so, and if the number of marked data in the daily power consumption data group is less than the marking threshold, dynamic granular line loss analysis is performed on the daily power consumption data group.
[0087] If so, and if the number of marked data in the daily power consumption data group is greater than or equal to the marking threshold, the line loss analysis of the daily power consumption data group is abandoned.
[0088] Specifically, when there is no marked data in the daily electricity consumption data group, the daily line loss analysis can be directly performed on the daily electricity consumption data group; when there is marked data in the daily electricity consumption data group, and the number of marked data in the daily electricity consumption data group is less than the marking threshold, dynamic granularity line loss analysis is performed on the daily electricity consumption data group. Exemplarily, the data in the daily electricity consumption data group can be divided into multiple data segments, and the average electricity of the multiple data segments is calculated to form a new data group, and then the daily line loss analysis is performed; when there is marked data in the daily electricity consumption data group, and the number of marked data in the daily electricity consumption data group is greater than or equal to the marking threshold, that is, there is a large amount of err / nan in the daily electricity consumption data group W, resulting in that even if the data in the daily electricity consumption data group is divided into multiple data segments, the dynamic granularity line loss analysis cannot be performed because the data segments are too small, indicating that the quality of the original user meter code data is too poor, and the line loss analysis of the daily electricity consumption data group is abandoned.
[0089] Furthermore, a dynamic granular line loss analysis is performed on the daily electricity consumption data set, including:
[0090] It is determined whether the daily power consumption data group can be equally divided into a first preset number of data segments, each data segment contains k days of daily power consumption, and table codes corresponding to the first and last daily power consumption in each data segment exist.
[0091] If yes, the daily power consumption data group is equally divided into a first preset number of data segments, the average power consumption of each user in each data segment is calculated to obtain a first line loss analysis data group, and daily line loss analysis is performed on the first line loss analysis data group.
[0092] If not, the daily electricity consumption data group is divided into a second preset number of unequal data segments, and the table codes corresponding to the first daily electricity consumption and the last daily electricity consumption in each unequal data segment exist; the average electricity consumption of each user in each unequal data segment is calculated to obtain a second line loss analysis data group, and daily line loss analysis is performed on the second line loss analysis data group.
[0093] Specifically, it is determined whether the daily power consumption data group can be equally divided into a first preset number of data segments, the first preset number can be set adaptively, and each data segment contains k days of daily power consumption, and the table codes corresponding to the first daily power consumption and the last daily power consumption in each data segment exist, that is, if the N-day daily power consumption data in the daily power consumption data group can be equally divided into a suitable number of segments, each segment contains k days, and the table codes at the beginning and end of each segment are complete, then the average power consumption of each user in each segment is calculated to obtain W of M+1 rows n=N%k columns k1 1 array, as the first line loss analysis data group, and using the first line loss analysis data group W k1 Perform daily loss analysis.
[0094] If not, the daily power consumption data set is divided into a second preset number of unequally divided data segments, and the table codes corresponding to the first and last daily power consumption in each unequally divided data segment exist; the average power of each user in each unequally divided data segment is calculated to obtain the second line loss analysis data set, and the daily line loss analysis is performed on the second line loss analysis data set. That is, if the daily power consumption data of N days in the daily power consumption data set can be divided into a suitable number of unequal length segments, and the length of each segment is [n1,n2,…,n k ], If the table codes at the beginning and end of each segment are complete, then the average power consumption of each user in each segment is calculated to obtain W with M+1 rows and k columns. k2 array, as the second line loss analysis data set, and using the second line loss analysis data set W k2 Perform daily loss analysis.
[0095] To further illustrate the above line loss analysis process, Figure 3FIG. 1 is a flow chart of another table code data processing method in an embodiment of the present invention, as shown in FIG. Figure 3 As shown, after obtaining the original data, missing data filling and table code duplication processing and marking are required, wherein the original data is the user table code data, through which the daily frozen table code data group B and the daily electricity consumption data group W can be established; the process of filling missing data can be performed by filling the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group, so as to achieve low error filling and error-free filling; the process of processing and marking repeated table codes can screen the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, and calculate the daily electricity consumption data. According to the total daily electricity consumption of repeated table code days in the data group, the daily electricity consumption of repeated table code days in the daily electricity consumption data group is modified according to the total daily electricity consumption of repeated table code days, and the daily electricity consumption of repeated table code days that cannot be modified is marked; the processed daily electricity consumption data group can be obtained by filling missing data and processing and marking table code duplications. It is necessary to determine whether there is an err / nan mark in the daily electricity consumption data group, that is, whether there is missing electricity and repeated electricity in the daily electricity consumption data group. If not, perform daily line loss analysis. If so, determine whether to perform dynamic granular line loss analysis; if so, perform dynamic granular line loss analysis, if not, give up the analysis.
[0096] It should be noted that the analysis object of daily line loss analysis is the daily electricity consumption data group, and the analysis object of dynamic granularity line loss analysis is a fixed-length or variable-length segmented data sequence. The analysis method is consistent with the ordinary daily line loss analysis, and the effect is basically the same.
[0097] The table code data processing method of the embodiment of the present invention can achieve the following technical effects:
[0098] 1) The main impact of missing electricity in the daily electricity consumption data set W is that the daily line loss analysis cannot be performed. This method eliminates the impact of missing values as much as possible through error-free filling and low-error filling of missing data, so that the line loss analysis can be performed, and limits the impact of data filling on the analysis accuracy.
[0099] 2) The main impact of duplicate table codes is to reduce the accuracy of daily line loss analysis, resulting in false alarms and missed alarms.
[0100] a) Repeated table codes distort the actual power sequence, resulting in failure of correlation matching.
[0101] b) The power calculated based on the repeated table code generates a false power sequence mutation point, which causes the feature point matching to produce an erroneous matching result and may cause the real power sequence mutation points of other users to fail to be correctly matched.
[0102] 3) The table code data processing method of the embodiment of the present invention eliminates the influence of missing values as much as possible by error-free filling and low-error filling of missing data, so that line loss analysis can be performed and the influence of data filling on the analysis accuracy is limited; possible table code duplication errors are discovered through repeated table code processing and marking, and power allocation is performed on some table code repeated data, so that line loss analysis can be performed and the influence of power allocation on the analysis accuracy is limited.
[0103] 4) The table code data processing method of the embodiment of the present invention proposes a dynamic analysis granularity to improve the feasibility and accuracy of line loss analysis.
[0104] a) Due to the centralized meter reading mechanism, a user's meter code duplication error rarely occurs continuously or periodically, but occurs in isolation; while electricity theft generally occurs continuously or periodically, but rarely occurs in isolation. Dynamic granular line loss analysis makes it possible to cover up the false mutation points of the user's power sequence caused by isolated meter code duplication errors without generating erroneous feature point matching results that lead to false alarms, and avoids the false mutation points of the user's power sequence covering up the real mutation points of other users in the same time period, leading to missed alarms.
[0105] b) Dynamic granularity line loss analysis avoids the impact of missing values on the feasibility of line loss analysis, and avoids the impact of "forced power allocation for missing values" on the accuracy of line loss analysis.
[0106] An embodiment of the present invention provides a table code data processing method, which fills in the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group to avoid the influence of the missing table codes in the frozen table code data group and the missing electricity in the daily electricity consumption data group on the line loss analysis, and modifies the daily electricity of the repeated table code day in the daily electricity consumption data group according to the total daily electricity consumption of the repeated table code day to avoid the influence of the daily electricity of the repeated table code day in the daily electricity consumption data group on the line loss analysis, reduces the influence of the missing table codes and the repeated table codes on the line loss analysis, and improves the accuracy of the line loss analysis.
[0107] The embodiment of the present invention further provides a table code data processing device, Figure 4 Schematic diagram of the structure of a table code data processing device in an embodiment of the present invention. The table code data processing device in an embodiment of the present invention is used to execute the table code data processing method in any embodiment of the present invention, such as Figure 4 As shown, the device comprises:
[0108] The data preprocessing module 110 is used to establish a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data.
[0109] The missing data filling module 120 is used to fill the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group.
[0110] The duplicate data correction module 130 is used to screen the duplicate table codes and corresponding duplicate table code days in the daily frozen table code data group, calculate the total daily power consumption of the duplicate table code days in the daily power consumption data group, and modify the daily power consumption of the duplicate table code days in the daily power consumption data group according to the total daily power consumption of the duplicate table code days.
[0111] The line loss analysis module 140 is used to perform line loss analysis on the processed daily power consumption data group.
[0112] Specifically, the data preprocessing module 110 establishes a daily frozen table code data group and a daily power consumption data group according to the acquired user table code data. The missing data filling module 120 fills the missing table codes in the daily frozen table code data group and the missing power in the daily power consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group, so as to avoid the influence of the missing table codes in the frozen table code data group and the missing power in the daily power consumption data group on the line loss analysis. The repeated data correction module 130 screens the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, calculates the total daily power consumption of the repeated table code days in the daily power consumption data group, and modifies the daily power consumption of the repeated table code days in the daily power consumption data group according to the total daily power consumption of the repeated table code days, so as to avoid the influence of the daily power consumption of the repeated table code days in the daily power consumption data group on the line loss analysis. The line loss analysis module 140 performs line loss analysis on the processed daily power consumption data group, thereby reducing the influence of the missing table codes and repeated table codes in the daily power consumption data group on the line loss analysis and improving the accuracy of the line loss analysis.
[0113] In addition, the table code data processing device of the embodiment of the present invention includes but is not limited to the above modules. The table code data processing device of the embodiment of the present invention can adaptively set relevant functional modules according to the table code data processing method in any embodiment of the present invention to achieve the function and technical effect of the table code data processing method in any embodiment of the present invention.
[0114] The embodiment of the present invention provides a table code data processing device, which establishes a daily frozen table code data group and a daily electricity consumption data group according to the acquired user table code data through a data preprocessing module; a missing data filling module fills the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group, so as to avoid the influence of the missing table codes in the frozen table code data group and the missing electricity in the daily electricity consumption data group on the line loss analysis; a repeated data correction module selects the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, calculates the total daily electricity consumption of the repeated table code days in the daily electricity consumption data group, and modifies the daily electricity consumption of the repeated table code days in the daily electricity consumption data group according to the total daily electricity consumption of the repeated table code days, so as to avoid the influence of the daily electricity consumption of the repeated table code days in the daily electricity consumption data group on the line loss analysis; a line loss analysis module performs line loss analysis on the processed daily electricity consumption data group, so as to reduce the influence of the missing table codes and repeated table codes on the line loss analysis, and improve the accuracy of the line loss analysis.
[0115] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the table code data processing method provided in the embodiment of the present invention is implemented, including:
[0116] A daily frozen meter code data group and a daily power consumption data group are established according to the acquired user meter code data.
[0117] The missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to the table codes of the preceding and following dates corresponding to the missing table codes in the daily frozen table code data group.
[0118] Filter the repeated table codes and corresponding repeated table code days in the daily frozen table code data group, calculate the total daily power consumption of the repeated table code days in the daily power consumption data group, and modify the daily power consumption of the repeated table code days in the daily power consumption data group according to the total daily power consumption of the repeated table code days.
[0119] Conduct line loss analysis on the processed daily electricity consumption data set.
[0120] Of course, the computer program stored in a computer-readable storage medium provided by an embodiment of the present invention is not limited to the above method operations, and can also execute related operations in the table code data processing method provided by any embodiment of the present invention.
[0121] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media 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, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a system or a device or used in combination with it.
[0122] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, etc., or any suitable combination of the foregoing.
[0123] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0124] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection 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, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A table code data processing method, characterized in that: The method comprises: Establish a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data; Filling the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group; Filtering the repeated table codes and the corresponding repeated table code days in the daily frozen table code data group, calculating the total daily power consumption of the repeated table code day in the daily power consumption data group, and modifying the daily power consumption of the repeated table code day in the daily power consumption data group according to the total daily power consumption of the repeated table code day; Line loss analysis is performed on the processed daily power consumption data group.
2. The table code data processing method according to claim 1, characterized in that: The step of filling the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the preceding and following dates corresponding to the missing table codes in the daily frozen table code data group comprises: Obtaining a table code difference between a table code of a previous day and a table code of a next day corresponding to a missing table code in the daily frozen table code data group; If the table code difference is 0, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to the first filling preset rule; If the table code difference is less than the first gap threshold, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to a second filling preset rule; If the table code difference is greater than or equal to the first gap threshold, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group will not be filled, and the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group will be marked.
3. The table code data processing method according to claim 2, characterized in that: If the table code difference is 0, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled in according to a first filling preset rule, including: If the table code difference is 0, the missing electricity in the daily electricity consumption data group is filled with 0, and the missing table code in the daily frozen table code data group is filled with the table code of the previous day or the table code of the next day corresponding to the missing table code in the daily frozen table code data group.
4. The table code data processing method according to claim 2, characterized in that: If the table code difference is less than the first gap threshold, the missing table code in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are filled according to the second filling preset rule, including: If the table code difference is less than the first gap threshold, obtaining the number of missing days of the missing table code in the daily frozen table code data group, and calculating the average daily power consumption of the missing days; The missing electricity in the daily electricity consumption data group is filled with the average daily electricity of the missing days, and the missing table code in the daily frozen table code data group is filled according to the filling result of the missing electricity in the daily electricity consumption data group.
5. The table code data processing method according to claim 1, characterized in that: The calculating the total daily power consumption of the repeated table code day in the daily power consumption data group, and modifying the daily power consumption of the repeated table code day in the daily power consumption data group according to the total daily power consumption of the repeated table code day, comprises: Calculating the total daily electricity consumption of the repeated table code day in the daily electricity consumption data group; If the total daily power consumption of the repeating table code day is less than the first power threshold, the average daily power consumption of the repeating table code day is calculated according to the total daily power consumption of the repeating table code day, and the average daily power consumption of the repeating table code day is used as the daily power consumption of the repeating table code day in the daily power consumption data group; If the total daily power consumption of the repeated table code day is greater than or equal to the first power threshold, the daily power consumption of the repeated table code day in the daily power consumption data group is marked.
6. The table code data processing method according to claim 1, characterized in that: The performing line loss analysis on the processed daily power consumption data group includes: Determining whether there is marked data in the daily power consumption data group; If not present, performing daily line loss analysis on the daily power consumption data group; If yes, and if the number of marked data in the daily power consumption data group is less than the marking threshold, then performing dynamic granular line loss analysis on the daily power consumption data group; If so, and if the number of marked data in the daily power consumption data group is greater than or equal to the marking threshold, the line loss analysis of the daily power consumption data group is abandoned.
7. The table code data processing method according to claim 6, characterized in that: The method performs dynamic granular line loss analysis on the daily power consumption data group, including: Determine whether the daily power consumption data group can be equally divided into a first preset number of data segments, and each of the data segments contains k days of daily power consumption, and the table codes corresponding to the first daily power consumption and the last daily power consumption in each of the data segments exist; If yes, the daily power consumption data group is equally divided into the first preset number of data segments, the average power consumption of each user in each data segment is calculated to obtain a first line loss analysis data group, and daily line loss analysis is performed on the first line loss analysis data group; If not, the daily electricity consumption data group is divided into a second preset number of unequal data segments, and the table codes corresponding to the first daily electricity consumption and the last daily electricity consumption in each of the unequal data segments exist; the average electricity consumption of each user in each of the unequal data segments is calculated to obtain a second line loss analysis data group, and daily line loss analysis is performed on the second line loss analysis data group.
8. The table code data processing method according to claim 1, characterized in that: The method of establishing a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data includes: Establishing the daily frozen table code data group according to the acquired user table code data, and establishing the daily power consumption data group according to the acquired user table code data; Among them, the user table code data includes M users and N days of data, the daily frozen table code data group is an array B of M+1 rows and N+1 columns, and the daily electricity consumption data group is an array W of M+1 rows and N columns; the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group are both marked as nan.
9. A table code data processing device, characterized in that: The table code data processing device is used to execute the table code data processing method according to any one of claims 1 to 8, and the device comprises: A data preprocessing module, used to establish a daily frozen meter code data group and a daily power consumption data group according to the acquired user meter code data; A missing data filling module, used to fill the missing table codes in the daily frozen table code data group and the missing electricity in the daily electricity consumption data group according to the table codes of the previous and next dates corresponding to the missing table codes in the daily frozen table code data group; a repeated data correction module, used for screening repeated table codes and corresponding repeated table code days in the daily frozen table code data group, calculating the total daily power consumption of the repeated table code day in the daily power consumption data group, and modifying the daily power consumption of the repeated table code day in the daily power consumption data group according to the total daily power consumption of the repeated table code day; The line loss analysis module is used to perform line loss analysis on the processed daily power consumption data group.
10. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the table code data processing method according to any one of claims 1 to 8.