CN108363789B - Short-term missing repairing method and device for electricity consumption meter data of industrial and commercial users - Google Patents
Short-term missing repairing method and device for electricity consumption meter data of industrial and commercial users Download PDFInfo
- Publication number
- CN108363789B CN108363789B CN201810146112.6A CN201810146112A CN108363789B CN 108363789 B CN108363789 B CN 108363789B CN 201810146112 A CN201810146112 A CN 201810146112A CN 108363789 B CN108363789 B CN 108363789B
- Authority
- CN
- China
- Prior art keywords
- time
- period
- time interval
- compensated
- table code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000005611 electricity Effects 0.000 title claims description 4
- 230000008439 repair process Effects 0.000 claims description 12
- 238000012163 sequencing technique Methods 0.000 claims description 10
- 230000000295 complement effect Effects 0.000 claims description 7
- 238000004519 manufacturing process Methods 0.000 description 6
- 239000000919 ceramic Substances 0.000 description 5
- 238000003860 storage Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000003066 decision tree Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000010248 power generation Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/215—Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Water Supply & Treatment (AREA)
- Tourism & Hospitality (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Primary Health Care (AREA)
- Marketing (AREA)
- Quality & Reliability (AREA)
- Human Resources & Organizations (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Software Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention provides a short-term missing repairing method and a short-term missing repairing device for data of electric meter codes for industrial and commercial users, wherein the method comprises the following steps: acquiring a time period to be compensated of a user meter, and determining each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and the preset number of the candidate reference time periods; respectively calculating the distance between the time interval to be compensated and each candidate reference time interval, and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval; after judging that the distance between the selected reference time interval and the time interval to be complemented is not greater than the preset distance, performing data patching on the time interval to be complemented according to the table code data of the selected reference time interval; the preset time interval is the time interval between any two adjacent time intervals in all the time intervals including the time interval to be compensated and the candidate reference time interval.
Description
Technical Field
The invention relates to the field of power grid data measurement, in particular to a method and a device for repairing short-term data missing of electric meter data for industrial and commercial users.
Background
With the advent of the information technology era, big data is increasingly widely applied in various fields. With the comprehensive development of intelligent power grid construction in China, large electric power data are generated as required and become an indispensable part in the intelligent process of the power grid.
The final goal of smart grid construction is to become a panoramic real-time system covering the whole production process of the power system, including multiple links of power generation, power transmission, power transformation, power distribution, power utilization, scheduling and the like. The basis for supporting the reliable operation of the intelligent power grid is the panoramic real-time data acquisition, transmission and storage of the power grid and the rapid analysis of the accumulated mass power data. However, data loss can inevitably occur in the data acquisition, transmission and storage processes, the data loss causes great influence on data analysis, and the practical value of the analysis result is related to effective processing of the lost data. Therefore, it is a significant and troublesome problem how to perform data patching to complete the analysis of the power data.
The existence of missing data not only interferes with the data analysis precision, but also influences the effective development of the follow-up work of statistical analysis personnel. For industrial and commercial users, when there is a short-term data missing using electric meter data to perform data repair, the commonly used methods are a rough set method, a decision tree, a bayesian network, and the like.
However, these methods cannot utilize the load characteristics of the industrial and commercial users when data repair is performed, so that the quality of repairing the data of the industrial and commercial users is not high.
Disclosure of Invention
The embodiment of the invention provides a short-term missing repairing method and device for electric meter code data for industrial and commercial users, which fully utilize the load characteristics of the industrial and commercial users, provide excellent data filling rate and realize higher repairing data quality.
The embodiment of the invention provides a short-term missing repairing method for data of electric meter codes for industrial and commercial users, which comprises the following steps:
acquiring a time period to be compensated of a user meter, and determining each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and the preset number of candidate reference time periods;
respectively calculating the distance between the time interval to be complemented and each candidate reference time interval, and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval;
after judging that the distance between the selected reference time interval and the time interval to be compensated is not more than the preset distance, performing data repair on the time interval to be compensated according to the table code data of the selected reference time interval;
the preset time interval is a time interval between any two adjacent time intervals in all time intervals including the time interval to be compensated and the candidate reference time interval.
Preferably, the method for repairing short-term missing of the electric meter code data for industrial and commercial users provided by the invention further comprises the following steps:
after the number of the time periods to be compensated is determined to be at least two, sequencing the durations of all the time periods to be compensated from small to large, and if a plurality of time periods to be compensated are consistent, sequencing a plurality of time periods to be compensated with consistent durations from front to back according to the starting time of each time period.
Preferably, with the number-of-candidates period as a central point, the number of candidate reference periods before the number-of-candidates period is equal to the number of candidate reference periods after the number-of-candidates period.
Preferably, the respectively calculating the distance between the time period to be complemented and each of the candidate reference time periods specifically includes:
respectively calculating the distance between the number waiting period and each candidate reference period by presetting a first formula according to the table code value at the starting time of the number waiting period, the table code value at the ending time of the number waiting period, the table code value at the starting time of each candidate reference period and the table code value at the ending time of each candidate reference period;
wherein the preset first formula is:
Dist(t0,ti)=|(Vt0_e-Vt0_s)-(Vti_e-Vti_s)|/|Vt0_e-Vt0_s|*100%
in the formula, t0For a period of time to be compensated, tiIs the ith candidate reference period, Vt0_sFor table code values at the start of the number period to be complemented, Vt0_eValue of table code at the end of the period to be complemented, Vti_sStarting for the ith candidate reference periodTable code value, V, of a time of dayti_eIs the table code value at the end time of the ith candidate reference period.
Preferably, after it is determined that the distance between the selected reference time period and the time period to be complemented is not greater than a preset distance, the data patching for the time period to be complemented according to the table code data of the selected reference time period specifically includes:
after the distance between the selected reference time period and the time period to be complemented is judged to be not more than a preset distance, determining each missing time of the time period to be complemented, and determining the complementing time corresponding to each missing time in the selected reference time period;
according to the table code value of the starting time of the number waiting period, the table code value of the ending time of the number waiting period, the table code value of the starting time of the selected reference period, the table code value of the ending time of the selected reference period and the table code value of each number complementing time of the selected reference period, corresponding data patching is carried out on each number missing time of the number waiting period through a preset second formula;
wherein the preset second formula is:
Vt0_s+j×m=Vt0_s+(Vti_s+j×m-Vti_s)×(Vt0_e-Vt0_s)÷(Vti_e-Vti_s)
in the formula, t0For a period of time to be compensated, tiFor selecting a reference time interval, m is the data acquisition time interval, Vt0_s+j×mIs a period t of time to be compensated0Table code value, V, for the jth missing timeti_s+j×mFor selecting a reference period tiThe table code value at the jth complement time.
Preferably, an embodiment of the present invention further provides a short-term missing repairing apparatus for electric meter code data for industrial and commercial users, including:
the acquisition unit is used for acquiring the number-to-be-compensated time periods of the user meter and determining each candidate reference time period corresponding to the number-to-be-compensated time period according to a preset time interval and the preset number of the candidate reference time periods;
the calculating unit is used for respectively calculating the distance between the time interval to be complemented and each candidate reference time interval and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval;
the patching unit is used for performing data patching on the time interval to be complemented according to the table code data of the selected reference time interval after judging that the distance between the selected reference time interval and the time interval to be complemented is not greater than a preset distance;
the preset time interval is a time interval between any two adjacent time intervals in all time intervals including the time interval to be compensated and the candidate reference time interval.
Preferably, the short-term missing repair device for the electric meter code data for the industrial and commercial users provided by the embodiment of the present invention further includes:
and the sequencing unit is used for sequencing the durations of all the time periods to be compensated from small to large after the number of the time periods to be compensated is determined to be at least two, and if the durations of a plurality of the time periods to be compensated are consistent, sequencing a plurality of the time periods to be compensated with consistent durations from front to back according to the starting time of each time period.
Preferably, with the number-of-candidates period as a central point, the number of candidate reference periods before the number-of-candidates period is equal to the number of candidate reference periods after the number-of-candidates period.
Preferably, the computing unit specifically includes:
a calculating subunit, configured to calculate distances between the time period to be complemented and the candidate reference time periods, respectively;
a first determining subunit, configured to determine the candidate reference time interval corresponding to the minimum distance as a selected reference time interval;
the calculating subunit is further configured to calculate, according to the table code value at the starting time of the to-be-complemented time period, the table code value at the ending time of the to-be-complemented time period, the table code value at the starting time of each candidate reference time period, and the table code value at the ending time of each candidate reference time period, distances between the to-be-complemented time period and each candidate reference time period by using a preset first formula;
wherein the preset first formula is:
Dist(t0,ti)=|(Vt0_e-Vt0_s)-(Vti_e-Vti_s)|/|Vt0_e-Vt0_s|*100%
in the formula, t0For a period of time to be compensated, tiIs the ith candidate reference period, Vt0_sFor table code values at the start of the number period to be complemented, Vt0_eValue of table code at the end of the period to be complemented, Vti_sFor table code values at the start of the ith candidate reference period, Vti_eIs the table code value at the end time of the ith candidate reference period.
Preferably, the repair unit specifically includes:
the second determining subunit is configured to determine, after determining that the distance between the selected reference time period and the to-be-complemented time period is not greater than a preset distance, each missing time of the to-be-complemented time period, and determine, in the selected reference time period, a complementing time corresponding to each missing time;
the patching subunit is used for performing corresponding data patching on each missing number moment of the number period to be complemented by a preset second formula according to the table code value of the starting moment of the number period to be complemented, the table code value of the ending moment of the number period to be complemented, the table code value of the starting moment of the selected reference period, the table code value of the ending moment of the selected reference period and the table code value of each complementing time of the selected reference period;
wherein the preset second formula is:
Vt0_s+j×m=Vt0_s+(Vti_s+j×m-Vti_s)×(Vt0_e-Vt0_s)÷(Vti_e-Vti_s)
in the formula, t0For a period of time to be compensated, tiFor selecting a reference time interval, m is the data acquisition time interval, Vt0_s+j×mIs a period t of time to be compensated0Table code value, V, for the jth missing timeti_s+j×mTo selectReference period tiThe table code value at the jth complement time.
According to the technical scheme, the embodiment of the invention has the following advantages:
the embodiment of the invention provides a short-term missing repairing method and a short-term missing repairing device for data of electric meter codes for industrial and commercial users, wherein the method comprises the following steps: acquiring a time period to be compensated of a user meter, and determining each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and the preset number of the candidate reference time periods; respectively calculating the distance between the time interval to be compensated and each candidate reference time interval, and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval; after judging that the distance between the selected reference time interval and the time interval to be complemented is not greater than the preset distance, performing data patching on the time interval to be complemented according to the table code data of the selected reference time interval; the preset time interval is the time interval between any two adjacent time intervals in all the time intervals including the time interval to be compensated and the candidate reference time interval. Under the condition that the user meter is found to have data loss, the characteristic that daily load curves of industrial and commercial users within a period of time have higher similarity is fully utilized, the data loss time is repaired by using the table code data of a plurality of days before and after the data loss time, the excellent data filling rate can be provided, and the data quality of repairing is higher.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart illustrating an embodiment of a short-term missing repairing method for electric meter code data for industrial and commercial users according to the present invention;
FIG. 2 is a schematic flowchart illustrating a short-term missing repair method for electric meter code data for industrial and commercial users according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of an embodiment of an apparatus for short-term missing repair of electric meter code data for industrial and commercial users according to the present invention.
Detailed Description
The embodiment of the invention provides a short-term missing repairing method and device for electric meter code data for industrial and commercial users, which fully utilize the load characteristics of the industrial and commercial users, provide excellent data filling rate and realize higher repairing data quality.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of a method for repairing short-term missing of electric meter code data for industrial and commercial users according to the present invention includes:
101. acquiring a time period to be compensated of a user meter, and determining each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and the preset number of the candidate reference time periods;
102. respectively calculating the distance between the time interval to be compensated and each candidate reference time interval, and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval;
103. and after judging that the distance between the selected reference time interval and the time interval to be complemented is not more than the preset distance, performing data patching on the time interval to be complemented according to the table code data of the selected reference time interval.
The preset time interval is the time interval between any two adjacent time intervals in all the time intervals including the time interval to be compensated and the candidate reference time interval.
The embodiment of the invention provides a short-term missing repairing method and a short-term missing repairing device for data of electric meter codes for industrial and commercial users, wherein the method comprises the following steps: acquiring a time period to be compensated of a user meter, and determining each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and the preset number of the candidate reference time periods; respectively calculating the distance between the time interval to be compensated and each candidate reference time interval, and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval; after judging that the distance between the selected reference time interval and the time interval to be complemented is not greater than the preset distance, performing data patching on the time interval to be complemented according to the table code data of the selected reference time interval; the preset time interval is the time interval between any two adjacent time intervals in all the time intervals including the time interval to be compensated and the candidate reference time interval. Under the condition that the user meter is found to have data loss, the characteristic that daily load curves of industrial and commercial users within a period of time have higher similarity is fully utilized, the data loss time is repaired by using the table code data of a plurality of days before and after the data loss time, the excellent data filling rate can be provided, and the data quality of repairing is higher.
In order to describe the method for repairing short-term missing of the electric meter code data for the industrial and commercial users more specifically, another embodiment of the method for repairing short-term missing of the electric meter code data for the industrial and commercial users is provided below, and referring to fig. 2, another embodiment of the method for repairing short-term missing of the electric meter code data for the industrial and commercial users is provided.
It should be noted that the to-be-compensated time interval (i.e., the missing time interval of the table code data) mentioned in this embodiment refers to a certain continuous time sequence based on the collection time interval, and the start time and the end time of the time sequence have table code data, but the table code data at other times are all missing. A single time period to be complemented may be represented by a triplet (start time, end time, number of missing data points).
Candidate reference period: the time intervals are some time intervals, the data in the time intervals to be complemented can be patched based on the data in any time interval, but the patching effect is different. A single candidate reference period may be represented by one doublet (start time, end time).
Selecting a reference time period: the method is characterized in that a certain time interval is selected from candidate reference time intervals according to a certain rule, and the data of the time interval is utilized to carry out patching, so that the best effect is achieved.
The embodiment comprises the following steps:
201. acquiring a time period to be compensated of a user meter, and determining each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and the preset number of the candidate reference time periods;
it should be noted that, a threshold is usually set for the number of missing data points in the period to be complemented, that is, if the acquisition time interval of the data is 1 hour, and if the threshold is set to be 24, the period to be complemented corresponding to the threshold represents complementing the period to be complemented whose data missing duration does not exceed 24 hours (1 day).
In the present embodiment, the preset time interval is a time interval between any two adjacent periods among all the periods including the to-be-complemented period and the candidate reference period. And the number of the candidate reference time periods before the number period to be complemented is equal to the number of the candidate reference time periods after the number period to be complemented by taking the number period to be complemented as a central point.
For example, for a gateway electric meter (case 1) of a ceramic manufacturing enterprise, the data acquisition time interval is 1 hour. Since the daily load characteristic curve thereof tends to have a large similarity with the daily load characteristic curve of days before and after, UL may be set to 24, SL (preset distance) to 15%, K (half of the preset number of candidate reference periods) to 7, and ST (preset time interval) to 1. Wherein, K is 7, ST is 1, and the candidate reference time interval is a synchronization time interval of 7 x 1 days before and after the time interval to be complemented.
Also, for example, for a gateway meter (case 2) in a large business center, the data acquisition interval is 1 hour. Since the daily load characteristic curve of the vehicle tends to have a greater similarity to the daily load characteristic curve of the previous cycle, UL may be set to 24, SL may be set to 15%, K may be set to 4, and ST may be set to 7. Where K is 4 and ST is 7, the candidate reference period is a synchronization period of the first 28, 21, 14, and 7 days and the last 7, 14, 21, and 28 days of the to-be-complemented period.
Before step 201, after determining that the number of the time periods to be compensated is at least two, sorting the durations of all the time periods to be compensated from small to large, and if the durations of a plurality of time periods to be compensated are consistent, sorting the time periods to be compensated with consistent durations from front to back according to the starting time of each time period.
For the gateway ammeter of the ceramic production enterprise in case 1, the time periods to be complemented, in which the number of missing data points is less than 24 from 0 in 10/1 in 2017 to 23 in 10/31 in 2017, are tm1 (2017-10-0510: 00:00, 2017-10-0606: 00: 19), tm2 (2017-10-1111: 00:00, 2017-10-1116: 00:00, 4), tm3 (2017-10-1312: 00, 2017-10-1317: 00:00, 4), tm4 (2017-10-1512: 00:00, 2017-10-151400: 00, 1), tm5 (2017-10-2512: 00:00, 2017-10-2603: 00:00, 14), respectively, and the result is sorted from before to after the missing data points are less to 52 in the order of starting from the number of missing data points to after the number of tm4, tm2, tm3, tm5, and tm 1. And executing the steps 201 to 206 for the time period to be complemented one by one.
202. Respectively calculating the distance between the number waiting period and each candidate reference period by presetting a first formula according to the table code value at the starting moment of the number waiting period, the table code value at the ending moment of the number waiting period, the table code value at the starting moment of each candidate reference period and the table code value at the ending moment of each candidate reference period, and determining the candidate reference period corresponding to the minimum distance as the selected reference period; after judging that the distance between the selected reference time interval and the time interval to be complemented is not greater than the preset distance, performing data patching on the time interval to be complemented according to the table code data of the selected reference time interval;
wherein, the preset first formula is as follows:
Dist(t0,ti)=|(Vt0_e-Vt0_s)-(Vti_e-Vti_s)|/|Vt0_e-Vt0_s|*100%
in the formula, t0For a period of time to be compensated, tiIs the ith candidate reference period, Vt0_sFor table code values at the start of the number period to be complemented, Vt0_eIs a number to be complementedTABLE-CODE VALUE at the end of the time period, Vti_sFor table code values at the start of the ith candidate reference period, Vti_eIs the table code value at the end time of the ith candidate reference period.
It should be noted that, to ensure the validity of the data, the candidate reference time interval with incomplete data needs to be eliminated before calculating the distance. Lack period t of gateway meter as for ceramic manufacturing enterprise in case 1m4(2017-10-1512: 00:00, 2017-10-1514: 00:00, 1), t is t because K is 7 and ST is 1m4Is a contemporaneous period of 7 days before and after the period, i.e., tm4_1=(2017-10-08 12:00:00,2017-10-08 14:00:00),tm4_2=(2017-10-09 12:00:00,2017-10-09 14:00:00),…,tm4_7=(2017-10-14 12:00:00,2017-10-14 14:00:00),tm4_8=(2017-10-16 12:00:00,2017-10-16 14:00:00),…,tm4_14(2017-10-2212: 00:00, 2017-10-2214: 00:00), where t ism4_4= (2017-10-1112: 00:00, 2017-10-1114: 00:00) and tm4_6When the code data of the table code is incomplete, the table code data is rejected out of the candidate reference time interval (2017-10-1312: 00:00, 2017-10-1314: 00: 00). And then calculating the distance between the time interval to be complemented and each candidate reference time interval.
Lack period t of gateway meter as for ceramic manufacturing enterprise in case 1m4The distances between each candidate reference time interval and the time interval to be complemented are respectively 8.8%, 8.4%, …, 5%, … and 7.5% by calculation according to formula 1, wherein the minimum distance is 5%, and the corresponding candidate reference time interval is tm4_7The time interval is taken as the selected reference time interval (2017-10-1412: 00:00, 2017-10-1414: 00: 00).
203. Judging whether the distance between the selected reference time interval and the time interval to be compensated is greater than a preset distance, if so, executing 204, and if not, executing 205;
204. abandoning execution of data patching operation;
205. after judging that the distance between the selected reference time period and the time period to be complemented is not more than the preset distance, determining each missing time of the time period to be complemented, and determining the complementing time corresponding to each missing time in the selected reference time period;
206. and performing corresponding data patching on each missing number moment of the number waiting period by presetting a second formula according to the table code value of the starting moment of the number waiting period, the table code value of the ending moment of the number waiting period, the table code value of the starting moment of the selected reference period, the table code value of the ending moment of the selected reference period and the table code value of each complementing number moment of the selected reference period.
Wherein, the preset second formula is as follows:
Vt0_s+j×m=Vt0_s+(Vti_s+j×m-Vti_s)×(Vt0_e-Vt0_s)÷(Vti_e-Vti_s)
in the formula, t0For a period of time to be compensated, tiFor selecting a reference time interval, m is the data acquisition time interval, Vt0_s+j×mIs a period t of time to be compensated0Table code value, V, for the jth missing timeti_s+j×mFor selecting a reference period tiThe table code value at the jth complement time.
Lack period t of gateway meter as for ceramic manufacturing enterprise in case 1m4The time for which the number needs to be complemented is 2017-10-1513: 00:00, 1, wherein the start timetable code and the end timetable code are 2001.46kWh and 2003.46kWh respectively;
while selecting the reference period tm4_7The start schedule code and the end schedule code of (2017-10-1412: 00:00, 2017-10-1414: 00:00) are 1951.24kWh and 1953.34kWh respectively, the same time corresponding to the time needing to be complemented is 2017-10-1413: 00:00, and the code value is 1952.74 kWh. Then the table code value for the time at which the complement is required:
V2017-10-15 13:00:00=2001.46+(1952.74-1951.24)×(2003.46-2001.46)÷(1953.34-1951.24)=2002.89kWh。
the embodiment of the invention provides excellent data filling rate and realizes higher repair data quality for short-term missing of the electric meter code data for industrial and commercial users. Based on the technology for processing the missing problem of the data of the table code, the data quality of the table code can be effectively improved, the existing data can be more widely and deeply utilized, and the fine applications of power consumption cost estimation, power consumption prediction, peak-to-valley utilization level evaluation and the like are realized.
The foregoing is a detailed description of the short-term missing repairing method for commercial user electrical meter code data provided by the present invention, and the following is a description of a short-term missing repairing device for commercial user electrical meter code data provided by the present invention, referring to fig. 3, an embodiment of the short-term missing repairing device for commercial user electrical meter code data provided by the present invention includes:
an obtaining unit 301, configured to obtain a time period to be compensated of a user meter, and determine each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and a preset number of candidate reference time periods;
a calculating unit 302, configured to calculate distances between the time periods to be compensated and the candidate reference time periods, respectively, and determine a candidate reference time period corresponding to the minimum distance as a selected reference time period;
the patching unit 303 is configured to patch data in the time period to be complemented according to the table code data in the selected reference time period after judging that the distance between the selected reference time period and the time period to be complemented is not greater than the preset distance;
the preset time interval is the time interval between any two adjacent time intervals in all the time intervals including the time interval to be compensated and the candidate reference time interval.
Furthermore, the short-term missing repair device for the electric meter code data for the industrial and commercial users provided by the embodiment of the invention further comprises:
the sorting unit 300 is configured to, after it is determined that the number of the time periods to be compensated is at least two, sort the durations of all the time periods to be compensated from small to large, and if there are a plurality of time periods to be compensated that are consistent in duration, sort the plurality of time periods to be compensated that are consistent in duration from front to back according to the start time of each time period.
Furthermore, with the period to be compensated as a central point, the number of candidate reference periods before the period to be compensated is equal to the number of candidate reference periods after the period to be compensated.
Further, the calculating unit 302 specifically includes:
a calculating subunit 3021, configured to calculate distances between the time period to be compensated and the candidate reference time periods, respectively;
a first determining subunit 3022, configured to determine a candidate reference period corresponding to the minimum distance as a selected reference period;
the calculating subunit 3021 is further configured to calculate, according to the table code value at the starting time of the number-to-be-complemented period, the table code value at the ending time of the number-to-be-complemented period, the table code value at the starting time of each candidate reference period, and the table code value at the ending time of each candidate reference period, distances between the number-to-be-complemented period and each candidate reference period by presetting a first formula, respectively;
wherein, the preset first formula is as follows:
Dist(t0,ti)=|(Vt0_e-Vt0_s)-(Vti_e-Vti_s)|/|Vt0_e-Vt0_s|*100%
in the formula, t0For a period of time to be compensated, tiIs the ith candidate reference period, Vt0_sFor table code values at the start of the number period to be complemented, Vt0_eValue of table code at the end of the period to be complemented, Vti_sFor table code values at the start of the ith candidate reference period, Vti_eIs the table code value at the end time of the ith candidate reference period.
Further, the repairing unit 303 specifically includes:
a second determining subunit 3031, configured to determine, after determining that the distance between the selected reference time period and the to-be-complemented time period is not greater than the preset distance, each missing time of the to-be-complemented time period, and determine, in the selected reference time period, a complementing time corresponding to each missing time;
a patching subunit 3032, configured to perform corresponding data patching on each missing number time of the to-be-complemented time period by presetting a second formula according to the table code value at the start time of the to-be-complemented time period, the table code value at the end time of the to-be-complemented time period, the table code value at the start time of the selected reference time period, the table code value at the end time of the selected reference time period, and the table code value at each complementing number time of the selected reference time period;
wherein, the preset second formula is as follows:
Vt0_s+j×m=Vt0_s+(Vti_s+j×m-Vti_s)×(Vt0_e-Vt0_s)÷(Vti_e-Vti_s)
in the formula, t0For a period of time to be compensated, tiFor selecting a reference time interval, m is the data acquisition time interval, Vt0_s+j×mIs a period t of time to be compensated0Table code value, V, for the jth missing timeti_s+j×mFor selecting a reference period tiThe table code value at the jth complement time.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
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; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (6)
1. A short-term missing repairing method for electricity consumption table data of industrial and commercial users is characterized by comprising the following steps:
acquiring a time period to be compensated of a user meter, and determining each candidate reference time period corresponding to the time period to be compensated according to a preset time interval and the preset number of candidate reference time periods;
respectively calculating the distance between the time interval to be complemented and each candidate reference time interval, and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval; wherein the step of calculating the distance between the time interval to be complemented and each candidate reference time interval respectively specifically comprises:
respectively calculating the distance between the number waiting period and each candidate reference period by presetting a first formula according to the table code value at the starting time of the number waiting period, the table code value at the ending time of the number waiting period, the table code value at the starting time of each candidate reference period and the table code value at the ending time of each candidate reference period;
wherein the preset first formula is:
Dist(t0,ti)=|(Vt0_e-Vt0_s)-(Vti_e-Vti_s)|/|Vt0_e-Vt0_s|*100%
in the formula, t0For a period of time to be compensated, tiIs the ith candidate reference period, Vt0_sFor table code values at the start of the number period to be complemented, Vt0_eValue of table code at the end of the period to be complemented, Vti_sFor table code values at the start of the ith candidate reference period, Vti_eTable code value for the i-th candidate reference period end time;
after judging that the distance between the selected reference time interval and the time interval to be compensated is not more than the preset distance, performing data repair on the time interval to be compensated according to the table code data of the selected reference time interval, which specifically comprises the following steps:
after the distance between the selected reference time period and the time period to be complemented is judged to be not more than a preset distance, determining each missing time of the time period to be complemented, and determining the complementing time corresponding to each missing time in the selected reference time period;
according to the table code value of the starting time of the number waiting period, the table code value of the ending time of the number waiting period, the table code value of the starting time of the selected reference period, the table code value of the ending time of the selected reference period and the table code value of each number complementing time of the selected reference period, corresponding data patching is carried out on each number missing time of the number waiting period through a preset second formula;
wherein the preset second formula is:
Vt0_s+j×m=Vt0_s+(Vti_s+j×m-Vti_s)×(Vt0_e-Vt0_s)÷(Vti_e-Vti_s)
in the formula, t0For a period of time to be compensated, tiFor selecting a reference time interval, m is the data acquisition time interval, Vt0_s+j×mIs a period t of time to be compensated0Table code value, V, for the jth missing timeti_s+j×mFor selecting a reference period tiA table code value at the jth complement time;
the preset time interval is a time interval between any two adjacent time intervals in all time intervals including the time interval to be compensated and the candidate reference time interval.
2. The method for short-term missing repair of code data for commercial and industrial users according to claim 1, further comprising:
after the number of the time periods to be compensated is determined to be at least two, sequencing the durations of all the time periods to be compensated from small to large, and if a plurality of time periods to be compensated are consistent, sequencing a plurality of time periods to be compensated with consistent durations from front to back according to the starting time of each time period.
3. The commercial power consumption meter code data short-term missing repairing method according to claim 1, wherein the number of the candidate reference periods before the time period to be compensated is equal to the number of the candidate reference periods after the time period to be compensated, with the time period to be compensated as a center point.
4. A short-term missing repairing device for electricity consumption meter data of industrial and commercial users is characterized by comprising:
the acquisition unit is used for acquiring the number-to-be-compensated time periods of the user meter and determining each candidate reference time period corresponding to the number-to-be-compensated time period according to a preset time interval and the preset number of the candidate reference time periods;
the calculating unit is used for calculating the distance between the time interval to be complemented and each candidate reference time interval respectively and determining the candidate reference time interval corresponding to the minimum distance as a selected reference time interval, wherein the calculating unit specifically comprises a calculating subunit, a first determining subunit and a second determining subunit;
a calculating subunit, configured to calculate distances between the time period to be complemented and the candidate reference time periods, respectively;
a first determining subunit, configured to determine the candidate reference time interval corresponding to the minimum distance as a selected reference time interval;
the calculating subunit is further configured to calculate, according to the table code value at the starting time of the to-be-complemented time period, the table code value at the ending time of the to-be-complemented time period, the table code value at the starting time of each candidate reference time period, and the table code value at the ending time of each candidate reference time period, distances between the to-be-complemented time period and each candidate reference time period by using a preset first formula;
wherein the preset first formula is:
Dist(t0,ti)=|(Vt0_e-Vt0_s)-(Vti_e-Vti_s)|/|Vt0_e-Vt0_s|*100%
in the formula, t0For a period of time to be compensated, tiIs the ith candidate reference period, Vt0_sFor table code values at the start of the number period to be complemented, Vt0_eValue of table code at the end of the period to be complemented, Vti_sFor table code values at the start of the ith candidate reference period, Vti_eTable code value for the i-th candidate reference period end time;
the second determining subunit is configured to determine, after determining that the distance between the selected reference time period and the to-be-complemented time period is not greater than a preset distance, each missing time of the to-be-complemented time period, and determine, in the selected reference time period, a complementing time corresponding to each missing time;
the patching subunit is used for performing corresponding data patching on each missing number moment of the number period to be complemented by a preset second formula according to the table code value of the starting moment of the number period to be complemented, the table code value of the ending moment of the number period to be complemented, the table code value of the starting moment of the selected reference period, the table code value of the ending moment of the selected reference period and the table code value of each complementing time of the selected reference period;
wherein the preset second formula is:
Vt0_s+j×m=Vt0_s+(Vti_s+j×m-Vti_s)×(Vt0_e-Vt0_s)÷(Vti_e-Vti_s)
in the formula, t0For a period of time to be compensated, tiFor selecting a reference time interval, m is the data acquisition time interval, Vt0_s+j×mIs a period t of time to be compensated0Table code value, V, for the jth missing timeti_s+j×mFor selecting a reference period tiA table code value at the jth complement time;
the patching unit is used for performing data patching on the time interval to be complemented according to the table code data of the selected reference time interval after judging that the distance between the selected reference time interval and the time interval to be complemented is not greater than a preset distance;
the preset time interval is a time interval between any two adjacent time intervals in all time intervals including the time interval to be compensated and the candidate reference time interval.
5. The apparatus for repairing short term missing of code data for commercial and industrial use according to claim 4, further comprising:
and the sequencing unit is used for sequencing the durations of all the time periods to be compensated from small to large after the number of the time periods to be compensated is determined to be at least two, and if the durations of a plurality of the time periods to be compensated are consistent, sequencing a plurality of the time periods to be compensated with consistent durations from front to back according to the starting time of each time period.
6. The apparatus for short-term missing repair of code data for utility and commercial users according to claim 4, wherein the number of the candidate reference periods before the period to be compensated is equal to the number of the candidate reference periods after the period to be compensated, with the period to be compensated as a center point.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810146112.6A CN108363789B (en) | 2018-02-12 | 2018-02-12 | Short-term missing repairing method and device for electricity consumption meter data of industrial and commercial users |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810146112.6A CN108363789B (en) | 2018-02-12 | 2018-02-12 | Short-term missing repairing method and device for electricity consumption meter data of industrial and commercial users |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108363789A CN108363789A (en) | 2018-08-03 |
CN108363789B true CN108363789B (en) | 2021-09-17 |
Family
ID=63005770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810146112.6A Active CN108363789B (en) | 2018-02-12 | 2018-02-12 | Short-term missing repairing method and device for electricity consumption meter data of industrial and commercial users |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108363789B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111127247B (en) * | 2019-11-21 | 2024-01-19 | 深圳供电局有限公司 | Electric quantity data acquisition method, device, computer equipment and storage medium |
CN117632927A (en) * | 2023-11-24 | 2024-03-01 | 九科信息技术(深圳)有限公司 | Data processing method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104992239A (en) * | 2015-06-24 | 2015-10-21 | 国网山东省电力公司电力科学研究院 | Correlation coefficient-based industry electricity consumption law forecasting method |
CN105678046A (en) * | 2014-11-18 | 2016-06-15 | 日本电气株式会社 | Missing data repairing method and device in time-space sequence data |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130033729A (en) * | 2011-09-27 | 2013-04-04 | 삼성전자주식회사 | Image scanning apparatus and method for image scanning thereof |
US20170300317A1 (en) * | 2016-03-24 | 2017-10-19 | Knight Point Systems, Inc. | System and method for patching software in a target computer system device |
-
2018
- 2018-02-12 CN CN201810146112.6A patent/CN108363789B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105678046A (en) * | 2014-11-18 | 2016-06-15 | 日本电气株式会社 | Missing data repairing method and device in time-space sequence data |
CN104992239A (en) * | 2015-06-24 | 2015-10-21 | 国网山东省电力公司电力科学研究院 | Correlation coefficient-based industry electricity consumption law forecasting method |
Also Published As
Publication number | Publication date |
---|---|
CN108363789A (en) | 2018-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110147367B (en) | Temperature missing data filling method and system and electronic equipment | |
CN107305577B (en) | K-means-based appropriate address data processing method and system | |
CN109308538B (en) | Method and device for predicting transaction conversion rate | |
CN108363789B (en) | Short-term missing repairing method and device for electricity consumption meter data of industrial and commercial users | |
CN111199493A (en) | Arrearage risk identification method based on customer payment information and credit investigation information | |
CN102521080A (en) | Computer data recovery method for electricity-consumption information collecting system for power consumers | |
CN115600824A (en) | Early warning method and device for carbon emission, storage medium and electronic equipment | |
CN106127602B (en) | Electricity stealing identification method and device based on reduction outlier algorithm | |
CN111325255B (en) | Specific crowd delineating method and device, electronic equipment and storage medium | |
CN111310121A (en) | New energy output probability prediction method and system | |
CN110728540A (en) | Enterprise recommendation method, device, equipment and medium | |
CN111127114A (en) | Method and device for determining power load declaration data | |
CN115907391A (en) | Scheduling method and system for electric energy meter verification task | |
CN111260085B (en) | Device replacement man-hour assessment method, device, equipment and medium | |
CN104978604B (en) | A kind of analog simulation method and device based on professional ability model | |
CN110244096B (en) | Method for automatically discovering and processing electric meter full code in electric energy metering system | |
CN112801415A (en) | Ultra-short-term load prediction method and system based on Markov chain distribution model | |
CN112308340A (en) | Power data processing method and device | |
CN113780630B (en) | Method for realizing form code prediction based on historical electricity consumption data of electricity consumption customer | |
CN109615095A (en) | A kind of device management method and device | |
CN114048905A (en) | Price prediction method, device, equipment and storage medium of power resource | |
CN107016062B (en) | Method and system for identifying trial listening cheating behaviors | |
CN117710103A (en) | Green card reference price prediction method and system based on green electricity transaction blockchain | |
CN114611815A (en) | Profit and loss data prediction method and device, computer equipment and readable storage medium | |
CN114970323A (en) | Intelligent electric energy meter service life prediction method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |