Central heating system room temperature prediction method and device, storage medium and electronic equipment

By using the LSTM-Transformer fusion model, the problems of gradient vanishing and gradient explosion in room temperature prediction of centralized heating systems by recurrent neural networks are solved, achieving more accurate room temperature prediction and adapting to changes in different environments and scenarios.

CN121658892APending Publication Date: 2026-03-13DATANG BAODING HEAT SUPPLYING CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing recurrent neural networks suffer from gradient vanishing and gradient exploding problems in predicting room temperature in centralized heating systems, resulting in large prediction deviations and difficulty in effectively capturing dependencies and complex relationships over long periods.

Method used

A fusion method of LSTM and Transformer models is adopted. The LSTM model captures local dependency features, and the Transformer model captures global dependency features. The features are then fused to construct a room temperature prediction model.

Benefits of technology

It improves the performance of the room temperature prediction model at both local and global scales, reduces prediction bias, and improves prediction accuracy, especially in different seasons or under extreme climate conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658892A_ABST
    Figure CN121658892A_ABST
Patent Text Reader

Abstract

The invention discloses a central heating system room temperature prediction method and device, a storage medium and electronic equipment, relates to the technical field of central heating control, and mainly aims at solving the problem that prediction deviation is large due to the fact that room temperature prediction depends on a recurrent neural network in the prior art. The historical heat supply parameters are time sequence data collected based on a preset sampling frequency; constructing a room temperature prediction model based on an LSTM model, a Transform model and the historical data set; performing training processing on the room temperature prediction model to obtain a trained room temperature prediction model; and obtaining a current heat supply parameter, and carrying out prediction processing on the user side indoor temperature based on the trained room temperature prediction model and the current heat supply parameter to obtain a user side indoor temperature prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of centralized heating control technology, and in particular to a method and device for predicting room temperature in a centralized heating system, a storage medium, and electronic equipment. Background Technology

[0002] Heating systems are a crucial component of urban energy systems. While the heating industry has flourished, it has also brought about serious problems of energy waste and excessive carbon emissions. Heating systems generally lack reasonable and effective intelligent forecasting and control mechanisms, which not only leads to significant energy waste but also increases company costs, often failing to achieve the expected results. Therefore, intelligent forecasting for heating systems is of great significance for promoting energy conservation and emission reduction, as well as building smart heating systems.

[0003] Existing technologies include room temperature prediction methods that combine data feature processing with neural networks. Room temperature is influenced by multiple factors, such as external climate conditions, indoor heat sources, and user activities. These factors change over time, thus room temperature prediction exhibits strong temporal characteristics. Recurrent neural networks (RNNs) can effectively capture time dependencies, thereby enabling accurate room temperature prediction. Therefore, an increasing number of researchers are using RNNs to study room temperature prediction methods. However, during the training process, when calculating gradients using the backpropagation algorithm, RNNs encounter vanishing and exploding gradient problems as the time step increases. This leads to training difficulties and limitations in effectively capturing long-term dependencies and in capturing complex relationships between different time steps. Therefore, existing room temperature prediction methods for centralized heating systems still have significant biases in their prediction performance. Summary of the Invention

[0004] In view of this, the present invention provides a method and device for predicting room temperature in a centralized heating system, a storage medium, and an electronic device, the main purpose of which is to solve the problem of large prediction deviation caused by existing methods that rely on recurrent neural networks to predict room temperature.

[0005] According to one aspect of the present invention, a method for predicting room temperature in a centralized heating system is provided, applied at the server end, comprising: Historical heating parameters from the user side are acquired to form a historical dataset, wherein the historical heating parameters are time-series data collected based on a preset sampling frequency; A room temperature prediction model was constructed based on the LSTM model, the Transformer model, and the historical dataset. The room temperature prediction model is trained to obtain a trained room temperature prediction model. Obtain the current heating parameters, and based on the trained room temperature prediction model and the current heating parameters, perform prediction processing on the user-side indoor temperature to obtain the user-side indoor temperature prediction result.

[0006] Furthermore, the historical heating parameters include supply water temperature, return water temperature, heat consumption, flow rate, outdoor temperature, and indoor temperature; After obtaining historical heating parameters from the user side to form a historical dataset, the method further includes: The historical dataset is preprocessed, including supplementing missing data, deleting redundant data, and normalizing data. The missing data is supplemented using one of the following methods: averaging at both ends, linear interpolation in the middle, or polynomial fitting.

[0007] Furthermore, the construction of the room temperature prediction model based on the LSTM model, the Transformer model, and the historical dataset includes: Define an LSTM layer and use the LSTM model to extract local dependency features of time-series data in the historical dataset; Define a location encoding layer and use a sine or cosine function to add location information to the historical dataset; Define a Transformer layer and use the Transformer model to extract features from the historical dataset after adding location information to obtain the global dependency features of the time series data. A feature fusion layer is defined to perform weighted fusion processing on the local dependency features and the global dependency features to obtain fused features; Define a fully connected layer to receive fused features and generate the final room temperature prediction result.

[0008] Furthermore, the Transformer model consists of an encoder and a decoder, which are connected through multiple self-attention layers; Each self-attention layer undergoes several different linear transformations, and self-attention calculations are performed on the transformed data for each set. Finally, the outputs of all self-attention layers are concatenated, and the final output is obtained through a linear transformation.

[0009] Further, the step of training the room temperature prediction model to obtain a trained room temperature prediction model includes: The room temperature prediction model is initialized, and the mean square error is determined as the model loss function; The historical dataset is divided into a training set and a test set; The training set is used as input to the room temperature prediction model for iterative training, and the model parameters of the room temperature prediction model are optimized based on the model loss function during the iterative training process; the model parameters include weight values. After the iterative training is completed, the training effect of the trained room temperature prediction model is verified based on the test set.

[0010] Furthermore, after obtaining the predicted indoor temperature on the user side, the method further includes: The predicted indoor temperature on the user side is visualized to obtain the visualization result. The visualization processing results are sent to the heating company so that the heating company can display the results.

[0011] Furthermore, the method also includes: The predicted indoor temperature on the user side is transmitted to the heating dispatch and control system on the heating company side via API interface or database connection, so that the heating dispatch and control system can adjust the working status of the heating equipment, including boiler output, valve opening degree and pump flow rate, based on the predicted indoor temperature on the user side.

[0012] According to another aspect of the present invention, a room temperature prediction device for a centralized heating system is provided, comprising: The data acquisition module is used to acquire historical heating parameters from the user side to form a historical dataset. The historical heating parameters are time-series data collected based on a preset sampling frequency. The model building module is used to build a room temperature prediction model based on the LSTM model, the Transformer model, and the historical dataset. The model training module is used to train the room temperature prediction model to obtain a trained room temperature prediction model. The prediction processing module is used to obtain the current heating parameters and perform prediction processing on the user-side indoor temperature based on the trained room temperature prediction model and the current heating parameters to obtain the user-side indoor temperature prediction result.

[0013] Furthermore, the historical heating parameters include supply water temperature, return water temperature, heat consumption, flow rate, outdoor temperature, and indoor temperature; the device also includes a data preprocessing module, which is used to: preprocess the historical dataset, including supplementing missing data, deleting redundant data, and normalizing data; the supplementation of missing data adopts one of the following: averaging at both ends, linear interpolation in the middle, and polynomial fitting.

[0014] Furthermore, the model building module is also used for: Define an LSTM layer and use the LSTM model to extract local dependency features of time-series data in the historical dataset; Define a location encoding layer and use a sine or cosine function to add location information to the historical dataset; Define a Transformer layer and use the Transformer model to extract features from the historical dataset after adding location information to obtain the global dependency features of the time series data. A feature fusion layer is defined to perform weighted fusion processing on the local dependency features and the global dependency features to obtain fused features; Define a fully connected layer to receive fused features and generate the final room temperature prediction result.

[0015] Furthermore, the Transformer model in the model building module consists of an encoder and a decoder, which are connected through multiple self-attention layers; Each self-attention layer undergoes several different linear transformations, and self-attention calculations are performed on the transformed data for each set. Finally, the outputs of all self-attention layers are concatenated, and the final output is obtained through a linear transformation.

[0016] Furthermore, the model training module is also used for: The room temperature prediction model is initialized, and the mean square error is determined as the model loss function; The historical dataset is divided into a training set and a test set; The training set is used as input to the room temperature prediction model for iterative training, and the model parameters of the room temperature prediction model are optimized based on the model loss function during the iterative training process; the model parameters include weight values. After the iterative training is completed, the training effect of the trained room temperature prediction model is verified based on the test set.

[0017] Furthermore, the device also includes a visualization processing module, which is used for: The predicted indoor temperature on the user side is visualized to obtain the visualization result. The visualization processing results are sent to the heating company so that the heating company can display the results.

[0018] Furthermore, the device also includes a coordination and scheduling module, which is used for: The predicted indoor temperature on the user side is transmitted to the heating dispatch and control system on the heating company side via API interface or database connection, so that the heating dispatch and control system can adjust the working status of the heating equipment, including boiler output, valve opening degree and pump flow rate, based on the predicted indoor temperature on the user side.

[0019] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to the above-described method for predicting room temperature in a centralized heating system.

[0020] According to another aspect of the present invention, an electronic device is provided, including a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform an operation corresponding to the above-described method for predicting room temperature in a centralized heating system.

[0021] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages: This invention provides a method and device for predicting room temperature in a centralized heating system, along with a storage medium and electronic equipment. Compared to existing technologies, this invention acquires historical heating parameters from the user side to form a historical dataset. A room temperature prediction model is then constructed based on an LSTM model, a Transformer model, and the historical dataset. This allows the room temperature prediction model to fully leverage its advantages at both local and global scales, thereby improving the overall performance of the room temperature prediction model in handling complex sequential data. In centralized heating scenarios, the LSTM model demonstrates significant advantages in capturing local information due to its unique gating mechanism, while its computational mode effectively reduces overall complexity. Furthermore, for temperature prediction, especially under different seasons or extreme climate conditions, the Transformer can flexibly adjust prediction accuracy. Room temperature is affected by various factors such as external climate change, building structure, and equipment usage. The Transformer can automatically learn these complex relationships and self-adjust to adapt to different environments and scenarios. Therefore, the fused LSTM-Transformer model can effectively reduce prediction bias in indoor temperature prediction for centralized heating systems.

[0022] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1This diagram illustrates an application scenario of a centralized heating system room temperature prediction method provided by an embodiment of the present invention. Figure 2 A schematic flowchart of a method for predicting room temperature in a centralized heating system provided by an embodiment of the present invention is shown. Figure 3 This invention provides a schematic diagram of the structure of a room temperature prediction device for a centralized heating system according to an embodiment of the present invention. Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown. Detailed Implementation

[0024] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0025] like Figure 1 As shown in the embodiments of the present invention, the room temperature prediction method for centralized heating systems is mainly applied to the server side, hereinafter referred to as the current execution end. The server side is independent of the user side and the heating company side, providing room temperature prediction services to both the user side and the heating company side. In areas where centralized heating is widely used, providing indoor temperature prediction by the server side can effectively reduce the data processing volume on the heating company side and improve the efficiency of temperature prediction and scheduling control on the heating company side.

[0026] This invention provides a method for predicting room temperature in a centralized heating system, such as... Figure 2 As shown, the method includes: 101. Obtain historical heating parameters from the user side to form a historical dataset, wherein the historical heating parameters are time-series data collected based on a preset sampling frequency; In this embodiment of the invention, the current execution terminal acquires and centrally stores historical heating parameters from the user side, forming a historical dataset. These historical heating parameters include supply water temperature, return water temperature, heat consumption, flow rate, outdoor temperature, and indoor temperature, etc., which are not specifically limited in this embodiment. These historical heating parameters are automatically collected by thermal system monitoring equipment (such as heat meters or SCADA systems) at a certain sampling frequency. Therefore, the method of collecting historical heating parameters determines that the historical heating parameters are time-series data collected based on a preset sampling frequency, commonly 1 minute, 5 minutes, or 1 hour, thus forming continuously recorded time-series data that can be used to analyze the operating status of the heating system and the changing patterns of heat load.

[0027] It should be noted that, in this embodiment, after the current execution terminal obtains the historical heating parameters from the user side to form a historical dataset, the method further includes: performing data preprocessing on the historical dataset. The data preprocessing includes supplementing missing data, deleting redundant data, and data normalization. Specifically, supplementing missing data employs one of the following methods: averaging at both ends, linear interpolation in the middle, or polynomial fitting.

[0028] The following is a method for using linear interpolation to fill in missing values: Suppose that data is missing at position i, and there are known numbers at positions i-1 and i+1. and The supplementary value can then be calculated using the linear interpolation formula. :

[0029] Redundant data typically refers to data containing duplicate records or data with strong correlations. Completely duplicate records can be deleted through deduplication. Data normalization is one method of standardizing data, aiming to transform the data into a uniform scale to facilitate better model training in machine learning algorithms. A common data normalization method is to scale the data to the range [0, 1]. It is a data sample. and Let these be the minimum and maximum values ​​of the feature, respectively. Then the normalized value is... It can be calculated using the following formula:

[0030] In this way, the normalized data will be scaled to the range of [0, 1].

[0031] 102. Construct a room temperature prediction model based on the LSTM model, the Transformer model, and the historical dataset; In this embodiment of the invention, the current execution end proposes an LSTM-Transformer fusion model structure by fusing the LSTM model and the Transformer model. Specifically: (1) Define the LSTM layer and use the LSTM model to extract the local dependency features of the time series data in the historical dataset; the preprocessed data is fed into the LSTM model. The LSTM model, with its unique gating mechanism, processes the sequence step by step, which can capture the local information of adjacent time steps and store historical information through hidden states, thereby enhancing the temporal continuity of the data.

[0032] (2) Define a positional encoding layer, using sine or cosine functions to add positional information to the historical dataset. Since the Transformer model structure itself lacks a sense of order, the positional encoding layer enables the Transformer model to recognize the order of elements in the sequence by adding a set of position-related vectors to the input word vectors. Using sine and cosine functions to generate fixed positional codes (such as sine and cosine curves of different frequencies) ensures the uniqueness and generalizability of the codes across different positions; trainable positional vectors can also be obtained through learning. In this way, when the model performs attention calculations, it can utilize the positional information provided by the positional encoding to distinguish the semantic differences of the same content at different positions, thereby better understanding the sequence structure.

[0033] (3) Define the Transformer layer and use the Transformer model to extract features from the historical dataset after adding location information to obtain the global dependency features of the time series data.

[0034] In this embodiment, after the LSTM model completes local information capture and historical information storage, the data is input into the improved Transformer module to further capture global information. The Transformer sub-network can learn long-term dependencies and cross-feature interactions from a global perspective, and through the capture of multi-scale information, the model's prediction performance for time-series data is significantly improved.

[0035] It should be noted that in this embodiment, the Transformer model consists of an encoder and a decoder, connected by multiple self-attention layers. Each self-attention layer performs self-attention calculations on each set of transformed data after undergoing several different linear transformations. Finally, the outputs of all self-attention layers are concatenated, and the final output is obtained through a linear transformation. The calculation formula for the self-attention mechanism is shown below:

[0036] in, The query vector is a vector representation of a specific position in the input sequence. It is the key vector, which is a vector representation of all positions in the input sequence; It is a value vector, which is also a vector representation of all positions in the input sequence; It is the dimension of the key vector.

[0037] (4) Define a feature fusion layer to perform weighted fusion processing on the local dependency features and the global dependency features to obtain fused features; the specific fusion method can be weighted concatenation, as shown in the following formula:

[0038] in, h fuse It is a feature of fusion. α It is a local dependency feature h LSM The weight values ​​can be learned and optimized during model training; β It is a global dependency feature h Trans The weight values ​​can be learned and optimized during model training; α and β This indicates the importance of the two modules in the final prediction.

[0039] (5) Define a fully connected layer to receive fused features and generate the final room temperature prediction result.

[0040] 103. The room temperature prediction model is trained to obtain a trained room temperature prediction model; In this embodiment of the invention, after the current execution terminal has built the room temperature prediction model, it is also necessary to perform a catenary process on the built room temperature prediction model. The specific training steps are as follows: (1) Initialize the room temperature prediction model and determine the mean square error as the model loss function; initialization includes initializing the input dimension, LSTM model dimension, Transformer model dimension, number of heads and layers of the multi-head self-attention mechanism, feedforward neural network dimension, output dimension and dropout rate.

[0041] The model loss function can quantitatively measure the model's predictive performance. In this embodiment of the invention, the mean squared error (MSE) is selected as the loss function, and the calculation formula is as follows:

[0042] Where n is the number of samples, , Let be the actual indoor temperature and the predicted indoor temperature of the i-th sample, respectively.

[0043] (2) Divide the historical dataset into a training set and a test set; (3) The training set is used as the input of the room temperature prediction model for iterative training, and the model parameters of the room temperature prediction model are optimized based on the model loss function during the iterative training process; the optimized model parameters include weight values. α and β ; (4) After the iterative training is completed, the training effect of the trained room temperature prediction model is verified based on the test set.

[0044] 104. Obtain the current heating parameters, and based on the trained room temperature prediction model and the current heating parameters, perform prediction processing on the user-side indoor temperature to obtain the user-side indoor temperature prediction result.

[0045] In this embodiment of the invention, the current execution terminal acquires the current heating parameters in real time, including the supply water temperature, return water temperature, heat consumption, flow rate, and outdoor temperature. Then, based on the room temperature prediction model trained in step 103 and the acquired current heating parameters, the indoor temperature on the user side is predicted, thereby obtaining the predicted indoor temperature result on the user side.

[0046] It should be noted that after obtaining the indoor temperature prediction result, the current execution terminal can also continuously monitor the user's indoor temperature and compare the indoor temperature monitoring value with the indoor temperature prediction value. If the difference between the indoor temperature prediction value and the indoor temperature monitoring value exceeds a predetermined threshold, the current execution terminal can also trigger an alarm, generate an alarm message and send it to the heating company side, thereby reminding the control center to perform manual intervention.

[0047] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to facilitate heating companies to more intuitively understand the indoor temperature prediction results on the user side, another method for predicting room temperature in a centralized heating system is provided. After obtaining the indoor temperature prediction results on the user side, the method further includes: The predicted indoor temperature on the user side is visualized to obtain the visualization result. The visualization processing results are sent to the heating company so that the heating company can display the results.

[0048] In this embodiment of the invention, the current execution terminal performs visualization processing on the user-side indoor temperature prediction results to obtain visualization processing results. The visualization processing can be displayed through visual charts, such as using a line graph to show the temperature change trend of a single user or multiple users; using a heat map to show the temperature distribution of a community or building; using a bar chart to compare temperature differences at different times (such as predicted temperatures on weekdays and weekends, daytime and nighttime, helping to analyze the impact of work and rest on temperature requirements), etc. This embodiment of the invention does not impose specific limitations. Furthermore, the visualization processing can also be displayed through a digital interface. The heating company can directly load and render a displayable file, which can directly display the current predicted temperature, target temperature, deviation value, or information such as user address, predicted temperature, predicted time period, and anomaly level on the interface. This embodiment of the invention does not impose specific limitations.

[0049] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to improve the temperature control capability of centralized heating, another method for predicting room temperature in a centralized heating system is provided, the method further comprising: The predicted indoor temperature on the user side is transmitted to the heating dispatch and control system on the heating company side via API interface or database connection, so that the heating dispatch and control system can adjust the working status of the heating equipment, including boiler output, valve opening degree and pump flow rate, based on the predicted indoor temperature on the user side.

[0050] In this embodiment of the invention, the current execution terminal transmits the predicted indoor temperature on the user side to the heating dispatch and control system on the heating company side through an API interface or database connection. This allows the heating dispatch and control system to adjust the operating status of the heating equipment, including boiler output, valve opening, and pump flow rate, based on the predicted indoor temperature on the user side, thereby ensuring that the indoor temperature remains within a comfortable range. This invention provides a method for predicting room temperature in a centralized heating system. Compared with existing technologies, this invention obtains historical heating parameters from the user side to form a historical dataset. A room temperature prediction model is then constructed based on an LSTM model, a Transformer model, and the historical dataset. This allows the room temperature prediction model to fully leverage its advantages at both local and global scales, thereby improving the overall performance of the room temperature prediction model in handling complex sequential data. In centralized heating scenarios, the LSTM model demonstrates significant advantages in capturing local information due to its unique gating mechanism, while its computational mode effectively reduces overall complexity. Furthermore, for temperature prediction, especially under different seasons or extreme climate conditions, the Transformer can flexibly adjust prediction accuracy. Room temperature is affected by various factors such as external climate change, building structure, and equipment usage. The Transformer can automatically learn these complex relationships and self-adjust to adapt to different environments and scenarios. Therefore, the fused LSTM-Transformer model can effectively reduce prediction bias in indoor temperature prediction for centralized heating systems.

[0051] As a response to the above Figure 1 The implementation of the method shown in this invention provides a room temperature prediction device for a centralized heating system, such as... Figure 3 As shown, the device includes: The data acquisition module 21 is used to acquire historical heating parameters from the user side to form a historical dataset. The historical heating parameters are time-series data collected based on a preset sampling frequency. Model building module 22 is used to build a room temperature prediction model based on the LSTM model, the Transformer model and the historical dataset; Model training module 23 is used to train the room temperature prediction model to obtain a trained room temperature prediction model. The prediction processing module 24 is used to obtain the current heating parameters and perform prediction processing on the user-side indoor temperature based on the trained room temperature prediction model and the current heating parameters to obtain the user-side indoor temperature prediction result.

[0052] Furthermore, the historical heating parameters include supply water temperature, return water temperature, heat consumption, flow rate, outdoor temperature, and indoor temperature; the device also includes a data preprocessing module, which is used to: preprocess the historical dataset, including supplementing missing data, deleting redundant data, and normalizing data; the supplementation of missing data adopts one of the following: averaging at both ends, linear interpolation in the middle, and polynomial fitting.

[0053] Furthermore, the model building module 22 is also used for: Define an LSTM layer and use the LSTM model to extract local dependency features of time-series data in the historical dataset; Define a location encoding layer and use a sine or cosine function to add location information to the historical dataset; Define a Transformer layer and use the Transformer model to extract features from the historical dataset after adding location information to obtain the global dependency features of the time series data. A feature fusion layer is defined to perform weighted fusion processing on the local dependency features and the global dependency features to obtain fused features; Define a fully connected layer to receive fused features and generate the final room temperature prediction result.

[0054] Furthermore, the Transformer model in the model building module 22 consists of an encoder and a decoder, which are connected through multiple self-attention layers; Each self-attention layer undergoes several different linear transformations, and self-attention calculations are performed on the transformed data for each set. Finally, the outputs of all self-attention layers are concatenated, and the final output is obtained through a linear transformation.

[0055] Furthermore, the model training module 23 is also used for: The room temperature prediction model is initialized, and the mean square error is determined as the model loss function; The historical dataset is divided into a training set and a test set; The training set is used as input to the room temperature prediction model for iterative training, and the model parameters of the room temperature prediction model are optimized based on the model loss function during the iterative training process; the model parameters include weight values. After the iterative training is completed, the training effect of the trained room temperature prediction model is verified based on the test set.

[0056] Furthermore, the device also includes a visualization processing module, which is used for: The predicted indoor temperature on the user side is visualized to obtain the visualization result. The visualization processing results are sent to the heating company so that the heating company can display the results.

[0057] Furthermore, the device also includes a coordination and scheduling module, which is used for: The predicted indoor temperature on the user side is transmitted to the heating dispatch and control system on the heating company side via API interface or database connection, so that the heating dispatch and control system can adjust the working status of the heating equipment, including boiler output, valve opening degree and pump flow rate, based on the predicted indoor temperature on the user side.

[0058] This invention provides a room temperature prediction device for centralized heating systems. Compared with existing technologies, this invention acquires historical heating parameters from the user side to form a historical dataset. A room temperature prediction model is then constructed based on an LSTM model, a Transformer model, and the historical dataset. This allows the room temperature prediction model to fully leverage its advantages at both local and global scales, thereby improving the overall performance of the room temperature prediction model in handling complex sequence data. In centralized heating scenarios, the LSTM model demonstrates significant advantages in capturing local information due to its unique gating mechanism, while its computational mode effectively reduces overall complexity. Furthermore, for temperature prediction, especially under different seasons or extreme climate conditions, the Transformer can flexibly adjust prediction accuracy. Room temperature is affected by various factors such as external climate change, building structure, and equipment usage. The Transformer can automatically learn these complex relationships and self-adjust to adapt to different environments and scenarios. Therefore, the fused LSTM-Transformer model can effectively reduce prediction bias in indoor temperature prediction for centralized heating systems.

[0059] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, the computer-executable instruction being able to execute the centralized heating system room temperature prediction method in any of the above method embodiments.

[0060] Figure 4 The diagram illustrates the structure of an electronic device according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.

[0061] like Figure 4 As shown, the electronic device may include: a processor 302, a communications interface 304, a memory 306, and a communications bus 308.

[0062] The processor 302, communication interface 304, and memory 306 communicate with each other via communication bus 308.

[0063] Communication interface 304 is used to communicate with other network elements such as clients or other servers.

[0064] The processor 302 is used to execute program 310, which can specifically perform the relevant steps of the above-mentioned centralized heating system room temperature prediction method.

[0065] Specifically, program 310 may include program code that includes computer operation instructions.

[0066] Processor 302 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The electronic device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0067] Memory 306 is used to store program 310. Memory 306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0068] Specifically, program 310 can be used to cause processor 302 to perform the following operations: Historical heating parameters from the user side are acquired to form a historical dataset, wherein the historical heating parameters are time-series data collected based on a preset sampling frequency; A room temperature prediction model was constructed based on the LSTM model, the Transformer model, and the historical dataset. The room temperature prediction model is trained to obtain a trained room temperature prediction model. Obtain the current heating parameters, and based on the trained room temperature prediction model and the current heating parameters, perform prediction processing on the user-side indoor temperature to obtain the user-side indoor temperature prediction result.

[0069] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0070] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for predicting room temperature in a centralized heating system, applied to the server side, characterized in that, include: Historical heating parameters from the user side are acquired to form a historical dataset, wherein the historical heating parameters are time-series data collected based on a preset sampling frequency; A room temperature prediction model was constructed based on the LSTM model, the Transformer model, and the historical dataset. The room temperature prediction model is trained to obtain a trained room temperature prediction model. Obtain the current heating parameters, and based on the trained room temperature prediction model and the current heating parameters, perform prediction processing on the user-side indoor temperature to obtain the user-side indoor temperature prediction result.

2. The method according to claim 1, characterized in that, The historical heating parameters include supply water temperature, return water temperature, heat consumption, flow rate, outdoor temperature, and indoor temperature; After obtaining historical heating parameters from the user side to form a historical dataset, the method further includes: The historical dataset is preprocessed, including supplementing missing data, deleting redundant data, and normalizing data. The missing data is supplemented using one of the following methods: averaging at both ends, linear interpolation in the middle, or polynomial fitting.

3. The method according to claim 1, characterized in that, The construction of the room temperature prediction model based on the LSTM model, the Transformer model, and the historical dataset includes: Define an LSTM layer and use the LSTM model to extract local dependency features of time-series data in the historical dataset; Define a location encoding layer and use a sine or cosine function to add location information to the historical dataset; Define a Transformer layer and use the Transformer model to extract features from the historical dataset after adding location information to obtain the global dependency features of the time series data. A feature fusion layer is defined to perform weighted fusion processing on the local dependency features and the global dependency features to obtain fused features; Define a fully connected layer to receive fused features and generate the final room temperature prediction result.

4. The method according to claim 3, characterized in that, The Transformer model consists of an encoder and a decoder, which are connected through multiple self-attention layers; Each self-attention layer undergoes several different linear transformations, and self-attention calculations are performed on the transformed data for each set. Finally, the outputs of all self-attention layers are concatenated, and the final output is obtained through a linear transformation.

5. The method according to claim 1, characterized in that, The step of training the room temperature prediction model to obtain a trained room temperature prediction model includes: The room temperature prediction model is initialized, and the mean square error is determined as the model loss function; The historical dataset is divided into a training set and a test set; The training set is used as input to the room temperature prediction model for iterative training, and the model parameters of the room temperature prediction model are optimized based on the model loss function during the iterative training process; the model parameters include weight values. After the iterative training is completed, the training effect of the trained room temperature prediction model is verified based on the test set.

6. The method according to claim 1, characterized in that, After obtaining the predicted indoor temperature on the user side, the method further includes: The predicted indoor temperature on the user side is visualized to obtain the visualization result. The visualization processing results are sent to the heating company so that the heating company can display the results.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The predicted indoor temperature on the user side is transmitted to the heating dispatch and control system on the heating company side via API interface or database connection, so that the heating dispatch and control system can adjust the working status of the heating equipment, including boiler output, valve opening degree and pump flow rate, based on the predicted indoor temperature on the user side.

8. A room temperature prediction device for a centralized heating system, characterized in that, include: The data acquisition module is used to acquire historical heating parameters from the user side to form a historical dataset. The historical heating parameters are time-series data collected based on a preset sampling frequency. The model building module is used to build a room temperature prediction model based on the LSTM model, the Transformer model, and the historical dataset. The model training module is used to train the room temperature prediction model to obtain a trained room temperature prediction model. The prediction processing module is used to obtain the current heating parameters and perform prediction processing on the user-side indoor temperature based on the trained room temperature prediction model and the current heating parameters to obtain the user-side indoor temperature prediction result.

9. A storage medium, characterized in that, The storage medium stores at least one executable instruction that performs the operation corresponding to the centralized heating system room temperature prediction method as described in any one of claims 1-7.

10. An electronic device, characterized in that, It includes a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the centralized heating system room temperature prediction method as described in any one of claims 1-7.