CN109508743B - KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket - Google Patents

KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket Download PDF

Info

Publication number
CN109508743B
CN109508743B CN201811342483.8A CN201811342483A CN109508743B CN 109508743 B CN109508743 B CN 109508743B CN 201811342483 A CN201811342483 A CN 201811342483A CN 109508743 B CN109508743 B CN 109508743B
Authority
CN
China
Prior art keywords
data
characteristic line
energy consumption
slope
utilization characteristic
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
CN201811342483.8A
Other languages
Chinese (zh)
Other versions
CN109508743A (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.)
Dalian Qunzhi Technology Co ltd
Original Assignee
Dalian University of Technology
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 Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN201811342483.8A priority Critical patent/CN109508743B/en
Publication of CN109508743A publication Critical patent/CN109508743A/en
Application granted granted Critical
Publication of CN109508743B publication Critical patent/CN109508743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a method for repairing abnormal energy consumption data of an illumination socket based on a KNN improved algorithm, and belongs to the technical field of data processing of building energy consumption monitoring platforms. The basic idea of the algorithm is shown in an abstract chart, historical data can be roughly divided into different energy utilization modes, the energy utilization modes of data to be repaired are compared, and the data in the energy utilization modes are used for repairing missing data. The data repairing process by using the KNN improved algorithm comprises the following steps: s1, establishing an energy utilization mode according to the historical data; s2, aiming at any energy utilization mode, establishing an electricity utilization characteristic database; and S3, selecting data with similar energy modes from the historical data to repair the missing data based on the KNN improved algorithm. The method has the advantages that the slope of the electricity utilization characteristic line is combined, the KNN improved algorithm is used for repairing abnormal energy consumption data by using data with similar energy consumption modes in historical data, and the quality of the building energy consumption data is greatly improved.

Description

KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket
Technical Field
The invention relates to a data processing method, in particular to a method for repairing abnormal data of building energy consumption monitoring based on a KNN improved algorithm, and belongs to the technical field of data processing of building energy consumption monitoring platforms.
Background
In recent years, a public building energy consumption monitoring platform is established, and the realization of building energy consumption item measurement is an important content for the construction of a public building energy supervision system. At present, building energy consumption monitoring platforms of different scales are established in many provinces and cities of China, and rich data is accumulated. However, due to some technical obstacles, the overall quality of building monitoring data is low, and data abnormal problems such as data loss, data mutation and the like occur, through investigation and analysis, the abnormal data proportion of the existing building energy consumption monitoring platform is generally up to 20%, so that the energy consumption monitoring data is far from the real energy consumption of the building, and a large amount of energy consumption data cannot be fully utilized. With the continuous development of green buildings in China, people not only acquire more and more types and larger data quantity of building energy consumption data, but also have higher and higher requirements on data quality. In order to improve the data quality of the building energy consumption monitoring platform, in recent years, many scientific researchers at home and abroad focus on the problems existing in the energy consumption monitoring platform data, and the missing or abnormal data of the platform is solved and corrected by adopting methods such as a data mining technology, cluster analysis and the like. The invention discloses a construction energy consumption monitoring abnormal data repairing method based on a KNN improved algorithm, which aims at solving the problem of repairing abnormal data. The energy consumption of building electricity is generally divided into four items of energy consumption of lighting sockets, energy consumption of heating ventilation air conditioners, energy consumption of power equipment and energy consumption of special electricity. The patent provides a method for repairing abnormal energy consumption data of the lighting socket based on a KNN improved algorithm by adopting a big data analysis method aiming at the power consumption characteristics of the energy consumption of the lighting socket so as to improve the data quality of a building energy consumption monitoring platform.
Disclosure of Invention
The invention aims to provide a method for repairing abnormal energy consumption data of an illumination socket based on a KNN improved algorithm, which can effectively improve the quality of building energy consumption monitoring data.
The technical scheme of the invention is as follows:
a method for repairing abnormal energy consumption data of an illumination socket based on a KNN improved algorithm comprises the following steps:
s1, calculating the slope of the historical data electricity utilization characteristic line: aiming at a certain type of energy consumption per unit time, calculating the slope of the historical data electricity utilization characteristic line per unit time, assuming that m historical data electricity utilization characteristic lines per unit time are provided, and for any historical data electricity utilization characteristic line per unit time i, the electricity consumptions at the j moment and the j +1 moment are respectively Ei,jAnd Ei,j+1The slope of the electricity utilization characteristic line from the j time to the j +1 time is Li,jThe calculation formula of (2) is as follows:
Figure BDA0001862913210000021
wherein, tjIs the unit time length;
s2, calculating the slope of the electricity utilization characteristic line of the abnormal data in unit time: calculating the abnormal data position by the same method as that of step S1Slope l of electricity utilization characteristic line at 24 hoursj,j=0,1,2,…,23;
S3, searching sample data: slope sequence l based on abnormal datajAnd historical data set slope sequence Li,jSearching the hour energy consumption data of the day with the minimum sequencing k days distance from the historical data set (m days); slope l of electrical characteristic line for abnormal datajThe slope of the electricity utilization characteristic line of the ith calendar history data is Li,jEuclidean distance p ofiThe calculation formula is as follows:
Figure BDA0001862913210000022
s4, determining a weighting coefficient: using the ratio of the inverse Euclidean distance to the sum of inverse Euclidean distances of k days as a weighting coefficient for weighting and summing abnormal data; the weighting coefficient formula is:
Figure BDA0001862913210000023
wherein q istThe weight p of the t day in k days nearest to the Euclidean distance calculated by the KNN algorithmtEuclidean distance of day t;
s5, repairing abnormal data: obtaining the repairing data of the abnormal data according to the k-day sample data and the weighting coefficient; assuming that the moment j is abnormal data, the data recovery formula is as follows:
Figure BDA0001862913210000031
wherein ejFor calculated repair energy consumption data, tjIs a unit time length, Ln,jIs the slope of the electricity utilization characteristic line of the nth day in the k-day calendar history data at the time j, qnThe weighting factor corresponding to the day.
The method is also suitable for repairing abnormal electricity utilization data of other power equipment with relatively regular electricity utilization loads.
Compared with the prior art, the method has the advantages that the method for repairing the abnormal data of the building energy consumption based on the KNN improved algorithm is provided, and the repairing quality of the data of the building energy consumption is greatly improved.
Drawings
FIG. 1 is a flow chart of an abnormal data repair operation.
FIG. 2 is a schematic diagram of the calculation of the slope of the electrical characteristic line.
Fig. 3 is a schematic diagram of sample data search.
Detailed Description
The following detailed description of the invention refers to the accompanying drawings that illustrate specific embodiments of the invention.
Referring to the attached figure 1, the method for repairing abnormal building energy consumption data based on the KNN improved algorithm comprises the following steps:
s1, referring to FIG. 2, calculating the slope of the historical data electricity utilization characteristic line in unit time, assuming a total of m historical data electricity utilization characteristic broken lines in unit time, and regarding any historical data electricity utilization characteristic line i in unit time, the electricity consumption at the j th moment and the j +1 th moment are respectively Ei,j、Ei,j+1The slope of the electricity utilization characteristic line from the j th moment to the j +1 th moment is Li,jThe calculation formula of (2) is as follows:
Figure BDA0001862913210000041
wherein t isjIs a unit time length.
S2, calculating the slope l of the electricity utilization characteristic line in the unit time of 24 hours in which the abnormal data are positioned by adopting the method of S1j(j=0,1,2,…,23);
S3, referring to the attached figure 3, calculating the slope sequence l of the electricity utilization characteristic line where the abnormal data are located by using an Euclidean distance calculation formulajAnd historical data set slope sequence Li,jAnd searching energy consumption data with the minimum day-hour distance of k days from the historical data set (m days). Slope l of electrical characteristic line for abnormal datajThe slope of the electricity utilization characteristic line of the ith calendar history data is Li,jEuclidean distance p ofiThe calculation formula is as follows:
Figure BDA0001862913210000042
and S4, using the ratio of the inverse Euclidean distance to the sum of inverse Euclidean distances of k days as a weighting coefficient for weighting and summing the abnormal data. The weighting coefficient formula is:
Figure BDA0001862913210000043
wherein q istThe weight p of the t day in k days nearest to the Euclidean distance calculated by the KNN algorithmtThe Euclidean distance of day t.
And S5, finally, obtaining the repairing data of the abnormal data according to the k-day sample data and the weighting coefficient. Assuming that the moment j is abnormal data, the data recovery formula is as follows:
Figure BDA0001862913210000044
wherein ejFor calculated repair energy consumption data, tjIs a unit time length, Ln,jIs the slope of the electricity utilization characteristic line of the nth day in the k-day calendar history data at the time j, qnThe weighting factor corresponding to the day.

Claims (1)

1. A method for repairing abnormal energy consumption data of an illumination socket based on a KNN improved algorithm is characterized by comprising the following steps:
s1, calculating the slope of the electricity utilization characteristic line of the historical data: aiming at a certain type of energy consumption per unit time, calculating the slope of the power utilization characteristic line of historical data per unit time, and assuming a common power consumptionmA historical data electricity utilization characteristic line in unit time, for any historical data electricity utilization characteristic line in unit timeiOf 1 atjTime and firstj+The electricity consumption at 1 moment is respectivelyE i, j AndE i, j+1 then it is firstjFrom time to timej The slope of the power utilization characteristic line of the historical data in the +1 moment is
Figure 640447DEST_PATH_IMAGE002
The calculation formula of (2) is as follows:
Figure 782847DEST_PATH_IMAGE004
formula (1)
Wherein,t jis the unit time length;
s2, calculating the slope of the electricity utilization characteristic line of the abnormal data in unit time: calculating the slope of the abnormal data electricity utilization characteristic line by the same method as the step S1l j
Figure 263638DEST_PATH_IMAGE006
S3, searching sample data: slope of electricity utilization characteristic line based on abnormal datal j Slope of power utilization characteristic line from historical dataL i,jEuclidean distance (similarity) of (m days), finding a ranking from the historical data setkHour energy consumption data for the day from the minimum day; slope of electrical characteristic line for abnormal datal j Slope of power utilization characteristic line from historical dataL i,jEuclidean distance ofp iThe calculation formula is as follows:
Figure 70533DEST_PATH_IMAGE008
formula (2)
S4, determining a weighting coefficient: using the inverse Euclidean distance andkthe ratio of the sum of the inverse Tian-Euclidean distances is used as a weighting coefficient for weighting and summing abnormal data; the weighting coefficient formula is:
Figure 939263DEST_PATH_IMAGE010
formula (3)
Wherein,q t calculated for KNN algorithm as nearest Euclidean distancekIn the middle of the daytThe weight of the day is calculated,p tis as followstThe Euclidean distance of day;
s5, repairing abnormal data: according tokObtaining the repairing data of the abnormal data by the sample data of the day and the weighting coefficient; suppose thatjThe time is abnormal data, and the data repair formula is as follows:
Figure DEST_PATH_IMAGE012
formula (4)
Whereine jIn order to calculate the repair energy consumption data,t jin terms of the length of the unit of time,L n,jis composed ofkThe first in the calendar history datanThe electricity utilization characteristic line of the sky isjThe slope of the time of day is,q nthe weighting factor corresponding to the day.
CN201811342483.8A 2018-11-13 2018-11-13 KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket Active CN109508743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811342483.8A CN109508743B (en) 2018-11-13 2018-11-13 KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811342483.8A CN109508743B (en) 2018-11-13 2018-11-13 KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket

Publications (2)

Publication Number Publication Date
CN109508743A CN109508743A (en) 2019-03-22
CN109508743B true CN109508743B (en) 2022-03-04

Family

ID=65748204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811342483.8A Active CN109508743B (en) 2018-11-13 2018-11-13 KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket

Country Status (1)

Country Link
CN (1) CN109508743B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625525B (en) * 2020-05-26 2023-05-26 哈尔滨工业大学 Environment data repairing/filling method and system
CN111723085B (en) * 2020-06-28 2023-06-23 山东建筑大学 Method and system for cleaning electric energy consumption data of public building air conditioner
CN112765549B (en) * 2021-01-20 2022-10-21 大连理工大学 KNN-Matrix method for repairing abnormal data of building energy consumption monitoring
CN114253953A (en) * 2021-11-18 2022-03-29 国电南京自动化股份有限公司 Power distribution network multidimensional data processing method and system based on cluster analysis
CN117969946B (en) * 2024-04-01 2024-06-14 山东普源电力工程有限公司 Lighting system energy consumption detection method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199961A (en) * 2014-09-19 2014-12-10 北京建筑技术发展有限责任公司 Data mining based public building energy consumption monitoring platform data processing method
GB201509507D0 (en) * 2015-06-02 2015-07-15 Passivsystems Ltd Fault detection in energy generation arrangements
CN108228862A (en) * 2018-01-12 2018-06-29 上海市建筑科学研究院 A kind of method for processing abnormal data and system of energy consumption monitoring platform
CN108694473A (en) * 2018-06-15 2018-10-23 常州瑞信电子科技有限公司 Building energy consumption prediction technique based on RBF neural

Also Published As

Publication number Publication date
CN109508743A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN109508743B (en) KNN improved algorithm-based method for repairing abnormal energy consumption data of lighting socket
Wang et al. A review of approaches to low-carbon transition of high-rise residential buildings in China
CN103912966B (en) A kind of earth source heat pump refrigeration system optimal control method
Ma et al. Building energy research in Hong Kong: a review
CN110796307B (en) Distributed load prediction method and system for comprehensive energy system
CN107220472B (en) Energy consumption instrument based on building area and energy efficiency ratio and energy consumption evaluation method
CN110851892B (en) Park level comprehensive energy system aided design method and system
CN105760963A (en) Tourist area resident household electricity prediction method
CN116992548B (en) Design optimization method and system for building and regional comprehensive energy system
CN112907074A (en) Energy efficiency sensitive index detection method and system for comprehensive energy system user
CN111738498A (en) Comprehensive energy system robust planning method and system
CN116205425A (en) Low-carbon park cold-hot electric load prediction method based on typical database
CN109146284B (en) Accounting system and method for comprehensive utilization amount and scale of renewable energy sources of urban building
Cheng et al. A study of urban form and the integration of energy supply technologies
CN112257964B (en) Load-intensive urban intelligent park demand aggregation modeling method
CN109359134B (en) Method for identifying energy consumption implicit abnormal data of lighting socket based on data mining
Medrano et al. Economics and climate change emissions analysis of a bioclimatic institutional building with trigeneration and solar support
CN111126863A (en) System and method for evaluating passive energy and active energy supply of public institution
CN112712213B (en) Method and system for predicting deep migration learning energy consumption of concentrated air conditioning house
CN116224161A (en) Judgment method based on polarity reverse connection error wiring abnormality of voltage transformer
CN113488990B (en) Micro-grid optimal scheduling method based on improved bat algorithm
CN114548533A (en) Design method and device for dynamic load of building cooling, heating and power, acquisition method for dynamic load in area, computer and storage medium
Wu et al. Field measurement research on indoor physical environment in natural ventilation season of rural housings in northeast and southeast China
CN117217094B (en) Photovoltaic optimal configuration method, system and equipment for urban ground and roof
Asmawi et al. Review on Building Energy Management Systems by Retrofitting Existing Buildings with Green Technology

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
TR01 Transfer of patent right

Effective date of registration: 20231218

Address after: Room 2205, 2 / F, 56a22, Torch Road, Dalian hi tech Industrial Park, 116000, Liaoning Province

Patentee after: Dalian Qunzhi Technology Co.,Ltd.

Address before: 116024 No. 2 Ling Road, Ganjingzi District, Liaoning, Dalian

Patentee before: DALIAN University OF TECHNOLOGY

TR01 Transfer of patent right