Air conditioning system short-term load prediction method and device based on model stacking

By constructing multiple independent prediction algorithm models and model stacking technology, the problem of difficult to identify the complex impact of multiple factors in air conditioning system load prediction is solved, high-precision short-term load prediction is achieved, and optimized control of air conditioning system is supported.

CN119494040APending Publication Date: 2025-02-21SHENZHEN HAIYUAN ENERGY SAVING SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411417260.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

Existing air-conditioning system load prediction methods are difficult to accurately identify the complex effects between multiple factors, resulting in limited prediction accuracy.

Method used

A multi-class independent prediction algorithm model is constructed using a method based on model stacking, and the model hyperparameters are optimized through random search. Then, the optimal model is selected as the meta-model, combined with the cross-validated model stacking algorithm, different types of machine learning algorithms are integrated to form a comprehensive model for prediction.

Benefits of technology

Through model stacking technology, the accuracy and stability of short-term load prediction of air conditioning systems are improved, and more accurate load prediction is achieved, thereby supporting more effective optimization and control of air conditioning systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494040A_ABST
    Figure CN119494040A_ABST
Patent Text Reader

Abstract

The invention provides an air conditioning system short-term load prediction method based on model stacking, and the method comprises the steps: constructing a plurality of types of independent prediction algorithm models, and carrying out the model hyper-parameter optimization; constructing a two-layer air conditioner short-term load prediction model containing cross validation; and predicting by using the trained model, and checking the accuracy of the model. A model stacking concept is innovatively introduced into the field of air conditioner load prediction, multiple prediction models are integrated by utilizing an integrated learning idea, and the purpose of high-precision short-term air conditioner load prediction is achieved by combining the advantages of different models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of air conditioning load prediction, and in particular to a method and device for predicting short-term load of an air conditioning system based on model stacking. Background Art

[0002] The operating energy consumption of building air-conditioning systems is huge. Since there is an obvious lag between the operating control of the air-conditioning system and the actual load, how to efficiently and accurately predict the short-term load of the air-conditioning system in the future is of great significance for the subsequent optimization control of the air-conditioning system based on the predicted load and reducing the overall operating cost.

[0003] In the early days, air conditioning system load forecasting generally used physical modeling or empirical methods. In recent years, with the development of technologies such as Internet of Things monitoring and big data, new ideas have been brought to air conditioning load forecasting. The methods currently used can be mainly divided into two categories: regression model prediction method and artificial intelligence prediction method. The regression model prediction method achieves prediction by establishing a linear or nonlinear relationship between input and output variables. Common methods include multivariate linear regression method, ridge regression method, etc.; artificial intelligence prediction method mainly uses various machine learning algorithms to extract rules from a large amount of data and make predictions. Common methods include BP neural network, support vector machine algorithm, etc.

[0004] In different scenarios, various prediction methods have their own advantages and disadvantages. In particular, air conditioning load is affected by many factors, such as changes in climate temperature and humidity, the influence of indoor occupant behavior, thermal inertia of the building, etc. These factors make it impossible to identify all the characteristics of the data when using a single algorithm to perform load prediction, and it is difficult to capture the complex influence of multiple factors, resulting in limited prediction accuracy; therefore, a short-term load prediction method and device for air conditioning systems based on model stacking is needed. Summary of the invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a method and device for short-term load forecasting of an air-conditioning system based on model stacking, which overcomes the above problems or at least partially solves the above problems.

[0006] In order to solve the above problems, an embodiment of the present invention discloses a method for short-term load forecasting of an air-conditioning system based on model stacking, the method comprising:

[0007] Construct an independent prediction algorithm model for the short-term load of the air-conditioning system, use the random search method to optimize the model hyperparameters, and determine the optimal model for each independent prediction algorithm;

[0008] An optimal model from the independent prediction algorithms is selected as the meta-model to build a two-layer stacked model for short-term air conditioning load prediction. Different types of machine learning algorithms are combined using a model stacking algorithm including cross-validation to obtain a comprehensive model for prediction. The pre-selected training set and test set are cross-validated.

[0009] The obtained model is trained using the training set and the test set to realize the short-term load forecast of the air-conditioning system and verify the accuracy of the model.

[0010] Furthermore, the independent prediction algorithm model of the short-term load of the air-conditioning system is constructed, and the model hyperparameter optimization is performed by using a random search method to determine the optimal model of each independent prediction algorithm, and the method also includes:

[0011] Acquire actual air conditioning system operation data, preliminarily select characteristic parameters related to short-term air conditioning load, and pre-process relevant characteristic data;

[0012] The Pearson correlation analysis method is used to calculate the correlation coefficient between each characteristic parameter and the air-conditioning cooling load. The parameters with strong correlation are selected as input features according to the preset conditions, and the characteristic data set is divided into a training set and a test set as the input of the subsequent model.

[0013] Furthermore, the actual air conditioning system operation data is obtained, characteristic parameters related to the short-term load of the air conditioner are preliminarily selected, and the relevant characteristic data are preprocessed, including:

[0014] Read the system operation data from the air conditioning system energy management platform, and preliminarily select characteristic parameters related to the short-term load of the air conditioning from three dimensions: time characteristic parameters, historical characteristic parameters, and working characteristic parameters;

[0015] Preprocess relevant characteristic data to supplement the missing data;

[0016] After filling in the missing data, the data were standardized.

[0017] Furthermore, the Pearson correlation analysis method is used to calculate the correlation coefficient between each characteristic parameter and the air conditioning cooling load, and the parameters with strong correlation are selected as input features according to the preset conditions, and the characteristic data set is divided into a training set and a test set as the input of the subsequent model, including:

[0018] The Pearson correlation analysis method was used to calculate the correlation coefficient ρ between each characteristic parameter;

[0019] According to the preset correlation coefficient range C0, the feature of the correlation coefficient ρ between the air conditioning load is selected as the input feature of the prediction stage, where |ρ|≥C0;

[0020] The input feature raw data is divided into a training set and a test set for subsequent prediction.

[0021] Furthermore, the preprocessing of the relevant feature data includes:

[0022] If the data missing in a certain period reaches the preset threshold, all data groups within this period are directly deleted; otherwise, the mean of adjacent moments is used as a replacement.

[0023] Furthermore, the independent prediction algorithm model of the short-term load of the air-conditioning system is constructed, and a random search method is used to optimize the model hyperparameters to determine the optimal model of each independent prediction algorithm, including:

[0024] Construct an independent prediction algorithm model for the short-term load of the air-conditioning system, and select multiple algorithm models with mature algorithms and different basic logics as independent prediction algorithms;

[0025] For each independent prediction algorithm model, a random search method is used to optimize the model hyperparameters to determine the main hyperparameters affecting each algorithm and the corresponding value range;

[0026] Hyperparameter combinations are randomly sampled from the sampling space consisting of the entire parameter value range for prediction. The accuracy of the short-term load prediction model of the air-conditioning system is measured using three indicators: root mean square error, mean absolute error and determination coefficient, and the optimal combination of hyperparameters is obtained.

[0027] Furthermore, the optimal model in the independent prediction algorithm is selected as a meta-model, a two-layer air conditioning short-term load prediction stacking model is constructed, different types of machine learning algorithms are combined using a model stacking algorithm including cross-validation to obtain a comprehensive model for prediction, and a pre-selected training set and test set are cross-validated, including:

[0028] In the set of independent prediction algorithms, the model with better model effect and simpler algorithm structure is selected as the meta-model;

[0029] Construct a two-layer stacked model for air conditioning short-term load forecasting, which includes a meta-learner in the second layer and a meta-learner in the first layer;

[0030] The process of adding k-fold cross-validation to the stacked model includes: dividing the training set into k parts according to the number of k-folds, for each base learner, starting from k=1, training the model on the training set divided by the k-th fold, making predictions on the validation set divided by the k-th fold, saving the obtained validation set prediction results and using them as input data for the second-layer model, and so on. Each base learner will provide k different model prediction results as the training data set for the second-layer model;

[0031] The k sub-models obtained by dividing each base learner are fitted on the validation set respectively, and the fitting results of the k sub-models are averaged as the validation data of the base learner. Then the results of all the base learners are combined to obtain the validation data set as the second-layer model.

[0032] Furthermore, the obtained model is trained using the training set and the test set to achieve short-term load prediction of the air-conditioning system and verify the accuracy of the model, including:

[0033] Use the training set updated in the previous step to train the meta-learner of the second layer of the stacked model, and use the validation set updated in the previous step to make the final prediction;

[0034] The root mean square error, mean absolute error and determination coefficient are selected to measure the accuracy of the prediction model.

[0035] Furthermore, the root mean square error,

[0036] The indicator formula is: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the predicted value of the characteristic parameter;

[0037] The mean absolute error is given by: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the prediction of characteristic parameters;

[0038] The coefficient of determination is given by: Among them, y i is the actual value of the characteristic parameter, y i * is the predicted value of the feature parameter, is the average value of the actual value of the characteristic parameter.

[0039] The embodiment of the present invention further discloses a short-term load forecasting device for an air conditioning system based on model stacking, comprising:

[0040] The parameter optimization module is used to build an independent prediction algorithm model for the short-term load of the air-conditioning system, and use the random search method to optimize the model hyperparameters to determine the optimal model for each independent prediction algorithm;

[0041] The model stacking module is used to select an optimal model from the independent prediction algorithms as a meta-model, build a two-layer air conditioning short-term load prediction stacking model, combine different types of machine learning algorithms using a model stacking algorithm including cross-validation, obtain a comprehensive model for prediction, and perform cross-validation on the pre-selected training set and test set;

[0042] The load forecasting module uses the training set and the test set to train the obtained model, thereby realizing the short-term load forecasting of the air-conditioning system and verifying the accuracy of the model.

[0043] An embodiment of the present invention also discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the steps of the method for short-term load forecasting of an air-conditioning system based on model stacking are implemented.

[0044] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for short-term load forecasting of an air-conditioning system based on model stacking are implemented.

[0045] The embodiments of the present invention include the following advantages:

[0046] In the embodiments of the present application, a multi-class independent budget method model is constructed to optimize the model hyperparameters; a two-layer air conditioning short-term load forecasting model including cross-validation is constructed; and the trained model is used for forecasting to verify the model accuracy. By innovatively introducing the concept of model stacking into the field of air conditioning load forecasting, the idea of ​​ensemble learning is used to integrate multiple forecasting models, and the advantages of different models are combined to achieve the purpose of high-precision short-term air conditioning load forecasting. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flowchart of a method for short-term load forecasting of an air-conditioning system based on model stacking provided by an embodiment of the present invention;

[0048] Figure 2 It is a schematic diagram of correlation analysis results of a short-term load forecasting method for an air-conditioning system based on model stacking provided by an embodiment of the present invention;

[0049] Figure 3 It is a schematic diagram of the principle of constructing a meta-model including model cross-validation of a short-term load forecasting method for an air-conditioning system based on model stacking provided by an embodiment of the present invention;

[0050] Figure 4 It is a workflow diagram of the overall stacking model of a short-term load forecasting method for an air-conditioning system based on model stacking provided by one embodiment of the present invention;

[0051] Figure 5 It is a schematic structural diagram of a short-term load forecasting device for an air-conditioning system based on model stacking provided by one embodiment of the present invention;

[0052] Figure 6 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] The core concept of the present invention is that, considering the problems mentioned in the background technology, the traditional single load forecasting algorithm cannot recognize all the characteristics of the data and it is difficult to capture the complex influence of multiple factors. The present invention proposes a short-term load forecasting method for air-conditioning systems based on model stacking to improve the progress and stability of current air-conditioning load forecasting. The concept of model stacking is innovatively introduced into the field of air-conditioning load forecasting, and multiple forecasting models are integrated using the idea of ​​ensemble learning, combining the advantages of different models to achieve the purpose of high-precision short-term air-conditioning load forecasting.

[0055] like Figure 1 FIG. 1 is a flowchart showing a method for short-term load forecasting of an air-conditioning system based on model stacking according to an embodiment of the present invention; the method comprises:

[0056] S100, constructing multiple independent budget method models and optimizing model hyperparameters. Specifically, constructing an independent prediction algorithm model for the short-term load of the air-conditioning system, optimizing the model hyperparameters by using a random search method, and determining the optimal model for each independent prediction algorithm;

[0057] S200, constructing a two-layer air conditioning short-term load forecasting model including cross-validation, specifically, selecting an optimal model in the independent forecasting algorithm as a meta-model, constructing a two-layer air conditioning short-term load forecasting stacking model, combining different types of machine learning algorithms using a model stacking algorithm including cross-validation, obtaining a comprehensive model for forecasting, and cross-validating the pre-selected training set and test set;

[0058] S300, using the trained model to make predictions and verify the accuracy of the model. Specifically, using the training set and the test set to train the obtained model, thereby realizing short-term load prediction of the air-conditioning system and verifying the accuracy of the model.

[0059] In the above embodiment, the idea of ​​ensemble learning is used to combine multiple weaker algorithms, and a stronger learning model is established by combining the advantages of different algorithms, which can further improve the accuracy and stability of air-conditioning load prediction. Considering the problems mentioned in the background technology, the traditional single load prediction algorithm cannot recognize all the characteristics of the data and it is difficult to capture the complex influence of multiple factors. The present invention proposes a short-term load prediction method for air-conditioning systems based on model stacking to improve the progress and stability of current air-conditioning load prediction. By innovatively introducing the concept of model stacking into the field of air-conditioning load prediction, the idea of ​​ensemble learning is used to integrate multiple prediction models, and the advantages of different models are combined to achieve the purpose of high-precision short-term air-conditioning load prediction.

[0060] Next, the short-term load forecasting method for an air-conditioning system based on model stacking in this exemplary embodiment will be further explained.

[0061] In one embodiment of the present application, the above step S100, wherein the independent prediction algorithm model of the short-term load of the air-conditioning system is constructed, and the model hyperparameter optimization is performed by using a random search method, and before the optimal model of each independent prediction algorithm is determined, the following is also included:

[0062] Retrieve operation data and pre-process the data;

[0063] Calculate the correlation coefficient between each feature and air conditioning load, and select the strongly correlated features;

[0064] Among them, the operation data is retrieved and pre-processed. Specifically, the actual air-conditioning system operation data is obtained, the characteristic parameters related to the short-term load of the air-conditioning are preliminarily selected, and the relevant characteristic data are pre-processed; specifically, the system operation data is read from the air-conditioning system energy management platform, and the characteristic parameters related to the short-term load of the air-conditioning are preliminarily selected from three dimensions: time characteristic parameters, historical characteristic parameters, and working characteristic parameters; the relevant characteristic data are pre-processed to supplement the missing data; after the missing data is supplemented, the data is standardized.

[0065] In a specific example, the present invention obtains the operation data of the central air-conditioning system from a large shopping mall, preliminarily selects the characteristic parameters related to the short-term load of the air-conditioning, and pre-processes the relevant characteristic data, specifically including:

[0066] The operation data of the system from March to June of this year is read from the energy management platform of the air conditioning system. The data sampling interval is 10 minutes. The characteristic parameters related to the short-term load of the air conditioner are preliminarily selected from three dimensions: time characteristic parameters, historical characteristic parameters, and working characteristic parameters. For this example, 16 characteristics related to the short-term load of the air conditioner are preliminarily selected, including: month characteristic parameters, date characteristic parameters, and hour characteristic parameters in the time characteristic parameters; the cooling load of the first 10 minutes, the cooling load of the first 20 minutes, the cooling load of the first 30 minutes, and the cooling load of the first 24 hours in the historical characteristic parameters; the outdoor air temperature, outdoor air humidity, air wet bulb temperature, refrigeration main pipe supply water temperature, refrigeration main pipe outlet water temperature, refrigeration water temperature difference, cooling main pipe supply water temperature, cooling main pipe outlet water temperature, and cooling water temperature difference in the working characteristic parameters;

[0067] In one embodiment of the present application, the above-mentioned preprocessing of the relevant characteristic data includes: if the data missing in a certain period reaches a preset threshold, it is regarded as a large number of missing data, and all data groups within the period are directly deleted; otherwise, it is regarded as a small number of missing data, and the average of adjacent moments is used for replacement. Specifically, the system operation data can be read from the air-conditioning system energy management platform, and the characteristic parameters related to the short-term load of the air conditioner can be preliminarily selected from three dimensions: time characteristic parameters, historical characteristic parameters, and working characteristic parameters; the relevant characteristic data are preprocessed, and the missing data are first supplemented. For a large number of missing data within a period of time, all data groups within the period are directly deleted, and for a small number of missing data, the average of adjacent moments is used for replacement.

[0068] In a specific example, the relevant feature data is preprocessed. First, missing data is supplemented. For a large amount of missing data within a period of time, all data groups within the period are directly deleted. For a small amount of missing data, the mean of adjacent moments is used to replace it. After this step of processing, a total of 1,800 groups of high-quality data are screened out;

[0069] After filling in the missing data, the data is standardized, where the standardization formula is: In the formula, xi,min, xi,max are the minimum and maximum values ​​of feature xi respectively.

[0070] In one embodiment of the present application, the correlation coefficient between each feature and the air conditioning load is calculated, and strongly correlated features are screened. Specifically, the correlation coefficient between each feature parameter and the air conditioning cooling load is calculated using the Pearson correlation analysis method, and parameters with strong correlation are screened as input features according to preset conditions, and the feature data set is divided into a training set and a test set as inputs for subsequent models, including:

[0071] The Pearson correlation analysis method is used to calculate the correlation coefficient ρ between each characteristic parameter, where ρ∈-1, 1], and the calculation formula is: In the formula, cov(x i ,x j ) is the feature x i With feature x j The covariance between i ),σ(x j ) are the features x i With feature x j The standard deviation of the correlation analysis results is as follows: Figure 2 shown.

[0072] According to the preset correlation coefficient range C0, the feature of the correlation coefficient ρ between the air conditioning load is selected as the input feature of the prediction stage, where |ρ|≥C0;

[0073] There are 11 input features screened out, namely: monthly characteristic parameters, date characteristic parameters, hourly characteristic parameters, cooling load in the first 10 minutes, cooling load in the first 20 minutes, cooling load in the first 30 minutes, cooling load in the first 24 hours, outdoor air temperature, outdoor air humidity, air wet-bulb temperature, and chilled water temperature difference.

[0074] The input feature raw data is divided into a training set and a test set for subsequent prediction.

[0075] In one embodiment of the present application, the above step S100, constructing an independent prediction algorithm model for the short-term load of the air-conditioning system, using a random search method to optimize the model hyperparameters, and determining the optimal model of each independent prediction algorithm, includes:

[0076] Sub-step S101, constructing an independent prediction algorithm model for the short-term load of the air-conditioning system, selecting multiple algorithm models with mature algorithms and different basic logics as independent prediction algorithms, which are sequentially referred to as prediction algorithm 1, prediction algorithm 2, prediction algorithm 3, ..., prediction algorithm t, where t is a positive integer; in detail, constructing an independent prediction algorithm model for the short-term load of the air-conditioning system, considering the maturity and diversity of the algorithm, the selected independent prediction algorithms include 6 types: Lasso regression algorithm, Ridge regression algorithm, Random Forest regression (RF) algorithm, Support Vector Regression (SVR) algorithm, eXtreme Gradient Boosting (XGBoost) algorithm, Multilayer Perceptron (MLP) neural network algorithm;

[0077] Sub-step S102: for each independent prediction algorithm model, a random search method is used to optimize the model hyperparameters, determine the main hyperparameters affecting each algorithm and the corresponding value range, randomly sample hyperparameter combinations in the sampling space composed of all parameter value ranges for prediction, and select the optimal combination of hyperparameters;

[0078] The value ranges of the main hyperparameters of each model in this example and the optimization results are shown in Table 1:

[0079] Sub-step S103: In the process of hyperparameter optimization and optimal independent model selection, the root mean square error (RMSE), mean absolute error (MAE) and coefficient of determination (R 2 )Three indicators are used to measure the accuracy of the short-term load forecasting model of the air-conditioning system.

[0080] Among them, the above indicator formula, root mean square error (RMSE),

[0081] The indicator formula is: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the predicted value of the characteristic parameter. The range of RMSE is from zero to positive infinity. The smaller the value, the better the model effect.

[0082] Mean absolute error (MAE), the formula is: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the predicted value of the characteristic parameter. The range of MAE is from zero to positive infinity. The smaller the value, the better the model effect.

[0083] Coefficient of determination (R 2 )The formula is: Among them, y i is the actual value of the characteristic parameter, y i * is the predicted value of the feature parameter, is the average value of the actual value of the characteristic parameter, R 2 The range is [0,1], and the closer its value is to 1, the better the model effect is.

[0084] Table 1: Range of values ​​of main hyperparameters of the model and optimization results

[0085]

[0086]

[0087] In one embodiment of the present application, the above step S200 selects an optimal model in the independent prediction algorithm as a meta-model, constructs a two-layer air conditioning short-term load prediction stacking model, combines different types of machine learning algorithms using a model stacking algorithm including cross-validation, obtains a comprehensive model for prediction, and cross-validates the pre-selected training set and test set, including:

[0088] Sub-step S201: In the set of independent prediction algorithms, a model with better model effect and simpler algorithm structure is selected as a meta-model to avoid overfitting in subsequent predictions; in this example, the RF algorithm among the six independent prediction algorithms is selected as the meta-model;

[0089] Sub-step S202, constructing a two-layer air conditioning short-term load forecasting stacked model including a second layer as a meta-learner and a first layer as a meta-learner. Specifically, constructing a two-layer air conditioning short-term load forecasting stacked model, wherein the second layer of the model is composed of the selected meta-model, called the meta-learner, and the meta-learner is used to combine the results of each model and give a final prediction result; the first layer of the model is composed of the remaining models in the independent prediction model set, called base learner 1, base learner 2,..., base learner N, and the base learner is used to generate new features to supply the meta-learner; for example, the above N is preferably 5.

[0090] Sub-step S203: adding a k-fold cross-validation process to the stacked model to improve the generalization ability of the model and avoid overfitting of the model; first, the training set is divided into k parts according to the number of k-folds, and for each base learner, starting from k=1, the model is trained on the training set divided by the k-th fold, and prediction is performed on the validation set divided by the k-th fold. The obtained validation set prediction results are saved and used as input data for the second-layer model. By analogy, each base learner will provide k different model prediction results as the training data set for the second-layer model;

[0091] Among them, the proposed meta-model construction principle with model cross-validation is as follows Figure 3 shown.

[0092] Sub-step S204, fit the k sub-models obtained by dividing each base learner on the verification set respectively, average the fitting results of the k sub-models as the verification data of the base learner, and then combine the results of all the base learners to obtain a verification data set as the second-layer model. Specifically, in order to obtain the verification data of the second-layer model, fit the k sub-models obtained by dividing each base learner on the verification set respectively, average the fitting results of the k sub-models as the verification data of the base learner, and then combine the results of all the base learners to serve as the verification data set of the second-layer model.

[0093] The overall workflow of the stacking model is as follows: Figure 4 shown.

[0094] In an embodiment of the present application, the above step S300, training the obtained model, thereby realizing short-term load prediction of the air-conditioning system, and verifying the accuracy of the model, specifically, using the training set and the test set, training the obtained model, thereby realizing short-term load prediction of the air-conditioning system, and verifying the accuracy of the model, includes:

[0095] Sub-step S301: Use the newly obtained training set to train the meta-learner of the second layer of the stacking model, and use the newly obtained validation set to make the final prediction; in this example, the data in the data set except the prediction day is used as the training set and input into the stacking model for learning, and 10 minutes is used as the calculation time unit to predict the air conditioning load fluctuation within 2 hours of the day;

[0096] S302, select root mean square error (RMSE), mean absolute error (MAE) and determination coefficient (R2) to measure the accuracy of the prediction model. The formulas of root mean square error (RMSE), mean absolute error (MAE) and determination coefficient (R2) are the same as the above formulas. Specifically, the root mean square error (RMSE) is

[0097] The indicator formula is: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the predicted value of the characteristic parameter. The range of RMSE is from zero to positive infinity. The smaller the value, the better the model effect.

[0098] Mean absolute error (MAE), the formula is: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the predicted value of the characteristic parameter. The range of MAE is from zero to positive infinity. The smaller the value, the better the model effect.

[0099] Coefficient of determination (R 2 )The formula is: Among them, y i is the actual value of the characteristic parameter, y i * is the predicted value of the feature parameter, is the average value of the actual value of the characteristic parameter, R 2 The range is [0,1], and the closer its value is to 1, the better the model effect is.

[0100] The prediction is performed using the method provided by the present invention and the independent prediction algorithm. The evaluation indicators of each algorithm are summarized as shown in Table 2 below:

[0101] Table 2

[0102] Lasso Ridge RF SVR XGBoost MLP Stacking Model RMSE 382.41 382.41 321.87 341.86 312.07 364.60 283.54 MAE 182.92 183.04 122.94 136.33 139.14 166.13 155.62 <![CDATA[R 2 ]]> 0.971 0.971 0.979 0.976 0.980 0.973 0.983

[0103] Through the comparison of evaluation indicators, it can be seen that the RMSE, MAE, R 2 All three evaluation indicators are better than any independent prediction algorithm, achieving more accurate prediction of the short-term load of the air-conditioning system, thus providing guidance for the operation and regulation of the system.

[0104] like Figure 5 As shown, a short-term load forecasting device for an air-conditioning system based on model stacking provided by an embodiment of the present application is shown, and the device includes:

[0105] The parameter optimization module 100 is used to construct an independent prediction algorithm model for the short-term load of the air-conditioning system, and use a random search method to optimize the model hyperparameters to determine the optimal model of each independent prediction algorithm;

[0106] The model stacking module 200 is used to select an optimal model from the independent prediction algorithms as a meta-model, construct a two-layer air conditioning short-term load prediction stacking model, combine different types of machine learning algorithms using a model stacking algorithm including cross-validation, obtain a comprehensive model for prediction, and perform cross-validation on the pre-selected training set and test set;

[0107] The load prediction module 300 uses the training set and the test set to train the obtained model, thereby realizing the short-term load prediction of the air-conditioning system and verifying the accuracy of the model.

[0108] It also includes a preprocessing module and a feature screening module, wherein the preprocessing module is used to obtain actual air-conditioning system operation data, preliminarily select characteristic parameters related to the short-term load of the air conditioner, and preprocess the relevant characteristic data; the feature screening module is used to calculate the correlation coefficient between each characteristic parameter and the air-conditioning cooling load using the Pearson correlation analysis method, screen out parameters with strong correlation as input features according to preset conditions, and divide the feature data set into a training set and a test set as input for subsequent models.

[0109] For the device embodiment, since the above-mentioned embodiments of the air-conditioning system short-term load prediction method based on model stacking are basically similar, the relevant parts can be referred to the partial description of the method embodiment.

[0110] Reference Figure 6In an embodiment of the present invention, the present invention further provides a computer device. The above-mentioned computer device 12 is expressed in the form of a general-purpose computing device. The components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0111] The bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor or a local bus 18 using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.

[0112] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0113] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 31 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of various embodiments of the present invention.

[0114] A program / utility 41 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0115] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), may communicate with one or more devices that enable a user to interact with the computer device 12, and / or may communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) via a network adapter 20. As shown, the network adapter 21 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including, but not limited to, microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.

[0116] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the short-term load forecasting method for an air-conditioning system based on model stacking provided in an embodiment of the present invention.

[0117] That is, when the processing unit 16 executes the above program, it realizes: constructing an independent prediction algorithm model for the short-term load of the air-conditioning system, using a random search method to optimize the model hyperparameters, and determining the optimal model of each independent prediction algorithm; selecting an optimal model in the independent prediction algorithm as a meta-model, constructing a two-layer air-conditioning short-term load prediction stacking model, using a model stacking algorithm including cross-validation to combine different types of machine learning algorithms to obtain a comprehensive model for prediction, and cross-validating the pre-selected training set and test set; using the training set and the test set to train the obtained model, and then realize the short-term load prediction of the air-conditioning system and verify the accuracy of the model.

[0118] That is, when the program is executed by the processor, it is implemented as follows: constructing an independent prediction algorithm model for the short-term load of the air-conditioning system, using a random search method to optimize the model hyperparameters, and determining the optimal model of each independent prediction algorithm; selecting an optimal model in the independent prediction algorithm as a meta-model, constructing a two-layer air-conditioning short-term load prediction stacking model, using a model stacking algorithm including cross-validation to combine different types of machine learning algorithms to obtain a comprehensive model for prediction, and cross-validating the pre-selected training set and test set; using the training set and the test set to train the obtained model, and then realize the short-term load prediction of the air-conditioning system and verify the accuracy of the model.

[0119] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0120] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0121] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, Python, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0122] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0123] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0124] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0125] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0127] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0128] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0129] The above is a detailed introduction to the short-term load forecasting method and device for air-conditioning systems based on model stacking provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A short-term load forecasting method for air conditioning system based on model stacking, characterized in that: The method comprises: Construct an independent prediction algorithm model for the short-term load of the air-conditioning system, use the random search method to optimize the model hyperparameters, and determine the optimal model for each independent prediction algorithm; An optimal model from the independent prediction algorithms is selected as the meta-model to build a two-layer stacked model for short-term air conditioning load prediction. Different types of machine learning algorithms are combined using a model stacking algorithm including cross-validation to obtain a comprehensive model for prediction. The pre-selected training set and test set are cross-validated. The obtained model is trained using the training set and the test set to realize the short-term load forecast of the air-conditioning system and verify the accuracy of the model.

2. The method according to claim 1, characterized in that The method of constructing an independent prediction algorithm model for the short-term load of the air-conditioning system and optimizing the model hyperparameters by using a random search method to determine the optimal model of each independent prediction algorithm also includes: Acquire actual air conditioning system operation data, preliminarily select characteristic parameters related to short-term air conditioning load, and pre-process relevant characteristic data; The Pearson correlation analysis method is used to calculate the correlation coefficient between each characteristic parameter and the air-conditioning cooling load. The parameters with strong correlation are selected as input features according to the preset conditions, and the characteristic data set is divided into a training set and a test set as the input of the subsequent model.

3. The method according to claim 2, characterized in that The actual air conditioning system operation data is obtained, characteristic parameters related to the short-term air conditioning load are preliminarily selected, and the relevant characteristic data are preprocessed, including: Read the system operation data from the air conditioning system energy management platform, and preliminarily select characteristic parameters related to the short-term load of the air conditioning from three dimensions: time characteristic parameters, historical characteristic parameters, and working characteristic parameters; Preprocess relevant characteristic data to supplement the missing data; After filling in the missing data, the data were standardized.

4. The method according to claim 2, characterized in that: The Pearson correlation analysis method is used to calculate the correlation coefficient between each characteristic parameter and the air conditioning cooling load, and the parameters with strong correlation are selected as input features according to the preset conditions, and the characteristic data set is divided into a training set and a test set as the input of the subsequent model, including: The Pearson correlation analysis method was used to calculate the correlation coefficient ρ between each characteristic parameter; According to the preset correlation coefficient range C0, the feature of the correlation coefficient ρ between the air conditioning load is selected as the input feature of the prediction stage, where |ρ|≥C0; The input feature raw data is divided into a training set and a test set for subsequent prediction.

5. The method according to claim 3, characterized in that: The preprocessing of the relevant feature data includes: If the data missing in a certain period reaches the preset threshold, all data groups within this period are directly deleted; otherwise, the mean of adjacent moments is used as a replacement.

6. The method according to claim 1, characterized in that The independent prediction algorithm model of the short-term load of the air-conditioning system is constructed, and a random search method is used to optimize the model hyperparameters to determine the optimal model of each independent prediction algorithm, including: Construct an independent prediction algorithm model for the short-term load of the air-conditioning system, and select multiple algorithm models with mature algorithms and different basic logics as independent prediction algorithms; For each independent prediction algorithm model, a random search method is used to optimize the model hyperparameters to determine the main hyperparameters affecting each algorithm and the corresponding value range; Hyperparameter combinations are randomly sampled from the sampling space consisting of the entire parameter value range for prediction. The accuracy of the short-term load prediction model of the air-conditioning system is measured using three indicators: root mean square error, mean absolute error and determination coefficient, and the optimal combination of hyperparameters is obtained.

7. The method according to claim 1, characterized in that The method selects an optimal model from the independent prediction algorithms as a meta-model, constructs a two-layer air conditioning short-term load prediction stacking model, combines different types of machine learning algorithms using a model stacking algorithm including cross-validation, obtains a comprehensive model for prediction, and cross-validates the pre-selected training set and test set, including: In the set of independent prediction algorithms, the model with better model effect and simpler algorithm structure is selected as the meta-model; Construct a two-layer stacked model for air conditioning short-term load forecasting, which includes a meta-learner in the second layer and a meta-learner in the first layer; The process of adding k-fold cross-validation to the stacked model includes: dividing the training set into k parts according to the number of k-folds, for each base learner, starting from k=1, training the model on the training set divided by the k-th fold, making predictions on the validation set divided by the k-th fold, saving the obtained validation set prediction results and using them as input data for the second-layer model, and so on. Each base learner will provide k different model prediction results as the training data set for the second-layer model; The k sub-models obtained by dividing each base learner are fitted on the validation set respectively, and the fitting results of the k sub-models are averaged as the validation data of the base learner. Then the results of all the base learners are combined to obtain the validation data set as the second-layer model.

8. The method according to claim 1, characterized in that: The method uses the training set and the test set to train the obtained model, thereby realizing the short-term load prediction of the air-conditioning system and verifying the accuracy of the model, including: Use the training set updated in the previous step to train the meta-learner of the second layer of the stacked model, and use the validation set updated in the previous step to make the final prediction; The root mean square error, mean absolute error and determination coefficient are selected to measure the accuracy of the prediction model.

9. The method according to claim 6 or 8, characterized in that: The root mean square error, The indicator formula is: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the predicted value of the characteristic parameter; The mean absolute error is given by: Where n is the number of samples, y i is the actual value of the characteristic parameter, y i * is the prediction of characteristic parameters; The coefficient of determination is given by: Among them, y i is the actual value of the characteristic parameter, y i * is the predicted value of the feature parameter, is the average value of the actual value of the characteristic parameter.

10. A short-term load forecasting device for air conditioning system based on model stacking, characterized in that: The device comprises: The parameter optimization module is used to build an independent prediction algorithm model for the short-term load of the air-conditioning system, and use the random search method to optimize the model hyperparameters to determine the optimal model for each independent prediction algorithm; The model stacking module is used to select an optimal model from the independent prediction algorithms as a meta-model, build a two-layer air conditioning short-term load prediction stacking model, combine different types of machine learning algorithms using a model stacking algorithm including cross-validation, obtain a comprehensive model for prediction, and perform cross-validation on the pre-selected training set and test set; The load forecasting module uses the training set and the test set to train the obtained model, thereby realizing the short-term load forecasting of the air-conditioning system and verifying the accuracy of the model.