Method for regulating and controlling heating temperature through long short-term memory network model

Using the LSTM model to control heating temperature solves the problem of inaccurate temperature prediction in traditional heating systems, achieves precise control and energy optimization, and improves user experience and system intelligence.

CN120611472APending Publication Date: 2025-09-09LINYI DAIMA INFORMATION TECH RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510713438.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Traditional heating temperature control methods cannot accurately predict and effectively control indoor temperature changes. Existing models cannot capture the complex nonlinear relationship between indoor temperature and various influencing factors, resulting in poor heating effects and energy waste.

Method used

The long short-term memory network (LSTM) model is used for data processing and temperature prediction. Through data cleaning, standardization, and time series alignment, the LSTM model is constructed and trained. The feedback mechanism is combined for heating regulation, and an intelligent heating regulation system is developed.

Benefits of technology

It improves the indoor heating temperature prediction accuracy, realizes precise heating control, reduces energy waste, enhances the system intelligence level and user experience, and optimizes energy utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005427599910000071
    Figure BDA0005427599910000071
  • Figure HDA0005427599920000011
    Figure HDA0005427599920000011
  • Figure HDA0005427599920000021
    Figure HDA0005427599920000021
Patent Text Reader

Abstract

The invention belongs to the technical field of heating regulation and control, and particularly relates to a method for realizing heating temperature regulation and control through a long short-term memory (LSTM) network model, which comprises the steps of data acquisition and preprocessing, LSTM model construction and training, indoor heating temperature prediction and regulation and system integration and application. According to the method, the complex relation between the indoor heating temperature and each factor is effectively captured through the LSTM model, the prediction precision is remarkably improved, heating regulation and control are optimized, the energy utilization efficiency is improved, the system intelligence level is enhanced, and more comfortable heating experience is brought to a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of heating control, and specifically to a method for achieving heating temperature control through a long short-term memory network model. Background Art

[0002] In the current heating sector, traditional indoor heating temperature control methods have numerous shortcomings. Firstly, the complexity of building structure, user behavior, and environmental factors makes indoor temperature fluctuations difficult to accurately predict and effectively control. Secondly, existing control methods often rely on simple mathematical models or empirical rules, failing to fully account for the dynamic characteristics and long-term trends of temperature changes, resulting in poor heating performance and significant energy waste.

[0003] From the perspective of data processing and model building, existing technologies offer relatively limited capabilities when dealing with large amounts of heating-related data. Missing values ​​and outliers in heat meter data and outdoor temperature data are not handled accurately, and data alignment methods are relatively simplistic, making them difficult to meet the requirements of complex models. Regarding model selection, traditional linear models fail to capture the complex nonlinear relationships between indoor temperature and various influencing factors, resulting in low prediction and control accuracy.

[0004] With the development of artificial intelligence (AI), deep learning models have shown great potential in time series prediction and complex system control. Long Short-Term Memory (LSTM) networks, as advanced deep learning models, can effectively handle long-term dependencies in time series data, providing a new solution for indoor heating temperature control. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for realizing heating temperature control through a long short-term memory network model. The method aims to improve the intelligence level of the heating system, optimize energy utilization efficiency, and create a more comfortable indoor thermal environment for users. It is widely applicable to various scenarios such as residential and commercial buildings with centralized heating.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A method for controlling heating temperature using a long short-term memory network model is provided. The method is implemented using a control system, the control system comprising:

[0008] Data processing module: used to collect various heating-related data, clean, standardize and align the data in time series;

[0009] Model building and training module: used to build, train, evaluate and optimize LSTM models;

[0010] Temperature prediction and control module: formulates and implements heating control strategies based on model prediction results, and establishes a feedback mechanism to update the model;

[0011] System integration and interaction module: used to develop and deploy intelligent heating control systems, and provide a visual interface to enable user interaction with the system;

[0012] The method for realizing heating temperature control by using the control system comprises the following steps:

[0013] Data collection and preprocessing: Collect user heat meter data, outdoor temperature data, indoor temperature history data, building structure data, and user behavior data; use the K-nearest neighbor algorithm to fill missing values ​​in the heat meter data, and use a density-based spatial clustering algorithm to identify and remove outliers; standardize the data; and use spline interpolation to align the time series of outdoor temperature data and heat meter data.

[0014] LSTM model construction and training: Construct a long short-term memory network model, determine the number of layers, number of hidden units, and time step; divide the preprocessed data into training, validation, and test sets; train the model using the training set, using an adaptive learning rate algorithm to adjust model parameters during training; evaluate model performance and adjust hyperparameters using the validation set; and test the trained model using the test set.

[0015] Indoor heating temperature prediction and control: Real-time heating data collected is fed into a trained LSTM model to predict indoor heating temperatures for a specific period of time. Based on the predicted results and the user-defined comfort temperature range, a corresponding heating control strategy is formulated and implemented. A feedback mechanism is established to compare the actual indoor temperature with the predicted temperature. When the deviation exceeds a threshold, the LSTM model is updated and optimized online.

[0016] System integration and application: Develop an intelligent heating control system that integrates data collection, model calculation, and control instruction sending functions; provide a visual interface for heating system managers and users to achieve automated and intelligent operation of the heating system.

[0017] Furthermore, the K nearest neighbor algorithm is used to fill the missing values ​​in the hot table data. In this process, the K value is selected according to the characteristics of the data. By calculating the distance between the missing value sample and other samples, the K samples with the closest distance are selected, and the values ​​of these K samples are used to estimate the missing values.

[0018] Furthermore, a density-based spatial clustering algorithm is used to identify and eliminate outliers. In this process, density-connected data points are divided into different clusters according to the density distribution of data points, and data points located in low-density areas are identified as outliers and eliminated.

[0019] Furthermore, when the spline interpolation method is used to align the time series of outdoor temperature data and heat meter data, a piecewise polynomial function is constructed to fit the data to ensure that the interpolated outdoor temperature data is consistent with the heat meter data in the time dimension and can more smoothly reflect the temperature change trend.

[0020] Furthermore, in the LSTM model construction and training steps, when constructing the LSTM model, a 2-3 layer network structure is adopted, the number of hidden units is set to 64 or 128, and the time step is determined to be the past 24 time steps based on the time interval of the data and the importance of historical data.

[0021] Furthermore, the adaptive learning rate algorithm is an Adam optimizer, which adaptively adjusts the learning rate according to the gradient of the model parameters during the model training process, thereby accelerating the model convergence speed and avoiding falling into the local optimal solution.

[0022] Furthermore, the comfortable temperature range is set by the user according to his or her own needs, and the heating control strategy includes adjusting the heating flow or water supply temperature. When the predicted indoor temperature is lower than the lower limit of the comfortable temperature range, the heating flow or water supply temperature is increased; when the predicted indoor temperature is higher than the upper limit of the comfortable temperature range, the heating flow or water supply temperature is reduced.

[0023] Furthermore, the backend of the intelligent heating control system is developed using the Python Fl ask framework to realize the functions of data collection, model calculation and control instruction sending; the front end uses HTML, CSS and JavaScript to develop a visual interface, and realizes data interaction between the front and back ends through Ajax technology.

[0024] The beneficial effects of the present invention are as follows:

[0025] (1) Improved prediction accuracy: By adopting advanced data processing methods and a powerful LSTM model, the present invention can more accurately capture the complex relationship between indoor heating temperature and various influencing factors, effectively improving the prediction accuracy of indoor heating temperature. Compared with traditional linear models, LSTM models have better adaptability and generalization capabilities when processing time series data. They can take into account long-term trends and seasonal changes in historical data, providing a more reliable basis for heating control.

[0026] (2) Optimizing heating control: Based on the prediction results of the LSTM model, the present invention can formulate a more reasonable heating control strategy and achieve precise control of indoor heating temperature. Through real-time monitoring and feedback mechanisms, the system can promptly adjust the operating parameters of the heating equipment according to actual temperature changes, ensuring that the indoor temperature always remains within a comfortable range, improving the user's heating experience.

[0027] (3) Improve energy efficiency: Accurate temperature prediction and control can help avoid insufficient or overheating, reduce energy waste, and improve the energy efficiency of the heating system. By optimizing the allocation of heating resources, heating costs are reduced, achieving the goal of energy conservation and emission reduction, with significant economic and environmental benefits.

[0028] (4) Enhanced system intelligence: The intelligent heating control system developed by this invention automates data collection, model calculation, and control instruction transmission, providing a visual interface for heating system management and operation, thereby improving the system's intelligence and management efficiency. Users can conveniently set temperatures and view forecast results through the interface, enhancing user participation and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic flow chart of the heating control method provided in Example 1 of the present disclosure;

[0030] Figure 2 This is a schematic diagram of the model training and prediction process of the heating control method provided in Example 1 of the present disclosure. DETAILED DESCRIPTION

[0031] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be derived from these drawings without inventive effort.

[0032] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The embodiments cannot be described one by one here, but the embodiments of the present invention are not limited to the following embodiments.

[0033] Example 1: A method for controlling heating temperature by using a long short-term memory network model, referring to Figure 1-2 As shown, the method is implemented by a control system, and the control system includes:

[0034] Data processing module: used to collect various heating-related data, clean, standardize and align the data in time series;

[0035] Model building and training module: used to build, train, evaluate and optimize LSTM models;

[0036] Temperature prediction and control module: formulates and implements heating control strategies based on model prediction results, and establishes a feedback mechanism to update the model;

[0037] System integration and interaction module: used to develop and deploy intelligent heating control systems, and provide a visual interface to enable user interaction with the system;

[0038] The method for realizing heating temperature control by using the control system comprises the following steps:

[0039] 1. Data Collection and Preprocessing

[0040] Implementation steps: Extensively collect various data related to indoor heating temperature, including but not limited to user heat meter data (such as cumulative heat, inlet and outlet water temperature, flow rate, etc.), outdoor temperature data, indoor temperature historical data, building structure data (such as room area, floor height, orientation, insulation material, etc.), and user behavior data (such as window opening frequency, set temperature adjustment, etc.). Among them, data collection is carried out through ultrasonic heat meters that record cumulative heat, inlet and outlet water temperature and flow rate every 15 minutes, meteorological stations collect outdoor temperature every 10 minutes and synchronize timestamps, indoor temperature is collected every 5 minutes by high-precision sensors covering each room, and user behavior data (such as window opening frequency, temperature control set value) is recorded in real time through the smart home system.

[0041] Clean the collected heat meter data and outdoor temperature data.

[0042] Data cleaning includes:

[0043] Missing value filling: K-nearest neighbor algorithm (KNNImputer, K=5-10) is used to fill missing values ​​by calculating the Euclidean distance based on the cumulative heat, flow rate and other characteristics;

[0044] Outlier removal: Based on the DBSCAN algorithm (parameters eps = 0.5, min_samples = 5), low-density outliers are identified and removed;

[0045] Time alignment: Use cubic spline interpolation (SciPy's CubicSpline) to align the outdoor temperature data to the heat table timestamp;

[0046] Normalization: Numerical features (such as temperature and flow rate) are normalized to [0, 1] using Min-Max, and categorical features (such as room orientation) are one-hot encoded.

[0047] 2. LSTM model construction and training

[0048] Implementation steps: Build an LSTM network to predict future indoor temperature and optimize model parameters.

[0049] 2.1 Model Design

[0050] The model input is a three-dimensional tensor (number of samples × time steps × number of features), where the time step is set to 24 (corresponding to 6 hours of historical data, with each time step being a 15-minute interval). The features include eight key parameters, including accumulated heat, flow rate, indoor temperature, outdoor temperature, user behavior encoding (such as window opening status and temperature control setpoint), room orientation encoding, historical energy consumption, and time series identifier. The network architecture uses a two-layer LSTM design: the input layer is an LSTM layer (128 hidden units, return_sequences=True), which receives the complete sequence of 24 time steps as input and outputs the hidden state for each time step to preserve the temporal dimension. A dropout layer (with a ratio of 0.2) is added to the middle layer to randomly block some neurons to prevent overfitting. A second LSTM layer (128 units, return_sequences=False) extracts global features from the time series data. The output layer uses a fully connected (Dense) layer to map the features to temperature predictions for the next 24 time steps (6 hours), directly outputting a continuous temperature series. This design uses a two-layer LSTM to capture short-term fluctuations and long-term trends, and combines it with Dropout to enhance generalization capabilities, ultimately achieving high-precision temperature prediction.

[0051] 2.2 Training Strategy

[0052] The preprocessed data is divided into training, validation, and test sets, with the ratios set to 70%, 15%, and 15% respectively. The LSTM model is trained using the training set. During model training, the Adam optimizer is used to dynamically adjust the learning rate (initial learning rate is set to 0.001). Its adaptive momentum mechanism balances the update speeds of different parameters, accelerating convergence while avoiding local optima. The mean absolute error (MAE) loss function directly reflects the average deviation between the predicted temperature and the true value. It is more robust to outliers than the mean squared error (MSE). To prevent overfitting, an early stopping mechanism is implemented: the validation set loss is monitored. If it does not decrease after 10 consecutive rounds, training is terminated early and the optimal model weights are retained. In addition, a 5-fold time series cross-validation (TimeSeriesSplit) is used to divide the data into five training and validation sets in chronological order. This ensures the model's generalization across different time periods and prevents performance fluctuations caused by changes in data distribution.

[0053] 2.3 Model Evaluation

[0054] In the model evaluation phase, the prediction performance is comprehensively measured through multi-dimensional indicators:

[0055] MAE (Mean Absolute Error): Calculates the mean absolute deviation between the predicted temperature and the true value. The target MAE is < 0.5°C, reflecting the model's ability to accurately capture temperature fluctuations.

[0056] MSE (mean square error): calculates the square mean of the prediction error, with a target MSE < 0.3, which focuses on penalizing large deviations and is used to optimize the model's sensitivity to extreme temperature changes;

[0057] R 2 (coefficient of determination): evaluates the model's ability to explain data variation, with the target R 2 A value >0.95 indicates that the model can explain more than 95% of the temperature variation patterns. If this value is not met, performance can be further improved by increasing the number of LSTM layers, introducing an attention mechanism, or expanding the training data.

[0058] Specific implementation:

[0059] First, we import the necessary libraries for the model, including Sequential for building linear stacked neural network layers and EarlyStopping and ModelCheckpoint callback functions for monitoring model performance during training.

[0060] Create a sequential model. Add the first LSTM layer with 128 units that returns the complete output sequence ( `return_sequences = True`) and an input shape of `(24,8)`, meaning 24 time steps and 8 features. Add a Dropout layer with a dropout rate of 0.2 to prevent overfitting. Add a second LSTM layer, also with 128 units, but that does not return the complete output sequence ( `return_sequences = False` by default). Add a fully connected layer (Dense) that outputs 24 values, corresponding to the temperature prediction for the next 24 time steps.

[0061] The model was compiled using the Adam optimizer with the loss function set to mean absolute error (MAE).

[0062] Configure the callback function: `EarlyStopping` monitors the validation set loss (`val_loss`) and terminates training early if there is no improvement for 10 consecutive rounds. `ModelCheckpoint` saves the model with the lowest validation set loss to `best_model.h5`.

[0063] Use the training data (`X_train`,`y_train`) for training for 200 epochs with a batch size of 64, use the validation data (`X_val`,`y_val`) for validation, and apply a callback function to monitor the training progress.

[0064] Evaluate the model performance using the test data (`X_test`, `y_test`). Output the mean absolute error (MAE) of the test set, formatted to three decimal places, in degrees Celsius.

[0065] 3. Temperature prediction and dynamic control

[0066] Based on the prediction results of the LSTM model, the system collects the latest 24 time-step data every 15 minutes (6-hour historical window, in the format of a three-dimensional tensor 1×24×8, including 8 features such as cumulative heat, flow rate, indoor and outdoor temperature, etc.), inputs the trained LSTM model and outputs the temperature sequence for the next 24 steps (6 hours). The average value of the predicted temperature is calculated using the average temperature calculation formula.

[0067]

[0068] Where: T i represents the predicted temperature value of the i-th time step output by the model; N is the total number of predicted time steps (for example, when predicting the next 24 time steps, N = 24).

[0069] The system dynamically determines whether it exceeds the comfort range set by the user (such as 18℃-22℃). If the predicted temperature is lower than the lower limit of 18℃, the heating valve opening is increased to 90% (default 50%), and the water supply temperature is increased to 55℃ (default 50℃) to increase the heat medium flow and heat transfer efficiency; if the predicted temperature is higher than the upper limit of 22℃, the valve opening is reduced to 30%, and the water supply temperature is reduced to 45℃ to reduce heat output. To ensure the long-term effectiveness of the model, the system introduces an online update mechanism: when the actual temperature deviates from the predicted value by more than ±1℃ for three consecutive times, incremental training is automatically triggered, and the data of the last 7 days is extracted from the time series database (such as InfluxDB). After preprocessing to generate input in the same format as the training set, the current optimal model is loaded for 20 rounds of fine-tuning training. Finally, the new version of the model is saved and the update log is recorded to continuously optimize the prediction accuracy and control stability.

[0070] 4. System integration and application

[0071] Implementation steps: Use the Python Flask framework to develop the backend of the intelligent heating control system, implementing data collection, model calculation, and control command transmission. Develop a front-end visualization interface using HTML, CSS, and JavaScript, and implement data interaction between the frontend and backend using Ajax technology. Deploy the intelligent heating control system to a server and connect it to heating equipment to achieve automated heating control. Provide users and administrators with a website or mobile app to access the system for easy use.

[0072] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A method for achieving heating temperature control through a long short-term memory network model, characterized in that: The method is implemented using a control system, which includes: Data processing module: used to collect various heating-related data, clean, standardize and align the data in time series; Model building and training module: used to build, train, evaluate and optimize LSTM models; Temperature prediction and control module: formulates and implements heating control strategies based on model prediction results, and establishes a feedback mechanism to update the model; System integration and interaction module: used to develop and deploy intelligent heating control systems, and provide a visual interface to enable user interaction with the system; The method for realizing heating temperature control by using the control system comprises the following steps: Data collection and preprocessing: Collect user heat meter data, outdoor temperature data, indoor temperature history data, building structure data, and user behavior data; use the K-nearest neighbor algorithm to fill missing values ​​in the heat meter data, and use a density-based spatial clustering algorithm to identify and remove outliers; standardize the data; and use spline interpolation to align the time series of outdoor temperature data and heat meter data. LSTM model construction and training: Construct a long short-term memory network model, determine the number of layers, number of hidden units, and time step; divide the preprocessed data into training, validation, and test sets; train the model using the training set, using an adaptive learning rate algorithm to adjust model parameters during training; evaluate model performance and adjust hyperparameters using the validation set; and test the trained model using the test set. Indoor heating temperature prediction and control: Real-time heating data collected is fed into a trained LSTM model to predict indoor heating temperatures for a specific period of time. Based on the predicted results and the user-defined comfort temperature range, a corresponding heating control strategy is formulated and implemented. A feedback mechanism is established to compare the actual indoor temperature with the predicted temperature. When the deviation exceeds a threshold, the LSTM model is updated and optimized online. System integration and application: Develop an intelligent heating control system that integrates data collection, model calculation, and control instruction sending functions; provide a visual interface for heating system managers and users to achieve automated and intelligent operation of the heating system.

2. The method for achieving heating temperature control by using a long short-term memory network model according to claim 1, characterized in that: The K nearest neighbor algorithm is used to fill the missing values ​​in the hot table data. In this process, the K value is selected according to the characteristics of the data. By calculating the distance between the missing value sample and other samples, the K samples with the closest distance are selected, and the values ​​of these K samples are used to estimate the missing values.

3. The method for achieving heating temperature control by using a long short-term memory network model according to claim 1, characterized in that: Outliers are identified and eliminated using a density-based spatial clustering algorithm. In this process, density-connected data points are divided into different clusters according to the density distribution of the data points, and data points in low-density areas are identified as outliers and eliminated.

4. The method for achieving heating temperature control using a long short-term memory network model according to claim 1, wherein: When using the spline interpolation method to align the time series of outdoor temperature data and heat meter data, a piecewise polynomial function is constructed to fit the data to ensure that the interpolated outdoor temperature data is consistent with the heat meter data in the time dimension and can more smoothly reflect the temperature change trend.

5. The method for achieving heating temperature control by using a long short-term memory network model according to claim 1, characterized in that: In the LSTM model construction and training steps, when building the LSTM model, a 2-3 layer network structure is adopted, the number of hidden units is set to 64 or 128, and the time step is determined to be the past 24 time steps based on the time interval of the data and the importance of historical data.

6. The method for achieving heating temperature control through a long short-term memory network model according to claim 1, characterized in that: The adaptive learning rate algorithm is the Adam optimizer, which adaptively adjusts the learning rate according to the gradient of the model parameters during model training to accelerate model convergence and avoid falling into local optimal solutions.

7. The method for achieving heating temperature control through a long short-term memory network model according to claim 1, characterized in that: The comfortable temperature range is set by the user according to his or her own needs. The heating control strategy includes adjusting the heating flow or water supply temperature. When the predicted indoor temperature is lower than the lower limit of the comfortable temperature range, the heating flow or water supply temperature is increased; when the predicted indoor temperature is higher than the upper limit of the comfortable temperature range, the heating flow or water supply temperature is reduced.

8. The method for achieving heating temperature control through a long short-term memory network model according to claim 1, characterized in that: The backend of the intelligent heating control system is developed using the Python Flask framework to implement the functions of data collection, model calculation and control instruction sending; The front-end uses HTML, CSS and JavaScript to develop a visual interface, and uses Ajax technology to achieve data interaction between the front-end and back-end.

Citation Information

Cited By

  • Equipment temperature adjusting method fusing long-term and short-term memory network

    CN120949858A