CN111666537B - Energy consumption statistical method based on table bottom value - Google Patents

Energy consumption statistical method based on table bottom value Download PDF

Info

Publication number
CN111666537B
CN111666537B CN202010470146.8A CN202010470146A CN111666537B CN 111666537 B CN111666537 B CN 111666537B CN 202010470146 A CN202010470146 A CN 202010470146A CN 111666537 B CN111666537 B CN 111666537B
Authority
CN
China
Prior art keywords
last
table bottom
bottom value
time
current
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
Application number
CN202010470146.8A
Other languages
Chinese (zh)
Other versions
CN111666537A (en
Inventor
姚丽丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Dongyuan Panneng Energy Technology Co ltd
Original Assignee
Nanjing Dongyuan Panneng Energy Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Dongyuan Panneng Energy Technology Co ltd filed Critical Nanjing Dongyuan Panneng Energy Technology Co ltd
Priority to CN202010470146.8A priority Critical patent/CN111666537B/en
Publication of CN111666537A publication Critical patent/CN111666537A/en
Application granted granted Critical
Publication of CN111666537B publication Critical patent/CN111666537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Abstract

The energy consumption statistical method based on the table bottom value comprises the steps of carrying out energy consumption statistics of minutes, hours, days, months and years based on the last value; removing and counting abnormal data; the special treatment for lowering the table bottom value after replacing the meter is aimed at. Compared with the traditional calculation method for calculating the hour consumption, the day consumption, the month consumption and the year consumption by using minute consumption accumulation, the method for calculating the month consumption and the month consumption accumulation, the method for calculating the energy consumption based on the last table bottom value is provided, and the method can not cause the error of all subsequent data due to the error of one data; meanwhile, the table bottom value reduction logic aiming at abnormal data and the replacement meter is processed, so that statistics are more accurate and perfect. The invention provides a more accurate energy consumption statistics means for the energy management system, and has more practical application value for energy consumption statistics.

Description

Energy consumption statistical method based on table bottom value
Technical Field
The invention belongs to the technical field of energy management, relates to an energy consumption statistical method based on a table bottom value, and particularly relates to an energy consumption statistical method based on a last table bottom value.
Background
Energy has historically been an important topic in the problem of sustainable development, and energy conservation has been a social task. Today, the energy crisis is becoming more serious, the energy shortage is also becoming an important factor for the economic sustainable development, and energy conservation and consumption reduction become difficult tasks which must be completed. The primary premise of realizing energy conservation and consumption reduction is to comprehensively monitor energy and accurately count energy consumption.
Many energy consumption systems are already in the market at present, and most of the energy consumption calculation processes of the systems are: the minute consumption is calculated by subtracting the current value and the last value, the hour consumption is equal to the accumulation of the minute consumption, the daily consumption is equal to the accumulation of the hour consumption, the month consumption is equal to the accumulation of the daily consumption, and the year consumption is equal to the accumulation of the month consumption. The method has the advantages that the data calculation dimensions are unified, the accumulated calculation of the related usage data in each dimension can be equal, and if the accumulation of all minute data in the month is utilized, the data is necessarily equal to the total usage data in the month. However, this method has a disadvantage in that, once an abnormality occurs in the data of one bottom layer at a time, all the data of the upper layer later will be erroneous. For example, if at a certain moment, the minute data is wrong due to the abnormal uploading of the meter data, the data of all the following hours, days, months and years have statistical errors.
Therefore, how to avoid the situation that the high-level data also has the energy consumption statistics error due to the partial low-level data error in the traditional sense through the level statistics is the content of important research by those skilled in the art.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide an energy consumption statistical method based on the table bottom value, which provides a statistical method for realizing data statistics of minutes, hours, days, months and years based on the last table bottom value, and processes abnormal data and table replacement logic, thereby further improving the accuracy of statistics.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows: an energy consumption statistical method based on a table bottom value comprises the following steps:
step (A), defining related parameters, wherein the parameters comprise last table bottom values of minutes, hours, days, months and years; last time of table bottom value extraction time of minutes, hours, days, months and years; counting the current table bottom value at the current time; counting the current time of the moment at present; relevant statistics of minutes, hours, days, months, and years; counting time interval periods;
step (B), if the time interval in the step (A) is counted, respectively calculating statistics of minutes, hours, days, months and years;
step (C), according to the calculation result of the statistic in the step (B), carrying out the elimination processing of abnormal data;
step (D), updating the last table bottom value and the last extraction time according to the change of the current statistical time and the hour, day, month and year of the last statistical time;
step (E), carrying out statistic storage processing;
wherein, in the step (a), defining the relevant parameters includes the following:
(A1) Setting a last table bottom value and a last table bottom value extraction time, wherein the last table bottom value and the last table bottom value extraction time are expressed as follows:
the last minute table bottom value is: lastvalue_min, last table value extraction time in minutes: lasttime_min;
the last hour table bottom value is: lastvalue_hour, last table base value extraction time: lasttime_hour;
the last day table bottom value is: lastvalue_day, last day table base value extraction time: lasttime_day;
the last month has the following table bottom value: lastvalue_Month, last table bottom value extraction time of month: lasttime_mole;
the last year table bottom value is: lastvalue_year, last table value extraction time: lasttime_year;
(A2) Setting a current table bottom value of a current statistical moment and a current time of the statistical moment, wherein the current table bottom value and the current time of the statistical moment are expressed as follows:
current table base value: curValue, current time, curTime
(A3) The relevant statistics are set as follows:
minute statistics: stavalue_min; hour statistics: stavalue_house;
daily statistics: stavalue_day; month statistics: stavalue_mole;
year statistics: stavalue_year;
(A4) The statistical interval time period is set as Stacycle.
Further, in the step (B), the statistic calculation process is as follows:
(B1) When the statistical time is reached, the current table bottom value is respectively assigned to lastvalue_ min, lastValue _ hour, lastValue _ day, lastValue _ month, lastValue _year when the table is run for the first time, namely when no last table bottom value exists, and the current time is assigned to lasttime_min, lasttime_ hour, lastTime _day and lasttime_ month, lastTime _year;
the first operation is carried out, and statistic calculation is not carried out;
(B2) When the statistical time interval is reached and the last table bottom value exists, the current table bottom value at the current moment is extracted, and the calculation process of the relevant statistics is as follows:
staValue_min=curValue-lastValue_min;
staValue_hour=curValue-lastValue_hour;
staValue_day=curValue-lastValue_day;
staValue_month=curValue-lastValue_month;
staValue_year=curValue–lastValue_year。
further, in the step (C), the processing method for eliminating abnormal usage according to the statistic calculation result is as follows:
(C1) Because the statistical consumption is unlikely to be less than 0, if the statistical consumption is less than 0, two conditions generally exist, one is abnormal data, and the other is subjected to table replacement or table zero clearing treatment; for which problem is caused, comparing and judging the statistic alarm limit value with the current table bottom value, wherein the statistic alarm limit value is equal to the maximum consumption in unit time multiplied by the time length of the last data statistics; if the currently extracted table bottom value is smaller than the statistic alarm limit value, the table change or the table meter zero clearing operation is indicated, otherwise, the table is abnormal data. The statistics warning limit value is used for comparing and judging with the current table bottom value, specifically, the maximum value according to the consumption, such as the maximum power can be calculated according to the consumption, and the flowmeter can be calculated according to the maximum instantaneous flow. If the maximum electricity consumption per hour is 30kwh and the data update time is 2 hours, if the current table bottom value is smaller than 60, the table is replaced or cleared, otherwise, the table is abnormal data
(C2) For the situation that the ultra-large value appears due to the fact that abnormal data are sent, the statistics warning limit value is set to be used for judging, and the statistics warning limit value is equal to the maximum consumption in unit time multiplied by the time length counted by the last time data; and judging, if the current statistics exceeds the maximum consumption limit, marking statistics abnormality as well, and not performing storage updating processing later. The judgment is carried out by setting the alarm limit value of the utilization statistics, and specifically, the judgment is based on the maximum value of the consumption, such as the maximum power calculation for the electricity consumption, and the calculation based on the maximum instantaneous flow for the flowmeter. If the maximum power consumption per hour is 30kwh for power consumption, and the data update time is 2 hours at the current time, if the current table bottom value is smaller than (the last table bottom value +60), the normal state is indicated, otherwise, the abnormal state is indicated.
Further, in the step (D), when the statistics data of the statistics judgment are normal, the process of updating the last table bottom value and the last extraction time is as follows:
(D1-1) assigning the current table base value to the minute last table base value, and assigning the current time to the minute last table base value extraction time, namely:
lastValue_min=curValue;
lastTime_min=curTime;
(D1-2) determining that if the hour of the current statistical time is not equal to the hour of the last statistical time, assigning the current table bottom value to the hour last table bottom value, and assigning the current time to the hour last table bottom value extraction time, namely:
If(curTime.hour!=lastTime_hour.hour)
{lastValue_hour=curValue;
lastTime_hour=curTime;}
(D1-3) determining that if the day of the current statistical time is not equal to the day of the last statistical time, assigning the current table bottom value to the last table bottom value of the day, and assigning the current time to the last table bottom value extraction time of the day, namely:
If(curTime.day!=lastTime_day.day)
{lastValue_day=curValue;
lastTime_day=curTime;}
(D1-4) judging that if the month of the current statistical time is not equal to the month of the last statistical time, assigning the current table bottom value to the last table bottom value of the month, and assigning the current time to the last table bottom value extraction time of the month, namely:
If(curTime.month!=lastTime_day.month)
{lastValue_month=curValue;
lastTime_month=curTime;}
(D1-5) determining that if the year of the current statistical time is not equal to the year of the last statistical time, assigning the current table bottom value to the last table bottom value of the year, and assigning the current time to the last table bottom value extraction time of the year, namely:
If(curTime.year!=lastTime_day.year)
{lastValue_year=curValue;
lastTime_year=curTime;}
further, in the step (D), when the table change or the table zero clearing occurs in the statistics data of the statistics judgment, the process of updating the last table bottom value and the last table bottom value extraction time is as follows:
(D2-1) assigning a minute current time to the minute last table bottom value extraction time on the basis of the statistical amount calculation, namely:
lastValue_min=curValue;
lastTime_min=curTime;
(D2-2) hour last table bottom = current table bottom-last hour statistics, wherein the last hour statistics is stavalue_hour; the current time of the hour is given to the last table bottom value extraction time of the hour, namely:
lastValue_hour=curValue-staValue_hour;
(D2-3) last day table bottom value = current table bottom value-last day statistical amount, wherein the last day statistical amount is stavalue_day; the current time of day is given to the last table bottom value extraction time of day, namely:
lastValue_day=curValue-staValue_day;
(D2-4), last month table bottom value = current table bottom value-last month statistical amount, wherein last month statistical amount is stavalue_month; the current time of the month is given to the last table bottom value extraction time of the month, namely:
lastValue_month=curValue-staValue_month;
(D2-5), last year table bottom = current table bottom-last year statistics, wherein last year statistics is stavalue_year; the current year time is given to the last table bottom value extraction time of the year, namely:
lastValue_year=curValue-staValue_year;
(D2-6) for the table change record, performing storage registration, wherein the registration information comprises a table id, a table bottom value before the replacement, a table bottom value after the replacement and a replacement time.
Further, in the step (D), when the statistic data of the statistic judgment is not a table change and the data is abnormal, the processing method for updating the last table bottom value and the last table bottom value extraction time is as follows:
all last table bottom values are not updated, and the last table bottom value extraction time is updated, namely:
lastTime_min=curTime;
lastTime_hour=curTime;
lastTime_day=curTime;
lastTime_month=curTime;
lastTime_year=curTime。
further, in the step (E), the statistic storage processing procedure is as follows:
(E1) If the current data is marked with abnormal statistics, not performing database storage updating processing;
(E2) If the statistic data is normal, the database storage updating processing is carried out, the related usage statistic value is stored in a warehouse, and the stored time stamp is the last table bottom value extraction time.
The format of the last table bottom value extraction time is as follows: "yyyy-MM-dd hh: MM"
Due to the application of the technical scheme, compared with the prior art, the invention has the following beneficial effects:
the invention provides an energy consumption statistical method based on each granularity of minutes, hours, days, months, years and the like of the last table bottom value, which can ensure that other data are not affected under the condition of partial data abnormality, and simultaneously provides the process of eliminating the data abnormality and changing expression conditions, thereby providing an effective method for accurate statistical calculation of energy consumption and further providing a reliable basis for energy conservation and emission reduction.
The invention provides an energy consumption statistical calculation method based on a last table bottom value, wherein the minute consumption, the hour consumption, the daily consumption, the month consumption and the year consumption of the method are all calculated based on the table bottom value, so that the error of all subsequent data caused by the error of one low-granularity data is avoided; meanwhile, the invention processes the problem of table bottom value reduction caused by abnormal data and table meter replacement, so that statistics are more accurate and perfect. The method provides a more accurate energy consumption statistics means for the energy management system, and has very practical application value for energy consumption statistics.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an energy consumption statistical method based on the last table bottom value.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1;
an energy consumption statistical method based on a table bottom value comprises the following steps:
step (A), defining related parameters, wherein the parameters comprise last table bottom values of minutes, hours, days, months and years; last time of table bottom value extraction time of minutes, hours, days, months and years; counting the current table bottom value at the current time; counting the current time of the moment at present; relevant statistics of minutes, hours, days, months, and years; counting time interval periods;
step (B), if the time interval in the step (A) is counted, respectively calculating statistics of minutes, hours, days, months and years;
step (C), according to the calculation result of the statistic in the step (B), carrying out the elimination processing of abnormal data;
step (D), updating the last table bottom value and the last extraction time according to the change of the current statistical time and the hour, day, month and year of the last statistical time;
step (E), carrying out statistic storage processing;
wherein, in the step (a), defining the relevant parameters includes the following:
(A1) Setting a last table bottom value and a last table bottom value extraction time, wherein the last table bottom value and the last table bottom value extraction time are expressed as follows:
the last minute table bottom value is: lastvalue_min, last table value extraction time in minutes: lasttime_min;
the last hour table bottom value is: lastvalue_hour, last table base value extraction time: lasttime_hour;
the last day table bottom value is: lastvalue_day, last day table base value extraction time: lasttime_day;
the last month has the following table bottom value: lastvalue_Month, last table bottom value extraction time of month: lasttime_mole;
the last year table bottom value is: lastvalue_year, last table value extraction time: lasttime_year;
(A2) Setting a current table bottom value of a current statistical moment and a current time of the statistical moment, wherein the current table bottom value and the current time of the statistical moment are expressed as follows:
current table base value: curValue, current time, curTime
(A3) The relevant statistics are set as follows:
minute statistics: stavalue_min; hour statistics: stavalue_house;
daily statistics: stavalue_day; month statistics: stavalue_mole;
year statistics: stavalue_year;
(A4) The statistical interval time period is set as Stacycle. The time period can be arbitrarily set, but the set value must be between 0 and 60 and can be divided by 60.
Assuming a statistical interval period of 15 minutes, then when the minutes are: at 0 point, 15 points, 30 points, 45 points, statistical treatment is required.
Further, in the step (B), the statistic calculation process is as follows:
(B1) When the statistical time is reached, the current table bottom value is respectively assigned to lastvalue_ min, lastValue _ hour, lastValue _ day, lastValue _ month, lastValue _year when the table is run for the first time, namely when no last table bottom value exists, and the current time is assigned to lasttime_min, lasttime_ hour, lastTime _day and lasttime_ month, lastTime _year;
the first operation is carried out, and statistic calculation is not carried out;
if the current time is "2020-04-27 09:00:00" and the program starts running for the first time, the obtained table bottom value of the table a is 234.5 currently, then:
lastValue_min=234.5,astTime_min=“2020-04-27 09:00:00”;
lastValue_hour=234.5,lastTime_hour=“2020-04-27 09:00:00”;
lastValue_day=235.5,lastTime_day=“2020-04-27 09:00:00”;
lastValue_month=234.5,lastTime_month=“2020-04-27 09:00:00”;
lastValue_year=234.5,lastTime_year=“2020-04-27 09:00:00”;
at this time, the next cycle judgment is directly performed without performing the subsequent statistical calculation processing.
(B2) When the statistical time interval is reached and the last table bottom value exists, the current table bottom value at the current moment is extracted, and the calculation process of the relevant statistics is as follows:
staValue_min=curValue-lastValue_min;
staValue_hour=curValue-lastValue_hour;
staValue_day=curValue-lastValue_day;
staValue_month=curValue-lastValue_month;
staValue_year=curValue–lastValue_year。
if, after 15 minutes from the first start of operation, "2020-04-27 09:15:00", the base value of meter a is 256.6, then the relevant statistics are calculated as follows:
staValue_min=256.6-234.5=22.1;
staValue_hour=256.6-234.5=22.1;
staValue_day=256.6-234.5=22.1;
staValue_month=256.6-234.5=22.1;
staValue_year=256.6-234.5=22.1。
further, in the step (C), the processing method for eliminating abnormal usage according to the statistic calculation result is as follows:
(C1) Because the statistical consumption is unlikely to be less than 0, if the statistical consumption is less than 0, two conditions generally exist, one is abnormal data, and the other is subjected to table replacement or table zero clearing treatment; for which problem is caused, judging by using a statistic alarm limit value, if the currently extracted table bottom value is smaller than the statistic alarm limit value, indicating that the table replacement or the table zero clearing operation occurs, otherwise, obtaining abnormal data;
if the minute statistics is smaller than 0, marking the abnormal minute statistics, and not carrying out storage updating treatment in the follow-up process;
if the hour statistics is smaller than 0, marking the hour statistics abnormality, and not carrying out storage updating treatment subsequently;
if the daily statistics is smaller than 0, marking the daily statistics abnormal, and not carrying out storage updating treatment in the follow-up process;
if the month statistics is smaller than 0, marking month statistics abnormality, and not carrying out storage updating treatment in the follow-up process;
if the year statistics are smaller than 0, marking the year statistics abnormal, and not carrying out storage updating processing later.
If at some point the last table bottom value of a minute is 2345.9 and the current table bottom value is 987.3, the minute statistic is: 987.3-2345.9 = -1358.6, when the usage of test minutes has a negative value, the current data is an abnormal value, and the related usage at the current moment is not subjected to storage update processing.
(C2) And judging the condition that the excessive value occurs due to the fact that abnormal data are sent in part, and if the current statistics exceeds the maximum usage limit value, marking the statistics abnormal, and not performing storage updating processing in the follow-up process.
If the minute statistics is larger than the maximum consumption limit value of the minutes, marking the abnormal minute statistics, and not carrying out storage updating treatment in the follow-up process;
if the hour statistics is larger than the hour maximum consumption limit value, marking hour statistics abnormality, and not carrying out storage updating treatment in the follow-up process;
if the daily statistics is larger than the maximum daily amount limit value, marking the daily statistics abnormality, and not carrying out storage updating treatment in the follow-up process;
if the month statistics is larger than the maximum limit value of the month consumption, marking the month statistics abnormal, and not carrying out storage updating treatment in the follow-up process;
if the annual statistics is larger than the annual usage maximum limit value, marking annual statistics abnormality, and not carrying out storage updating processing later.
If at some point the last table floor value before 15 minutes was 2345.9 and the current table floor value was 34456677889.8, the minute statistic is: 34456677889.8-2345.9 = 34456675543.9, and the maximum usage of minutes is 1000, which indicates that the current data is an outlier, and the related usage at the current time is not subjected to storage update processing.
Further, in the step (D), when the statistics data of the statistics judgment are normal, the process of updating the last table bottom value and the last extraction time is as follows:
(D1-1) assigning the current table base value to the minute last table base value, and assigning the current time to the minute last table base value extraction time, namely:
lastValue_min=curValue;
lastTime_min=curTime;
(D1-2) determining that if the hour of the current statistical time is not equal to the hour of the last statistical time, assigning the current table bottom value to the hour last table bottom value, and assigning the current time to the hour last table bottom value extraction time, namely:
If(curTime.hour!=lastTime_hour.hour)
{lastValue_hour=curValue;
lastTime_hour=curTime;}
(D1-3) determining that if the day of the current statistical time is not equal to the day of the last statistical time, assigning the current table bottom value to the last table bottom value of the day, and assigning the current time to the last table bottom value extraction time of the day, namely:
If(curTime.day!=lastTime_day.day)
{lastValue_day=curValue;
lastTime_day=curTime;}
(D1-4) judging that if the month of the current statistical time is not equal to the month of the last statistical time, assigning the current table bottom value to the last table bottom value of the month, and assigning the current time to the last table bottom value extraction time of the month, namely:
If(curTime.month!=lastTime_day.month)
{lastValue_month=curValue;
lastTime_month=curTime;}
(D1-5) determining that if the year of the current statistical time is not equal to the year of the last statistical time, assigning the current table bottom value to the last table bottom value of the year, and assigning the current time to the last table bottom value extraction time of the year, namely:
If(curTime.year!=lastTime_day.year)
{lastValue_year=curValue;
lastTime_year=curTime;}。
for the above procedure, the following is exemplified:
2020-04-27 09:00:00, the table base values are: 234.5;
2020-04-27 09:15:00, the values of the table bottoms are: 256.6;
2020-04-27 09:30:00, the table base values are: 280.8;
2020-04-27 09:45:00, the table base values are: 302.2;
2020-04-27 10:00:00, the table base values are: 336.9;
2020-04-28:00:00, the table base values are: 1023.8;
2020-04-29 00:00:00, the table bottom values are: 2653.2;
2020-04-30:00:00, the table bottom values are: 4578.8;
2020-05-01:00:00, the table bottom values are: 5876.4;
then, between 2020-04-27 09:15:00 and 2020-04-27 09:45:00, after the related statistics are processed, only the last minute value and the last time are updated; 2020-04-27 10:00:00, and when a change in day occurs, a change in minute, hour, and day occurs, and when a change in month occurs, a change in minute, hour, day, and month occurs.
2020-04-27 09:15:00:
lastValue_min=256.6,lastTime_min=2020-04-27 09:15:00;
lastValue_hour=234.5,lastTime_hour=2020-04-27 09:00:00;
lastValue_day=234.5,lastTime_day=2020-04-27 09:00:00;
lastValue_month=234.5,lastTime_month=2020-04-27 09:00:00;
lastValue_year=234.5,lastTime_year=2020-04-27 09:00:00;
2020-04-27 09:30:00:
lastValue_min=280.8,lastTime_min=2020-04-27 09:30:00;
lastValue_hour=234.5,lastTime_hour=2020-04-27 09:00:00;
lastValue_day=234.5,lastTime_day=2020-04-27 09:00:00;
lastValue_month=234.5,lastTime_month=2020-04-27 09:00:00;
lastValue_year=234.5,lastTime_year=2020-04-27 09:00:00;
2020-04-27 09:45:00:
lastValue_min=302.2,lastTime_min=2020-04-27 09:45:00;
lastValue_hour=234.5,lastTime_hour=2020-04-27 09:00:00;
lastValue_day=234.5,lastTime_day=2020-04-27 09:00:00;
lastValue_month=234.5,lastTime_month=2020-04-27 09:00:00;
lastValue_year=234.5,lastTime_year=2020-04-27 09:00:00;
2020-04-27 10:00:00:
lastValue_min=336.9,lastTime_min=2020-04-27 10:00:00;
lastValue_hour=336.9,lastTime_hour=2020-04-27 10:00:00;
lastValue_day=234.5,lastTime_day=2020-04-27 09:00:00;
lastValue_month=234.5,lastTime_month=2020-04-27 09:00:00;
lastValue_year=234.5,lastTime_year=2020-04-27 09:00:00;
2020-04-28 00:00:00:
lastValue_min=1023.8,lastTime_min=2020-04-28 00:00:00;
lastValue_hour=1023.8,lastTime_hour=2020-04-28 00:00:00;
lastValue_day=1023.8,lastTime_day=2020-04-28 00:00:00;
lastValue_month=234.5,lastTime_month=2020-04-27 09:00:00;
lastValue_year=234.5,lastTime_year=2020-04-27 09:00:00;
2020-05-01:00:00:
lastValue_min=5876.4,lastTime_min=2020-05-01 00:00:00;
lastValue_hour=5876.4,lastTime_hour=2020-05-01 00:00:00;
lastValue_day=5876.4,lastTime_day=2020-05-01 00:00:00;
lastValue_month=5876.4,lastTime_month=2020-05-01 00:00:00;
lastValue_year=234.5,lastTime_year=2020-04-27 09:00:00;
further, in the step (D), when the table change or the table zero clearing occurs in the statistics data of the statistics judgment, the process of updating the last table bottom value and the last table bottom value extraction time is as follows:
(D2-1) assigning a minute current time to the minute last table bottom value extraction time on the basis of the statistical amount calculation, namely:
lastValue_min=curValue;
lastTime_min=curTime;
(D2-2) hour last table bottom = current table bottom-last hour statistics, wherein the last hour statistics is stavalue_hour; the current time of the hour is given to the last table bottom value extraction time of the hour, namely:
lastValue_hour=curValue-staValue_hour;
(D2-3) last day table bottom value = current table bottom value-last day statistical amount, wherein the last day statistical amount is stavalue_day; the current time of day is given to the last table bottom value extraction time of day, namely:
lastValue_day=curValue-staValue_day;
(D2-4), last month table bottom value = current table bottom value-last month statistical amount, wherein last month statistical amount is stavalue_month; the current time of the month is given to the last table bottom value extraction time of the month, namely:
lastValue_month=curValue-staValue_month;
(D2-5), last year table bottom = current table bottom-last year statistics, wherein last year statistics is stavalue_year; the current year time is given to the last table bottom value extraction time of the year, namely:
lastValue_year=curValue-staValue_year;
(D2-6) for the table change record, performing storage registration, wherein the registration information comprises a table id, a table bottom value before the replacement, a table bottom value after the replacement and a replacement time.
The update process of the occurrence meter clearing or replacement meter is exemplified as follows:
if at a certain moment, the relevant last value and value extraction time are as follows:
lastValue_min=989778934234.8,lastTime_min=2018-01-27 10:15:00;
lastValue_hour=989778934123.8,lastTime_hour=2018-01-27 10:00:00;
lastValue_day=989778933456.8,lastTime_day=2018-01-27 00:00:00;
lastValue_month=989778864231.8,lastTime_month=2018-01-01 00:00:00;
lastValue_year=989778864231.8,lastTime_year=2018-01-01 00:00:00;
the relevant amounts at 2018-01-27 10:15:00 are as follows:
staValue_min=22.1;
staValue_hour=57.9;
staValue_day=1560.4;
staValue_month=345632.2;
staValue_year=1245678.8;
when 2018-01-27, 10:30:00, the uploaded table bottom value is 23.6, and the statistical consumption is not updated at the moment when the table is judged to be caused by replacing the meter, and the last table bottom value is updated as follows:
lastValue_min=23.6,lastTime_min=2018-01-27 10:30:00;
lastValue_hour=23.6-57.9=-34.3,lastTime_hour=2018-01-27 10:00:00;
lastValue_day=23.6-1560.4=-1536.8,lastTime_day=2018-01-27 00:00:00;
lastValue_month=-345608.6,lastTime_month=2018-01-01 00:00:00;
lastValue_year=-1245655.2,lastTime_year=2018-01-01 00:00:00;
the update is performed according to (D1) after the other hour update time, day update time, month update time, and year update time.
Further, in the step (D), when the statistic data of the statistic judgment is not a table change and the data is abnormal, the processing method for updating the last table bottom value and the last table bottom value extraction time is as follows:
all last table bottom values are not updated, and the last table bottom value extraction time is updated, namely:
lastTime_min=curTime;
lastTime_hour=curTime;
lastTime_day=curTime;
lastTime_month=curTime;
lastTime_year=curTime。
further, in the step (E), the statistic storage processing procedure is as follows:
(E1) If the current data is marked with abnormal statistics, not performing database storage updating processing;
(E2) If the statistic data is normal, the database storage updating processing is carried out, the related usage statistic value is stored in a warehouse, and the stored time stamp is the last table bottom value extraction time.
To further illustrate the advantages of the method provided by the present invention, assuming that the above-mentioned table bottom value anomaly occurs at 2019-02-27:10:15:00, the value is 3243.3, the data at 2019-02-27:10:00 is 2345.4, the value at the current time is the anomaly data interfered during the meter transmission, and since it cannot be identified whether it is anomaly data, the minute statistic is: 3243.3-2345.4 =897.9, but the hour, day, month and year data are correct at a later time although the data are abnormal since the last value update process is not performed; if the traditional method that the minute dosage accumulation is equal to the hour dosage, the hour dosage accumulation is equal to the daily dosage, the daily dosage accumulation is equal to the month dosage, and the month dosage accumulation is equal to the year dosage is utilized, all data can have statistical errors.
In summary, the invention provides the energy consumption statistical method based on the last table bottom value, which can ensure that other data are not affected under the condition of partial data abnormality, and simultaneously provides the process of eliminating the data abnormality and changing expression condition, thereby providing an effective method for accurate statistical calculation of energy consumption and further providing a reliable basis for energy conservation and emission reduction.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.

Claims (5)

1. The energy consumption statistical method based on the table bottom value is characterized by comprising the following steps of: the method comprises the following steps:
step (A), defining related parameters, wherein the parameters comprise last table bottom values of minutes, hours, days, months and years; last time of table bottom value extraction time of minutes, hours, days, months and years; counting the current table bottom value at the current time; counting the current time of the moment at present; relevant statistics of minutes, hours, days, months, and years; counting time interval periods;
step (B), if the time interval in the step (A) is counted, respectively calculating statistics of minutes, hours, days, months and years;
step (C), judging whether the current table base number is abnormal data or is caused by table clearing or table replacement according to the calculation result of the statistic in the step (B), and performing abnormal processing; the processing method for eliminating abnormal usage according to the statistic calculation result comprises the following steps:
(C1) Because the statistical consumption is unlikely to be less than 0, if the statistical consumption is less than 0, two conditions generally exist, one is abnormal data, and the other is subjected to table replacement or table zero clearing treatment; for which problem is caused, comparing and judging a statistic alarm limit value with a current table bottom value, wherein the statistic alarm limit value is equal to the maximum consumption in unit time multiplied by the time length of the last data statistics; if the currently extracted table bottom value is smaller than the statistic alarm limit value, the table is replaced or the table is cleared, otherwise, the table is abnormal data;
(C2) For the situation that the ultra-large value appears due to the fact that abnormal data are sent up, the statistics warning limit value is set to be used for judging, and the statistics warning limit value is equal to the maximum consumption in unit time multiplied by the time length counted by the last time data; judging, if the current statistic exceeds the maximum consumption limit, marking the statistic abnormality as well, and not performing storage updating processing subsequently;
step (D), updating the last table bottom value and the last extraction time according to the change of the current statistical time and the hour, day, month and year of the last statistical time; under the condition that the statistic data of statistic judgment is normal, the process of updating the last table bottom value and the last extraction time is as follows:
(D1-1) assigning the current table base value to the minute last table base value, and assigning the current time to the minute last table base value extraction time, namely:
lastValue_min=curValue;
lastTime_min=curTime;
(D1-2) determining that if the hour of the current statistical time is not equal to the hour of the last statistical time, assigning the current table bottom value to the hour last table bottom value, and assigning the current time to the hour last table bottom value extraction time, namely:
If(curTime.hour!=lastTime_hour.hour)
{lastValue_hour=curValue;
lastTime_hour=curTime;}
(D1-3) determining that if the day of the current statistical time is not equal to the day of the last statistical time, assigning the current table bottom value to the last table bottom value of the day, and assigning the current time to the last table bottom value extraction time of the day, namely:
If(curTime.day!=lastTime_day.day)
{lastValue_day=curValue;
lastTime_day=curTime;}
(D1-4) judging that if the month of the current statistical time is not equal to the month of the last statistical time, assigning the current table bottom value to the last table bottom value of the month, and assigning the current time to the last table bottom value extraction time of the month, namely:
If(curTime.month!=lastTime_day.month)
{lastValue_month=curValue;
lastTime_month=curTime;}
(D1-5) determining that if the year of the current statistical time is not equal to the year of the last statistical time, assigning the current table bottom value to the last table bottom value of the year, and assigning the current time to the last table bottom value extraction time of the year, namely:
If(curTime.year!=lastTime_day.year)
{lastValue_year=curValue;
lastTime_year=curTime;}
updating the table bottom value and the last extraction time;
step (E), carrying out statistic storage processing;
wherein, in the step (a), defining the relevant parameters includes the following:
(A1) Setting a last table bottom value and a last table bottom value extraction time, wherein the last table bottom value and the last table bottom value extraction time are expressed as follows:
the last minute table bottom value is: lastvalue_min, last table value extraction time in minutes: lasttime_min;
the last hour table bottom value is: lastvalue_hour, last table base value extraction time: lasttime_hour;
the last day table bottom value is: lastvalue_day, last day table base value extraction time: lasttime_day;
the last month has the following table bottom value: lastvalue_Month, last table bottom value extraction time of month: lasttime_mole;
the last year table bottom value is: lastvalue_year, last table value extraction time: lasttime_year;
(A2) Setting a current table bottom value of a current statistical moment and a current time of the statistical moment, wherein the current table bottom value and the current time of the statistical moment are expressed as follows:
current table base value: curValue, current time, curTime
(A3) The relevant statistics are set as follows:
minute statistics: stavalue_min; hour statistics: stavalue_house;
daily statistics: stavalue_day; month statistics: stavalue_mole;
year statistics: stavalue_year;
(A4) The statistical interval time period is set as Stacycle.
2. The energy consumption statistical method based on the table bottom value according to claim 1, wherein: in the step (B), the statistic calculation process is as follows:
(B1) When the statistical time is reached, the current table bottom value is respectively assigned to lastvalue_ min, lastValue _ hour, lastValue _ day, lastValue _ month, lastValue _year when the table is run for the first time, namely when no last table bottom value exists, and the current time is assigned to lasttime_min, lasttime_ hour, lastTime _day and lasttime_ month, lastTime _year;
the first operation is carried out, and statistic calculation is not carried out;
(B2) When the statistical time interval is reached and the last table bottom value exists, the current table bottom value at the current moment is extracted, and the calculation process of the relevant statistics is as follows:
staValue_min=curValue-lastValue_min;
staValue_hour=curValue-lastValue_hour;
staValue_day=curValue-lastValue_day;
staValue_month=curValue-lastValue_month;
staValue_year=curValue–lastValue_year。
3. the energy consumption statistical method based on the table bottom value according to claim 1, wherein: in the step (D), when the statistics data of the statistics judgment are changed from table to table or the table is cleared, the process of updating the last table bottom value and the last table bottom value extraction time is as follows:
(D2-1) assigning a minute current time to the minute last table bottom value extraction time on the basis of the statistical amount calculation, namely:
lastValue_min=curValue;
lastTime_min=curTime;
(D2-2) hour last table bottom = current table bottom-last hour statistics, wherein the last hour statistics is stavalue_hour; the current time of the hour is given to the last table bottom value extraction time of the hour, namely:
lastValue_hour=curValue-staValue_hour;
(D2-3) last day table bottom value = current table bottom value-last day statistical amount, wherein the last day statistical amount is stavalue_day; the current time of day is given to the last table bottom value extraction time of day, namely:
lastValue_day=curValue-staValue_day;
(D2-4), last month table bottom value = current table bottom value-last month statistical amount, wherein last month statistical amount is stavalue_month; the current time of the month is given to the last table bottom value extraction time of the month, namely:
lastValue_month=curValue-staValue_month;
(D2-5), last year table bottom = current table bottom-last year statistics, wherein last year statistics is stavalue_year; the current year time is given to the last table bottom value extraction time of the year, namely:
lastValue_year=curValue-staValue_year;
(D2-6) for the table change record, performing storage registration, wherein the registration information comprises a table id, a table bottom value before the replacement, a table bottom value after the replacement and a replacement time.
4. The energy consumption statistical method based on the table bottom value according to claim 1, wherein: in the step (D), when the statistic data of the statistic judgment is not a table replacement and the data is abnormal, the processing method for updating the last table bottom value and the last table bottom value extraction time is as follows:
all last table bottom values are not updated, and the last table bottom value extraction time is updated, namely:
lastTime_min=curTime;
lastTime_hour=curTime;
lastTime_day=curTime;
lastTime_month=curTime;
lastTime_year=curTime。
5. the energy consumption statistical method based on the table bottom value according to claim 1, wherein: in the step (E), the statistic storage processing procedure is as follows:
(E1) If the current data is marked with abnormal statistics, not performing database storage updating processing;
(E2) If the statistic data is normal, the database storage updating processing is carried out, the related usage statistic value is stored in a warehouse, and the stored time stamp is the last table bottom value extraction time.
CN202010470146.8A 2020-05-28 2020-05-28 Energy consumption statistical method based on table bottom value Active CN111666537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010470146.8A CN111666537B (en) 2020-05-28 2020-05-28 Energy consumption statistical method based on table bottom value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010470146.8A CN111666537B (en) 2020-05-28 2020-05-28 Energy consumption statistical method based on table bottom value

Publications (2)

Publication Number Publication Date
CN111666537A CN111666537A (en) 2020-09-15
CN111666537B true CN111666537B (en) 2023-08-01

Family

ID=72385215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010470146.8A Active CN111666537B (en) 2020-05-28 2020-05-28 Energy consumption statistical method based on table bottom value

Country Status (1)

Country Link
CN (1) CN111666537B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102692615A (en) * 2012-03-02 2012-09-26 安徽中兴继远信息技术有限公司 System capable of automatically acquiring electric quantity data
CN108932217A (en) * 2017-05-27 2018-12-04 深圳市中电电力技术股份有限公司 The method and device of energy consumption statistic
CN109614392A (en) * 2018-10-25 2019-04-12 珠海派诺科技股份有限公司 Interrupt historical data self-repairing method, device, electronic equipment and medium
CN111080135A (en) * 2019-12-19 2020-04-28 江苏联宏智慧能源股份有限公司 Dynamic incremental energy consumption data processing method and device and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102692615A (en) * 2012-03-02 2012-09-26 安徽中兴继远信息技术有限公司 System capable of automatically acquiring electric quantity data
CN108932217A (en) * 2017-05-27 2018-12-04 深圳市中电电力技术股份有限公司 The method and device of energy consumption statistic
CN109614392A (en) * 2018-10-25 2019-04-12 珠海派诺科技股份有限公司 Interrupt historical data self-repairing method, device, electronic equipment and medium
CN111080135A (en) * 2019-12-19 2020-04-28 江苏联宏智慧能源股份有限公司 Dynamic incremental energy consumption data processing method and device and readable storage medium

Also Published As

Publication number Publication date
CN111666537A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN108038040A (en) Computer cluster performance indicator detection method, electronic equipment and storage medium
CN110927654B (en) Batch running state evaluation method for intelligent electric energy meters
CN104200314B (en) Electricity and line loss same period statistical method based on data remote synchronization acquisition technique
CN110889088A (en) Enterprise pollution discharge supervision method assisted by electric model
CN111141950B (en) Method for judging and repairing time-sharing code abnormality of electric meter of metering automation system
CN103325072A (en) Equipment condition maintenance fuzzy decision-making method of servers in power distribution system and power system
CN107153593A (en) A kind of Internet service monitoring threshold value determination method and device
WO2018209913A1 (en) Distribution network station area power shortage prediction method based on voltage quality
CN112730938A (en) Electricity stealing user judgment method based on electricity utilization collection big data
WO2021082612A1 (en) Power distribution station area load prediction method and apparatus
CN112886922A (en) Method and device for calculating loss electric quantity of photovoltaic power station and storage medium
CN111666537B (en) Energy consumption statistical method based on table bottom value
CN107453481B (en) Method for rapidly discovering power failure of low-voltage transformer area
CN117056848A (en) Monitoring data quality analysis method for improving power system decision
CN115587673B (en) Voltage transformer error state prediction method and system
CN116231633A (en) Method, device, equipment and storage medium for monitoring carbon emission of power distribution network
CN113642248B (en) Method and device for evaluating residual use time of positioning equipment
CN110633270B (en) Multi-strategy electric meter daily freezing value automatic substitution method and device based on priority
CN114415101A (en) Intelligent electric meter operation error diagnosis and analysis method and system
CN103344824A (en) Electric energy integration method based on time mark measurement
CN111859292A (en) Water supply leakage monitoring method for night water use active cell
CN113378102A (en) Data missing preprocessing method, medium and application for short-term load prediction
CN111461559A (en) Spare part demand determining method and device and electronic equipment
CN112580990B (en) Method and system for estimating long-term annual power generation hours in-service coal power plant
CN112561230A (en) Environment-friendly equipment state monitoring method based on electrical characteristics

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