A prediction method and system for the temperature change rate of the water storage tank of an office building water energy storage device

The XGBoost model predicts the temperature change of the water tank, which solves the problem of temperature inaccuracy under the influence of external factors in the water storage system, and achieves more efficient temperature control and energy utilization.

CN115049154BActive Publication Date: 2025-07-29TIANJIN HUIFENG ENG DESIGN CONSULTING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210868262.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2025-07-29
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

The existing water storage system has shortcomings in taking into account external factors and scope of application, resulting in inaccurate prediction of water tank temperature, affecting comfort and causing energy waste.

Method used

The XGBoost gradient enhancement model tree model is adopted, combined with machine learning methods, to predict the temperature changes of the water tank under different external factors. By constructing a water temperature change rate model during energy storage and discharge, the singularity of water temperature changes are found, and weather data and time information are used for training and prediction.

Benefits of technology

It improves the accuracy of water tank temperature prediction, maintains the temperature in the building stable, reduces energy waste, and improves comfort and energy saving effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115049154B_ABST
    Figure CN115049154B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting the temperature change rate of a water storage tank of an office building water energy storage device, belonging to the technical field of energy conservation and environmental protection, including: S1. Obtain the real-time water temperature data at multiple position points of the water tank, calculate the average value of the multiple real-time water temperature data, and record the average value as the water tank temperature; S2. Collect the weather data and time information of the historical period, as well as the energy storage amount, energy release amount, and water tank temperature of the water energy storage device in the corresponding period, and obtain the training set after data preprocessing; S3. Construct a water temperature change rate model for the water energy storage and release of the water energy storage device; S4. Use the weather data and time information of the historical period as the input, and the water temperature change rate in the corresponding period as the expected output, and train the water temperature change rate model for the water energy storage and release of the water energy storage device; S5. Input the weather data and time information in sub-periods of the next day into the trained water temperature change rate model for the water energy storage and release of the water energy storage device to obtain the predicted results of the water temperature change rate in sub-periods of the next day.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of energy conservation and environmental protection, and particularly relates to a method and system for predicting the temperature change rate of a water storage tank of an office building water energy storage device. Background Art

[0002] Energy is an important material basis for the economic and social development of our country, and plays a very important role in the rapid and healthy development of the economy and the improvement of people's living standards. Since the end of the 20th century, the urban development in our country has been rapid, and the electricity consumption of civil buildings has been increasing continuously. Among civil buildings, the energy consumption of public buildings is relatively large. For example, the energy consumption per unit area of large high-grade office buildings is about 10-15 times that of ordinary urban residential buildings. And about 50%-60% of the energy consumption of public buildings is used for the air-conditioning system. Taking summer cooling as an example, the energy consumption of the air-conditioning system mainly lies in the energy consumption of chillers, cooling towers, chilled water pumps, etc. In order to reduce these energy consumptions, the refrigeration efficiency of the units can be improved to reduce the energy consumption of the refrigeration units, and the primary pump constant flow system of the chilled water pumps can be changed to the primary pump variable flow system and the secondary pump variable flow system to reduce the energy consumption of the pumps. However, the above methods cannot avoid the waste of energy consumption, and the cost is relatively high during actual operation.

[0003] The energy storage technology in our country is mainly used to adjust the peak-valley power supply and demand relationship and play the role of "peak shaving and valley filling". After years of research and practice, the mainstream energy storage technologies are divided into ice energy storage technology, water energy storage technology and eutectic salt energy storage technology. Among them, the water energy storage technology is simple and easy to control, so the water energy storage technology is mainly used now.

[0004] For the current water energy storage system, although the technology is relatively mature, how to store and release energy more efficiently to meet the requirements of office buildings still needs to be studied. For example, external factors have a significant impact on the water temperature change. When the temperature does not meet the requirements and other energy equipment is started again, the indoor temperature will fluctuate significantly, affecting the comfort. At the same time, when storing heat or cold, too high or too low water temperature in the water tank will cause waste of energy. The use of traditional water energy storage tanks mostly focuses on the outlet water temperature and the return water temperature. These two temperatures are generally set values. When the requirements are not met, the water tank temperature has decreased significantly. Therefore, it is necessary to make a preliminary judgment in advance to start other energy equipment in advance to ensure the stability of the indoor temperature. At present, the research on the water tank temperature change mostly establishes a model through specific experiments or directly gives a mathematical model, rarely considering the role of external factors and energy storage on demand, and also lacking the generalization ability for different buildings. Summary of the Invention

[0005] The present invention aims to solve the technical problems brought about by the traditional experimental modeling or mathematical modeling of the water tank water temperature prediction method, which does not consider external factors and has limited application scope. A machine learning method is adopted to predict the water temperature change during energy storage and release of the water storage tank of the water energy storage device under the influence of different external factors. Specifically, the gradient boosting model tree model XGBoost is adopted in the present invention.

[0006] The first object of the present invention is to provide a method for predicting the water temperature change rate of a water storage tank of an office building water energy storage device, which includes the following steps:

[0007] S1. Obtain the real-time water temperature data at W position points of the water tank, calculate the average value of the W real-time water temperature data, and use this average value as the water tank temperature; W is a natural number greater than 1;

[0008] S2. Adopt the XGBoost gradient boosting model tree model; respectively construct a water temperature change rate model during energy storage and a water temperature change rate model during energy release, and find the singularity of the water temperature change;

[0009] S3. Collect the weather data (such as temperature, wind force, humidity, and time information) of the office building in the historical period, as well as the energy storage amount, energy release amount, and water tank temperature of the water tank during the corresponding historical period, and obtain a training set through data preprocessing;

[0010] S4. Use the weather data (such as temperature, wind force, humidity) and time information of the office building in the historical period as inputs, and use the water temperature change rate of the water tank during the corresponding historical period as the expected output to train the water temperature change rate model during energy storage and the water temperature change rate model during energy release; The training steps are as follows:

[0011] S401. Establish an expression for the data set:

[0012] S = {(y m , x m ), n = 1, …, M} (1)

[0013] Where: S represents the data set, M represents the number of samples, x m is the feature vector of the mth sample, y m is the predicted value of the mth sample, p is the number of included features, and the expression of each feature vector is (x1, x2, …, x p );

[0014] S402. Clean the data set, perform one-hot encoding on discrete data, fill in missing data, and then divide the data set into a training set S0 and a test set S1 according to a ratio;

[0015] S403. Set the initial parameters of XGBoost, input the training set into the model for model training to obtain the trained model, then input the test set into the model for prediction, calculate the error for the prediction result, and then continuously adjust the parameters of XGBoost to minimize the error;

[0016] S5. Input the weather data (such as temperature, wind force, humidity) and time information in time periods of the next day into the water temperature change rate model during energy storage and the water temperature change rate model during energy release to obtain the predicted results of the water temperature change rate in time periods of the next day.

[0017] Preferably, the data preprocessing includes:

[0018] Divide time features: Divide the date and time into week number, week count, month, season, holiday; Represent the season information and holiday information in the form of integers;

[0019] Fill in missing data: Fill in the missing values in the way of filling with the average value;

[0020] Eliminate abnormal data and duplicate data: The abnormal data includes null values and negative values;

[0021] Extract the weather data (such as temperature, wind force, humidity) in time periods;

[0022] Calculate the water temperature change rate: Calculate the change range of the water temperature per unit time.

[0023] Preferably, the error is the mean absolute percentage error MAPE, and the expression is:

[0024]

[0025] Where: X i is the actual water temperature change rate, and Y i is the predicted water temperature change rate; Finally, count the accuracy of the predicted water temperature change rate and the actual water temperature change rate as the final evaluation index, and the corresponding mathematical expression is:

[0026]

[0027] Where, Y s is the predicted water temperature change rate of the next day, and P s is the actual water temperature change rate of the next day predicted.

[0028] Preferably, the weather data in the historical period is crawled using a web crawler, and the temperature data includes the highest temperature, the lowest temperature, wind force and humidity in the area where the office building is located.

[0029] The second object of the present invention is to provide a prediction system for the water tank temperature change rate of an office building water energy storage device, including:

[0030] Data acquisition module: Obtain the real-time water temperature data at W position points of the water tank, calculate the average value of the W real-time water temperature data, and use this average value as the water tank temperature; W is a natural number greater than 1;

[0031] Prediction model construction module: Adopt the XGBoost gradient boosting model tree model; respectively construct the water temperature change rate model during energy storage and the water temperature change rate model during energy release, and find the singularity of the water temperature change;

[0032] Training set construction module: Collect the weather data (such as temperature, wind force, humidity) and time information of the office building in the historical period, as well as the energy storage amount, energy release amount, and water tank temperature of the water tank during the corresponding historical period, and obtain the training set through data preprocessing;

[0033] Prediction model training module: Use the weather data (such as temperature, wind force, humidity) and time information of the office building in the historical period as input, and use the water temperature change rate of the water tank during the corresponding historical period as the expected output to train the water temperature change rate model during energy storage and the water temperature change rate model during energy release; The training steps are:

[0034] Establish the expression of the data set:

[0035] S = {(y m ,x m ), n = 1, …, M} (1)

[0036] Where: S represents the data set, M represents the number of samples, x m is the feature vector of the mth sample, y m is the predicted value of the mth sample, p is the number of features included, and the expression of each feature vector is (x1, x2, …, x p );

[0037] Clean the data set, perform one-hot encoding on discrete data, fill in missing data, and then divide the data set into a training set S0 and a test set S1 according to a ratio;

[0038] Set the initial parameters of XGBoost, input the training set into the model for model training to obtain the trained model, then input the test set into the model for prediction, calculate the error for the prediction result, and then continuously adjust the parameters of XGBoost to minimize the error;

[0039] Prediction execution module: Input the weather data (such as temperature, wind force, humidity) and time information in sub-periods of the next day into the water temperature change rate model during energy storage and the water temperature change rate model during energy release to obtain the predicted results of the water temperature change rate in sub-periods of the next day.

[0040] Preferably, the data preprocessing includes:

[0041] Divide time features: Divide the date and time into week numbers, week counts, months, seasons, and holidays; represent the season information and holiday information in the form of integers;

[0042] Fill in missing data: Fill in the missing values by using the average value filling method;

[0043] Remove abnormal data and duplicate data: The abnormal data includes null values and negative values;

[0044] Extract weather data (such as temperature, wind force, humidity) in sub-periods;

[0045] Calculate the water temperature change rate: Calculate the change range of the water temperature per unit time.

[0046] Preferably, the error is the mean absolute percentage error MAPE, and the expression is:

[0047]

[0048] Where: X i is the actual water temperature change rate, and Y i is the predicted water temperature change rate; finally, the accuracy of the predicted water temperature change rate and the actual water temperature change rate is statistically calculated as the final evaluation index, and the corresponding mathematical expression is:

[0049]

[0050] Where, Y s is the predicted water temperature change rate of the next day, and P s is the actual water temperature change rate of the predicted next day.

[0051] Preferably, the weather data in the historical period is crawled by using a web crawler, and the temperature data includes the highest temperature, the lowest temperature, the wind force, and the humidity in the area where the office building is located.

[0052] The third invention object of this patent is to provide a computer program for implementing the method for predicting the water tank temperature change rate of the above office building water energy storage equipment.

[0053] The fourth invention object of this patent is to provide an information data processing terminal for implementing the method for predicting the water tank temperature change rate of the office building water energy storage equipment.

[0054] The fifth invention object of this patent is to provide a computer-readable storage medium, including instructions, which when running on a computer, cause the computer to execute the method for predicting the water tank temperature change rate of the above office building water energy storage equipment.

[0055] The advantages and positive effects of the present invention are:

[0056] 1. Predict the inflection point of the water temperature change in the water tank through a big data model, so as to provide an effective basis for the activation of other energy equipment, thereby maintaining the stable temperature in the building, avoiding large fluctuations, and improving comfort.

[0057] 2. According to the water temperature change rate model of the water tank, the energy storage temperature can be determined as needed, avoiding too high heat storage temperature and too low cold storage temperature, and further saving electricity costs.

[0058] 3. By observing the average water temperature of the water tank, rather than paying attention to the outlet and return water temperatures of the water tank and the temperature of the top layer of the water tank, it is possible to better predict and respond to the possible changes in the water tank temperature.

[0059] 4. The present invention uses the XGBoost model to construct the water temperature change rate model during energy storage and energy release of the water energy storage device, making full use of the integration idea of the XGBoost model, reducing the risk of model overfitting, and improving the generalization performance and prediction accuracy of the model.

[0060] 5. The present invention can predict the water temperature change of the water tank of the water energy storage device in an office building under the action of external environmental factors, which is beneficial to providing more accurate energy storage and energy release powers of the water energy storage device and selecting a reasonable water tank temperature setting when generating the operation strategy of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 is the schematic diagram of the web crawler in the preferred embodiment of the present invention;

[0062] Figure 2 is the data preprocessing flowchart in the preferred embodiment of the present invention;

[0063] Figure 3 is the water temperature change rate curve diagram in the preferred embodiment of the present invention;

[0064] Figure 4 is the flowchart of the water temperature change rate model during energy storage and energy release of the water energy storage device in the preferred embodiment of the present invention;

[0065] Figure 5 is the comparison diagram of the water temperature change rate predicted by the energy storage process of the water energy storage device in an office building and the real data;

[0066] Figure 6 is the comparison diagram of the water temperature change rate predicted by the energy release process of the water energy storage device in an office building and the real data. DETAILED DESCRIPTION OF THE INVENTION

[0067] In order to further understand the content, features and effects of the present invention, the following embodiments are cited and described in detail in conjunction with the accompanying drawings.

[0068] Please refer to Figures 1 to 6 ,

[0069] A method for predicting the temperature change rate of a water storage tank of an office building water energy storage device, the method comprising the following steps:

[0070] S1. According to the characteristic that the temperature of the water storage tank of the water energy storage device has a stratified distribution during energy supply, water temperature gauges are set at different depths and different positions of each layer of the water tank. The real-time water temperature of the water tank is measured by multiple water temperature gauges, and the average value of the readings of multiple water temperature gauges is taken to calculate the water temperature, and this average value is used as the water tank temperature;

[0071] S2. Construct a water temperature change rate model during energy storage and a water temperature change rate model during energy discharge: The water temperature change rate models during energy storage and energy discharge of the water energy storage device adopt the XGBoost gradient boosting model tree model; respectively construct a water temperature change rate model during energy storage and a water temperature change rate model during energy discharge, and find the singularity of the water temperature change; The singularity is the point where the change rate changes from positive to negative, or from negative to positive, or exceeds the threshold, and the threshold can be set according to different situations.

[0072] S3. Collect the weather data (such as temperature, wind force, humidity) and time information of the office building in the historical period, as well as the energy storage amount, energy discharge amount, and water tank temperature of the water tank during the corresponding historical period, and obtain a training set after data preprocessing;

[0073] The weather data of the office building in the historical period needs to be crawled using a web crawler. The specific data to be crawled includes the highest temperature, lowest temperature, wind force, and humidity in the area where the office building is located. The principle of the web crawler is as Figure 1 shown. After obtaining the weather data crawled by the web crawler, it is necessary to merge the weather data with the energy storage amount, energy discharge amount, and water temperature change amount of the collected water energy storage device according to the corresponding time to obtain the original data set.

[0074] Since there are many problems in the original data set, it is necessary to preprocess the original data set. The steps of preprocessing mainly include dividing time features, filling missing data, calculating the average water temperature of the water tank, calculating the water temperature change rate, detecting and removing outliers, and dividing the energy storage and energy discharge data sets.

[0075] As Figure 2 shown is the process of data preprocessing, and the specific operation process of each part is as follows:

[0076] (1) Divide time features: Divide the general date and time into features such as week number, week number, month, season, holiday, etc. Season information includes spring, summer, autumn, and winter, which are represented in integer form (0: spring, 1: summer, 2: autumn, 3: winter). Holiday information includes non-holidays and holidays, which are also represented in integer form (0: non-holiday, 1: holiday);

[0077] (2) Filling in missing data: The collected data inevitably contains missing values. For missing data, in addition to directly deleting it, it can also be filled in manually. In this example, the average value filling method is used to fill in the missing values;

[0078] (3) Calculating the average water temperature of the water tank: Since the real-time water temperature of the water tank in the water energy storage system is measured by multiple water temperature gauges, it is necessary to take the average value of the readings of each water temperature gauge as the actual water temperature of the water tank; as Figure 3 Figure 5 shows the water tank temperature change curve of an office building throughout the day on December 17, 2020, which marks the water temperature changes (yc1 - yc3) of each water temperature gauge and the average water temperature change (yc_avg);

[0079] (4) Calculating the water temperature change rate: When the water energy storage equipment stores and releases energy, the water temperature in the water tank will rise and fall accordingly. Since the original data set only records the water temperature at a certain time point and cannot express the speed of water temperature change at a certain moment, it is necessary to approximately calculate the water temperature change rate at the current moment by taking the difference between the water temperature at the current time point and the water temperature at the previous time point;

[0080] (5) Detection and elimination of outliers: The original data set usually contains a large number of abnormal data, such as null values, negative values, etc. In this article, a very typical type of outlier is that the water temperature drops when the water energy storage equipment stores energy, and the water temperature rises when the water energy storage equipment releases energy. When encountering such outliers, they can be directly eliminated.

[0081] (6) Dividing the data sets for energy storage and energy release: Since the energy storage and energy release processes of the water energy storage equipment are two different processes, it is necessary to build models separately. Naturally, it is necessary to divide the original data set into two data sets for different models to use. The division method is to divide the data with energy storage greater than 0 into one category and the data with energy release greater than 0 into one category.

[0082] The following are some parts of the data sets before and after preprocessing:

[0083] Table 1 Some parts of the data set before preprocessing

[0084]

[0085] Table 2 Some parts of the data set after preprocessing

[0086]

[0087]

[0088] Table 1 shows that in this embodiment, the weather data and the energy storage, energy release, and water temperature change amounts of the collected water energy storage equipment are merged according to the corresponding time to obtain the original data set. The time is not feature-divided, there are multiple water tank temperature features, and the water temperature change rate feature is missing. Table 2 is the training data after preprocessing. The time is divided into hours, weeks, seasons, and holidays. For the water tank temperatures recorded by multiple water temperature gauges, the average water temperature is taken. In addition, the water temperature change rate is calculated.

[0089] S4. Using the temperature, wind force, humidity, and time information of the office building in the historical period as the input, and the water temperature change rate of the water tank in the corresponding historical period as the expected output, train the water temperature change rate model during energy storage and the water temperature change rate model during energy release; the training steps are as follows:

[0090] S401. Establish the expression of the data set:

[0091] S = {(y m , x m ), n = 1, …, M} (1)

[0092] Where: S represents the data set, M represents the number of samples, x m is the feature vector of the mth sample, y m is the predicted value of the mth sample, p is the number of features included, and the expression of each feature vector is (x1, x2, …, x p );

[0093] S402. Clean the data set, perform one-hot encoding on discrete data, fill in missing data, and then divide the data set into a training set S0 and a test set S1 according to a ratio;

[0094] S403. Set the initial parameters of XGBoost, input the training set into the model for model training to obtain the trained model, then input the test set into the model for prediction, calculate the error for the prediction result, and then continuously adjust the parameters of XGBoost to minimize the error;

[0095] It should be noted that since the energy storage and energy release of the water tank are two different processes and there are differences in the process of water tank temperature change, it is necessary to model and train the water energy storage and energy release in the above manner separately.

[0096] S5. Crawl the weather data of the next day from the weather website, input the temperature, wind force, humidity, and time information of the next day to be predicted into the trained water temperature change rate model during energy storage and energy release of the water energy storage equipment to obtain the predicted result of the water temperature change rate of the next day.

[0097] In the present invention, the mean absolute percentage error MAPE is adopted as the prediction evaluation index for the water temperature change rate during the energy storage and release of the water energy storage device. The expression is as follows:

[0098]

[0099] In formula (3), X i is the actual water temperature change rate, and Y i is the predicted water temperature change rate; finally, the accuracy of the predicted water temperature change rate and the actual water temperature change rate is statistically calculated as the final evaluation index, and the corresponding mathematical expression is:

[0100]

[0101] Among them, Y s is the predicted water temperature change rate on the second day, and P s is the actual water temperature change rate on the second day of prediction.

[0102] To verify the effectiveness of the present invention, in this embodiment, the water temperature change rate during the energy storage and release of the water energy storage device in an office building from January 1, 2021 to January 10, 2021 is predicted. The comparison graph of the predicted water temperature change rate and the real data during the energy storage of the water energy storage device is as Figure 5 shown, and the comparison graph of the predicted water temperature change rate and the real data during the energy release of the water energy storage device is as Figure 6 shown. Taking the predicted water temperature change rate during the energy storage of the water energy storage device as an example, where the abscissa represents the time series from January 1, 2021 to January 10, 2021 in hours, and the ordinate is the water temperature change rate per hour, the absolute mean percentage error calculated in hours is 2.3%.

[0103] A prediction system for the water tank temperature change rate of a water energy storage device in an office building includes:

[0104] Data acquisition module: According to the characteristic that the water tank temperature of the water energy storage device has a stratified distribution during energy supply, water temperature gauges are set at different depths and different positions of each layer of the water tank. The real-time water temperature of the water tank is measured by multiple water temperature gauges, and the average value of the readings of multiple water temperature gauges is taken to calculate the water temperature;

[0105] Prediction model construction module: Construct a water temperature change rate model during energy storage and a water temperature change rate model during energy release: The water temperature change rate models during the energy storage and release of the water energy storage device adopt the XGBoost gradient boosting model tree model; respectively construct a water temperature change rate model during energy storage and a water temperature change rate model during energy release, and find the singular points of the water temperature change; The singular point is the point where the change rate changes from positive to negative or from negative to positive.

[0106] The training set construction module collects the temperature, wind force, humidity, and time information of the office building in historical periods, as well as the energy storage capacity, energy release capacity, and water tank temperature of the water tank during the corresponding historical periods, and obtains the training set through data preprocessing;

[0107] The weather data of the office building in historical periods needs to be crawled using a web crawler. The specific data to be crawled includes the highest temperature, lowest temperature, wind force, and humidity in the area where the office building is located. The principle of the web crawler is as Figure 1 shown. After obtaining the weather data crawled by the web crawler, it is necessary to merge the weather data with the energy storage, energy release, and water temperature change of the collected water energy storage equipment according to the corresponding time to obtain the original data set.

[0108] Since there are many problems in the original data set, it is necessary to preprocess the original data set. The main steps of the preprocessing mainly include dividing time features, filling missing data, calculating the average water temperature of the water tank, calculating the water temperature change rate, detecting and removing outliers, and dividing the energy storage and energy release data sets.

[0109] As Figure 2 shown in is the process of data preprocessing. The specific operation process of each part is as follows:

[0110] (1) Divide time features: Divide the general date and time into features such as week number, week number, month, season, holiday, etc. Season information includes spring, summer, autumn, and winter, which are represented in integer form (0: spring, 1: summer, 2: autumn, 3: winter). Holiday information includes non-holiday and holiday, which are also represented in integer form (0: non-holiday, 1: holiday);

[0111] (2) Fill missing data: It is inevitable that there are missing values in the collected data. For missing data, in addition to directly deleting them, they can also be filled manually. In this example, the average value filling method is used to fill the missing values;

[0112] (3) Calculate the average water temperature of the water tank: Since the real-time water temperature of the water tank in the water energy storage system is measured by multiple water temperature gauges, it is necessary to take the average value of the readings of each water temperature gauge as the actual water temperature of the water tank; As Figure 3 shown in is the water tank temperature change curve of an office building throughout the day on December 17, 2020, which indicates the water temperature changes (yc1~yc3) of each water temperature gauge, as well as the average water temperature change (yc_avg);

[0113] (4) Calculate the water temperature change rate: When the water energy storage equipment stores and releases energy, the water temperature in the water tank will rise and fall accordingly. Since only the water temperature at a certain time point is recorded in the original data set and cannot express the speed of water temperature change at a certain moment, it is necessary to approximately calculate the water temperature change rate at the current moment by taking the difference between the water temperature at the current time point and the water temperature at the previous time point;

[0114] (5) Detection and elimination of outliers: There are usually a large number of abnormal data in the original dataset, such as null values, negative values, etc. In this paper, a very typical type of outlier is that the water temperature drops when the water energy storage device stores energy, and the water temperature rises when the water energy storage device releases energy. When encountering such outliers, they can be directly eliminated.

[0115] (6) Divide the energy storage and energy release datasets: Since the energy storage and energy release processes of the water energy storage device are two different processes, separate modeling is required. Naturally, the original dataset needs to be divided into two datasets for different models to use. The division method is to divide the data with energy storage greater than 0 into one category, and the data with energy release greater than 0 into another category.

[0116] The following are some parts of the dataset before and after preprocessing:

[0117] Table 1 Some parts of the dataset before preprocessing

[0118]

[0119] Table 2 Some parts of the dataset after preprocessing

[0120]

[0121] Table 1 is the original dataset obtained by combining weather data and the energy storage, energy release, and water temperature change of the collected water energy storage device according to the corresponding time in this embodiment. The time is not feature-divided, there are multiple water tank temperature features, and the water temperature change rate feature is missing; while Table 2 is the training data after preprocessing. The time is divided into hours, weeks, seasons, and holidays. For the water tank temperatures recorded by multiple water temperature gauges, the average water temperature is taken. In addition, the water temperature change rate is calculated.

[0122] Prediction model training module: Using the temperature, wind force, humidity, and time information of the historical period of the office building as input, and the water temperature change rate of the water tank during the corresponding historical period as the expected output, train the water temperature change rate models during energy storage and energy release; the training steps are as follows:

[0123] Establish the expression of the dataset:

[0124] S = {(y m , x m ), n = 1, …, M} (1)

[0125] Where: S represents the dataset, M represents the number of samples, x m is the feature vector of the m-th sample, y mis the predicted value of the m-th sample, p is the number of features included, and the expression of each feature vector is (x1, x2, …, x p );

[0126] Clean the data set, perform one-hot encoding on discrete data, fill in missing data, and then divide the data set into a training set S0 and a test set S1 according to a certain proportion;

[0127] Set the initial parameters of XGBoost, input the training set into the model for model training to obtain the trained model, then input the test set into the model for prediction, calculate the error for the prediction result, and then continuously adjust the parameters of XGBoost to minimize the error;

[0128] It should be noted that since the energy storage and release of the water tank are two different processes and there are differences in the process of water tank temperature change, it is necessary to model and train the water energy storage and release separately in the above manner.

[0129] Prediction execution module: Crawl the weather data of the next day from the weather website, and input the temperature, wind force, humidity and time information of the next day to be predicted into the water temperature change rate model during the energy storage and release of the trained water energy storage device to obtain the prediction result of the water temperature change rate of the next day.

[0130] In the present invention, the prediction evaluation index of the water temperature change rate model during the energy storage and release of the water energy storage device adopts the mean absolute percentage error MAPE, and the expression is:

[0131]

[0132] (3) In the formula, X i is the actual water temperature change rate, and Y i is the predicted water temperature change rate; finally, the accuracy of the predicted water temperature change rate and the actual water temperature change rate is statistically calculated as the final evaluation index, and the corresponding mathematical expression is:

[0133]

[0134] Among them, Y s is the predicted water temperature change rate of the next day, and P s is the actual water temperature change rate of the predicted next day.

[0135] A computer program for implementing the above method for predicting the water tank temperature change rate of the office building water energy storage device.

[0136] An information data processing terminal for implementing the above method for predicting the water tank temperature change rate of the office building water energy storage device.

[0137] A computer-readable storage medium includes instructions that, when run on a computer, cause the computer to execute the method for predicting the rate of change of the water tank temperature of the office building water energy storage device described above.

[0138] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in whole or in part in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk (SSD)).

[0139] The above description is only a preferred embodiment of the present invention, and does not impose any form of limitation on the present invention. Any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention all fall within the scope of the technical solution of the present invention.

Claims

1. A method for predicting the temperature change rate of a water storage tank of an office building energy storage device, characterized in that, It includes the following steps: S1. Obtain the real-time water temperature data at W position points of the water tank, calculate the average value of the W real-time water temperature data, and record this average value as the water tank temperature; W is a natural number greater than 1; S2. Adopt the XGBoost gradient boosting model tree model; respectively construct the water temperature change rate model during energy storage and the water temperature change rate model during energy discharge, and find the singularity of the water temperature change; S3. Collect the weather data and time information of the office building in the historical period, as well as the energy storage amount, energy discharge amount, and water tank temperature of the water tank during the corresponding historical period, and obtain the training set after data preprocessing; The data preprocessing includes: Dividing time features: Divide the date and time into week numbers, week counts, months, seasons, and holidays; represent the season information and holiday information in the form of integers; Filling missing data: Fill the missing values by using the average value filling method; Removing abnormal data and duplicate data: The abnormal data includes null values and negative values; Extracting the weather data in sub-periods; Calculating the water temperature change rate: Calculate the change range of the water temperature per unit time; S4. Use the weather data and time information of the office building in the historical period as the input, and use the water temperature change rate of the water tank during the corresponding historical period as the expected output to train the water temperature change rate model during energy storage and the water temperature change rate model during energy discharge; The training steps are: S401. Establish the expression of the data set: (1) in: S represents a dataset, M represents the number of samples, For the m The feature vector of the samples, is the predicted value of the mth sample, p is the number of features contained, and the expression of each feature vector is (x1, x2, …,x p ); S402. Clean the data set, perform one-hot encoding on the discrete data, fill the missing data, and then divide the data set into a training set S0 and a test set S1 according to a ratio; S403. Set the initial parameters of XGBoost, input the training set into the model for model training to obtain the trained model, then input the test set into the model for prediction, calculate the error for the prediction result, and then continuously adjust the parameters of XGBoost to minimize the error; The error is the mean absolute percentage error MAPE, and the expression is: (2) Wherein: is the actual water temperature change rate, is the predicted water temperature change rate; finally, the accuracy of the predicted water temperature change rate and the actual water temperature change rate is statistically calculated as the final evaluation index, and the corresponding mathematical expression is: (3) in, is the predicted rate of change of water temperature on the next day, is the actual water temperature change rate predicted for the next day; S5. Input the weather data and time information in sub-periods of the next day into the water temperature change rate model during energy storage and the water temperature change rate model during energy discharge. The weather data includes temperature, wind force, and humidity; obtain the predicted results of the water temperature change rate in sub-periods of the next day.

2. The method for predicting the temperature change rate of the water tank of the office building water storage equipment according to claim 1 is characterized in that: The weather data in the historical period is crawled using a web crawler. The temperature data includes the highest temperature, lowest temperature, wind force, and humidity in the area where the office building is located.

3. A prediction system for the temperature change rate of a water storage tank of an office building water energy storage device, characterized in that, It includes: Data acquisition module: Obtain the real-time water temperature data at W position points of the water tank, calculate the average value of the W real-time water temperature data, and record this average value as the water tank temperature; W is a natural number greater than 1; Prediction model construction module: Adopt the XGBoost gradient boosting model tree model; respectively construct the water temperature change rate model during energy storage and the water temperature change rate model during energy discharge, and find the singularity of the water temperature change; Training set construction module: Collect the weather data and time information of the office building in the historical period, as well as the energy storage amount, energy discharge amount, and water tank temperature of the water tank during the corresponding historical period, and obtain the training set after data preprocessing; The data preprocessing includes: Dividing time features: Divide the date and time into week numbers, week counts, months, seasons, and holidays; represent the season information and holiday information in the form of integers; Filling missing data: Fill the missing values by using the average value filling method; Removing abnormal data and duplicate data: The abnormal data includes null values and negative values; Extracting weather data in time periods; Calculating the water temperature change rate: Calculate the change range of the water temperature per unit time; The prediction model training module uses the weather data and time information of the historical periods of the office building as inputs, and the water temperature change rate of the water tank within the corresponding historical periods as the expected output to train the water temperature change rate model during energy storage and the water temperature change rate model during energy discharge; The training steps are as follows: Establishing the expression of the data set: (1) Wherein: S represents the data set, M represents the number of samples, is the m feature vector of the th sample, p is the predicted value of the mth sample, p is the number of features included, and the expression of each feature vector is (x1, x2, …, x p ); Cleaning the data set, performing one-hot encoding on the discrete data, filling the missing data, and then dividing the data set into a training set S0 and a test set S1 according to a ratio; Setting the initial parameters of XGBoost, inputting the training set into the model for model training to obtain the trained model, then inputting the test set into the model for prediction, calculating the error for the prediction result, and then continuously adjusting the parameters of XGBoost to minimize the error; The error is the mean absolute percentage error MAPE, and the expression is: (2) in: is the actual water temperature change rate, To predict the water temperature change rate; finally, the accuracy of the predicted water temperature change rate and the actual water temperature change rate is calculated as the final evaluation index, and the corresponding mathematical expression is: (3) Among them, is the predicted water temperature change rate on the second day, is the actual water temperature change rate on the second day predicted; The prediction execution module: Input the weather data and time information in time periods of the next day into the water temperature change rate model during energy storage and the water temperature change rate model during energy discharge. The weather data includes temperature, wind force, and humidity; Obtain the prediction results of the water temperature change rate in time periods of the next day.

4. The system for predicting the temperature change rate of water tanks of water storage equipment for office buildings according to claim 3 is characterized in that: The weather data of the historical periods is crawled using a web crawler. The temperature data includes the highest temperature, the lowest temperature, wind force, and humidity in the area where the office building is located.

5. An information data processing terminal, characterized in that, For implementing the method for predicting the water temperature change rate of the water tank of the office building water energy storage device described in claim 1 or 2 above.

6. A computer-readable storage medium comprising instructions, characterized in that, When it runs on a computer, it causes the computer to execute the method for predicting the water temperature change rate of the water tank of the office building water energy storage device described in claim 1 or 2 above.

Citation Information

Patent Citations

  • Water tank intelligent regulation method with monitoring function

    CN109062279A

  • Short-term wind power prediction method

    CN113591399A