A heat load prediction method of an LSTM+transformer model
By combining the LSTM+transformer model with the differential equations of the heating system, integrating short-term and long-term data, and introducing an outdoor temperature perturbation mechanism, the problem of accuracy in predicting heating delays was solved, and efficient energy consumption management of the heating system was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ELECTRIC INTELLIGENT ENERGY CO LTD
- Filing Date
- 2026-05-08
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies in centralized heating systems cannot effectively predict the delay time when the heat source is turned on or when the water supply temperature is adjusted to reach the user's indoor temperature setting, leading to excessive heating and increased energy consumption.
Using an LSTM+transformer model, combined with the thermodynamic differential equations of the heating system, and integrating short-term and long-term data, the system generates coded states and performs strategy adjustments by introducing the standard deviation of outdoor temperature and a probability perturbation mechanism to predict heating delay time and optimal water supply temperature.
It enables accurate prediction of heating delay time, reduces redundant heat output due to heat source start-up and shutdown and water supply temperature setting, lowers heating energy consumption, and improves the system's adaptive control capability under non-steady climatic conditions.
Smart Images

Figure CN122197728A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, specifically to a heating load prediction method using an LSTM+transformer model. Background Technology
[0002] In centralized heating systems, there is a significant delay in reaching the set indoor temperature after the heat source is turned on or the water supply temperature is adjusted. This delay is determined by factors such as pipeline transmission and building thermal inertia, and is closely related to outdoor temperature. Existing delay prediction methods mostly employ mechanistic models or statistical regression. Mechanistic models rely on difficult-to-obtain building thermal parameters, while statistical regression struggles to capture the nonlinear dynamic changes in delay with outdoor temperature and historical operating conditions. Traditional machine learning models, limited by their feature representation capabilities, cannot effectively model long-term time-series dependencies, leading to large prediction errors when outdoor temperatures fluctuate drastically. To ensure comfort, dispatchers often supply excessive heat ahead of schedule, increasing heat source energy consumption. Therefore, there is an urgent need for a method that can integrate multi-source time-series data and possess long-term dependency modeling capabilities to predict heating delays and provide corresponding strategies. Summary of the Invention
[0003] The purpose of this invention is to provide a heating load prediction method based on the LSTM+transformer model, thereby solving the above-mentioned technical problems.
[0004] The objective of this invention can be achieved through the following technical solutions: A heating load prediction method using an LSTM+transformer model includes the following steps: S1: Obtain water supply data from the mall's historical water supply records, which varies with time t. The water supply data includes the indoor temperature T. in (t), outdoor temperature T out (t) and water supply temperature T sup (t), construct differential equations based on water supply data; S2: A pre-defined sub-time period ts is set, and short-term data from the past ts hours is obtained. The short-term data includes water supply temperature, return water temperature, indoor temperature, and outdoor temperature. The short-term data is input into the LSTM model to obtain the short-term vector h. L ; Obtain long-term data from the past 24 hours, including indoor temperature, outdoor air temperature, and water supply temperature. Input the long-term data into the transformer model to obtain the long-term vector h. TF Based on short-term vector h L and long-term vector h TF Generate encoded state s; S3: Collect outdoor temperature data every ts interval and generate an outdoor temperature set H={Tout_1 T out_2 , ..., T out_m}, where T out_m Let m represent the outdoor temperature collected for the mth time, and m = 24 / ts; Calculate the standard deviation σ of the outdoor temperature, and add a perturbation to the outdoor temperature based on a preset probability p to obtain the outdoor temperature perturbation RT. out Recalculate the perturbed coding state st, and adjust the strategy based on the coding state s and coding state st.
[0005] As a further aspect of the present invention: the method for constructing differential equations based on water supply data in step S1 includes: Constructing differential equations Where C represents the equivalent heat capacity, R1 represents the thermal resistance of the heating side, and R2 represents the thermal resistance of the building envelope.
[0006] As a further aspect of the present invention: in step S2, short-term data is input into the LSTM model to obtain a short-term vector h. L include: Within time step ts, the supply water temperature, return water temperature, indoor temperature, and outdoor temperature are collected once per minute, resulting in ts×60 sampling points. These sampling points are then input into a two-layer LSTM with 64 neurons per layer in chronological order. The output of the last time step is obtained and denoted as the short-term vector h. L .
[0007] As a further aspect of the present invention: long-term data is input into the transformer model to obtain the long-term vector h. TF include: Indoor temperature, outdoor air temperature, and water supply temperature are collected hourly over a period of 24 hours, resulting in 24 sampling points. A sinusoidal position code is added to each sampling point. The processed data is then input into a Transformer encoder with four attention heads, a feedforward dimension of 128, and three stacked layers. The encoder output is averaged over the time axis to obtain the long-term vector h. TF .
[0008] As a further aspect of the present invention: in step S2, based on the short-term vector h L and long-term vector h TF The generated encoded state s specifically includes: The short-term vector h L and long-term vector h TF The input is fused, compressed to 64 dimensions, and then activated by ReLU to obtain the encoded state s.
[0009] As a further aspect of the present invention: in step S3, a perturbation is added to the outdoor temperature based on a preset probability p to obtain the outdoor temperature perturbation RT. out Specifically, it includes: A perturbation is added to the outdoor temperature with a preset probability p, and the outdoor temperature perturbation RT is obtained. out The outdoor temperature disturbance RT out =T out +γ, where γ∈(-σ, +σ).
[0010] As a further aspect of the present invention: in step S3, the strategy adjustment based on the encoding state s and the encoding state st specifically includes: Obtain the final encoded state St = 0.5 × s + 0.5 × st, and input the final encoded state St into the prediction network. The training data of the prediction network comes from the optimal advance time and optimal water supply temperature in the historical data. The optimal advance time is the time from the start of heating in the current moment to the mall temperature exactly reaching the set value in the historical records. The optimal water supply temperature is the water supply temperature that achieves the optimal advance time. Obtain the current water supply data, repeat the above steps, and record the output value as the advance water supply time D. adv and recommended water supply temperature T rec This allows the system to advance D. adv Turn on the heating and press T. rec Set the water supply temperature.
[0011] As a further aspect of the present invention: in step S2, when obtaining long-term data of the past 24 hours, the outdoor temperature value is set to be equal to the average outdoor temperature of that day.
[0012] The beneficial effects of this invention are as follows: (1) This solution, by integrating short-term memory networks and long-term dependency models, and combining them with the thermodynamic differential equations of the heating system, can predict the heating delay time and the optimal water supply temperature. Compared with traditional mechanistic models and statistical regression, it has a stronger long-term dependency modeling capability. The system can predict the delay time in advance to start the heat source and supply water at the recommended water supply temperature, avoiding the use of excessive advance heating strategies. It can reduce redundant heat output during the start-up and shutdown of the heat source and the setting of the water supply temperature, thereby reducing heating energy consumption while meeting the indoor temperature target.
[0013] (2) The standard deviation of outdoor temperature and a probability perturbation mechanism are introduced into the prediction process to generate a perturbed encoded state, which is then weighted and fused with the original encoded state. This enables the model to simulate random fluctuations and extreme changes in outdoor temperature during the training and inference phases, improving the model's generalization ability to non-stationary climate conditions. Simultaneously, the equivalent heat capacity, heating-side thermal resistance, and building envelope thermal resistance in the differential equations provide physical prior constraints for the model, preventing the failure of purely data-driven methods when historical data is insufficient or when extrapolating scenarios. Therefore, even under scenarios with drastic fluctuations in outdoor temperature, the model can still maintain high reliability in recommending water supply temperatures, improving the adaptive control capability of the heating system. Attached Figure Description
[0014] The invention will now be further described with reference to the accompanying drawings.
[0015] Figure 1 This is a schematic diagram of the structure of a heating load prediction method using an LSTM+transformer model according to the present invention. Figure 2 This is a flowchart illustrating the heating load prediction method using an LSTM+transformer model according to the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Please see Figure 1 As shown, this invention provides a heating load prediction method using an LSTM+transformer model, comprising the following steps: S1: Obtain water supply data from the mall's historical water supply records, which varies with time t. The water supply data includes the indoor temperature T. in (t), outdoor temperature T out (t) and water supply temperature T sup (t), construct differential equations based on water supply data; S2: A pre-defined sub-time period ts is set, and short-term data from the past ts hours is obtained. The short-term data includes water supply temperature, return water temperature, indoor temperature, and outdoor temperature. The short-term data is input into the LSTM model to obtain the short-term vector h. L ; Obtain long-term data from the past 24 hours, including indoor temperature, outdoor air temperature, and water supply temperature. Input the long-term data into the transformer model to obtain the long-term vector h.TF Based on short-term vector h L and long-term vector h TF Generate encoded state s; S3: Collect outdoor temperature data every ts interval and generate an outdoor temperature set H={T out_1 T out_2 , ..., T out_m}, where T out_m Let m represent the outdoor temperature collected for the mth time, and m = 24 / ts; Calculate the standard deviation σ of the outdoor temperature, and add a perturbation to the outdoor temperature based on a preset probability p to obtain the outdoor temperature perturbation RT. out Recalculate the perturbed coding state st, and adjust the strategy based on the coding state s and coding state st.
[0018] It should be noted that the water supply data, varying with time t, was obtained from the historical water supply records of the shopping mall's heating system. The sampling frequency was once per minute, covering at least one complete heating season to ensure sufficient model training. Based on this data, a differential equation describing the dynamic changes in indoor temperature was constructed. Where C represents the building's equivalent heat capacity in joules per degree Celsius, R1 represents the thermal resistance of the heating side in degrees Celsius per watt, and R2 represents the thermal resistance of the building envelope in degrees Celsius per watt. The influence of water supply temperature and outdoor air temperature on indoor temperature is characterized through physical mechanisms. A preset sub-time period ts is used, which can be 2 hours or 4 hours depending on the system response speed. Short-term data from the past ts hours are acquired, including water supply temperature, return water temperature, indoor temperature, and outdoor temperature. These four temperature signals are sampled once per minute within ts hours, resulting in ts multiplied by 60 sampling points. These sampling points are input into a two-layer long short-term memory network in chronological order, with 64 neurons in each layer. The output of the last time step is taken as the short-term vector, which encodes the local dynamic features of the most recent ts hours. Simultaneously, long-term data from the past 24 hours, including indoor temperature, outdoor air temperature, and water supply temperature, is acquired. To reduce computational complexity, a sampling strategy of once per hour is adopted for the long-term data, resulting in 24 sampling points. To preserve temporal order information, a sinusoidal positional encoding is added to each sampling point. The processed data is input into a Transformer encoder, which is configured with four multi-head attention mechanisms, a 128-dimensional feedforward network, and three stacked layers. The feature sequence output by the encoder is globally averaged on the time axis to obtain a long-term vector. The short-term vector and the long-term vector are fused, input into a fully connected layer, and compressed to 64 dimensions. The ReLU activation function is used to obtain the encoded state s. Outdoor air temperature is collected every interval ts to generate an outdoor air temperature set H. The standard deviation σ of the outdoor air temperature is calculated, and a perturbation is added to the outdoor air temperature with a preset probability p to obtain the outdoor air temperature perturbation RT_out.
[0019] The encoded state is recalculated using the perturbed outdoor temperature to obtain the perturbed encoded state st. Policy adjustment is performed based on the encoded state s and the perturbed encoded state st. First, the final encoded state is obtained, and then St is input into the prediction network. The training data for this prediction network comes from the optimal lead time and optimal water supply temperature in historical data. The optimal lead time is the time taken from the start of heating at the current moment until the indoor temperature of the shopping mall reaches the set value in historical records, and the optimal water supply temperature is the water supply temperature corresponding to achieving this optimal lead time. After obtaining the water supply data at the current moment, the above steps are repeated, and the output value of the prediction network is recorded as the advance water supply time D. adv and recommended water supply temperature T rec This causes the heating system to be installed ahead of schedule. adv Turn on heating every hour and press T. rec The system sets the water supply temperature. Furthermore, when acquiring long-term data from the past 24 hours, the outdoor temperature value is set to the average outdoor temperature of that day to smooth out diurnal fluctuations. Through these methods, the system can integrate minute-level short-term dynamics with hour-level long-term dependencies, combining differential equation constraints with a random outdoor temperature perturbation mechanism to achieve accurate prediction and optimized adjustment of heating delay time and water supply temperature.
[0020] In another preferred embodiment of the present invention, step S1, the method for constructing differential equations based on water supply data, includes: Constructing differential equations Where C represents the equivalent heat capacity, R1 represents the thermal resistance of the heating side, and R2 represents the thermal resistance of the building envelope.
[0021] It is worth noting that constructing differential equations In this equation, C represents the building's equivalent heat capacity, which is the amount of heat stored to raise the indoor air and internal structure by one degree Celsius, typically measured in joules per degree Celsius. R1 represents the heating-side thermal resistance, the resistance encountered when heat is transferred from the water supply system to the indoor air, depending on factors such as radiator type, pipe length, and water flow rate, measured in degrees Celsius per watt. R2 represents the building envelope thermal resistance, the resistance encountered when heat is transferred from the interior through walls, windows, and other external building envelope structures to the exterior environment, closely related to building materials, insulation thickness, and door / window sealing, measured in degrees Celsius per watt. The left side of the differential equation represents the rate of change of indoor temperature over time multiplied by the equivalent heat capacity, i.e., the rate of change of indoor heat storage. The first term on the right side, divided by R1, represents the net heat power supplied to the interior by the heating system per unit time; this is positive when the water supply temperature is higher than the indoor temperature, indicating heating is achieved. The second term on the right side, divided by R2, represents the heat power lost from the interior to the exterior through the building envelope per unit time; this is positive when the indoor temperature is higher than the outdoor temperature, indicating heat loss. The difference between the two terms represents the net indoor heat gain, which is exactly equal to the rate of change of indoor heat storage, thus fully describing the dynamic response process of indoor temperature. This differential equation can serve as a physical prior constraint for subsequent prediction models, improving the model's generalization ability and reliability in scenarios with sparse data or extrapolation of operating conditions.
[0022] In another preferred embodiment of the present invention, in step S2, short-term data is input into the LSTM model to obtain a short-term vector h. L include: Within time step ts, the supply water temperature, return water temperature, indoor temperature, and outdoor temperature are collected once per minute, resulting in ts×60 sampling points. These sampling points are then input into a two-layer LSTM with 64 neurons per layer in chronological order. The output of the last time step is obtained and denoted as the short-term vector h. L .
[0023] Understandable, In another preferred embodiment of the present invention, long-term data is input into the transformer model to obtain the long-term vector h. TF include: Indoor temperature, outdoor air temperature, and water supply temperature were collected hourly over a 24-hour period, resulting in 24 sampling points. A sinusoidal position code was added to each sampling point. The processed data was then input into a Transformer encoder with four attention heads, a feedforward dimension of 128, and three stacked layers. The encoder output was averaged over the time axis to obtain the long-term vector h. TF .
[0024] It is important to note that In another preferred embodiment of the present invention, in step S2, based on the short-term vector h L and long-term vector hTF The generated encoded state s specifically includes: The short-term vector h L and long-term vector h TF The input is fused, compressed to 64 dimensions, and then activated by ReLU to obtain the encoded state s.
[0025] It should be noted that, firstly, `ts` is the pre-defined short-term time window length. Since the dynamic changes of the heating system are significant at the minute level, a sampling frequency of once per minute is used to capture the instantaneous fluctuations and trends of supply water temperature, return water temperature, indoor temperature, and outdoor temperature, resulting in a total of `ts×60` time-series data points. Each sampling point contains all four temperatures mentioned above. These data points are sequentially fed into a two-layer LSTM network. LSTM is specifically designed for processing time-series data and includes forget gates, input gates, and output gates, enabling it to remember long-term dependencies and avoid gradient vanishing or exploding. The two-layer structure means that the output of the first LSTM layer serves as the input to the second LSTM layer, enhancing the network's ability to abstract complex time-series patterns. Each layer has 64 neurons, representing a 64-dimensional hidden state vector, sufficient to encode short-term temperature dynamics. Since the LSTM outputs a hidden state at each time step, and the hidden state at the last time step aggregates all historical information from the first sampling point to the last sampling point, the output of the last time step is used as the short-term vector. The subscript here indicates that the vector represents the short-term features of a sampling interval up to the current moment, and will be fused with the long-term vector for heating delay prediction.
[0026] In another preferred embodiment of the present invention, in step S3, a perturbation is added to the outdoor temperature based on a preset probability p to obtain the outdoor temperature perturbation RT. out Specifically, it includes: A perturbation is added to the outdoor temperature with a preset probability p, and the outdoor temperature perturbation RT is obtained. out The outdoor temperature disturbance RT out =T out +γ, where γ∈(-σ, +σ).
[0027] Understandably, the probability p is used to control whether to apply a perturbation to the current outdoor temperature. For example, p can be set to 0.3, indicating a 30% probability of triggering a perturbation and a 70% probability of maintaining the original value. σ is the standard deviation of the outdoor temperature set H, reflecting the recent fluctuation of outdoor temperatures. γ is uniformly and randomly selected within the interval (-σ, +σ) to match the perturbation amount with the natural fluctuation range of temperature. In this way, the model can simulate random changes and measurement errors in outdoor temperature during training, avoiding overfitting to historical temperature sequences, thereby improving the generalization ability of heating delay prediction in real-world environments.
[0028] In another preferred embodiment of the present invention, step S3, which involves adjusting the strategy based on the encoding state s and the encoding state st, specifically includes: Obtain the final encoded state St = 0.5 × s + 0.5 × st, and input the final encoded state St into the prediction network. The training data of the prediction network comes from the optimal advance time and optimal water supply temperature in the historical data. The optimal advance time is the time from the start of heating in the current moment to the mall temperature exactly reaching the set value in the historical records. The optimal water supply temperature is the water supply temperature that achieves the optimal advance time. Obtain the current water supply data, repeat the above steps, and record the output value as the advance water supply time D. adv and recommended water supply temperature T rec This allows the system to advance D. adv Turn on the heating and press T. rec Set the water supply temperature.
[0029] It is worth noting that the final encoded state St is obtained and input into the prediction network. The training data of the prediction network comes from the optimal advance time and optimal water supply temperature in historical data. The optimal advance time is the time from the start of heating at the current moment to the mall temperature exactly reaching the set value in historical records, and the optimal water supply temperature is the water supply temperature that achieves the optimal advance time. The water supply data at the current moment is obtained, and the above steps are repeated. The output value is recorded as the advance water supply time and recommended water supply temperature, and the system advances D. adv Turn on the heating and press T. rec Set the water supply temperature.
[0030] The significance of this approach is that the encoded state 's' is a comprehensive representation obtained by fusing short-term LSTM and long-term Transformer, while the encoded state 'st' is a perturbation representation recalculated after introducing outdoor temperature disturbances. A weighted average of the two is applied to obtain the final encoded state 'St'. This aims to balance the feature information under both unperturbed and perturbed scenarios, ensuring the model retains the authenticity of the original data while also adapting to temperature uncertainties. 'St' is input into the prediction network, which is essentially a fully connected regression network. Its training data comes from the optimal advance time and optimal water supply temperature in historical operation records. The optimal advance time is the length of time from the start of heating at a certain historical moment until the indoor temperature of the mall reaches the user's desired temperature. This time can be calculated from the room temperature change curve in historical data, reflecting the most reasonable advance heating duration under current conditions. The optimal water supply temperature refers to the actual water supply temperature used during this historical process that ensures the room temperature reaches the set value on time. Through learning from historical samples, the prediction network establishes a mapping relationship between the final encoded state and the optimal advance time and optimal water supply temperature. In actual operation, after acquiring the current water supply data, the system executes steps S1 to S3 sequentially to obtain the output value D of the prediction network. adv and T rec Finally, the heating control system activated D ahead of schedule as instructed. adv Turn on the heat source at the designated time and press T. rec Set the water supply temperature to achieve on-demand heating and reduce energy consumption.
[0031] In another preferred embodiment of the present invention, in step S2, when obtaining long-term data of the past 24 hours, the outdoor temperature value is set to be equal to the average outdoor temperature of that day.
[0032] It is worth noting that outdoor temperatures exhibit significant diurnal fluctuations throughout the day. Directly using hourly raw temperature values may introduce high-frequency noise, causing the Transformer model to overemphasize short-term fluctuations and ignore overall thermal trends. By using the daily average, instantaneous changes caused by solar radiation and nighttime cooling can be smoothed out, highlighting the core characteristics reflecting the overall heat load level throughout the day. Furthermore, the daily average temperature is more closely correlated with the average heat dissipation demand of the building envelope, helping the model learn stable patterns and reducing sensitivity to abnormal periods, such as brief afternoon temperature rises. In addition, it reduces redundant fluctuations in the model's input dimensions.
[0033] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.
Claims
1. A heating load prediction method using an LSTM+transformer model, characterized in that, Includes the following steps: S1: Obtain water supply data from the mall's historical water supply records, which varies with time t. The water supply data includes the indoor temperature T. in (t), outdoor temperature T out (t) and water supply temperature T sup (t), construct differential equations based on water supply data; S2: A pre-defined sub-time period ts is set, and short-term data from the past ts hours is obtained. The short-term data includes water supply temperature, return water temperature, indoor temperature, and outdoor temperature. The short-term data is input into the LSTM model to obtain the short-term vector h. L ; Obtain long-term data from the past 24 hours, including indoor temperature, outdoor air temperature, and water supply temperature. Input the long-term data into the transformer model to obtain the long-term vector h. TF Based on short-term vector h L and long-term vector h TF Generate encoded state s; S3: Collect outdoor temperature data every ts interval and generate an outdoor temperature set H={T out_1 T out_2 , ..., T out_m }, where T out_m Let m represent the outdoor temperature collected for the mth time, and m = 24 / ts; Calculate the standard deviation σ of the outdoor temperature, and add a perturbation to the outdoor temperature based on a preset probability p to obtain the outdoor temperature perturbation RT. out Recalculate the perturbed coding state st, and adjust the strategy based on the coding state s and coding state st.
2. The heating load prediction method using an LSTM+transformer model according to claim 1, characterized in that, In step S1, the method for constructing differential equations based on water supply data includes: Constructing differential equations Where C represents the equivalent heat capacity, R1 represents the thermal resistance of the heating side, and R2 represents the thermal resistance of the building envelope.
3. The heating load prediction method using an LSTM+transformer model according to claim 1, characterized in that, In step S2, the short-term data is input into the LSTM model to obtain the short-term vector h. L include: Within time step ts, the supply water temperature, return water temperature, indoor temperature, and outdoor temperature are collected once per minute, resulting in ts×60 sampling points. These sampling points are then input into a two-layer LSTM with 64 neurons per layer in chronological order. The output of the last time step is obtained and denoted as the short-term vector h. L .
4. The heating load prediction method using an LSTM+transformer model according to claim 1, characterized in that, After inputting long-term data into the transformer model, the long-term vector h is obtained. TF include: Indoor temperature, outdoor air temperature, and water supply temperature are collected hourly over a period of 24 hours, resulting in 24 sampling points. A sinusoidal position code is added to each sampling point. The processed data is then input into a Transformer encoder with four attention heads, a feedforward dimension of 128, and three stacked layers. The encoder output is averaged over the time axis to obtain the long-term vector h. TF .
5. The heating load prediction method using an LSTM+transformer model according to claim 1, characterized in that, In step S2, based on the short-term vector h L and long-term vector h TF The generated encoded state s specifically includes: The short-term vector h L and long-term vector h TF The input is fused, compressed to 64 dimensions, and then activated by ReLU to obtain the encoded state s.
6. The heating load prediction method using an LSTM+transformer model according to claim 1, characterized in that, In step S3, a perturbation is added to the outdoor temperature based on a preset probability p to obtain the outdoor temperature perturbation RT. out Specifically, it includes: A perturbation is added to the outdoor temperature with a preset probability p, and the outdoor temperature perturbation RT is obtained. out The outdoor temperature disturbance RT out =T out +γ, where γ∈(-σ, +σ).
7. The heating load prediction method using an LSTM+transformer model according to claim 1, characterized in that, In step S3, the policy adjustment based on encoding state s and encoding state st specifically includes: Obtain the final encoded state St = 0.5 × s + 0.5 × st, and input the final encoded state St into the prediction network. The training data of the prediction network comes from the optimal advance time and optimal water supply temperature in the historical data. The optimal advance time is the time from the start of heating in the current moment to the mall temperature exactly reaching the set value in the historical records. The optimal water supply temperature is the water supply temperature that achieves the optimal advance time. Obtain the current water supply data, repeat the above steps, and record the output value as the advance water supply time D. adv and recommended water supply temperature T rec This allows the system to advance D. adv Turn on the heating and press T. rec Set the water supply temperature.
8. The heating load prediction method using an LSTM+transformer model according to claim 1, characterized in that, In step S2, when obtaining long-term data for the past 24 hours, the outdoor temperature value is set to be equal to the average outdoor temperature of that day.