Heating load ultra-short-term prediction method and system based on deep residual network

By combining deep residual networks with long short-term memory networks, the problem of ultra-short-term accurate prediction of heating load in distributed heating systems is solved, achieving rapid response and high-precision prediction of heating load, and adapting to the dynamic changes of the heating system.

CN121809734APending Publication Date: 2026-04-07HUANENG RIZHAO THERMAL POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies cannot achieve accurate short-term forecasting of heating load in distributed heating systems, especially when equipment performance declines or sudden increases in user demand occur, as the forecast results cannot reflect rapid changes in node status in real time.

Method used

By combining deep residual networks with long short-term memory networks, multidimensional data streams are acquired, and time alignment, missing value imputation, and feature compression are performed to dynamically model the hidden state sequence. Attention mechanisms are used for parameter updates and fine-tuning to achieve ultra-short-term prediction of heating load.

Benefits of technology

It achieves rapid response and high-precision prediction of heating load, and can automatically adjust model parameters when data fluctuates or operating conditions change abruptly, thus improving the stability and real-time performance of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809734A_ABST
    Figure CN121809734A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy management, and discloses a heat supply load ultra-short-term prediction method and system based on a deep residual network, and the method comprises the steps: obtaining and preprocessing a multi-dimensional data flow, obtaining a data feature vector, then carrying out the dynamic modeling, obtaining a long-short-term memory network model, and generating a corresponding hidden state sequence; the change amplitude of the hidden state sequence is calculated, and if the change amplitude exceeds a threshold value, model parameters are updated and the hidden state sequence is recorded; an attention weight is extracted from the hidden state sequence, a prediction deviation value of the model is calculated, if the deviation value exceeds a threshold value, model parameters are adjusted, forward propagation is conducted on the data feature vector, a calculation result serves as an ultra-short-term load prediction value, and preliminary prediction output is obtained; and calculating a correlation value of the preliminary prediction output and the data feature vector, and if the correlation value is lower than a threshold value, finely adjusting the parameter, and determining a final prediction output. According to the method, the problem that ultra-short-term accurate prediction of the heating load cannot be realized in a distributed system can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy management technology, and in particular to a method and system for ultra-short-term prediction of heating load based on deep residual networks. Background Technology

[0002] Currently, heating systems, as an important component of urban infrastructure, are rapidly evolving in response to the development needs of smart energy and green, low-carbon technologies, demonstrating broad application prospects. With the continuous expansion of heating networks and the diversification and dynamism of demand-side characteristics, how to utilize machine learning technology to achieve efficient coordinated scheduling of multiple heat sources and accurate load forecasting has gradually become a research hotspot.

[0003] In one existing technology, sensors are deployed at key nodes of the heating system to collect multi-dimensional data in real time, including ambient temperature, pipeline flow, pressure, and equipment operating status. The collected data is then aggregated and processed using a centralized server, and machine learning methods are used to model and predict load change trends. Finally, based on the prediction results and a preset optimization algorithm, the heating load of multiple heat sources is allocated and adjusted.

[0004] However, centralized forecasting relies on data uploaded from edge nodes. Data transmission and aggregation are subject to delays, causing the forecast results to fail to reflect rapid changes in node states within the distributed heating system in real time, such as load fluctuations caused by equipment performance degradation or sudden increases in user demand. Furthermore, most existing machine learning methods are based on globally lagging forecasts and use static data or historical samples as modeling foundations. This makes it difficult to achieve real-time coordinated scheduling of multiple heat sources and accurately capture state differences and abrupt changes between nodes. In summary, existing technologies suffer from the inability to achieve ultra-short-term accurate forecasting of heating loads in distributed systems. Summary of the Invention

[0005] This invention provides a method and system for ultra-short-term heating load forecasting based on deep residual networks, in order to solve the problem of inability to forecast heating load in a timely and accurate manner in distributed systems.

[0006] Firstly, to address the aforementioned technical problems, this invention provides a method for ultra-short-term heating load forecasting based on deep residual networks, comprising: Acquire and preprocess the multidimensional data stream to obtain data feature vectors; The data feature vectors are dynamically modeled to obtain a long short-term memory network model, and the corresponding hidden state sequence is generated. Calculate the change magnitude of the hidden state sequence. If the change magnitude exceeds a preset magnitude threshold, trigger a preset model parameter update mechanism and record the updated hidden state sequence. Attention weights are extracted from the updated hidden state sequence, and the prediction bias of the long short-term memory network model is calculated based on the attention weights. If the prediction bias exceeds a preset bias threshold, the model parameters of the long short-term memory network model are adjusted to obtain updated model parameters. The data feature vector is forward-propagated based on the updated model parameters, and the calculation result of the forward propagation is used as the ultra-short-term load prediction value to obtain the preliminary prediction output. Calculate the correlation value between the preliminary prediction output and the data feature vector. If the correlation value is lower than a preset correlation value threshold, fine-tune the parameters of the long short-term memory network model to determine the final prediction output.

[0007] In one optional implementation, the step of acquiring and preprocessing the multidimensional data stream to obtain a data feature vector includes: Acquire multidimensional data streams; The multidimensional data stream is aligned according to the timestamp and missing values ​​are filled to obtain the aligned multidimensional data stream; Extract the initial feature vector of the aligned multidimensional data stream. If the dimension of the initial feature vector exceeds a preset dimension threshold, compress the feature vector to obtain the data feature vector.

[0008] In one optional implementation, the step of dynamically modeling the data feature vector to obtain a long short-term memory network model and generating a corresponding hidden state sequence includes: The data feature vector is segmented according to a preset time window to obtain a segmented time-series data sequence. Based on the segmented time-series data, a long short-term memory network model is obtained. The dependencies of the segmented time-series data are analyzed using the Long Short-Term Memory network model to generate a hidden state sequence.

[0009] In one optional implementation, the step of calculating the change magnitude of the hidden state sequence, and if the change magnitude exceeds a preset magnitude threshold, triggering a preset model parameter update mechanism and recording the updated hidden state sequence, includes: Extract state records for each dimension from the hidden state sequence; The change magnitude of each dimension's state is calculated based on the state records of each dimension. If the change magnitude of a certain dimension exceeds a preset magnitude threshold, the parameters of the Long Short-Term Memory Network model are updated according to a preset model parameter update mechanism, and the data feature vector is re-analyzed to obtain the updated hidden state sequence.

[0010] In one optional implementation, the step of extracting attention weights from the updated hidden state sequence, calculating the prediction bias value of the long short-term memory network model based on the attention weights, and adjusting the model parameters of the long short-term memory network model to obtain updated model parameters if the prediction bias value exceeds a preset bias threshold includes: The updated hidden state sequence is segmented using a preset time window to obtain a segmented hidden state sequence. The attention weight of each segment is calculated based on the hidden state sequence after segmentation; The prediction bias value of the long short-term memory network model is calculated based on the attention weights. If the prediction deviation value exceeds the preset deviation threshold, then the long short-term memory network model is incrementally learned to obtain updated model parameters.

[0011] In one optional implementation, the step of forward propagating the data feature vector based on the updated model parameters and using the calculation result of the forward propagation as the ultra-short-term load forecast value to obtain a preliminary forecast output includes: The data feature vector is segmented using a preset time window to obtain a segmented time-series data sequence. Based on the updated model parameters, the segmented time-series data sequence is forward-propagated, and the calculation result of the forward propagation is used as the ultra-short-term load prediction value to obtain the preliminary prediction output.

[0012] In one optional implementation, the step of calculating the correlation value between the preliminary prediction output and the data feature vector, and if the correlation value is lower than a preset correlation value threshold, then fine-tuning the parameters of the long short-term memory network model to determine the final prediction output, includes: Calculate the correlation value between the preliminary prediction output and the data feature vector; If the correlation value is lower than the preset correlation value threshold, then the deviation between the preliminary prediction output and the preset normal heating load is calculated. Based on the deviation value, reverse gradient descent is performed on the long short-term memory network model to update the parameters of the long short-term memory network model, resulting in an updated network model. The updated network model is used to make predictions, and the final prediction output is obtained.

[0013] Secondly, the present invention provides a heating load ultra-short-term prediction system based on deep residual networks, comprising: The data acquisition module is used to acquire and preprocess multidimensional data streams to obtain data feature vectors; The dynamic modeling module is used to dynamically model the data feature vectors to obtain a long short-term memory network model and generate the corresponding hidden state sequence. The parameter update module is used to calculate the change magnitude of the hidden state sequence. If the change magnitude exceeds a preset magnitude threshold, a preset model parameter update mechanism is triggered, and the updated hidden state sequence is recorded. The model fine-tuning module is used to extract attention weights from the updated hidden state sequence, calculate the prediction deviation value of the long short-term memory network model based on the attention weights, and adjust the model parameters of the long short-term memory network model if the prediction deviation value exceeds a preset deviation threshold to obtain updated model parameters. The preliminary prediction module is used to perform forward propagation on the data feature vector based on the updated model parameters, and use the calculation result of the forward propagation as the ultra-short-term load prediction value to obtain the preliminary prediction output. The result output module is used to calculate the correlation value between the preliminary prediction output and the data feature vector. If the correlation value is lower than a preset correlation value threshold, the parameters of the long short-term memory network model are fine-tuned to determine the final prediction output.

[0014] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the ultra-short-term heating load prediction method based on deep residual networks as described in any one of the above.

[0015] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the ultra-short-term heating load prediction method based on deep residual networks as described above.

[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention combines a deep residual network with a long short-term memory network to dynamically model and monitor the hidden state of multidimensional feature sequences. When the change in the hidden state exceeds a preset threshold, a parameter update mechanism is triggered to cope with sudden load fluctuations. The smooth propagation of gradients is achieved through the residual mapping structure, and combined with the dynamic threshold judgment mechanism, the model is ensured to maintain stability and have rapid adaptive capability in long-term prediction, thus solving the problem that it is impossible to achieve ultra-short-term accurate prediction of heating load in distributed systems.

[0017] (2) This invention constructs a unified data feature vector input by performing time alignment, missing value imputation, and feature compression on multidimensional heating data streams. During feature extraction and compression, it can reduce invalid dimensions and noise interference while ensuring information integrity, thereby improving the stability and representation efficiency of the model input. The alignment operation ensures temporal consistency, and the imputation and compression of missing values ​​ensure the continuity and compactness of data distribution, providing high-quality feature input for subsequent network modeling. It realizes the structured expression and efficient preprocessing of heating data.

[0018] (3) This invention introduces an attention mechanism to perform weighted analysis on the hidden state sequence and performs adaptive parameter fine-tuning based on the prediction error and the correlation value of the output. When the prediction error exceeds the deviation threshold or the output correlation is lower than the correlation threshold, the model automatically enters the incremental learning stage to optimize the parameters in a fine-grained manner. The allocation of attention weights strengthens the model's focus on key time periods and important features, and together with the deviation-driven feedback mechanism, forms a self-correction closed loop, enabling the model to have continuous optimization and self-learning capabilities, and realizing high-precision capture and real-time adaptive adjustment of dynamic changes in the ultra-short-term prediction of heating load. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of a method for ultra-short-term heating load prediction based on deep residual networks provided in the first embodiment of the present invention. Figure 2 This is a schematic diagram of a heating load ultra-short-term prediction system based on a deep residual network provided in the second embodiment of the present invention. Detailed Implementation

[0020] 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.

[0021] Reference Figure 1 The first embodiment of the present invention provides a method for ultra-short-term prediction of heating load based on deep residual networks, comprising the following steps: S11: Acquire and preprocess the multidimensional data stream to obtain the data feature vector; S12, Dynamically model the data feature vector to obtain a long short-term memory network model and generate the corresponding hidden state sequence; S13, calculate the change magnitude of the hidden state sequence. If the change magnitude exceeds a preset magnitude threshold, trigger a preset model parameter update mechanism and record the updated hidden state sequence. S14, extract attention weights from the updated hidden state sequence, calculate the prediction deviation value of the long short-term memory network model based on the attention weights, and if the prediction deviation value exceeds a preset deviation threshold, adjust the model parameters of the long short-term memory network model to obtain updated model parameters. S15, perform forward propagation on the data feature vector according to the updated model parameters, and use the calculation result of the forward propagation as the ultra-short-term load prediction value to obtain the preliminary prediction output; S16, calculate the correlation value between the preliminary prediction output and the data feature vector. If the correlation value is lower than a preset correlation value threshold, fine-tune the parameters of the long short-term memory network model to determine the final prediction output.

[0022] In step S11, the acquisition and preprocessing of the multidimensional data stream to obtain the data feature vector includes: Acquire multidimensional data streams; The multidimensional data stream is aligned according to the timestamp and missing values ​​are filled to obtain the aligned multidimensional data stream; Extract the initial feature vector of the aligned multidimensional data stream. If the dimension of the initial feature vector exceeds a preset dimension threshold, compress the feature vector to obtain the data feature vector.

[0023] It should be noted that multi-dimensional data streams, including ambient temperature and equipment performance indicators, are acquired through an edge node sensor network. Ambient temperature is measured in °C, heating load in kW, and equipment pressure in Pa. It should be clarified that the heating load typically fluctuates between 10kW and 10MW.

[0024] For the collected multidimensional data stream, time alignment is first performed based on timestamp information to ensure temporal consistency across different dimensions. For missing data points, an interpolation imputation strategy is employed: when a single time point is missing, the arithmetic mean of the observations from its immediate vicinity is used for imputation; when consecutive missing data points occur, the nearest valid data points at both ends of the consecutive missing interval are located, the difference between the two data points is calculated, and this difference is distributed proportionally according to the number of missing points to obtain the interpolation step size. Subsequently, starting from the first missing point, the interpolation step size is sequentially accumulated based on the previous valid data point to complete the linear imputation of the missing segments, resulting in the aligned multidimensional data stream.

[0025] The aligned multidimensional data stream is directly converted into a vector representation to obtain initial feature vectors. If the initial feature vectors have more than 5 dimensions, it indicates high correlation and redundancy among the features, thus requiring feature compression. Specifically, principal component analysis (PCA) is used to reduce the dimensionality of high-dimensional features. First, the covariance matrix between each dimension of the feature vector is calculated to characterize the linear correlation between different features. Then, eigenvalue decomposition is performed on the covariance matrix. The linear correlation between data in each dimension is analyzed; for any two feature dimensions, a positive covariance indicates a positive correlation, a negative covariance indicates a negative correlation, and a covariance close to zero indicates that the two features are basically independent. Based on this, eigenvalue decomposition is performed on the covariance matrix to extract the eigenvalues ​​and eigenvectors corresponding to each principal component. The principal components are then sorted according to the eigenvalues, and the top principal components with a cumulative variance contribution rate of 95% are selected to construct a new feature subspace. Finally, the original feature vectors are projected onto this low-dimensional subspace to obtain the compressed data feature vectors. The feature vector dimension threshold of 5 is determined based on experimental data and model performance analysis. In ultra-short-term heating load forecasting, adding more than five additional features offers limited improvement in forecast accuracy and increases model computational complexity. Therefore, the feature dimension threshold is preset to 5 to effectively reduce redundant features and computational burden while retaining key information. Those skilled in the art will understand that this threshold can be adjusted within a reasonable range based on the specific heating system scale, number of devices, or data sampling accuracy to balance forecast accuracy and computational efficiency.

[0026] In step S12, the dynamic modeling of the data feature vector to obtain a long short-term memory network model and generate the corresponding hidden state sequence includes: The data feature vector is segmented according to a preset time window to obtain a segmented time-series data sequence. Based on the segmented time-series data, a long short-term memory network model is obtained. The dependencies of the segmented time-series data are analyzed using the Long Short-Term Memory network model to generate a hidden state sequence.

[0027] It should be noted that the data feature vectors are segmented according to 10-minute time windows to generate segmented time-series data sequences. Specifically, continuous feature vectors are divided into 10-minute time windows, with each window containing data features from several consecutive time points, forming an independent time-series segment. Each time-series segment can be used for local dependency modeling to capture short-term load change patterns. The selection of the 10-minute time window length is based on the typical short-term change characteristics of heating load. Analysis of historical load data reveals that the ultra-short-term load of the heating system mainly exhibits a significant fluctuation trend within the range of 5 to 15 minutes. Therefore, setting the time window to 10 minutes can fully capture the main information of short-term load changes in the system while balancing data volume and model computational burden. Those skilled in the art will understand that this time window can be adjusted within a reasonable range according to the load fluctuation characteristics of specific application scenarios (such as large-scale centralized heating systems or small decentralized heating units) to ensure that effective load changes are captured without causing model computational overload.

[0028] Based on the segmented time-series data, a Long Short-Term Memory (LSTM) network model for ultra-short-term load forecasting is constructed. The LSTM model consists of an input layer, two hidden layers, and an output layer. The input layer receives the segmented time-series data to fully represent the system's operating state. The first hidden layer is an LSTM layer containing 64 memory units. Each memory unit includes an input gate, a forget gate, and an output gate, used for selectively storing and transmitting information, thus preserving important features and suppressing irrelevant noise in the time dimension. The first hidden layer is responsible for capturing short-term dependencies in the input sequence and outputting a hidden state vector at each time step with a dimension of 64. The second hidden layer is also an LSTM layer, also containing 64 memory units, used to integrate long-term dependency information across time steps. Taking the output of the first hidden layer as input, it generates a high-level hidden state sequence, still with a dimension of 64, used to describe the trend of ultra-short-term load changes. The output layer is a fully connected layer that maps the hidden state vector of the second hidden layer at each time step to a scalar prediction value, i.e., the load prediction value for that time step. The parameters of the output layer are obtained through training and can convert short-term fluctuations and long-term trends in the hidden state sequence into prediction results. During model training, the hidden state at each time step is calculated sequentially through forward propagation. Then, combined with historical load data, the weights and biases of the input gate, forget gate, output gate, and output layer are subjected to gradient descent using the backpropagation algorithm to minimize the prediction error. After training, the LSTM model can output the predicted load value at each time step and provide the corresponding hidden state sequence. The hidden state sequence encodes the short-term fluctuations and long-term trend information at each time step, providing a basis for subsequent attention mechanism analysis and model parameter updates, and realizing dynamic dependency modeling of ultra-short-term loads.

[0029] The Long Short-Term Memory (LSTM) network model is used to analyze the segmented time-series data to capture the dependencies between time steps and generate a hidden state sequence. Specifically, the segmented time-series data within each time window is used as model input. The LSTM model outputs local short-term change features through the first hidden layer to identify direct dependencies between consecutive time steps. Subsequently, the second hidden layer merges the local short-term change features output by the first hidden layer across time steps. In this process, the hidden state vector of each time step not only contains the instantaneous load features of that time step but also incorporates historical information from previous time steps, thus forming a dynamic contextual representation and obtaining the hidden state sequence.

[0030] In step S13, the change magnitude of the hidden state sequence is calculated. If the change magnitude exceeds a preset magnitude threshold, a preset model parameter update mechanism is triggered, and the updated hidden state sequence is recorded, including: Extract state records for each dimension from the hidden state sequence; The change magnitude of each dimension's state is calculated based on the state records of each dimension. If the change magnitude of a certain dimension exceeds a preset magnitude threshold, the parameters of the Long Short-Term Memory Network model are updated according to a preset model parameter update mechanism, and the data feature vector is re-analyzed to obtain the updated hidden state sequence.

[0031] It should be noted that the hidden state sequence is expanded dimensionally to form a state matrix, with each column corresponding to the dynamic trajectory of a hidden unit within the entire time window. Subsequently, the state records for each dimension are normalized. Specifically, for each column in the state matrix, the minimum and maximum values ​​of that column are calculated, and all values ​​in that column are subtracted from the minimum value and then divided by the difference between the maximum and minimum values. This achieves column-wise normalization, uniformly mapping the output amplitude of each hidden unit to a consistent value. Interval.

[0032] After normalization, the change amplitude of the normalized state record of each hidden unit in the state matrix is ​​calculated. Specifically, the difference between the maximum and minimum values ​​of the column is calculated to obtain the change amplitude of the hidden unit, which characterizes the dynamic response strength of the unit. When the change amplitude of a hidden unit exceeds 0.6, it indicates that the unit is too sensitive to changes in input features under the current model parameters, which may lead to overfitting of the model to local fluctuations. The selection of the amplitude threshold of 0.6 is based on the fact that statistical analysis of historical load data samples revealed that the amplitude changes of most hidden units in the stable prediction phase are concentrated between 0.3 and 0.6. When the amplitude exceeds 0.6, the prediction error increases significantly and the model output variance increases by about 15% to 20%. Therefore, setting 0.6 as the amplitude threshold can effectively distinguish between normal fluctuations and abnormal overresponse, and can maintain the stability of the prediction results while ensuring the sensitivity of the model. Those skilled in the art will know that this threshold can be adaptively adjusted within a range of ±0.1 according to different application scenarios (such as industrial systems with more drastic load fluctuations or residential heating systems with higher stability) in order to balance model response speed and prediction accuracy.

[0033] At this point, a pre-defined model parameter update mechanism is triggered, adjusting the weights of the forget gate and input gate to suppress the model's oversensitivity to input changes. Specifically, when the change in a hidden unit exceeds 0.6, the weight of the forget gate is increased by 10% to enhance the model's ability to remember historical states; simultaneously, the weight of the input gate is decreased by 10% to reduce the impact of new input features on the current state. Through this inverse proportional adjustment, the model rebalances information retention and updating, avoiding short-term prediction instability caused by over-response, thereby improving the smoothness and reliability of ultra-short-term load prediction results. The 10% adjustment of the forget gate and input gate weights was determined based on model sensitivity experiments. Comparative tests on a large number of historical load samples at different weight adjustment ratios (5%, 10%, 15%) revealed that when the adjustment ratio was 10%, the model's mean squared error (MSE) decreased the most and the convergence speed remained stable; if the adjustment ratio was below 5%, the model's suppression of abnormal fluctuations was insufficient; if it exceeded 15%, it may lead to a sluggish response to new inputs and a significant prediction delay. Therefore, setting the weight adjustment range to 10% achieves the best balance between stability and response speed. After the parameters are updated, the data feature vector is re-inputted into the updated Long Short-Term Memory network model for forward propagation to obtain the updated hidden state sequence.

[0034] In step S14, the attention weights are extracted from the updated hidden state sequence, and the prediction bias of the long short-term memory network model is calculated based on the attention weights. If the prediction bias exceeds a preset bias threshold, the model parameters of the long short-term memory network model are adjusted to obtain updated model parameters, including: The updated hidden state sequence is segmented using a preset time window to obtain a segmented hidden state sequence. The attention weight of each segment is calculated based on the hidden state sequence after segmentation; The prediction bias value of the long short-term memory network model is calculated based on the attention weights. If the prediction deviation value exceeds the preset deviation threshold, then the long short-term memory network model is incrementally learned to obtain updated model parameters.

[0035] It should be noted that the updated hidden state sequence is segmented according to a 10-minute time window to generate a segmented hidden state sequence. Specifically, the continuous hidden state sequence is divided into 10-minute time windows, with each window containing hidden states at several consecutive time points, forming an independent time series segment. The selection of the 10-minute time window length is based on the typical short-term variation characteristics of heating load. Analysis of historical load data reveals that the ultra-short-term load of the heating system mainly exhibits a significant fluctuation trend within the range of 5 to 15 minutes. Therefore, setting the time window to 10 minutes can fully capture the main information of short-term load changes in the system, while balancing the amount of data and the computational burden on the model. Those skilled in the art will understand that this time window can be adjusted within a reasonable range according to the load fluctuation characteristics of specific application scenarios (such as large-scale centralized heating systems or small decentralized heating units) to ensure that effective load changes are captured without causing model computational overload.

[0036] After segmenting the updated hidden state sequence, attention weights are calculated for each segment to reflect the importance of each time segment to the prediction result. Specifically, the hidden state sequence within each segment is first normalized to eliminate numerical scale differences between different hidden units. This is done by processing the state matrix formed by the segment into columns, with each column corresponding to the output sequence of a hidden unit within that segment. For each column, the minimum and maximum values ​​are calculated first. Then, the minimum value is subtracted from each value in the column, and the result is divided by the difference between the maximum and minimum values, mapping all values ​​to... Intervals. Subsequently, the score of each hidden unit is calculated (e.g., using a dot product or weighted sum), and then the score is normalized by applying the softmax function to obtain the attention score of that unit in that segment, forming the attention weight for that segment; where the softmax function ensures that the sum of all weights is 1, to reflect the importance of each time segment.

[0037] For example, within the time window, the normalized value of the hidden state sequence is [0.2, 0.5, 0.8], and after calculating the attention weight, it is [0.2, 0.3, 0.5].

[0038] After obtaining the attention weights, historical load data is used for testing to calculate the prediction bias of the Long Short-Term Memory (LSTM) network model. Specifically, the hidden state sequence of each segment in the historical load data is multiplied by the corresponding attention weight to obtain a weighted hidden state representation. This weighted hidden state is then input into the output layer for forward propagation to generate a predicted value for the future load of that segment. The prediction result is compared with the actual load value for the corresponding time period in the historical load data, and the mean squared error is calculated to obtain the prediction bias for each segment. The historical load data originates from the long-term operating records of the heating system, collected and stored by edge nodes. Specifically, the system records the operating status information of each collection point every five minutes during daily operation, including ambient temperature, equipment power, pipeline pressure, flow rate, and actual heating load value. After preprocessing, missing value imputation, and time alignment, this raw data forms a historical load dataset corresponding to the current prediction task. The data at each time point constitutes a complete feature vector, containing environmental parameters, equipment status, and load value, thus reflecting the load variation pattern of the system under different operating conditions. By dividing these historical load data into time windows consistent with the prediction segments, each segment corresponds to a set of hidden state sequences, providing a basis for the model to perform weighted prediction and bias calculation, and for judging the model fitting accuracy and triggering parameter updates.

[0039] When the prediction deviation exceeds 0.2, an incremental learning mechanism is triggered. Specifically, the segment causing the deviation to exceed the threshold, along with its corresponding input feature vector and hidden state sequence, are selected as incremental training samples. These samples are then input into the LSTM model for forward propagation to calculate the predicted value, and the error is calculated by comparing it with the actual load value. Next, using the backpropagation algorithm, gradient descent is performed only on the input gate, forget gate, output gate, and the weights and biases of the output layer involved in that segment to update the model parameters. During the update process, the parameter adjustment range is limited to ±10% of the original parameters each time to avoid over-adjustment or oscillation of the model, resulting in updated model parameters. The value of 0.2 is determined based on statistical analysis of the distribution of historical ultra-short-term load prediction errors. Through simulation prediction of a large amount of historical load data, it was found that the prediction error is mostly concentrated between 0 and 0.2. A value exceeding 0.2 usually indicates that the model is insufficiently responsive to short-term load fluctuations during that period, which may affect the overall prediction accuracy. Therefore, setting the deviation threshold to 0.2 can ensure model sensitivity while avoiding frequent adjustments.

[0040] In step S15, the forward propagation of the data feature vector based on the updated model parameters, and the use of the forward propagation calculation result as the ultra-short-term load forecast value to obtain the preliminary forecast output, includes: The data feature vector is segmented using a preset time window to obtain a segmented time-series data sequence. Based on the updated model parameters, the segmented time-series data sequence is forward-propagated, and the calculation result of the forward propagation is used as the ultra-short-term load prediction value to obtain the preliminary prediction output.

[0041] It should be noted that the data feature vectors are segmented according to 10-minute time windows to generate segmented time-series data sequences. Specifically, continuous feature vectors are divided into 10-minute time windows, with each window containing data features from several consecutive time points, forming an independent time-series segment. Each time-series segment can be used for local dependency modeling to capture short-term load change patterns. The selection of the 10-minute time window length is based on the typical short-term change characteristics of heating load. Analysis of historical load data reveals that the ultra-short-term load of the heating system mainly exhibits a significant fluctuation trend within the range of 5 to 15 minutes. Therefore, setting the time window to 10 minutes can fully capture the main information of short-term load changes in the system while balancing data volume and model computational burden. Those skilled in the art will understand that this time window can be adjusted within a reasonable range according to the load fluctuation characteristics of specific application scenarios, such as large-scale centralized heating systems or small decentralized heating units, to ensure that effective load changes are captured without causing model computational overload.

[0042] After constructing the segmented time-series data sequence, each time-series segment is input into the incrementally updated LSTM model for forward propagation. Specifically, the continuous feature vectors within each 10-minute window are used as input and passed sequentially through the model's input layer, two LSTM hidden layers, and the output layer to calculate the predicted load value at each time point. Subsequently, the prediction results within each window are combined in chronological order to form the preliminary prediction output for that period.

[0043] In step S16, the calculation of the correlation value between the preliminary prediction output and the data feature vector, and if the correlation value is lower than a preset correlation value threshold, involves fine-tuning the parameters of the long short-term memory network model to determine the final prediction output, including: Calculate the correlation value between the preliminary prediction output and the data feature vector; If the correlation value is lower than the preset correlation value threshold, then the deviation between the preliminary prediction output and the preset normal heating load is calculated. Based on the deviation value, reverse gradient descent is performed on the long short-term memory network model to update the parameters of the long short-term memory network model, resulting in an updated network model. The updated network model is used to make predictions, and the final prediction output is obtained.

[0044] It should be noted that, to assess the correlation between the preliminary predicted output and the original data feature vectors, the correlation value between the two is defined as the Pearson correlation coefficient. Specifically, the preliminary predicted output is mapped one-to-one with the average value of the data feature vectors within the corresponding time period, forming two vector sequences of equal length. Then, the mean of the two vectors is calculated, and the mean is subtracted from the value for each time period to obtain a centered sequence. Next, the centered values ​​at corresponding positions in the two sequences are multiplied and summed to obtain the covariance. Simultaneously, the variances of the two sequences are calculated and their square roots are taken to obtain the product of standard deviations. Finally, the covariance is divided by the product of standard deviations to obtain the Pearson correlation coefficient, which ranges from -1 to 1, where a positive value indicates a positive correlation, a negative value indicates a negative correlation, and a value close to zero indicates virtually no correlation.

[0045] When the correlation value between the initial predicted output and the data feature vector is below 0.85, it indicates that the model's ability to fit the input features under the current parameters is insufficient. In this case, the model needs to be fine-tuned to optimize the prediction accuracy. Specifically, the initial predicted output is compared with the preset normal heating load sequence, and the prediction error at each time point is calculated, i.e., the difference between the two. Then, the mean square error of the error sequence over the entire prediction period is calculated to obtain the final deviation value. The selection of the correlation value threshold of 0.85 is based on the actual fluctuation characteristics of the ultra-short-term load prediction of the heating system and the model accuracy requirements. Statistical analysis of historical load data reveals that the heating load exhibits a certain degree of natural fluctuation within a 10-minute short-term window. Typically, the Pearson correlation coefficient between the load change sequence of different time periods and the ideal or average load sequence mostly remains above 0.85, indicating that the model can fit short-term load changes well when the value is above this. If the correlation coefficient is below 0.85, it indicates that the model's ability to capture input features is insufficient, and there may be bias or over-smoothing. Therefore, setting 0.85 as the threshold can effectively balance prediction accuracy and model robustness. Those skilled in the art will understand that this threshold can be appropriately adjusted within a reasonable range, such as between 0.80 and 0.90, based on the specific scale of the heating system, the magnitude of load fluctuations, and the required prediction accuracy, to adapt to different application scenarios and load characteristics. The preset normal heating load sequence is derived from historical data of the heating system under stable operating conditions.

[0046] Specifically, by collecting load records of equipment under normal operating conditions, calculating the average load value at each time point, and removing extreme values ​​caused by abnormal fluctuations or sudden events, a continuous and smooth normal load sequence is formed. This sequence can reflect the system's load level under typical operating conditions, providing a reliable benchmark reference for calculating prediction errors and guiding model fine-tuning.

[0047] Based on the calculated deviation values, the parameters of the Long Short-Term Memory (LSTM) network model are fine-tuned using the backward gradient descent method. Specifically, a standard regression loss function is used, with the deviation values ​​as input. The loss function is used to calculate the error gradient between the model output and the preset normal load sequence. This gradient is then backpropagated to each layer of the model, including the input gate, forget gate, output gate, and the weights and biases of the output layer. During backpropagation, the parameters are adjusted layer by layer to make the output of each hidden unit closer to the expected target, thereby gradually reducing the prediction error. After the update, the model parameters are optimized, generating an updated network model. The updated network model is then used for prediction. The segmented data feature vectors are used as input and forward propagated sequentially through the input layer, two hidden layers, and the output layer of the LSTM model. Finally, the prediction results of each time window are averaged to obtain the final prediction output for the entire prediction period, achieving accurate prediction of the ultra-short-term load of the heating system.

[0048] In summary, this invention introduces a long short-term memory network that combines a deep residual structure with a dynamic attention mechanism to model and adaptively update parameters of multidimensional heating data streams. This enables the model to respond quickly to load changes and make high-precision predictions. It can automatically adjust model parameters when data fluctuates significantly or operating conditions change abruptly, significantly improving the stability and real-time performance of predictions and solving the problem of timely and accurate prediction in distributed systems.

[0049] Reference Figure 2 The second embodiment of the present invention provides a heating load ultra-short-term prediction system based on deep residual networks, comprising: The data acquisition module is used to acquire and preprocess multidimensional data streams to obtain data feature vectors; The dynamic modeling module is used to dynamically model the data feature vectors to obtain a long short-term memory network model and generate the corresponding hidden state sequence. The parameter update module is used to calculate the change magnitude of the hidden state sequence. If the change magnitude exceeds a preset magnitude threshold, a preset model parameter update mechanism is triggered, and the updated hidden state sequence is recorded. The model fine-tuning module is used to extract attention weights from the updated hidden state sequence, calculate the prediction deviation value of the long short-term memory network model based on the attention weights, and adjust the model parameters of the long short-term memory network model if the prediction deviation value exceeds a preset deviation threshold to obtain updated model parameters. The preliminary prediction module is used to perform forward propagation on the data feature vector based on the updated model parameters, and use the calculation result of the forward propagation as the ultra-short-term load prediction value to obtain the preliminary prediction output. The result output module is used to calculate the correlation value between the preliminary prediction output and the data feature vector. If the correlation value is lower than a preset correlation value threshold, the parameters of the long short-term memory network model are fine-tuned to determine the final prediction output.

[0050] It should be noted that the heating load ultra-short-term prediction system based on deep residual networks provided in this embodiment of the invention is used to execute all the process steps of the heating load ultra-short-term prediction method based on deep residual networks in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0051] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a data acquisition program. When the processor executes the computer program, it implements the steps in the various embodiments of the above-described methods for ultra-short-term heating load forecasting based on deep residual networks, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments, such as the data acquisition module.

[0052] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0053] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0054] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.

[0055] The memory can be used to store the computer programs and modules. The processor implements various functions of the electronic device by running or executing the computer programs and modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0056] If the modules integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0057] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0058] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for ultra-short-term heating load forecasting based on deep residual networks, characterized in that, include: Acquire and preprocess the multidimensional data stream to obtain data feature vectors; The data feature vectors are dynamically modeled to obtain a long short-term memory network model, and the corresponding hidden state sequence is generated. Calculate the change magnitude of the hidden state sequence. If the change magnitude exceeds a preset magnitude threshold, trigger a preset model parameter update mechanism and record the updated hidden state sequence. Attention weights are extracted from the updated hidden state sequence, and the prediction bias of the long short-term memory network model is calculated based on the attention weights. If the prediction bias exceeds a preset bias threshold, the model parameters of the long short-term memory network model are adjusted to obtain updated model parameters. The data feature vector is forward-propagated based on the updated model parameters, and the calculation result of the forward propagation is used as the ultra-short-term load prediction value to obtain the preliminary prediction output. Calculate the correlation value between the preliminary prediction output and the data feature vector. If the correlation value is lower than a preset correlation value threshold, fine-tune the parameters of the long short-term memory network model to determine the final prediction output.

2. The ultra-short-term heating load prediction method based on deep residual networks according to claim 1, characterized in that, The process of acquiring and preprocessing the multidimensional data stream to obtain data feature vectors includes: Acquire multidimensional data streams; The multidimensional data stream is aligned according to the timestamp and missing values ​​are filled to obtain the aligned multidimensional data stream; Extract the initial feature vector of the aligned multidimensional data stream. If the dimension of the initial feature vector exceeds a preset dimension threshold, compress the feature vector to obtain the data feature vector.

3. The ultra-short-term heating load prediction method based on deep residual networks according to claim 1, characterized in that, The process of dynamically modeling the data feature vectors to obtain a long short-term memory network model and generating a corresponding hidden state sequence includes: The data feature vector is segmented according to a preset time window to obtain a segmented time-series data sequence. Based on the segmented time-series data, a long short-term memory network model is obtained. The dependencies of the segmented time-series data are analyzed using the Long Short-Term Memory network model to generate a hidden state sequence.

4. The ultra-short-term heating load prediction method based on deep residual networks according to claim 1, characterized in that, The calculation of the change magnitude of the hidden state sequence, if the change magnitude exceeds a preset magnitude threshold, triggers a preset model parameter update mechanism, and records the updated hidden state sequence, including: Extract state records for each dimension from the hidden state sequence; The change magnitude of each dimension's state is calculated based on the state records of each dimension. If the change magnitude of a certain dimension exceeds a preset magnitude threshold, the parameters of the Long Short-Term Memory Network model are updated according to a preset model parameter update mechanism, and the data feature vector is re-analyzed to obtain the updated hidden state sequence.

5. The ultra-short-term heating load forecasting method based on deep residual networks according to claim 1, characterized in that, The process involves extracting attention weights from the updated hidden state sequence, calculating the prediction bias of the Long Short-Term Memory (LSTM) network model based on the attention weights, and adjusting the model parameters of the LTM network model to obtain updated model parameters if the prediction bias exceeds a preset bias threshold. The updated hidden state sequence is segmented using a preset time window to obtain a segmented hidden state sequence. The attention weight of each segment is calculated based on the hidden state sequence after segmentation; The prediction bias value of the long short-term memory network model is calculated based on the attention weights. If the prediction deviation value exceeds the preset deviation threshold, then the long short-term memory network model is incrementally learned to obtain updated model parameters.

6. The ultra-short-term heating load forecasting method based on deep residual networks according to claim 1, characterized in that, The step of forward propagating the data feature vector based on the updated model parameters and using the calculation result of the forward propagation as the ultra-short-term load forecast value to obtain the preliminary forecast output includes: The data feature vector is segmented using a preset time window to obtain a segmented time-series data sequence. Based on the updated model parameters, the segmented time-series data sequence is forward-propagated, and the calculation result of the forward propagation is used as the ultra-short-term load prediction value to obtain the preliminary prediction output.

7. The ultra-short-term heating load forecasting method based on deep residual networks according to claim 1, characterized in that, The calculation of the correlation value between the preliminary prediction output and the data feature vector, and if the correlation value is lower than a preset correlation value threshold, involves fine-tuning the parameters of the Long Short-Term Memory network model to determine the final prediction output, including: Calculate the correlation value between the preliminary prediction output and the data feature vector; If the correlation value is lower than the preset correlation value threshold, then the deviation between the preliminary prediction output and the preset normal heating load is calculated. Based on the deviation value, reverse gradient descent is performed on the long short-term memory network model to update the parameters of the long short-term memory network model, resulting in an updated network model. The updated network model is used to make predictions, and the final prediction output is obtained.

8. A heating load ultra-short-term forecasting system based on deep residual networks, characterized in that, include: The data acquisition module is used to acquire and preprocess multidimensional data streams to obtain data feature vectors; The dynamic modeling module is used to dynamically model the data feature vectors to obtain a long short-term memory network model and generate the corresponding hidden state sequence. The parameter update module is used to calculate the change magnitude of the hidden state sequence. If the change magnitude exceeds a preset magnitude threshold, a preset model parameter update mechanism is triggered, and the updated hidden state sequence is recorded. The model fine-tuning module is used to extract attention weights from the updated hidden state sequence, calculate the prediction deviation value of the long short-term memory network model based on the attention weights, and adjust the model parameters of the long short-term memory network model if the prediction deviation value exceeds a preset deviation threshold to obtain updated model parameters. The preliminary prediction module is used to perform forward propagation on the data feature vector based on the updated model parameters, and use the calculation result of the forward propagation as the ultra-short-term load prediction value to obtain the preliminary prediction output. The result output module is used to calculate the correlation value between the preliminary prediction output and the data feature vector. If the correlation value is lower than a preset correlation value threshold, the parameters of the long short-term memory network model are fine-tuned to determine the final prediction output.