Building energy consumption prediction method based on machine learning, product, equipment and medium

By processing building energy consumption data based on machine learning, identifying and repairing abnormal data, analyzing data characteristics and selecting appropriate models, the problem of low accuracy in building energy consumption prediction in the existing technology is solved, and more efficient energy Consumption forecasts and energy costs are reduced.

CN119005631APending Publication Date: 2024-11-22SHANGHAI PUGONG ENERGY SAVING & ENVIRONMENTAL PROTECTION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411257598.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The prior art has low accuracy in building energy consumption prediction, making it difficult to adapt to data differences between different types of buildings, resulting in inaccurate prediction results.

Method used

Using a machine learning-based method, we obtain and process the energy consumption data of historical buildings, identify and repair abnormal data, analyze data characteristics, select appropriate prediction model types, and use historical data to train models for prediction.

Benefits of technology

It improves the accuracy and efficiency of building energy consumption prediction, ensures the reliability and practicality of forecast results, and reduces energy costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005631A_ABST
    Figure CN119005631A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy management, in particular to a building energy consumption prediction method based on machine learning, a product, equipment and a medium. The method comprises the steps of obtaining to-be-processed historical building energy consumption data, and performing abnormal data identification and restoration on the to-be-processed historical building energy consumption data to obtain processed historical building energy consumption data; the historical building energy consumption data are analyzed, data characteristics of the historical building energy consumption data are determined, and the data characteristics represent fluctuation conditions of the building energy consumption data along with time factors; obtaining a prediction demand, determining a prediction model type according to the prediction demand and the data characteristics, and training the prediction model according to the historical building energy consumption data to obtain a building energy consumption prediction model; and obtaining building energy consumption data before the current moment, and taking the building energy consumption data as input of the building energy consumption prediction model to obtain predicted building energy consumption data. The accuracy and efficiency of building energy consumption prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of energy management technology, and in particular to a method, product, device and medium for predicting building energy consumption based on machine learning. Background Art

[0002] As a solid pillar of the national economy, the construction industry has inevitably become one of the main areas of energy consumption while promoting social development. In order to achieve sustainable social development, building energy conservation and emission reduction has become an urgent and important task. Among them, the fine management of building energy consumption is the key link to achieve the goal of energy conservation and emission reduction. The cornerstone of this work is to accurately and scientifically predict building energy consumption, so as to support the optimization management of building operation and effectively achieve the goal of energy conservation and emission reduction.

[0003] Relevant technologies use existing models to predict building energy consumption to a certain extent, but there are significant differences between different types of building data, which leads to different types of prediction models having their own advantages and disadvantages in performance, making it difficult to use them universally in all situations, resulting in low accuracy of prediction results. Summary of the invention

[0004] In order to solve the problem that the existing technology has low accuracy in predicting building energy consumption, the present application provides a method, product, device and medium for predicting building energy consumption based on machine learning.

[0005] In the first aspect, the present application provides a method for predicting building energy consumption based on machine learning, which adopts the following technical solutions: A building energy consumption prediction method based on machine learning, comprising: Acquire the energy consumption data of the historical building to be processed, and identify and repair abnormal data on the energy consumption data of the historical building to be processed to obtain processed energy consumption data of the historical building; Analyzing the historical building energy consumption data to determine data characteristics of the historical building energy consumption data, wherein the data characteristics represent fluctuations of the building energy consumption data over time; Obtaining prediction requirements, determining a prediction model type according to the prediction requirements and the data characteristics, and training the prediction model according to the historical building energy consumption data to obtain a building energy consumption prediction model; Acquire building energy consumption data before the current moment, use the building energy consumption data as input of the building energy consumption prediction model, and obtain predicted building energy consumption data.

[0006] By adopting the above technical solution, abnormal data can be identified and repaired, which can ensure the data quality of subsequent data analysis and improve the accuracy and reliability of prediction results. The data characteristics represent the trend and law of building energy consumption changes over time. Selecting the appropriate prediction model type according to the prediction needs and data characteristics can ensure the accuracy and practicality of the prediction results. Using historical building energy consumption data to train the model can enable it to learn the potential patterns and laws of building energy consumption and obtain building energy consumption data before the current moment. By continuously inputting new building energy consumption data, the prediction model can continue to make predictions and obtain accurate predicted building energy consumption data, thereby improving the accuracy and efficiency of building energy consumption predictions and helping to reduce energy costs.

[0007] In a preferred example, the present application may be further configured as follows: analyzing the energy consumption data of the historical buildings to determine the data characteristics of the energy consumption data of the historical buildings includes: The energy consumption data of the historical buildings are grouped according to a plurality of preset time factors, each group corresponding to a preset time factor label; Determine the difference between every two groups with different labels in the grouping results corresponding to the target preset time factor to obtain multiple difference degrees, wherein the target preset time factor is any one of the multiple preset time factors; According to the multiple difference degrees, data characteristics of the historical building energy consumption data under the target preset time factor are determined.

[0008] By adopting the above technical solution, the energy consumption data of historical buildings are grouped according to multiple preset time factors, and each group is assigned a corresponding preset time factor label, so that the data is more orderly and structured. There may be differences in energy consumption patterns in different time periods. Through grouping and labeling, it is easier to identify and understand such differences. By determining the difference between each two groups with different labels in the grouping results corresponding to the target preset factors, the energy consumption differences in different time periods can be quantified. The difference can be used as an important indicator for data fluctuation and periodicity evaluation, and can accurately determine the data characteristics of the energy consumption data of historical buildings under the target preset time factors.

[0009] In a preferred example, the present application may be further configured as follows: determining the data characteristics of the historical building energy consumption data under the target preset time factor according to the multiple differences, including: Determine the proportion of the plurality of differences that exceeds a preset difference threshold among the plurality of differences, and determine whether the proportion exceeds a preset proportion threshold; If the ratio exceeds the preset ratio threshold, it is determined that the data characteristic of the historical building energy consumption data under the target preset time factor is that the historical building energy consumption data fluctuates significantly with the target preset time factor.

[0010] By adopting the above technical solution and using the preset difference threshold and the preset ratio threshold, it is possible to provide an objective method for quantifying the significance of fluctuations in historical building energy consumption data over time, thereby improving the accuracy of determining data characteristics.

[0011] In a preferred example, the present application can be further configured as follows: the prediction requirement includes a prediction efficiency requirement and a prediction accuracy requirement, The determining the prediction model type according to the prediction requirement and the data characteristics includes: Determining at least two optional model types according to the data characteristics; Determining a prediction requirement matching index for each of the at least two optional model types according to the prediction efficiency requirement and the prediction accuracy requirement; According to the prediction demand matching index of each optional model type, one with the highest prediction demand matching index is determined from the at least two optional model types as the prediction model type.

[0012] By adopting the above technical solution, at least two optional model types are determined according to the data characteristics, and the model type selection is determined based on the actual characteristics of the data. The prediction efficiency requirements and prediction accuracy requirements are further combined to screen out the most suitable model type, so that the model selection is more targeted and can better meet the actual needs.

[0013] In a preferred example, the present application may be further configured as follows: determining the prediction requirement matching index of each of the at least two optional model types according to the prediction efficiency requirement and the prediction accuracy requirement, including: Obtaining the efficiency performance index and accuracy performance index corresponding to each optional model type; If the prediction efficiency requirement is a high-efficiency prediction requirement, and the prediction accuracy requirement is a high-accuracy prediction requirement, then the prediction demand matching index of any optional model is the sum of the corresponding efficiency performance index and accuracy performance index; If the prediction efficiency requirement is that high-efficiency prediction is not required, and the prediction accuracy requirement is that high-accuracy prediction is required, then the prediction requirement matching index of any optional model is the corresponding accuracy performance index; If the prediction efficiency requirement is to require high-efficiency prediction, and the prediction accuracy requirement is not to require high-accuracy prediction, then the prediction requirement matching index of any optional model is the corresponding efficiency performance index; If the prediction efficiency requirement is that high-efficiency prediction is not required, and the prediction accuracy requirement is that high-accuracy prediction is not required, then the prediction requirement matching index of any optional model is the sum of the corresponding efficiency performance index and accuracy performance index.

[0014] By adopting the above technical solution, it is possible to handle different forecasting demand scenarios, select the most suitable forecasting model type according to the specific situation, convert the forecasting efficiency requirements and forecasting accuracy requirements into performance indexes, and calculate the forecasting demand matching index based on this, which can simplify the decision-making process of model selection and improve matching efficiency.

[0015] In a preferred example, the present application can be further configured as follows: the abnormal data identification and repair of the to-be-processed historical building energy consumption data to obtain the processed historical building energy consumption data includes: The historical building energy consumption data is clustered for a preset number of times, and abnormal data is identified and eliminated from the clustering results obtained after each clustering is completed, so as to obtain a target clustering result after the preset number of clustering processes and the elimination of abnormal data; according to the target clustering result, the abnormal data eliminated in each clustering result is repaired, and the repaired abnormal data and the target clustering result constitute the processed historical building energy consumption data.

[0016] By adopting the above technical solution, after a preset number of clustering processes, normal data and anomalies in the energy consumption data of historical buildings can be gradually distinguished. The clustering algorithm can group data based on the similarity between them, so that abnormal data can be identified because of its significant difference from normal data. After eliminating the abnormal data, the target clustering result obtained will be closer to the actual data distribution, thereby improving the overall data quality. The abnormal data can be repaired so that the repaired data not only retains the characteristics of the original data, but also avoids the influence of outliers on the data analysis results, further enhancing the reliability of the data.

[0017] In a preferred example, the present application may be further configured as follows: repairing the abnormal data removed from each clustering result according to the target clustering result, including: For any abnormal data point in the abnormal data removed from each clustering result, calculate the distance between the abnormal data point and each data point in the target clustering result to obtain multiple distance values; determining a preset number of distance values ​​from the plurality of distance values; According to the preset number of distance values, a replacement value of the abnormal data point is determined, and the abnormal data point is repaired by the replacement value.

[0018] By adopting the above technical solution, the distance between the abnormal data point and each data point in the target clustering result is calculated, the similarity between the abnormal data point and the normal data point can be obtained, and a preset number of minimum distance values ​​are selected, that is, the normal data point closest to the abnormal data point is selected, and the determined replacement value is more accurate.

[0019] In a second aspect, the present application provides a computer program product, which adopts the following technical solution: A computer program product includes a computer program. When the computer program is executed by a processor, it implements the building energy consumption prediction method based on machine learning as described in any one of the first aspects.

[0020] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: one or more processors; Memory; At least one application, wherein at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the building energy consumption prediction method based on machine learning as described in any one of the first aspects.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the building energy consumption prediction method based on machine learning as described in any one of the first aspects.

[0022] In summary, this application includes the following beneficial technical effects: This application can ensure the data quality of subsequent data analysis and improve the accuracy and reliability of prediction results by identifying and repairing abnormal data. The data characteristics represent the trend and law of building energy consumption changes over time. Selecting the appropriate prediction model type according to the prediction needs and data characteristics can ensure the accuracy and practicality of the prediction results. Using historical building energy consumption data to train the model can enable it to learn the potential patterns and laws of building energy consumption and obtain building energy consumption data before the current moment. By continuously inputting new building energy consumption data, the prediction model can continue to make predictions and obtain accurate predicted building energy consumption data, thereby improving the accuracy and efficiency of building energy consumption predictions and helping to reduce energy costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of a method for predicting building energy consumption based on machine learning provided in an embodiment of the present application; Figure 2 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] The following is combined with Figure 1 -Attached Figure 2 This application is described in further detail.

[0025] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make modifications to the present embodiment without any creative contribution as needed. However, as long as it is within the scope of the claims of the present application, it shall be protected by the patent law.

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0028] It should be noted that in the optional embodiments of the present application, the object information and other related data involved, when the embodiments in the present application are applied to specific products or technologies, need to obtain the permission or consent of the object, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information needs to obtain the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained. The embodiments also need to be implemented with the authorization and consent of the object.

[0029] The present application embodiment provides a method for predicting building energy consumption based on machine learning, such as Figure 1As shown, the method provided in the embodiment of the present application is executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes steps S101 to S104, wherein: S101. Obtain the energy consumption data of the historical buildings to be processed, identify and repair abnormal data on the energy consumption data of the historical buildings to be processed, and obtain processed energy consumption data of the historical buildings.

[0030] In this embodiment, historical building energy consumption data for a period of time (such as one year or three years) can be selected according to actual needs to obtain the historical building energy consumption data to be processed. Then, the historical building energy consumption data to be processed can be clustered multiple times, and the clustering results obtained by each clustering can be identified and eliminated for abnormal data. Except for the first clustering, the data for each clustering is the data after the abnormal data is eliminated from the clustering results of the previous clustering, and the clustering result after the abnormal data is eliminated from the last clustering is used as the target clustering result.

[0031] Furthermore, the abnormal data obtained from the multiple clustering results are repaired, and the repaired abnormal data and the target clustering results constitute the processed historical building energy consumption data.

[0032] S102. Analyze the energy consumption data of historical buildings to determine the data characteristics of the energy consumption data of historical buildings, where the data characteristics represent the fluctuation of the building energy consumption data with time factors.

[0033] In this embodiment, the energy consumption data of historical buildings can be grouped according to multiple preset time factors, each preset time factor corresponds to a grouping result, and a grouping result contains multiple divided groups. Optionally, the multiple preset time factors may include seasonal factors, working day / non-working day factors, and day and night factors. Exemplarily, for seasonal factors, the corresponding grouping method may be to group the energy consumption data of historical buildings according to seasons, with the data of one season as one group, and mark the data with the corresponding seasonal label. If the time period corresponding to the energy consumption data of historical buildings contains at least two identical seasons, data of different groups may correspond to the same seasonal label; for working day / non-working day factors, the energy consumption data corresponding to a working day in the energy consumption data of historical buildings may be taken as a group and set a working day label, and the energy consumption data of a non-working day may be taken as a group and set a non-working day label, thereby obtaining multiple groups corresponding to working day labels and multiple groups corresponding to non-working day labels.

[0034] Furthermore, any one of the multiple preset time factors is used as the target preset time factor, and the difference between each two groups with different labels in the grouping result corresponding to the target preset time factor is calculated to obtain multiple difference degrees. By analyzing the obtained multiple difference degrees, the data characteristics of the historical building energy consumption data under the target preset time factor can be determined.

[0035] S103, obtaining prediction demand, determining the prediction model type according to the prediction demand and data characteristics, and training the prediction model according to historical building energy consumption data to obtain a building energy consumption prediction model.

[0036] In this embodiment, the prediction requirement may include a prediction efficiency requirement and a prediction accuracy requirement, wherein the prediction efficiency requirement is one of a requirement for high-efficiency prediction and a requirement for no high-efficiency prediction, and the prediction accuracy requirement is one of a requirement for high-accuracy prediction and a requirement for no high-accuracy prediction. At least two optional model types corresponding to each data characteristic may be determined in advance according to the model characteristics, and the obtained corresponding relationship may be stored in a database. After the data characteristics of the historical building energy consumption data are determined, at least two optional prediction model types may be determined according to the corresponding relationship, and then one of the at least two optional prediction model types may be determined as the prediction model type according to the prediction requirement.

[0037] Furthermore, the energy consumption data of historical buildings are divided into training sets and test sets. The training set is used to train the selected prediction model type, and the test set is used to perform performance tests. The model parameters are adjusted according to the test results to optimize the model performance.

[0038] S104: Acquire building energy consumption data before the current moment, and use the building energy consumption data as input of a building energy consumption prediction model to obtain predicted building energy consumption data.

[0039] The embodiments of the present application can ensure the data quality of subsequent data analysis and improve the accuracy and reliability of prediction results by identifying and repairing abnormal data. The data characteristics represent the trend and law of building energy consumption changes over time. The appropriate prediction model type is selected according to the prediction requirements and data characteristics to ensure the accuracy and practicality of the prediction results. The model is trained using historical building energy consumption data to learn the potential patterns and laws of building energy consumption and obtain building energy consumption data before the current moment. By continuously inputting new building energy consumption data, the prediction model can continue to make predictions and obtain accurate predicted building energy consumption data, thereby improving the accuracy and efficiency of building energy consumption predictions and helping to reduce energy costs.

[0040] A possible implementation of the embodiment of the present application is to analyze the energy consumption data of historical buildings to determine the data characteristics of the energy consumption data of historical buildings, including: The energy consumption data of historical buildings are grouped according to a plurality of preset time factors, and each group corresponds to a preset time factor label; Determine the difference between every two groups with different labels in the grouping results corresponding to the target preset time factor to obtain multiple differences, and the target preset time factor is any one of the multiple preset time factors; According to multiple difference degrees, the data characteristics of the historical building energy consumption data under the target preset time factor are determined.

[0041] In this embodiment, the difference between the data of two groups may be determined by Euclidean distance.

[0042] The embodiment of the present application groups the energy consumption data of historical buildings according to multiple preset time factors, and assigns corresponding preset time factor labels to each group, so that the data is more orderly and structured. There may be differences in energy consumption patterns in different time periods. Through grouping and labeling, it is easier to identify and understand such differences. By determining the difference between each two groups with different labels in the grouping results corresponding to the target preset factors, the energy consumption differences in different time periods can be quantified. The difference can be used as an important indicator for data fluctuation and periodicity evaluation, and can accurately determine the data characteristics of the energy consumption data of historical buildings under the target preset time factors.

[0043] A possible implementation of the embodiment of the present application is to determine the data characteristics of the historical building energy consumption data under the target preset time factor according to multiple difference degrees, including: Determine the proportion of the differences exceeding a preset difference threshold among the multiple differences, and determine whether the proportion exceeds the preset proportion threshold; If the ratio exceeds a preset ratio threshold, it is determined that the data characteristics of the historical building energy consumption data under the target preset time factor are that the historical building energy consumption data fluctuates significantly with the target preset time factor.

[0044] In this embodiment, the preset difference threshold can be set according to actual experience. If the difference between the data of two groups exceeds the preset difference threshold, it can be determined that the data of the two groups are significantly different. If the difference between the data of the two groups does not exceed the preset difference threshold, it can be determined that there is no significant difference between the data of the two groups. Among them, the preset ratio threshold can be set according to actual experience and is not specifically limited in this embodiment.

[0045] The embodiment of the present application utilizes a preset difference threshold and a preset ratio threshold, which can provide an objective method for quantifying the significance of fluctuations in historical building energy consumption data over time, thereby improving the accuracy of determining data characteristics.

[0046] In a possible implementation of the embodiment of the present application, the prediction requirement includes a prediction efficiency requirement and a prediction accuracy requirement. Determine the type of forecasting model based on forecasting requirements and data characteristics, including: Determine at least two optional model types according to data characteristics; Determining a prediction requirement matching index for each of at least two optional model types according to a prediction efficiency requirement and a prediction accuracy requirement; According to the prediction demand matching index of each optional model type, one with the highest prediction demand matching index is determined from at least two optional model types as the prediction model type.

[0047] In this embodiment, the correspondence between different data characteristics and optional model types can be set in advance based on experience or experiments. The data characteristics of the historical building energy consumption data include three aspects: whether the fluctuations are obvious with seasonal changes, whether the fluctuations are obvious with day and night changes, and whether the fluctuations are obvious with working day / non-working day changes.

[0048] Specifically, when the energy consumption data of historical buildings fluctuate greatly only with seasonal changes, optional models may include time series models (such as SARIMA, Holt-Winters seasonal model) and random forests. Time series models can capture long-term trends, seasonality and cyclical changes in data. Random forests are integrated models composed of multiple decision trees. They learn seasonal patterns in data through different decision trees and improve the accuracy of predictions through integrated results. When the energy consumption data of historical buildings fluctuate greatly only with day and night changes, or fluctuate greatly with seasonal and day and night changes, or fluctuate greatly with day and night and working days / non-working days, optional models may include recurrent neural networks (RNN) and long short-term memory networks (LSTM). Neural networks are good at processing complex patterns and fluctuations in time series data and can identify data fluctuations with day and night. When the energy consumption data of historical buildings fluctuate greatly only with working days / non-working days, optional models include decision trees and random forests, both of which can process categorical variables and learn different patterns by dividing the data into different subsets, thereby generating accurate predictions. When the energy consumption data of historical buildings fluctuates greatly with both seasons and working days / non-working days, optional models can include random forests and gradient boosting machines, which can capture multiple patterns in the data by building multiple decision trees and weak learners, and can handle categorical variables and seasonal patterns. When the energy consumption data of historical buildings fluctuates greatly with seasons, day and night, and working days / non-working days, neural networks (such as recurrent neural networks and long short-term memory networks) can be used to combine time series features (seasons, day and night) and categorical features (working days / non-working days) to fully understand the multiple patterns in the data and generate more accurate prediction results.

[0049] The embodiment of the present application determines at least two optional model types according to data characteristics, determines that the model type is selected based on the actual characteristics of the data, further combines prediction efficiency requirements and prediction accuracy requirements, and screens out the most suitable model type, so that the model selection is more targeted and can better meet actual needs.

[0050] A possible implementation of the embodiment of the present application is to determine the prediction requirement matching index of each of at least two optional model types according to the prediction efficiency requirement and the prediction accuracy requirement, including: Obtaining the efficiency performance index and accuracy performance index corresponding to each optional model type; If the forecast efficiency requirement is to demand high efficiency forecast, and the forecast accuracy requirement is to demand high accuracy forecast, then the forecast demand matching index of any optional model is the sum of the corresponding efficiency performance index and accuracy performance index; If the prediction efficiency requirement is that high-efficiency prediction is not required, and the prediction accuracy requirement is that high-accuracy prediction is required, then the prediction requirement matching index of any optional model is the corresponding accuracy performance index; If the prediction efficiency requirement is to require high-efficiency prediction, and the prediction accuracy requirement is not to require high-accuracy prediction, then the prediction demand matching index of any optional model is the corresponding efficiency performance index; If the prediction efficiency requirement is that high-efficiency prediction is not required, and the prediction accuracy requirement is that high-accuracy prediction is not required, then the prediction requirement matching index of any optional model is the sum of the corresponding efficiency performance index and accuracy performance index.

[0051] In this embodiment, all optional model types corresponding to each data characteristic can be obtained, and all optional model types can be sorted according to experience or experiments, and the basis for sorting includes efficiency and accuracy, so as to obtain an efficiency list and an accuracy list. For the efficiency list, they can be arranged from low to high according to efficiency, and the position of each optional model type in the efficiency list is used as the corresponding efficiency performance index. Exemplarily, if the number of all optional model types is 8, the efficiency index of the first optional model type in the efficiency list is determined to be 1, and the efficiency index of the eighth optional model type in the efficiency list is determined to be 8. For the accuracy list, they can be arranged from low to high according to accuracy, and the position of each optional model type in the accuracy list is used as the corresponding accuracy performance index.

[0052] The embodiments of the present application can handle different forecasting demand scenarios, select the most suitable forecasting model type according to the specific situation, convert the forecasting efficiency requirements and forecasting accuracy requirements into performance indexes, and calculate the forecasting demand matching index based on this, which can simplify the decision-making process of model selection and improve matching efficiency.

[0053] A possible implementation of the embodiment of the present application is to identify and repair abnormal data on the historical building energy consumption data to be processed to obtain processed historical building energy consumption data, including: Perform a preset number of clustering processes on the energy consumption data of historical buildings, and identify and remove abnormal data from the clustering results obtained after each clustering is completed, so as to obtain a target clustering result after the preset number of clustering processes and the removal of abnormal data; According to the target clustering results, the abnormal data eliminated in each clustering result are repaired, and the repaired abnormal data and the target clustering results constitute the processed historical building energy consumption data.

[0054] In this embodiment, the K-means algorithm can be used for clustering. The K-means algorithm divides the data sample into K clusters by calculating the Euclidean distance from the data point to the cluster center, and finally divides similar data points into the same cluster. The premise for achieving effective clustering is to determine the accurate cluster center. The determination method is generally to randomly define K cluster points as the initial cluster center for clustering, and then calculate the center value of the K clusters as the new cluster center for re-clustering, and repeat the process until the clustering criterion function converges. In this embodiment, K can be defined as 3, that is, the corresponding clustering result contains three clusters, corresponding to high energy consumption, medium energy consumption and low energy consumption respectively. Among them, the preset number can be flexibly set according to experience. Optionally, the preset number can be set to 4.

[0055] The embodiment of the present application can gradually distinguish normal data from anomalies in the energy consumption data of historical buildings after a preset number of clustering processes. The clustering algorithm can group the data based on the similarity between the data, so that the abnormal data can be identified because of its significant difference from the normal data. After eliminating the abnormal data, the target clustering result obtained will be closer to the actual data distribution, thereby improving the quality of the overall data. The abnormal data can be repaired so that the repaired data retains the characteristics of the original data and avoids the influence of outliers on the data analysis results, further enhancing the reliability of the data.

[0056] A possible implementation of the embodiment of the present application is to repair abnormal data removed from each clustering result according to the target clustering result, including: For any abnormal data point in the abnormal data removed from each clustering result, the distance between the abnormal data point and each data point in the target clustering result is calculated to obtain multiple distance values; determining a preset number of distance values ​​from a plurality of distance values; According to a preset number of distance values, alternative values ​​of abnormal data points are determined, and the abnormal data points are repaired by the alternative values.

[0057] In this embodiment, the distance between the abnormal data point and each data point in the target clustering result can be calculated by using the Euclidean distance calculation method. The preset number can be set according to actual needs and is not specifically limited in this embodiment. Furthermore, the weighted average of the preset number of distance values ​​can be calculated to obtain the replacement value of the abnormal data point.

[0058] Among them, for any data point in the target clustering result, the weight value w corresponding to its distance value with the abnormal data point is i The calculation method is: Among them, k is the preset number, d i is the i-th distance value among the k distance values.

[0059] The embodiment of the present application calculates the distance between the abnormal data point and each data point in the target clustering result to obtain the similarity between the abnormal data point and the normal data point, and selects a preset number of minimum distance values, that is, selects the normal data point closest to the abnormal data point, so that the determined replacement value is more accurate.

[0060] An embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the contents shown in the aforementioned embodiment of the building energy consumption prediction method based on machine learning are implemented.

[0061] An electronic device is provided in an embodiment of the present application, such as Figure 2 As shown, Figure 2 The electronic device 200 shown includes: a processor 201 and a memory 203. The processor 201 and the memory 203 are connected, such as through a bus 202. Optionally, the electronic device 200 may also include a transceiver 204. It should be noted that in actual applications, the transceiver 204 is not limited to one, and the structure of the electronic device 200 does not constitute a limitation on the embodiments of the present application.

[0062] The processor 201 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 201 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0063] The bus 202 may include a path to transmit information between the above components. The bus 202 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 202 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 Only one thick line is used in the diagram, but it does not mean that there is only one bus or only one type of bus.

[0064] The memory 203 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0065] The memory 203 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 201. The processor 201 is used to execute the application code stored in the memory 203 to implement the contents shown in the above-mentioned embodiment of the building energy consumption prediction method based on machine learning.

[0066] Figure 2 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0067] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer can execute the contents shown in the aforementioned embodiment of the building energy consumption prediction method based on machine learning.

[0068] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0069] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A building energy consumption prediction method based on machine learning, characterized in that: include: Acquire the energy consumption data of the historical building to be processed, and identify and repair abnormal data on the energy consumption data of the historical building to be processed to obtain processed energy consumption data of the historical building; Analyzing the historical building energy consumption data to determine data characteristics of the historical building energy consumption data, wherein the data characteristics represent fluctuations of the building energy consumption data over time; Obtaining prediction requirements, determining a prediction model type according to the prediction requirements and the data characteristics, and training the prediction model according to the historical building energy consumption data to obtain a building energy consumption prediction model; Acquire building energy consumption data before the current moment, use the building energy consumption data as input of the building energy consumption prediction model, and obtain predicted building energy consumption data.

2. The building energy consumption prediction method based on machine learning according to claim 1 is characterized in that: The analyzing the historical building energy consumption data to determine the data characteristics of the historical building energy consumption data includes: The energy consumption data of the historical buildings are grouped according to a plurality of preset time factors, each group corresponding to a preset time factor label; Determine the difference between every two groups with different labels in the grouping results corresponding to the target preset time factor to obtain multiple difference degrees, wherein the target preset time factor is any one of the multiple preset time factors; According to the multiple difference degrees, data characteristics of the historical building energy consumption data under the target preset time factor are determined.

3. The building energy consumption prediction method based on machine learning according to claim 2 is characterized in that: Determining the data characteristics of the historical building energy consumption data under the target preset time factor according to the multiple differences includes: Determine the proportion of the plurality of differences that exceeds a preset difference threshold among the plurality of differences, and determine whether the proportion exceeds a preset proportion threshold; If the ratio exceeds the preset ratio threshold, it is determined that the data characteristic of the historical building energy consumption data under the target preset time factor is that the historical building energy consumption data fluctuates significantly with the target preset time factor.

4. The building energy consumption prediction method based on machine learning according to claim 1 is characterized in that: The forecasting requirements include forecasting efficiency requirements and forecasting accuracy requirements. The determining the prediction model type according to the prediction requirement and the data characteristics includes: Determining at least two optional model types according to the data characteristics; Determining a prediction requirement matching index for each of the at least two optional model types according to the prediction efficiency requirement and the prediction accuracy requirement; According to the prediction demand matching index of each optional model type, one with the highest prediction demand matching index is determined from the at least two optional model types as the prediction model type.

5. The building energy consumption prediction method based on machine learning according to claim 4 is characterized in that: The step of determining a prediction requirement matching index of each of the at least two optional model types according to the prediction efficiency requirement and the prediction accuracy requirement includes: Obtaining the efficiency performance index and accuracy performance index corresponding to each optional model type; If the prediction efficiency requirement is a high-efficiency prediction requirement, and the prediction accuracy requirement is a high-accuracy prediction requirement, then the prediction demand matching index of any optional model is the sum of the corresponding efficiency performance index and accuracy performance index; If the prediction efficiency requirement is that high-efficiency prediction is not required, and the prediction accuracy requirement is that high-accuracy prediction is required, then the prediction requirement matching index of any optional model is the corresponding accuracy performance index; If the prediction efficiency requirement is to require high-efficiency prediction, and the prediction accuracy requirement is not to require high-accuracy prediction, then the prediction requirement matching index of any optional model is the corresponding efficiency performance index; If the prediction efficiency requirement is that high-efficiency prediction is not required, and the prediction accuracy requirement is that high-accuracy prediction is not required, then the prediction requirement matching index of any optional model is the sum of the corresponding efficiency performance index and accuracy performance index.

6. The building energy consumption prediction method based on machine learning according to claim 1 is characterized in that: The abnormal data identification and repair of the to-be-processed historical building energy consumption data to obtain processed historical building energy consumption data includes: Performing a preset number of clustering processes on the historical building energy consumption data, and identifying and removing abnormal data from the clustering results obtained after each clustering is completed, to obtain a target clustering result after the preset number of clustering processes and the removal of abnormal data; According to the target clustering result, the abnormal data eliminated in each clustering result is repaired, and the repaired abnormal data and the target clustering result constitute the processed historical building energy consumption data.

7. The building energy consumption prediction method based on machine learning according to claim 6 is characterized in that: The repairing of abnormal data removed from each clustering result according to the target clustering result includes: For any abnormal data point in the abnormal data removed from each clustering result, calculate the distance between the abnormal data point and each data point in the target clustering result to obtain multiple distance values; determining a preset number of distance values ​​from the plurality of distance values; According to the preset number of distance values, a replacement value of the abnormal data point is determined, and the abnormal data point is repaired by the replacement value.

8. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the steps of the building energy consumption prediction method based on machine learning described in any one of claims 1 to 7.

9. An electronic device, characterized in that: include: at least one processor; Memory; At least one application, wherein at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the building energy consumption prediction method based on machine learning as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the building energy consumption prediction method based on machine learning as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Multi-source heterogeneous data management method and system based on digital twinning

    CN119557818A

  • Building energy consumption prediction method and device based on GANs

    CN119939744A