A heating demand load forecasting method based on user habits

By preprocessing and feature extraction of multi-source data from the heating area, and combining it with an improved long short-term memory neural network, a user habit-driven heating load prediction model is generated. This solves the problem that it is difficult to characterize the nonlinear correlation between user heating behavior and meteorological disturbances in existing technologies, and realizes refined and time-series load prediction for the heating system.

CN122367545APending Publication Date: 2026-07-10LIAONING HUIDE ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing heating load forecasting technologies fail to effectively combine the temporal evolution patterns and regional distribution characteristics of user heating behavior, resulting in a lack of time-series fine-grained expression in model outputs, making it difficult to meet the requirements of refined and time-series load forecasting for modern heating systems.

Method used

By acquiring multi-source data from the target heating area, a structured training sample database is generated after preprocessing. Dynamic feature vectors representing the heating response patterns of user groups are extracted. An improved long short-term memory neural network is used to learn the nonlinear mapping relationship between users' habitual heating behavior and external meteorological disturbances, thereby generating a user habit-driven heating load prediction model.

Benefits of technology

It enhances the network's ability to fit temporal and spatial characteristics, enabling it to generate continuous hourly heating demand load forecast sequences that meet the daily operation and scheduling needs of the heating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122367545A_ABST
    Figure CN122367545A_ABST
Patent Text Reader

Abstract

This invention discloses a heating demand load forecasting method based on user habits, belonging to the field of heating load forecasting technology. The method includes collecting multi-source historical heating season data from a target heating area, performing outlier removal, missing value imputation, and time series alignment preprocessing to construct a structured training sample database. Dynamic feature vectors representing the heating response patterns of user groups are extracted and input into a long short-term memory neural network optimized by combining the temporal periodicity and spatial correlation of user heating behavior. The nonlinear mapping relationship between user habitual heating behavior and external meteorological disturbances is explored to construct a heating load forecasting model. Hourly heating demand load forecast sequences are generated by combining future weather forecast data. This method can deeply explore the inherent patterns of user heating behavior, adapt to temporal and spatial correlation characteristics, accurately characterize the complex nonlinear correlations between multiple factors, and output continuous time-series load forecast results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of heating load forecasting technology, specifically a heating demand load forecasting method based on user habits. Background Technology

[0002] The stable operation of urban heating systems relies on reliable load forecasting results for scheduling and planning. Currently, heating load forecasting generally uses raw collected data directly for modeling and analysis without systematically standardizing and processing various multi-source data during the heating season. Abnormal values ​​and missing fields in the raw data have not been standardized and corrected, and different categories of data cannot be aligned in time, failing to form standardized structured training samples. Therefore, the data foundation is insufficient to meet the requirements for training high-precision models.

[0003] Conventional load forecasting modeling typically employs standard long short-term memory neural networks, maintaining a fixed network structure without adjusting the structure to reflect the temporal evolution of users' actual heating behavior and its regional distribution characteristics. The modeling process often directly uses raw data as input, lacking methods for extracting heating response patterns from massive amounts of historical data, and thus failing to develop a characteristic representation that can characterize changes in heating habits.

[0004] Traditional forecasting models can only simply fit the superficial relationship between meteorological parameters and heating load, and cannot characterize the deep nonlinear relationship between users' long-term heating habits and external meteorological disturbances. The model outputs lack the ability to express time series details, making it difficult to generate continuous and complete hourly load change sequences. Traditional technical processes cannot meet the application requirements of modern heating systems to carry out refined and time-series load forecasting based on users' inherent heating habits. Summary of the Invention

[0005] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes a heating demand load prediction method based on user habits, comprising: Obtain a multi-source data set of historical heating seasons within the target heating area, and preprocess the multi-source data set, including outlier removal, missing value imputation and time series alignment, to generate a structured training sample database. Based on the training sample database, dynamic feature vectors representing the heating response patterns of user groups are extracted. The dynamic feature vector is input into an improved long short-term memory neural network, which is optimized based on the temporal periodicity and spatial correlation of the user's heat usage behavior. Using the improved long short-term memory neural network, the nonlinear mapping relationship between users' habitual heating behavior and external meteorological disturbances is learned and modeled to generate a user habit-driven heating load prediction model. Based on weather forecast data for a specified future forecast period, the user-habit-driven heating load forecast model is invoked to generate an hourly heating demand load forecast sequence for that forecast period.

[0006] Furthermore, the step of extracting dynamic feature vectors representing the heating response patterns of user groups specifically includes: The multi-source dataset includes outdoor meteorological time-series data, user room temperature collection time-series data, time-segmented heat consumption data, and building envelope structural attribute data. The dynamic feature vector includes room temperature deviation, heating demand elasticity coefficient, and room temperature stability response time. The cumulative temperature deviation is calculated daily from the outdoor meteorological time-series data in the training sample database. This cumulative temperature deviation is the cumulative difference between the actual outdoor temperature and the historical average temperature for the same period. From the time-series data of user room temperature collected from the training sample database, the frequency of temperature fluctuations and the cumulative duration of temperature exceeding the set comfort range at each collection point are extracted to calculate the active adjustment intensity of user room temperature. From the time-segmented heat consumption data, the heat consumption ratio of the same time period on weekdays and rest days is calculated, and the decrease rate of nighttime heat load relative to daytime heat load is analyzed to generate user heat consumption time-segment preference characteristics. From the building envelope attribute data, the building age, external wall insulation type and window-to-wall area ratio are extracted. Combined with the user room temperature collection time series data, the room temperature decay rate under a unit outdoor temperature difference is calculated as a quantitative index of building thermal inertia. The dynamic feature vector is formed by integrating the cumulative temperature deviation, the intensity of active adjustment of user room temperature, the user's time period preference for heating, and the quantitative index of building thermal inertia.

[0007] Furthermore, when calculating the rate of room temperature decay under a unit outdoor temperature difference, the least squares method is used to perform univariate linear regression fitting on the room temperature and outdoor temperature sequences.

[0008] Furthermore, the step of calculating the active regulation intensity of the user's room temperature specifically includes: Set the upper and lower threshold values ​​for the user's comfortable room temperature range; The user room temperature collection time series data is traversed, and the number of times the room temperature value exceeds the upper limit threshold of the comfort range per unit time is counted as the high temperature over-adjustment frequency, and the number of times the room temperature value is lower than the lower limit threshold of the comfort range is counted as the low temperature under-adjustment frequency. The cumulative duration for which the room temperature value exceeds the upper limit threshold of the comfort range per unit time is calculated as the overheat tolerance time; The cumulative duration for which the room temperature value is below the lower limit of the comfort range per unit time is calculated as the cold tolerance duration. The frequency of high-temperature over-adjustment, frequency of low-temperature under-adjustment, duration of overheating tolerance, and duration of overcooling tolerance are weighted and summed to obtain a quantitative value characterizing the degree of active intervention by the user in room temperature, that is, the intensity of active adjustment of the user's room temperature.

[0009] Furthermore, the improved long short-term memory neural network optimizes its operation based on the temporal periodicity and spatial correlation of user heat usage behavior, specifically including: In the memory unit of the improved long short-term memory neural network, a periodic attention gating mechanism is added; The periodic attention gating mechanism dynamically retrieves hidden states with the same weekday attribute or the same time of day as the current time from the historical hidden state sequence when calculating the current hidden state at each time step. The improved long short-term memory neural network introduces a spatial correlation graph convolutional layer when encoding user heat usage behavior; The spatial correlation graph convolutional layer uses each heating zone or building as a node, and uses the similarity of building attributes, geographical proximity and correlation of historical heating patterns as edge weights to construct a spatial relationship graph. The spatial correlation graph convolutional layer performs convolution operations on the spatial correlation graph to aggregate the heat consumption characteristic information of neighboring nodes, thereby integrating the heat consumption habit information of the surrounding area when predicting the load of a single user or a zone. The final output of the improved long short-term memory neural network is a heating load prediction value that integrates time periodicity and spatial correlation characteristics.

[0010] Furthermore, in the spatial correlation graph convolutional layer, the similarity of building attributes is obtained by calculating the Euclidean distance of the combination of building age, external wall insulation type, and window-to-wall area ratio.

[0011] Furthermore, the step of dynamically retrieving historical latent states using the periodic attention gating mechanism specifically includes: At time step t, obtain the current input features and the hidden state of the previous time step; Calculate the similarity score between the hidden state of each historical time step within the historical time window and the hidden state of the current time step. The similarity score is calculated using a dot product attention mechanism. When calculating the similarity score, a time period mask matrix is ​​introduced, which applies a large negative bias to historical time steps that are different from the current time's weekday attribute or daytime to suppress their attention weights. Based on the similarity score after time period masking adjustment, the attention weight for each historical time step is calculated; Based on the calculated attention weights, the hidden states of all historical time steps are summed in a weighted manner to obtain the periodic attention context vector; The periodic attention context vector is spliced ​​and fused with the standard long short-term memory network computation process of the current time step.

[0012] Furthermore, the step of generating a user-habit-driven heating load prediction model specifically includes: The training sample database is divided into a training set, a validation set, and a test set in chronological order. The improved long short-term memory neural network is trained using data from the training set through forward and backward propagation to minimize the mean square error between the predicted and actual heat consumption. After each training iteration, the model's predictive performance is evaluated using the validation set, and early stopping is employed to prevent overfitting. When the model's performance on the validation set no longer improves, training is stopped and the pre-trained heating load prediction model is saved. The test set is used to perform a final performance evaluation on the initially trained heating load prediction model. If the evaluation index meets the preset accuracy requirements, it is determined as the user habit-driven heating load prediction model.

[0013] Furthermore, the step of training the improved long short-term memory neural network using the data in the training set specifically includes: Samples are drawn from the training set in batches, and each sample contains a time series segment and a corresponding actual calorie label. The time series segment is input into the improved long short-term memory neural network, and the final hidden state representation of the time series segment is obtained by sequentially passing through the input gate, forget gate, output gate, periodic attention gating mechanism, and spatial correlation graph convolutional layer. The final implicit state is represented by a fully connected regression layer and mapped to a predicted calorie value. Calculate the mean square error loss between the predicted calorie consumption value and the actual calorie consumption label; Using the gradient descent algorithm, the gradients of each parameter in the network are calculated based on the mean squared error loss, and the weights and bias parameters of the improved long short-term memory neural network are updated.

[0014] Furthermore, in the step of training the improved long short-term memory neural network using the data in the training set for forward and backward propagation, the gradient descent algorithm employs an adaptive moment estimation algorithm.

[0015] Compared with the prior art, the beneficial effects of the present invention are: By combining the temporal periodicity and spatial correlation of user heating behavior, the structure of a long short-term memory neural network is optimized, changing the fixed architecture of traditional networks and characterizing the evolution of heating behavior with the heating cycle from a temporal perspective. From a spatial perspective, the interrelationships of user heating status in different regions are incorporated, making the iterative logic of the network's internal parameters conform to the inherent changing logic of the overall heating behavior in the heating area. This enhances the network's ability to fit temporal and spatial characteristics, adapting to load variation patterns under the combined influence of multiple factors.

[0016] Dynamic feature vectors representing the heating response patterns of user groups are extracted from the standardized training sample database. The original multi-source data undergoes feature refinement and dimensionality simplification, eliminating redundant information and retaining the core changing patterns that reflect users' long-term heating habits. Using these dynamic feature vectors as model input replaces the direct use of original, complex data in modeling, reducing model computation and allowing model training to focus on the inherent heating response patterns of user groups.

[0017] By leveraging the optimized network to learn the nonlinear mapping relationship between users' habitual heating behavior and external meteorological disturbances, the complex intrinsic correlation between these two types of factors is fully captured, establishing a stable load modeling mechanism. Based on meteorological forecast data to drive model deduction, a continuous hourly heating demand load forecast sequence is generated along the time dimension, maintaining the continuity and regularity of the forecast results in the time series dimension, aligning with the standards for using time-series load data in the daily operation and scheduling of the heating system. Attached Figure Description

[0018] Figure 1 This is a state diagram of a heating demand load prediction method based on user habits as described in this invention. Figure 2 A flowchart for calculating the intensity of active room temperature regulation for users; Figure 3 This is a flowchart illustrating the operation of a long short-term memory neural network optimized based on temporal periodicity and spatial correlation. Detailed Implementation

[0019] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. 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.

[0020] See Figure 1 A specific implementation of a heating demand load forecasting method based on user habits is as follows: A multi-source dataset of historical heating season data for the target heating area is acquired. This dataset is preprocessed, including outlier removal, missing value imputation, and time series alignment, to generate a structured training sample database. Specifically, data is collected from the heating system's monitoring platform, meteorological data service providers, and building information archives. Values ​​that significantly exceed the physical range or exhibit abnormal rates of change are removed. Missing points in the time series are filled using linear interpolation or interpolation based on the mean of nearby time points. All data are resampled at uniform time intervals to achieve time series alignment. The processed data is then integrated and stored as the training sample database.

[0021] Based on this training sample database, dynamic feature vectors representing the heating response patterns of user groups are extracted. These dynamic feature vectors include various parameters characterizing user heating habits, such as room temperature deviation, heating demand elasticity coefficient, and room temperature stabilization response time. These dynamic feature vectors are then input into an improved Long Short-Term Memory (LSTM) neural network, which is optimized based on the temporal periodicity and spatial correlation of user heating behavior.

[0022] This improved Long Short-Term Memory (LSTM) neural network learns and models the nonlinear mapping relationship between users' habitual heating behavior and external meteorological disturbances, generating a user-habit-driven heating load prediction model. Specifically, dynamic feature vectors and meteorological data are used as input sequences, and actual heat consumption is used as the output target. Through iterative training, the neural network can capture the inherent patterns of user heating habits adjusting with changes in external temperature. Based on weather forecast data for a specified future forecast period, this user-habit-driven heating load prediction model is invoked to generate an hourly heating demand load prediction sequence for that forecast period. Specifically, hourly outdoor temperature, humidity, wind speed, and other weather forecast data are input into the trained prediction model, which automatically outputs the corresponding hourly heating load prediction values, forming a complete hourly load prediction sequence.

[0023] In one embodiment of the present invention, when extracting the dynamic feature vector characterizing the heating response pattern of a user group, the multi-source dataset includes outdoor meteorological time-series data, user room temperature collection time-series data, time-segmented heat consumption data, and building envelope structural attribute data. The dynamic feature vector includes room temperature deviation, heating demand elasticity coefficient, and room temperature stability response time. From the outdoor meteorological time-series data in the training sample database, the daily cumulative temperature deviation is calculated. This cumulative temperature deviation is the cumulative difference between the actual outdoor temperature and the historical average temperature for the same period. Specifically, the average outdoor temperature of the same date over multiple days in the historical period is calculated. The actual outdoor temperature of the current date is subtracted from this historical average to obtain the daily temperature deviation value. This daily temperature deviation value is then accumulated from the start of the heating season to obtain the daily cumulative temperature deviation. From the user room temperature collection time-series data in the training sample database, the frequency of temperature fluctuations and the cumulative duration of temperatures exceeding the set comfort range at each collection point are extracted to calculate the active adjustment intensity of the user room temperature.

[0024] From the time-segmented heat consumption data, the ratio of heat consumption during the same time period on weekdays and rest days is calculated, and the rate of decrease in nighttime heat load relative to daytime heat load is analyzed to generate user heat consumption time-segmentation preferences. Specifically, a day is divided into several time periods, and the average heat consumption for each time period on weekdays and rest days is statistically analyzed. The ratio of the corresponding time periods is calculated to reflect the differences in users' heat consumption habits under different daytime patterns. At the same time, the ratio of average heat consumption during nighttime periods to average heat consumption during daytime periods is calculated. From the building envelope attribute data, building age, external wall insulation type, and window-to-wall area ratio are extracted. Combined with the time-series data of user room temperature collection, the rate of room temperature decay per unit outdoor temperature difference is calculated as a quantitative indicator of building thermal inertia. When calculating the rate of room temperature decay per unit outdoor temperature difference, the least squares method is used to perform a univariate linear regression fitting on the room temperature and outdoor temperature series. That is, room temperature is used as the dependent variable and outdoor temperature is used as the independent variable. The regression coefficient is solved by the least squares method, and the absolute value of the regression coefficient is the rate of decay of room temperature with changes in outdoor temperature. By integrating the cumulative temperature deviation, the intensity of active adjustment of user room temperature, the user's heating time preference characteristics, and the quantitative index of building thermal inertia, a dynamic feature vector is constructed. Specifically, the features of the above four dimensions are normalized and then concatenated to form a multi-dimensional feature vector, which is used as the input of the subsequent neural network.

[0025] In practical implementation, a residential community within a specific heating area is selected as the target heating area. Historical outdoor meteorological time-series data, user room temperature data, time-segmented heat consumption data, and building envelope attribute data for this community are acquired. Outlier removal, missing value imputation, and time series alignment are performed on the aforementioned multi-source data set to generate a structured training sample database. From the outdoor meteorological time-series data in the training sample database, the daily cumulative temperature deviation is calculated. The cumulative temperature deviation is the cumulative difference between the actual outdoor temperature and the historical average temperature for the same period. Specifically, the daily average outdoor temperature for the same date in multiple past heating seasons is extracted and the historical average is calculated. The actual daily average outdoor temperature for that date in the current heating season is subtracted from the historical average to obtain the daily temperature deviation. Finally, all daily temperature deviations from the start of the current heating season to the current date are summed to obtain the daily cumulative temperature deviation.

[0026] In some embodiments, the frequency of temperature fluctuations and the cumulative duration of temperature exceeding the set comfort range are extracted from the user room temperature collection time-series data in the training sample database to calculate the active adjustment intensity of the user room temperature. The specific steps include: setting an upper and lower threshold for the user room temperature comfort range; traversing the user room temperature collection time-series data; counting the number of times the room temperature value exceeds the upper threshold of the comfort range per unit time as the high temperature over-adjustment frequency; counting the number of times the room temperature value is lower than the lower threshold of the comfort range as the low temperature under-adjustment frequency; calculating the cumulative duration of the room temperature value exceeding the upper threshold of the comfort range per unit time as the overheat tolerance duration; calculating the cumulative duration of the room temperature value being lower than the lower threshold of the comfort range per unit time as the undercool tolerance duration; and weighted summing the high temperature over-adjustment frequency, low temperature under-adjustment frequency, overheat tolerance duration, and undercool tolerance duration to obtain the active adjustment intensity of the user room temperature.

[0027] From the time-segmented heat consumption data, the ratio of heat consumption during the same time period on weekdays and rest days is calculated, and the rate of decrease in nighttime heat load relative to daytime heat load is analyzed to generate user heat consumption time-segment preference characteristics. Specifically, a day is divided into several time periods, and the average heat consumption of each time period on all weekdays and each time period on all rest days is statistically analyzed. For each time period, the ratio of the average heat consumption on rest days to the average heat consumption on weekdays is calculated. At the same time, the ratio of the total heat consumption during nighttime to the total heat consumption during daytime is calculated. The heat load decrease rate is obtained by subtracting the ratio of the total heat consumption during nighttime to daytime from 1.

[0028] Optionally, from the building envelope attribute data, the building age, external wall insulation type, and window-to-wall area ratio are extracted. Combined with the user's room temperature collection time series data, the room temperature decay rate per unit outdoor temperature difference is calculated as a quantitative index of building thermal inertia. The least squares method is used to perform a univariate linear regression fitting on the room temperature and outdoor temperature series when calculating the room temperature decay rate per unit outdoor temperature difference; let the outdoor temperature at the i-th time point be... The indoor temperature is The fitted linear regression equation is as follows: ,in For the predicted indoor temperature value, For regression coefficients, For intercept, regression coefficient Calculated using the least squares formula: ; in: The total number of data points. This represents the average value of the outdoor temperature series. This represents the average value of the indoor temperature series. The absolute value of is the rate of room temperature decay per unit outdoor temperature difference. It can be understood that the temperature cumulative deviation, the intensity of active room temperature adjustment by users, the time-period preference characteristics of users' heating, and the quantitative index of building thermal inertia are concatenated into a multi-dimensional vector after standardization. This multi-dimensional vector is the dynamic feature vector characterizing the heating response mode of the user group.

[0029] In one embodiment of the present invention, when calculating the active regulation intensity of the user's room temperature, refer to... Figure 2 The system sets upper and lower thresholds for the user's comfortable room temperature range. These thresholds can be predetermined based on local heating standards and typical user survey results. It iterates through the time-series data of user room temperature collection, counting the number of times the room temperature value exceeds the upper threshold of the comfortable range per unit time as the high-temperature over-adjustment frequency, and the number of times the room temperature value falls below the lower threshold of the comfortable range as the low-temperature under-adjustment frequency. The system calculates the cumulative duration of the room temperature value exceeding the upper threshold of the comfortable range per unit time as the overheat tolerance duration. Specifically, for each consecutive time period where the room temperature exceeds the upper threshold, the length of that time period is calculated, and all such time period lengths are summed to obtain the overheat tolerance duration.

[0030] The cumulative duration of room temperature values ​​below the lower limit of the comfort range per unit time is calculated as the overcooling tolerance duration. Specifically, for each consecutive period when the room temperature is below the lower limit, the length of that period is calculated, and the lengths of all such periods are summed to obtain the overcooling tolerance duration. The frequency of high-temperature over-adjustment, the frequency of low-temperature under-adjustment, the overheating tolerance duration, and the overcooling tolerance duration are weighted and summed to obtain a quantitative value characterizing the degree of active intervention by the user in room temperature, i.e., the intensity of the user's active room temperature regulation. The weight coefficients of each item can be set according to the actual operating experience of the heating system.

[0031] In practice, a residential community within a specific heating area is used as the target heating area. Each household in the community has a room temperature data acquisition device installed in its living room, recording indoor temperature data every 15 minutes. The time-series data of room temperature acquisition for a single household throughout the heating season is extracted from the training sample database. The upper limit threshold for the user's comfortable room temperature range is set at 24 degrees Celsius, and the lower limit threshold is set at 20 degrees Celsius. The time-series data of the user's room temperature is iterated through, and the number of times the room temperature exceeds 24 degrees Celsius within each 24-hour period is counted as the high-temperature over-adjustment frequency, and the number of times the room temperature falls below 20 degrees Celsius within each 24-hour period is counted as the low-temperature under-adjustment frequency. In the specific statistical process, each time the room temperature changes from less than or equal to 24 degrees Celsius to greater than 24 degrees Celsius is counted as a high-temperature over-adjustment event, and each time the room temperature changes from greater than or equal to 20 degrees Celsius to less than 20 degrees Celsius is counted as a low-temperature under-adjustment event.

[0032] In some embodiments, the cumulative duration of room temperature exceeding 24 degrees Celsius within each 24-hour period is calculated as the overheat tolerance duration. Specifically, this is done by identifying all time intervals in the room temperature data collection time series where the room temperature is continuously greater than 24 degrees Celsius, and summing the lengths (in minutes) of each such time interval to obtain the overheat tolerance duration within 24 hours. Similarly, the cumulative duration of room temperature below 20 degrees Celsius within each 24-hour period is calculated as the undercooling tolerance duration. This is done by identifying all time intervals where the room temperature is continuously below 20 degrees Celsius, and summing the lengths (in minutes) of each such time interval to obtain the undercooling tolerance duration within 24 hours.

[0033] Optionally, for a given day's room temperature data, if the frequency of high-temperature over-adjustment is 3 times, the frequency of low-temperature under-adjustment is 1 time, the overheat tolerance time is 45 minutes, and the undercool tolerance time is 12 minutes, the frequency of high-temperature over-adjustment, the frequency of low-temperature under-adjustment, the overheat tolerance time, and the undercool tolerance time are weighted and summed to obtain the user's active room temperature regulation intensity. The formula for calculating the weighted sum is: ; in: A quantitative value representing the intensity of active room temperature regulation by the user. Indicates the frequency of high temperature over-adjustment. Indicates the frequency of low-temperature under-adjustment. Indicates the duration of overheat tolerance. Indicates the duration of cold tolerance. This represents a unit of time, with a value of 1 minute. and The value is dimensionless. , , , These are the weights for high-temperature over-adjustment frequency, low-temperature under-adjustment frequency, overheat tolerance duration, and overcool tolerance duration, respectively.

[0034] In practical implementation, weight , , , The values ​​are set based on the heating system's focus on users' proactive adjustment behavior, and the frequency of high-temperature over-adjustment is weighted accordingly. The value is 0.2, representing the weight of low-temperature undertuning frequency. The value is 0.2, which is the weight for overheat tolerance time. The value is 0.3, which is the weight for supercooling tolerance time. The value is 0.3. Substituting the values ​​in the example above into the formula yields the result. 17.9 is the quantified value of the active regulation intensity of the user's room temperature on that day.

[0035] In some embodiments, for each day throughout the heating season, the above-mentioned statistical and weighted summation calculations of high-temperature over-adjustment frequency, low-temperature under-adjustment frequency, overheat tolerance duration, and undercool tolerance duration are repeatedly performed to obtain a quantitative value of the active adjustment intensity of the user's room temperature for each day, forming a time series with days as the time unit. For different households, due to differences in indoor temperature setting habits, room orientation, and insulation conditions, the obtained quantitative values ​​of active adjustment intensity will vary.

[0036] It is understandable that the frequency of over-adjustment at high temperatures and under-adjustment at low temperatures reflects the frequency with which users adjust room temperature, while the duration of tolerance for overheating and under-cooling reflects the duration for which users can tolerate room temperature deviating from the comfort range. These four indicators characterize users' active intervention behavior regarding indoor temperature from different dimensions. For residents with a higher quantified value of active adjustment intensity, it indicates that the resident frequently adjusts the heating valve or window opening to change the indoor temperature, or tolerates the indoor temperature deviating from the comfort range for a long time. For residents with a lower quantified value of active adjustment intensity, it indicates that the resident rarely intervenes in room temperature, and the indoor temperature remains relatively constant within the comfort range.

[0037] Optionally, when there are missing data in the time-series data of room temperature acquisition, the missing periods will not be included in the statistics of high-temperature over-adjustment frequency and low-temperature under-adjustment frequency, nor will they be included in the accumulation of overheat tolerance duration and undercool tolerance duration. Only the valid data periods will be calculated, and the unit time will be uniformly adjusted to the actual time length within the valid data periods. For example, if the valid room temperature data for a certain day covers 22 hours, the statistical results of high-temperature over-adjustment frequency, low-temperature under-adjustment frequency, overheat tolerance duration, and undercool tolerance duration will be proportionally scaled to the values ​​corresponding to 24 hours.

[0038] It is understandable that the intensity of active adjustment of user room temperature, as a component of dynamic feature vector, is input into the subsequent improved long short-term memory neural network along with the temperature cumulative deviation, the user's time period preference for heating, and the quantitative index of building thermal inertia. This network is used to model the nonlinear mapping relationship between user habitual heating behavior and external meteorological disturbances.

[0039] In one embodiment of the present invention, the optimized working steps of the improved long short-term memory neural network based on the temporal periodicity and spatial correlation of user heat usage behavior are as follows. (See also...) Figure 3 In the improved Long Short-Term Memory (LSTM) neural network's memory unit, a periodic attention gating mechanism is added. This mechanism dynamically retrieves hidden states with the same weekday attribute or daytime as the current time step from the historical hidden state sequence when calculating the current hidden state at each time step. The steps of the periodic attention gating mechanism to dynamically retrieve historical hidden states are as follows: At time step t, the current input features and the hidden state of the previous time step are obtained; the similarity score between the hidden state of each historical time step within the historical time window and the hidden state of the current time step is calculated. This similarity score is calculated using a dot product attention mechanism, which involves performing a dot product operation between the hidden state of the current time step and the hidden states of historical time steps; when calculating the similarity score, a time periodic mask matrix is ​​introduced. This matrix applies a large negative bias to historical time steps with different weekday attributes or daytimes than the current time step to suppress... The attention weights are determined; based on the similarity scores adjusted by the time period mask, the attention weights for each historical time step are calculated. Specifically, the adjusted similarity scores are subjected to softmax normalization to obtain the attention weights; based on the calculated attention weights, the hidden states of all historical time steps are weighted and summed to obtain the periodic attention context vector; this periodic attention context vector is then concatenated and fused with the standard long short-term memory network computation process of the current time step, that is, it is used as additional input information to participate in the calculation of the gating unit together with the input features and hidden states of the current time step.

[0040] This improved Long Short-Term Memory (LSTM) neural network introduces a spatial correlation graph convolutional layer when encoding user heating behavior. This layer uses each heating zone or building as a node, and uses the similarity of building attributes, geographical proximity, and correlation of historical heating patterns as edge weights to construct a spatial relationship graph. Building attribute similarity is obtained by calculating the Euclidean distance of a combination of building age, external wall insulation type, and window-to-wall area ratio. Geographical proximity is calculated based on the actual geographical distance between nodes, and the correlation of historical heating patterns is obtained by calculating the Pearson correlation coefficient of historical heat consumption sequences of different nodes. This spatial correlation graph convolutional layer performs convolution operations on the spatial relationship graph to aggregate the heating feature information of neighboring nodes. This allows for the fusion of heating habit information from the surrounding area when predicting the load of a single user or zone. Specifically, the graph convolution operation performs weighted aggregation of the features of each node and its neighboring nodes using either spectral domain graph convolution or spatial domain graph convolution. The final output of this improved long short-term memory neural network is a heating load prediction value that integrates the characteristics of time periodicity and spatial correlation. That is, the hidden state after being processed by the periodic attention gating mechanism and the spatial correlation graph convolutional layer is mapped to the load prediction value through the fully connected layer.

[0041] In practical implementation, a heating zone within a certain heating area is used as the target prediction unit. This heating zone comprises 10 buildings, each equipped with a heat meter and a room temperature data collector. Dynamic feature vectors and hourly heat consumption data for each building have been extracted from the training sample database of historical heating seasons. An improved Long Short-Term Memory (LSTM) neural network is constructed. A periodic attention gating mechanism is added to the memory unit of the improved LSM. This periodic attention gating mechanism dynamically retrieves hidden states with the same weekday attribute or the same daytime as the current time from the historical hidden state sequence when calculating the current hidden state at each time step. At time step t, the current input features and the hidden state of the previous time step are obtained. The similarity score between the hidden state of each historical time step within the historical time window and the hidden state of the current time step is calculated. This similarity score is calculated using a dot product attention mechanism. When calculating the similarity score, a time period mask matrix is ​​introduced, which applies a large negative bias to historical time steps that are different from the current time in terms of weekday attribute or daytime, in order to suppress their attention weights.

[0042] In some embodiments, the attention weight for each historical time step is calculated based on the similarity score adjusted by the time period mask, using the softmax function: ; in: For historical time steps Attention weights The similarity score is adjusted using a time-period mask, and W represents the set of all time steps within the historical time window. Based on the calculated attention weights, the hidden states of all historical time steps are weighted and summed to obtain the periodic attention context vector. This periodic attention context vector is then concatenated and fused with the standard Long Short-Term Memory (LSTM) network computation process for the current time step.

[0043] In its implementation, the improved Long Short-Term Memory (LSTM) neural network introduces a spatial correlation graph convolutional layer when encoding user heating behavior. This layer uses each heating zone or building as nodes, and employs building attribute similarity, geographical proximity, and historical heating pattern correlation as edge weights to construct a spatial relationship graph. Building attribute similarity is obtained by calculating the Euclidean distance of a combination of building age, external wall insulation type, and window-to-wall area ratio. Geographical proximity is calculated based on the actual geographical distance between nodes. Historical heating pattern correlation is obtained by calculating the Pearson correlation coefficient of historical heating patterns for different nodes. For any two nodes, the weighted sum of building attribute similarity, geographical proximity, and historical heating pattern correlation is used to obtain the edge weights.

[0044] Optionally, the spatial relational graph convolutional layer performs a convolution operation on the spatial relational graph to aggregate the heat consumption feature information of neighboring nodes, thereby fusing the heat consumption habit information of the surrounding area when predicting the load of a single user or a region. In the graph convolution operation, the elements of the adjacency matrix are set as the edge weights, the degree matrix is ​​calculated from the adjacency matrix, and the node feature matrix is ​​transformed by the graph convolution formula to output the feature representation after aggregating the neighbor information. In some embodiments, in the step of dynamically retrieving historical latent states by the periodic attention gating mechanism, when calculating the similarity score, the time period mask matrix applies a large negative bias to historical time steps that have different weekday attributes and different daytimes than the current time, and applies a zero bias to historical time steps that have the same weekday attributes and the same daytimes as the current time.

[0045] It is understandable that for the heating load prediction of a single building, the spatial correlation graph convolutional layer can aggregate the heating habit information of neighboring buildings and buildings with similar attributes. The final output of the improved long short-term memory neural network is a heating load prediction value that integrates temporal periodicity and spatial correlation characteristics.

[0046] Optionally, in actual deployment, the improved long short-term memory neural network performs end-to-end joint training of the periodic attention gating mechanism and the spatial correlation graph convolutional layer, and feeds the node feature sequence output by the spatial correlation graph convolutional layer as the time dimension input into the long short-term memory neural network with the periodic attention gating mechanism.

[0047] It is understood that the periodic attention gating mechanism operates in parallel with the input gate, forget gate, and output gate in a standard long short-term memory neural network, introducing an additional periodic attention context vector during hidden state updates. The spatial correlation graph convolutional layers can be stacked multiple times within the improved long short-term memory neural network.

[0048] In one embodiment of the present invention, when generating a user-habit-driven heating load prediction model, the training sample database is divided into a training set, a validation set, and a test set in chronological order. For example, according to the chronological order of the heating season, data from the early period is used as the training set, data from the middle period as the validation set, and data from the later period as the test set. The data in the training set is used to train an improved long short-term memory neural network through forward and backward propagation to minimize the mean square error between the predicted and actual heating consumption. After each training iteration, the model's predictive performance is evaluated using the validation set, and an early stopping method is employed to prevent overfitting. Specifically, the model's loss value on the validation set is monitored, and training is stopped when the loss value on the validation set no longer decreases or increases in multiple consecutive training rounds. When the model's performance on the validation set no longer improves, training is stopped, and the preliminarily trained heating load prediction model is saved. The test set is used to conduct a final performance evaluation of the initially trained heating load prediction model. If the evaluation indicators meet the preset accuracy requirements, it is determined as a user habit-driven heating load prediction model. The evaluation indicators include mean absolute percentage error, root mean square error, etc. The preset accuracy requirements can be set according to the actual heating scheduling needs.

[0049] In practice, based on historical heating season data of a certain heating area, the training sample database is divided into training, validation, and test sets in chronological order. Specifically, the division is done on a daily basis: data from day 1 to day 60 after the start of the heating season is used as the training set, data from day 61 to day 75 as the validation set, and data from day 76 to day 90 as the test set. The improved Long Short-Term Memory (LSTM) neural network is trained using the data in the training set through forward and backward propagation to minimize the mean squared error between predicted and actual heat consumption. After each training iteration, the model's predictive performance is evaluated using the validation set, and an early stopping method is employed to prevent overfitting. The early stopping method is implemented by setting an early stopping patience value of 10 training epochs; training is immediately stopped when the model's loss value on the validation set does not decrease for 10 consecutive epochs.

[0050] In some embodiments, when the model's performance on the validation set no longer improves, training is stopped, and the preliminarily trained heating load prediction model is saved. The performance metric on the validation set is the root mean square error (RMSE). The RMSE is calculated after each training epoch. If the RMSE of the current epoch does not decrease compared to the previously recorded best value, the consecutive no-improvement count is incremented by 1; otherwise, the consecutive no-improvement count is reset to zero, and the best RMSE is updated. When the consecutive no-improvement count reaches 10, it is determined that the model's performance on the validation set no longer improves, training is stopped, and the model parameters with the smallest RMSE on the validation set are saved as the preliminarily trained heating load prediction model.

[0051] In practical implementation, the test set is used to perform a final performance evaluation of the initially trained heating load prediction model. If the evaluation indicators meet the preset accuracy requirements, it is determined as the user habit-driven heating load prediction model. The evaluation indicators include mean absolute percentage error and root mean square error. The preset accuracy requirements are set as mean absolute percentage error less than 8% and root mean square error less than 0.15 MW. The mean absolute percentage error and root mean square error between the predicted heat consumption and the actual heat consumption on the test set are calculated using the following formula: ; in: Indicates the mean absolute percentage error. This represents the total number of samples in the test set. Indicates the first The actual heat consumption of each sample Indicates the first The predicted heat for each sample.

[0052] Optionally, if the evaluation metrics on the test set do not meet the preset accuracy requirements, the hyperparameters of the improved Long Short-Term Memory (LSTM) neural network are readjusted, including the number of hidden layer units, learning rate, batch size, etc., and the training set, validation set, and test set partitioning and training process are re-executed until the evaluation metrics meet the preset accuracy requirements. It can be understood that the training set is used to update the weight parameters of the neural network, the validation set is used to monitor overfitting during training and trigger early stopping, and the test set is used to independently evaluate the final model. The partitioning of the three datasets is non-overlapping and the time order is strictly increasing to avoid future information being leaked into the training of historical data.

[0053] In some embodiments, the proportions of the training set, validation set, and test set can be adjusted for data from different heating regions or different heating seasons. For example, when the heating season is long, the proportion of the training set can be increased to 70%, with the validation set and test set each accounting for 15%. The temporal order is always maintained during the partitioning process, i.e., the training set data is the earliest, the validation set data is the next earliest, and the test set data is the latest. Optionally, when using the early stop method, the criterion for determining whether the validation set performance no longer improves can be either that the loss value has not decreased or that the loss value has increased beyond a preset threshold. This embodiment uses the criterion that the loss value has not decreased.

[0054] It is understandable that the preset accuracy requirement can be set according to the actual business needs of heating scheduling. For example, for areas with smaller heating areas, the allowable range of absolute error is smaller, and the preset accuracy requirement is correspondingly increased; for areas with larger heating areas, the preset accuracy requirement can be appropriately relaxed. Once the test set evaluation is passed, the user habit-driven heating load prediction model can be used for hourly load prediction in future prediction cycles.

[0055] In one embodiment of the present invention, when training an improved long short-term memory neural network using data from the training set for forward and backward propagation, samples are drawn from the training set in batches. Each sample contains a time series segment and a corresponding actual calorie consumption label. The batch size can be determined based on the scale of the training data and computational resources. The time series segment is input into the improved long short-term memory neural network and sequentially processed through an input gate, a forget gate, an output gate, a periodic attention gating mechanism, and a spatial correlation graph convolutional layer to obtain the final hidden state representation of the time series segment. This final hidden state representation is then mapped to a predicted calorie consumption value through a fully connected regression layer. The mean squared error loss between the predicted calorie consumption value and the actual calorie consumption label is calculated. Using a gradient descent algorithm, the gradients of each parameter in the network are calculated based on the mean squared error loss, and the weights and bias parameters of the improved long short-term memory neural network are updated. This gradient descent algorithm employs an adaptive moment estimation algorithm, namely the Adam algorithm, which adaptively adjusts the learning rate of each parameter by calculating the first-order moment estimate and the second-order moment estimate of the gradient. Repeat the above steps of batch sampling, forward propagation, loss calculation, backpropagation, and parameter update until the preset training rounds are reached or the early stopping condition is met.

[0056] In practical implementation, a training sample database of historical heating seasons in a certain heating area is used as the basis. Samples are extracted from the training set in batches, with each sample containing a time series segment and a corresponding actual heat consumption label. The batch size is set to 32, meaning 32 samples are randomly extracted from the training set each time. The time series segment of each sample is 48 hours long with a time resolution of 1 hour, and the corresponding actual heat consumption label is the heat consumption value of the 49th hour. The time series segment is input into an improved long short-term memory neural network, and the final hidden state representation of the time series segment is obtained by sequentially passing through the input gate, forget gate, output gate, periodic attention gating mechanism, and spatial correlation graph convolutional layer. Specifically, the input gate, forget gate, and output gate process the input sequence step by step according to the calculation formula of the standard long short-term memory neural network. At each time step, the periodic attention gating mechanism is called in parallel to retrieve the states with the same weekday attribute and daytime time from the historical hidden states. At the same time, the spatial correlation graph convolutional layer performs spatial information aggregation on the node features before or after the time dimension processing, and finally outputs the hidden state of the last time step as the final hidden state representation.

[0057] In some embodiments, the final latent state representation is mapped to a predicted calorie consumption value through a fully connected regression layer. The fully connected regression layer includes a linear transformation unit that multiplies the final latent state representation vector by a weight matrix and adds a bias term, outputting a scalar value, which is the predicted calorie consumption value. The mean squared error loss between the predicted calorie consumption value and the actual calorie consumption label is calculated using the following formula: ; in: Indicates the mean square error loss. Indicates batch size ( ), Indicates the first The actual calorie label used for each sample Indicates the first The predicted calorie value for each sample.

[0058] In practical implementation, the gradient descent algorithm is used to calculate the gradient of each parameter in the network based on the mean squared error loss, and to update the weights and bias parameters of the improved long short-term memory neural network. The gradient descent algorithm employs an adaptive moment estimation algorithm. The adaptive moment estimation algorithm maintains the first-order moment estimate and the second-order moment estimate for each parameter. In each iteration, it calculates the gradient of the loss with respect to the parameter, updates the exponential moving average of the first-order moment estimate and the second-order moment estimate, corrects the bias of the estimates, and updates the parameters with the corrected values.

[0059] Optionally, the hyperparameters of the adaptive moment estimation algorithm are set as follows: learning rate 0.001, and exponential decay rate of the first-order moment estimation. The exponential decay rate estimated by the second moment is 0.9. The value is 0.999, indicating a numerical stability term. for Each time the parameters are updated, the first moment of the gradient is estimated. and second-order moment estimation The samples are calculated as follows and then used for parameter updates. In some embodiments, during the batch sampling process, the entire training set is traversed once in each training epoch, and samples are drawn in batch order within each epoch until all samples have been drawn once. After each epoch, the order of the samples in the training set is randomly shuffled before the next batch sampling is performed.

[0060] It is understandable that the smaller the mean squared error loss, the smaller the difference between the predicted and actual heat consumption. When calculating the gradient through backpropagation, the gradient of the loss with respect to the parameters at the end of the network is calculated first, and then propagates along the network to the parameters at the front end. The gradient of each layer depends on the gradient of the layer following it. The adaptive moment estimation algorithm adaptively adjusts the learning rate based on the historical gradient of each parameter, so that parameters corresponding to sparse gradients receive a larger update step size, while parameters corresponding to frequent gradients receive a smaller update step size.

[0061] In practice, after each batch of parameter updates is completed, it is determined whether the preset training termination conditions are met. Training termination conditions include reaching the maximum number of training rounds (e.g., 100 rounds) or triggering an early stopping mechanism. If not terminated, the next batch is drawn from the training set, and the forward propagation, loss calculation, backpropagation, and parameter update steps are repeated. Optionally, the batch size can be adjusted for different heating regions or different dataset sizes. For example, when the number of training samples is large, the batch size can be set to 64 or 128, and when the number of samples is small, it can be set to 16. The learning rate can also adopt a learning rate decay strategy, multiplying the learning rate by 0.9 after a certain number of training rounds.

[0062] It is understandable that when updating parameters, the adaptive moment estimation algorithm updates each parameter not only based on the current gradient but also on the exponential moving average of past gradients, making the training process more stable. The input gate, forget gate, output gate, attention weight parameters in the periodic attention gating mechanism, the weight matrix in the spatial correlation graph convolutional layer, and the weights and biases of the fully connected regression layer in the improved long short-term memory neural network are all updated using the adaptive moment estimation algorithm.

[0063] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for predicting heating demand load based on user habits, characterized in that, The method includes: Obtain a multi-source data set of historical heating seasons within the target heating area, and preprocess the multi-source data set, including outlier removal, missing value imputation and time series alignment, to generate a structured training sample database. Based on the training sample database, dynamic feature vectors representing the heating response patterns of user groups are extracted. The dynamic feature vector is input into an improved long short-term memory neural network, which is optimized based on the temporal periodicity and spatial correlation of the user's heat usage behavior. Using the improved long short-term memory neural network, the nonlinear mapping relationship between users' habitual heating behavior and external meteorological disturbances is learned and modeled to generate a user habit-driven heating load prediction model. Based on weather forecast data for a specified future forecast period, the user-habit-driven heating load forecast model is invoked to generate an hourly heating demand load forecast sequence for that forecast period.

2. The heating demand load forecasting method based on user habits according to claim 1, characterized in that, The step of extracting dynamic feature vectors representing the heating response patterns of user groups specifically includes: The multi-source dataset includes outdoor meteorological time-series data, user room temperature collection time-series data, time-segmented heat consumption data, and building envelope structural attribute data. The dynamic feature vector includes room temperature deviation, heating demand elasticity coefficient, and room temperature stability response time. The cumulative temperature deviation is calculated daily from the outdoor meteorological time-series data in the training sample database. This cumulative temperature deviation is the cumulative difference between the actual outdoor temperature and the historical average temperature for the same period. From the time-series data of user room temperature collected from the training sample database, the frequency of temperature fluctuations and the cumulative duration of temperature exceeding the set comfort range at each collection point are extracted to calculate the active adjustment intensity of user room temperature. From the time-segmented heat consumption data, the heat consumption ratio of the same time period on weekdays and rest days is calculated, and the decrease rate of nighttime heat load relative to daytime heat load is analyzed to generate user heat consumption time-segment preference characteristics. From the building envelope attribute data, the building age, external wall insulation type and window-to-wall area ratio are extracted. Combined with the user room temperature collection time series data, the room temperature decay rate under a unit outdoor temperature difference is calculated as a quantitative index of building thermal inertia. The dynamic feature vector is formed by integrating the cumulative temperature deviation, the intensity of active adjustment of user room temperature, the user's time period preference for heating, and the quantitative index of building thermal inertia.

3. The heating demand load forecasting method based on user habits according to claim 2, characterized in that, When calculating the rate of room temperature decay under a unit outdoor temperature difference, the least squares method is used to perform univariate linear regression fitting on the room temperature and outdoor temperature sequences.

4. The heating demand load forecasting method based on user habits according to claim 2, characterized in that, The step of calculating the active regulation intensity of the user's room temperature specifically includes: Set the upper and lower threshold values ​​for the user's comfortable room temperature range; The user room temperature collection time series data is traversed, and the number of times the room temperature value exceeds the upper limit threshold of the comfort range per unit time is counted as the high temperature over-adjustment frequency, and the number of times the room temperature value is lower than the lower limit threshold of the comfort range is counted as the low temperature under-adjustment frequency. The cumulative duration for which the room temperature value exceeds the upper limit threshold of the comfort range per unit time is calculated as the overheat tolerance time; The cumulative duration for which the room temperature value is below the lower limit of the comfort range per unit time is calculated as the cold tolerance duration. The frequency of over-adjustment at high temperatures, the frequency of under-adjustment at low temperatures, the duration of overheating tolerance, and the duration of overcooling tolerance are weighted and summed to obtain a quantitative value characterizing the degree of active intervention by the user in room temperature, i.e., the intensity of active room temperature regulation by the user.

5. The heating demand load forecasting method based on user habits according to claim 1, characterized in that, The improved long short-term memory neural network optimizes its operation based on the temporal periodicity and spatial correlation of user heat usage behavior, specifically including: In the memory unit of the improved long short-term memory neural network, a periodic attention gating mechanism is added; The periodic attention gating mechanism dynamically retrieves hidden states with the same weekday attribute or the same daytime as the current time from the historical hidden state sequence when calculating the current hidden state at each time step. The improved long short-term memory neural network introduces a spatial correlation graph convolutional layer when encoding user heat usage behavior; The spatial correlation graph convolutional layer uses each heating zone or building as a node, and uses the similarity of building attributes, geographical proximity and correlation of historical heating patterns as edge weights to construct a spatial relationship graph. The spatial correlation graph convolutional layer performs convolution operations on the spatial correlation graph to aggregate the heat consumption characteristic information of neighboring nodes, thereby integrating the heat consumption habit information of the surrounding area when predicting the load of a single user or a zone. The final output of the improved long short-term memory neural network is a heating load prediction value that integrates time periodicity and spatial correlation characteristics.

6. The heating demand load forecasting method based on user habits according to claim 5, characterized in that, In the convolutional layer of the spatial correlation graph, the similarity of building attributes is obtained by calculating the Euclidean distance of the combination of building age, external wall insulation type and window-to-wall area ratio.

7. The heating demand load forecasting method based on user habits according to claim 5, characterized in that, The periodic attention gating mechanism dynamically retrieves historical latent states through the following steps: At time step t, obtain the current input features and the hidden state of the previous time step; Calculate the similarity score between the hidden state of each historical time step within the historical time window and the hidden state of the current time step. The similarity score is calculated using a dot product attention mechanism. When calculating the similarity score, a time period mask matrix is ​​introduced, which applies a large negative bias to historical time steps that are different from the current time's weekday attribute or daytime to suppress their attention weights. Based on the similarity score after time period masking adjustment, the attention weight for each historical time step is calculated; Based on the calculated attention weights, the hidden states of all historical time steps are summed in a weighted manner to obtain the periodic attention context vector; The periodic attention context vector is spliced ​​and fused with the standard long short-term memory network computation process of the current time step.

8. The heating demand load forecasting method based on user habits according to claim 1, characterized in that, The steps for generating a user-habit-driven heating load prediction model specifically include: The training sample database is divided into a training set, a validation set, and a test set in chronological order. The improved long short-term memory neural network is trained using data from the training set through forward and backward propagation to minimize the mean square error between the predicted and actual heat consumption. After each training iteration, the model's predictive performance is evaluated using the validation set, and early stopping is employed to prevent overfitting. When the model's performance on the validation set no longer improves, training is stopped and the pre-trained heating load prediction model is saved. The test set is used to perform a final performance evaluation on the initially trained heating load prediction model. If the evaluation index meets the preset accuracy requirements, it is determined as the user habit-driven heating load prediction model.

9. A method for predicting heating demand load based on user habits according to claim 8, characterized in that, The steps of training the improved long short-term memory neural network using data from the training set include: Samples are drawn from the training set in batches, and each sample contains a time series segment and a corresponding actual calorie label. The time series segment is input into the improved long short-term memory neural network, and the final hidden state representation of the time series segment is obtained by sequentially passing through the input gate, forget gate, output gate, periodic attention gating mechanism, and spatial correlation graph convolutional layer. The final implicit state is represented by a fully connected regression layer and mapped to a predicted calorie value. Calculate the mean square error loss between the predicted calorie consumption value and the actual calorie consumption label; Using the gradient descent algorithm, the gradients of each parameter in the network are calculated based on the mean squared error loss, and the weights and bias parameters of the improved long short-term memory neural network are updated.

10. A method for predicting heating demand load based on user habits according to claim 9, characterized in that, In the step of training the improved long short-term memory neural network using data from the training set for forward and backward propagation, the gradient descent algorithm employs an adaptive moment estimation algorithm.