Multi-day heat supply load prediction method and device based on time sequence attention network

CN123014337APending Publication Date: 2026-10-30HUANENG YICHUN THERMAL POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611421787.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]针对现有技术存在的多日连续供热负荷预测中长短时序特征兼顾不足、关键节点失焦以及误差逐日累积导致长周期趋势失真的问题,本申请通过基于时序注意力网络的多日供热负荷预测方法及装置,实现了多日供热负荷的高精度滚动预测与自适应校正

Benefits of technology

[0014]本申请提供的一种基于时序注意力网络的多日供热负荷预测方法、装置、电子设备及存储介质,通过按时间粒度将历史多日时序数据拆分为多尺度时序序列,并利用对应的特征提取分支分别提取特征,能够从物理意义上解耦供热负荷的短时随机波动与多日长期热惰性趋势,解决了单一尺度模型难以同时兼顾细节与趋势的矛盾;在此基础上,引入基于特征变化程度的时序注意力机制进行动态权重分配与融合,能够自主识别并强化寒潮突变、连续降温等关键时序节点的贡献度,同时抑制平稳冗余信息的干扰,显著提升了模型对极端工况和多日长时序依赖关系的捕捉能力;进一步地,建立基于多日连续预测累积误差的在线滚动校正机制,通过反向传播算法实时更新注意力权重与网络参数,形成了“预测-反馈-修正”的闭环自适应体系,有效克服了传统静态模型在多日滚动预测中误差逐日累积、长周期趋势失真的缺陷,从而为城镇集中供热系统的多日产能规划、蓄热调峰及超前调度提供了高精度、高鲁棒性的数据支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014337A_ABST
    Figure CN123014337A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent heat supply and artificial intelligence, and provides a multi-day heat supply load prediction method and device based on a time sequence attention network, which comprises the following steps: acquiring historical multi-day time sequence data and splitting the data into multi-scale time sequence sequences according to time granularity, and extracting multi-scale time sequence features through a corresponding feature extraction branch; performing dynamic weight distribution and fusion according to the feature change degree based on a time sequence attention mechanism to obtain global time sequence features; outputting a multi-day heat supply load prediction result based on the global time sequence features, and performing online rolling correction on the weight parameters of the time sequence attention mechanism based on the cumulative error of multi-day continuous prediction. The application can consider short-time fluctuations and long-term trends, autonomously strengthen key time sequence nodes and suppress redundant interference, effectively solve the multi-day prediction error accumulation problem, and improve the prediction accuracy and robustness under extreme working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of smart heating and artificial intelligence technology, and more specifically, to multi-day heating load prediction based on temporal attention networks. Background Technology

[0002] In urban centralized heating systems, accurate multi-day continuous heat load forecasting is the core foundation for heat source unit start-up and shutdown planning, fuel storage, and pipeline network hydraulic and thermal pre-regulation. Existing heat load forecasting technologies mainly rely on Long Short-Term Memory (LSTM) networks or hybrid models of convolutional neural networks and LSTM. However, in practical engineering applications, existing technologies generally suffer from the following problems: On the one hand, traditional time series models often equalize historical data or only focus on short-term instantaneous features, lacking the ability to differentiate key abrupt change nodes (such as cold waves and temperature drop transitions) and long-term trend features in multi-day long-term data. This results in the inability to effectively balance short-term fluctuation details and long-term evolution patterns when making multi-day continuous forecasts for the next 3 to 7 days. On the other hand, existing models are mostly statically trained offline or only support single-day correction, lacking an online feedback mechanism for the cumulative effect of errors during multi-day rolling forecasting. As the number of forecast days increases, the deviation accumulates and amplifies day by day, easily causing long-term trend fitting failure, and failing to meet the accuracy requirements of advance scheduling and multi-heat source collaborative optimization under extreme weather conditions. Summary of the Invention

[0003] To address the problems of insufficient consideration of both long and short time-series characteristics, loss of focus on key nodes, and distortion of long-term trends due to the daily accumulation of errors in existing multi-day continuous heating load forecasting technologies, this application achieves high-precision rolling forecasting and adaptive correction of multi-day heating load through a multi-day heating load forecasting method and device based on temporal attention networks.

[0004] Firstly, a multi-day heating load prediction method based on a temporal attention network is provided, which may include: Historical multi-day time-series data is acquired and split into multi-scale time-series sequences according to time granularity. Multi-scale time-series features are extracted through corresponding feature extraction branches. Based on the time-series attention mechanism, dynamic weights are assigned according to the feature change degree of the multi-scale time-series features to obtain attention weights. These attention weights are then fused to obtain global time-series features. Based on the global time-series features, multi-day heating load prediction results are output, and the weight parameters of the time-series attention mechanism are adjusted online based on the cumulative error of multi-day continuous predictions.

[0005] As an optional implementation, the multi-scale time series includes a first-scale time series characterizing short-term fluctuations and a second-scale time series characterizing long-term trends over multiple days; the step of extracting multi-scale time series features through corresponding feature extraction branches includes: extracting features from the first-scale time series through a first extraction branch, and extracting features from the second-scale time series through a second extraction branch.

[0006] As an optional implementation, both the first extraction branch and the second extraction branch employ a long short-term memory network; the feature extraction of the first-scale time series through the first extraction branch includes: outputting a first-scale hidden feature vector through the first extraction branch; the feature extraction of the second-scale time series through the second extraction branch includes: outputting a second-scale hidden feature vector through the second extraction branch.

[0007] As an optional implementation, the degree of feature change includes the degree of meteorological abrupt change and the degree of load fluctuation; the step of dynamically allocating attention weights based on the degree of feature change of the multi-scale time series features includes: calculating attention weights based on the degree of feature change, increasing the attention weights for time series nodes that are greater than a preset threshold, and suppressing the attention weights for time series nodes that are less than the preset threshold.

[0008] As an optional implementation, the multi-scale time series features include a first-scale hidden feature vector and a second-scale hidden feature vector; the fusion based on the attention weights to obtain global time series features includes: using the attention weights to perform weighted fusion of the first-scale hidden feature vector and the second-scale hidden feature vector to generate a global time series feature matrix that takes into account both short-term fluctuations and long-term trends over multiple days.

[0009] As an optional implementation, the online rolling correction of the weight parameters of the temporal attention mechanism based on the cumulative error of multi-day continuous prediction includes: statistically analyzing the cumulative error of the multi-day continuous prediction within the rolling prediction period; and updating the weight parameters of the temporal attention mechanism and the network parameters of the feature extraction branch based on the cumulative error of the multi-day continuous prediction using a backpropagation algorithm.

[0010] As an optional implementation, the method further includes: when extreme weather features are detected over several consecutive days, adaptively increasing the attention weights corresponding to the weather features and the historical multi-day time series data; updating the weight parameters of the time series attention mechanism and the network parameters of the feature extraction branch through the backpropagation algorithm includes: updating the weight parameters of the time series attention mechanism in reverse through the gradient descent algorithm.

[0011] Secondly, a multi-day heating load prediction device based on a temporal attention network is provided. This device may include: a feature extraction module for acquiring historical multi-day time-series data, splitting it into multi-scale time-series sequences according to time granularity, and extracting multi-scale time-series features through corresponding feature extraction branches; an attention weighted fusion module for dynamically allocating weights based on the degree of feature change according to a temporal attention mechanism to obtain attention weights, and fusing these attention weights to obtain global temporal features; and a prediction and correction module for outputting multi-day heating load prediction results based on the global temporal features, and performing online rolling correction of the weight parameters of the temporal attention mechanism based on the cumulative error of continuous multi-day predictions.

[0012] Thirdly, an electronic device is provided, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.

[0013] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.

[0014] This application provides a method, device, electronic device, and storage medium for multi-day heating load prediction based on a temporal attention network. By splitting historical multi-day time-series data into multi-scale time-series sequences according to time granularity and extracting features using corresponding feature extraction branches, it can physically decouple short-term random fluctuations in heating load from long-term thermal inertia trends over multiple days, resolving the contradiction that single-scale models cannot simultaneously consider details and trends. Furthermore, a temporal attention mechanism based on the degree of feature change is introduced for dynamic weight allocation and fusion, enabling autonomous identification and enhancement of key time-series nodes such as sudden cold waves and continuous temperature drops. The contribution of points is reduced, while the interference of stationary redundant information is suppressed, which significantly improves the model's ability to capture extreme operating conditions and long-term time-series dependencies. Furthermore, an online rolling correction mechanism based on the cumulative error of continuous multi-day prediction is established. The attention weights and network parameters are updated in real time through the backpropagation algorithm, forming a closed-loop adaptive system of "prediction-feedback-correction". This effectively overcomes the defects of traditional static models in multi-day rolling prediction, such as the daily accumulation of errors and distortion of long-term trends. Thus, it provides high-precision and robust data support for multi-day capacity planning, heat storage peak shaving and advanced scheduling of urban centralized heating systems. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 An architecture diagram of a multi-day heating load prediction system using a temporal attention network is provided in this application embodiment; Figure 2 A flowchart illustrating a multi-day heating load prediction method based on a temporal attention network, provided in an embodiment of this application; Figure 3 A schematic diagram of a multi-day heating load prediction device based on a temporal attention network is provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art. The terms "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are only used to distinguish different components. The terms "comprising" or "including," etc., mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but does not exclude other elements or objects. The terms "connection," "coupled," or "linked," etc., are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0018] The multi-day heating load prediction method based on temporal attention networks provided by this invention is applied to urban centralized heating systems. It primarily addresses the challenge of predicting continuous multi-day heating loads under the characteristics of strong temporal sequence, strong nonlinearity, multi-factor coupling, and large time-varying lags in heating systems. This system provides high-precision, long-cycle data support for heat source unit start-up and shutdown planning, fuel storage, time-sharing scheduling of thermal storage devices, hydraulic and thermal pre-regulation of the pipeline network, and coordinated peak shaving of multiple heat sources. It is a key prerequisite for achieving intelligent heating, energy conservation, stable operation, and unattended scheduling.

[0019] Figure 1 The architecture diagram of the time-series attention network multi-day heating load forecasting system for implementing this multi-day heating load forecasting method is as follows: Figure 1 As shown, the system is structured in four layers from top to bottom: a multi-source time-series data acquisition layer, a time-series data preprocessing and feature construction layer, a time-series attention fusion prediction core layer, and a multi-day prediction output and closed-loop correction layer. Each layer is connected and works collaboratively by specific components through data flow. The connection relationship and complete working principle are as follows: The first layer is the multi-source time-series data acquisition layer, which includes multi-source time-series data acquisition unit 1. Multi-source time-series data acquisition unit 1 completes the full-domain data acquisition. It connects to external sensors, meteorological interfaces, the pipeline SCADA system, and the building energy consumption database. It continuously collects multi-day historical heat load time-series data, hourly meteorological time-series data (including temperature, wind speed, sunshine duration, rain and snow), date type (weekday, holiday), building thermal inertia, pipeline operating status, and other multi-source time-series information to form a continuous multi-day raw time-series sample library, and outputs the data to component 2.

[0020] The second layer is the time-series data preprocessing and feature construction layer, which includes a multi-day time-series dataset construction module 2 and a multi-scale time-series feature decomposition module. The multi-day time-series dataset construction module 2 receives data from the multi-source time-series data acquisition unit 1, constructs a multi-day time-series sample set by daily and time-series sliding windows, forming a multi-scale input sample containing short-term hourly sequences and long-term daily sequences, and outputs it to the time-series data preprocessing and normalization module 3. The time-series data preprocessing and normalization module 3 connects to the multi-day time-series dataset construction module 2, performs abnormal time-series value removal, missing time-series interpolation repair, and global normalization processing, eliminating dimensional differences and time-series noise, and outputs it to the multi-scale time-series feature decomposition module 4. The multi-scale time-series feature decomposition module 4 connects to the time-series data preprocessing and normalization module 3, decomposes the time-series features into short-term fluctuation features and multi-day long-term trend features, achieving multi-scale time-series information separation input, and outputs it to the LSTM long-short time-series feature extraction unit 5.

[0021] The third layer is the core layer of temporal attention fusion prediction, including an LSTM short- and long-term temporal feature extraction unit 5, a temporal attention weight adaptive allocation module 6, a temporal feature weighted fusion module 7, and a multi-day load prediction solution module 8. The LSTM short- and long-term temporal feature extraction unit 5 extracts short-term temporal fluctuation patterns and multi-day long-term temporal dependency features through a multi-layer LSTM network, outputting a multi-scale temporal hidden feature vector to the temporal attention weight adaptive allocation module 6. The temporal attention weight adaptive allocation module 6 dynamically calculates the weights for features of all temporal steps and different historical days, automatically strengthening the weights of cold wave abrupt changes, continuous temperature drops, and highly correlated historical periods, while weakening ineffective and stable redundant temporal weights in the long term, outputting the result to the temporal feature weighted fusion module 7. The temporal feature weighted fusion module 7 deeply fuses the attention-weighted multi-scale temporal features to construct the optimal global temporal feature matrix, outputting it to the multi-day load prediction solution module 8. The multi-day load prediction solution module 8 solves for the 1-day, 3-day, and 7-day continuous heat load prediction sequences based on the fused features.

[0022] The fourth layer is the multi-day prediction output and closed-loop correction layer, which includes a multi-duration prediction result output unit 9, a measured error statistics and feedback correction module 10, and a model parameter storage and visualization operation and maintenance terminal 11. The multi-day load prediction solution module 8 outputs to the multi-duration prediction result output unit 9, providing tiered multi-day prediction results for short-term real-time scheduling, multi-day heat source capacity planning, and medium- to long-term heating strategy optimization. Simultaneously, the measured error statistics and feedback correction module 10 collects daily measured heat load data in real time, calculates the cumulative error of multi-day predictions, and iteratively updates the temporal attention weights and LSTM network parameters to achieve online model self-correction. All data is stored in the model parameter storage and visualization operation and maintenance terminal 11 for data retention and visualization.

[0023] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0024] like Figure 2 As shown, this embodiment provides a multi-day heating load prediction method based on a temporal attention network. This method constructs a complete closed-loop process from multi-scale feature extraction, dynamic weighted fusion to cumulative error correction. The method includes: Step S100: Obtain historical multi-day time series data, split it into multi-scale time series sequences according to time granularity, and extract multi-scale time series features through the corresponding feature extraction branches.

[0025] This step encompasses the entire process of data acquisition, preprocessing, and feature decomposition. First, the multi-source time-series data acquisition unit 1 continuously collects historical heat load, hourly meteorological parameters, date type, pipeline operating conditions, and building heat storage status for the heating season, constructing a long-term time-series raw sample set. Then, the multi-day time-series dataset construction module 2 uses a sliding window slicing method to construct samples from the raw data. Based on this, the time-series data preprocessing and normalization module 3 performs outlier removal, missing value interpolation, and global normalization to eliminate dimensional differences and time-series noise. Next, the multi-scale time-series feature decomposition module 4 decomposes the cleaned data into multi-scale time-series sequences according to time granularity. In this embodiment, the multi-scale time-series sequences include a first-scale time-series sequence representing short-term fluctuations and a second-scale time-series sequence representing long-term multi-day trends. This decomposition is not a simple time-length segmentation but a functional decoupling based on the physical characteristics of the heating system.

[0026] The underlying physical basis for this application's multi-scale decomposition lies in the significant differences in thermal inertia time constants within the heating system. Heating networks and building envelopes possess enormous heat capacity, and their heat storage and release processes often span several days, exhibiting a long-cycle thermal inertia response; while sudden weather changes or users' immediate heating behavior manifest as short-cycle transient disturbances. If only a single time scale is used for modeling, the model faces a dilemma: while excessively fine time granularity can capture transient fluctuations, it struggles to characterize the cumulative evolution of long-cycle heat storage effects, leading to distorted multi-day trend predictions; conversely, while excessively coarse time granularity can fit long-term trends, it smooths out crucial short-term abrupt changes, weakening the ability to respond to extreme conditions. Therefore, this application, through functional multi-scale decomposition, allows feature extraction branches at different scales to focus on the dynamic process of matching their respective physical time constants, thus fundamentally solving the technical challenge of a single scale simultaneously and accurately characterizing transient disturbances and heat storage and release processes.

[0027] After the splitting is completed, the LSTM long short-term time series feature extraction unit 5 uses the corresponding feature extraction branches to extract features from the first-scale time series and the second-scale time series respectively, and outputs hidden feature vectors containing rich semantic information.

[0028] Step S200: Based on the temporal attention mechanism, dynamic weight allocation is performed according to the degree of feature change of multi-scale temporal features to obtain attention weights, and fusion is performed based on the attention weights to obtain global temporal features.

[0029] This step aims to address the problem of key information being overwhelmed by redundant information in long-term time-series data. The time-series attention weight adaptive allocation module 6 receives multi-scale time-series features from the feature extraction unit. The degree of feature change referred to here is the intensity of non-stationarity exhibited by the time-series data in the time dimension, physically reflecting the difference in the contribution of a specific historical moment to future load forecasting. For example, when meteorological conditions at a certain time-series node undergo drastic changes or load fluctuates abnormally, its feature change degree is high, meaning that this node contains key driving factors determining the future evolution of the system state; conversely, data from stable operating periods have a lower feature change degree and often carry more redundant information. The time-series attention weight adaptive allocation module 6 calculates attention weights based on this feature change degree, automatically increasing the weights of key time-series nodes with high change degrees and suppressing the weights of redundant nodes with low change degrees, thereby achieving adaptive feature selection. Subsequently, the time-series feature weighted fusion module 7 uses the generated attention weights to perform weighted fusion of the first-scale hidden feature vector and the second-scale hidden feature vector. Through this fusion mechanism, the model can retain short-term fluctuation details while embedding the macroscopic evolution law of long-term trends over multiple days, generating a global time series feature matrix that takes into account both local sensitivity and global stability, thus laying a data foundation for subsequent high-precision predictions.

[0030] Step S300: Output multi-day heating load prediction results based on global time series characteristics, and perform online rolling correction on the weight parameters of the time series attention mechanism based on the cumulative error of multi-day continuous prediction.

[0031] This step achieves a closed loop between the predicted output and the adaptive optimization of the model. The multi-day load prediction solution module 8 performs regression solving based on the global time-series feature matrix, outputting a continuous heating load prediction sequence for the next several days. The multi-duration prediction result output unit 9 outputs the prediction results in stages to meet the needs of different business scenarios such as real-time adjustment, capacity planning, and thermal storage scheduling. More importantly, the measured error statistics and feedback correction module 10 constructs an online rolling correction mechanism. Here, online rolling correction specifically refers to the process of calculating the cumulative error of multi-day continuous prediction using real-time transmitted measured load data during the actual operation of the model and the output of prediction results, and dynamically adjusting the model parameters accordingly. This is fundamentally different from the traditional offline retraining mode: offline training relies on a fixed historical dataset, and once the model is deployed, it is static and cannot adapt to the time-varying characteristics of the heating system caused by seasonal changes, pipeline aging, or changes in user habits; while the online rolling correction in this embodiment is a real-time feedback link embedded in the prediction execution flow. It can continuously fine-tune the weight parameters of the time-series attention mechanism and the network parameters of the feature extraction branch through the backpropagation algorithm without interrupting the service. Through this dynamic closed loop of "prediction-feedback-correction", this application effectively overcomes the defect of the daily accumulation and amplification of errors in multi-day prediction, and significantly improves the robustness and engineering practical value of long-term prediction.

[0032] Furthermore, the multi-scale time series includes a first-scale time series characterizing short-term fluctuations and a second-scale time series characterizing long-term trends over multiple days; features are extracted from the first-scale time series through a first extraction branch, and features are extracted from the second-scale time series through a second extraction branch.

[0033] Specifically, this segmentation method is based on the time constant differences of different physical processes in the heating system. The first-scale time series mainly captures the transient response of the hydraulic and thermal conditions of the heating network and short-term abrupt changes in meteorological conditions, such as the adjustment of heat source outlet temperature, changes in valve opening, or rapid load increases caused by sudden cooling. Its physical meaning lies in reflecting the dynamic equilibrium adjustment process of the system within a short time window. The second-scale time series focuses on characterizing the heat storage and release patterns of the building envelope and the periodic evolution of meteorological conditions, such as the cumulative effect of consecutive days of cold waves or the lagged impact of diurnal temperature variation on indoor thermal comfort. Its physical meaning lies in revealing the long-term thermal inertia trend of the system. To construct samples at these two scales, this embodiment uses a sliding window technique to slice the preprocessed historical data. For example, for first-scale time series, the sliding window length can be set to 24 to 72 time steps (corresponding to hourly data for 1 to 3 days), with a sliding step size of 1 time step, to preserve high-frequency details. For second-scale time series, the sliding window length can be set to 7 to 14 time steps (corresponding to daily average data for 1 to 2 weeks), with a sliding step size of 1 time step, to smooth noise and extract macroscopic trends. Through this differentiated sample construction strategy, the model can fully explore the spatiotemporal evolution of heating load from both micro and macroscopic dimensions.

[0034] Furthermore, both the first and second extraction branches employ Long Short-Term Memory (LSTM) networks. Feature extraction of the first-scale time series is performed through the first extraction branch, including outputting a first-scale hidden feature vector. Feature extraction of the second-scale time series is performed through the second extraction branch, including outputting a second-scale hidden feature vector. Combined with... Figure 1 The LSTM long-short-term temporal feature extraction unit 5 shown contains two independent LSTM sub-networks, serving as the first extraction branch and the second extraction branch, respectively. Logically, these two branches can be processed in parallel, simultaneously receiving input sequences at their respective scales and performing forward propagation to improve computational efficiency; or they can be processed sequentially, first processing the second-scale sequence to obtain the long-term trend context, and then using this as auxiliary information to input into the first-scale branch to enhance the trend perception capability of short-term features. Regardless of the topology used, the core of each LSTM branch lies in its unique gating mechanism, which effectively solves the gradient vanishing problem in traditional recurrent neural networks when processing long sequences. Specifically, the LSTM cell state update process can be described by the following set of formulas:

[0035]

[0036]

[0037]

[0038]

[0039]

[0040] in, express The input vector at time step 1, for the first extraction branch, is the time series sequence at the first scale. The observed values ​​at time t, for the second extraction branch, are the second-scale time series. The observed value at time; express Output the hidden state at any given moment; express Cellular state at any given moment; , , These represent the activation values ​​of the forget gate, input gate, and output gate, respectively, used to control the discarding, writing, and reading of information; Indicates the state of candidate cells; This indicates the updated cell state; express The hidden feature vector output at each time step, i.e., the hidden feature vector at the corresponding scale; , , , These represent the weight matrices of each gating layer and candidate state layer, respectively. , , , These represent the corresponding bias terms, and these parameters are all adaptively learned through the backpropagation algorithm during network training. This represents the Sigmoid activation function, which maps the output to a range of 0 to 1. This represents the hyperbolic tangent activation function, which maps the output to the range of -1 to 1; This represents element-wise multiplication. Through the precise coordination of the above gating structures, LSTM can selectively memorize long-term historical information useful for prediction, while filtering out irrelevant short-term noise, thereby outputting high-quality first-scale hidden feature vectors and second-scale hidden feature vectors respectively.

[0041] Regarding the parameter configuration of the dual-branch architecture, in this embodiment, the network parameters of the first extraction branch and the second extraction branch are completely independent, meaning they do not share weight matrices or bias terms. This is because the physical processes represented by the two scales are fundamentally different, with varying data distribution characteristics, temporal dependency patterns, and noise levels. Forcing parameter sharing would lead to a trade-off during optimization, making it unable to accurately fit drastic short-term fluctuations or robustly capture the gradual evolution of long-term trends, ultimately impairing the model's generalization ability. Independent parameter spaces allow each branch to focus on learning the intrinsic patterns of a specific scale, providing semantically clear and complementary feature representations for the subsequent attention fusion module.

[0042] Besides Long Short-Term Memory (LSTM) networks, the feature extraction branch of this application can also employ deep learning models such as Gated Recurrent Units (GRU), Temporal Convolutional Networks (TCN), or Transformer Encoders as equivalent alternatives. GRU simplifies the LSTM structure by merging the forget gate and the input gate, reducing the number of parameters. However, when processing complex time-series data such as heating loads, which have extremely strong long-range dependencies and multi-timescale coupling characteristics, its ability to finely filter key historical information is slightly inferior to that of LSTM. TCN utilizes causal dilated convolutions to achieve parallel computation and a fixed receptive field. Although it has advantages in training speed, its receptive field size needs to be pre-set, making it difficult to adaptively match the dynamic time constant of the heating system that changes with the seasons. Transformer Encoders perform well in long sequence modeling due to their self-attention mechanism, but their computational complexity increases quadratically with the sequence length. Moreover, in the absence of positional encoding priors, for time-series data such as heating loads, which have strong local continuity and physical inertia, a larger amount of data is often required to converge to the ideal effect. In comparison, LSTM demonstrates superior overall performance in the heating load prediction scenario of this application: on the one hand, its gating mechanism is naturally adapted to the thermal inertia memory characteristics of heating systems, enabling it to effectively capture the cumulative effects spanning several days with lower computational costs; on the other hand, LSTM exhibits better convergence stability and noise robustness when processing small-to-medium scale time-series samples, making it more suitable for actual working conditions where data quality varies significantly in engineering projects. Therefore, although the aforementioned alternatives can all realize the technical concept of this application, LSTM remains the preferred implementation method that balances prediction accuracy, computational efficiency, and engineering feasibility.

[0043] In some embodiments, the degree of feature change includes the degree of meteorological abrupt change and the degree of load fluctuation; attention weights are calculated based on the degree of feature change, and attention weights are increased for time-series nodes with a value greater than a preset threshold, and attention weights are suppressed for time-series nodes with a value less than the preset threshold. Specifically, in conjunction with Figure 1The temporal attention weight adaptive allocation module 6 shown receives multi-scale temporal features output from the LSTM long-short-term temporal feature extraction unit 5 and independently calculates its importance score for each temporal step. In this embodiment, the degree of meteorological abrupt change is used to quantify the severity of external thermal disturbances, which can be obtained by calculating the absolute difference between outdoor temperatures at adjacent times, or by calculating the variance of wind speed and solar radiation intensity within a sliding window; the degree of load fluctuation is used to characterize the non-stationarity of the internal heat demand of the system, which can be obtained by calculating the magnitude of the first derivative or the gradient magnitude of the historical heat load sequence.

[0044] To transform these two dimensions of physical quantities into computable attention scores and eliminate the weight imbalance caused by different dimensions, this embodiment calculates the original attention scores... Previously, the degree of meteorological abrupt change and load fluctuation were first normalized. Specifically, the Min-Max normalization method was used to map physical quantities of different dimensions to... Within the interval, the calculation formula is as follows:

[0045] in, This represents the degree of meteorological change at time t, such as the absolute value of the difference between the outdoor temperature at time t and time t-1. This data is directly obtained from the multi-source time series data acquisition unit 1 and obtained after preprocessing. This indicates the degree of load fluctuation at time t, such as the absolute value of the rate of change of heat load at time t relative to the previous time, which is also derived from the historical load data of the multi-source time-series data acquisition unit 1. and They are respectively and Dimensionless eigenvalues ​​after normalization and These represent the minimum and maximum values ​​of the corresponding feature sequence within the current sliding window, respectively. After obtaining the dimensionless normalized features, this embodiment calculates the original attention score using the following formula:

[0046] in, This represents the raw attention score at time t. The larger the value, the higher the contribution to future prediction at that time. and These are the weighting coefficients for meteorological factors and load factors, respectively, used to balance the contribution ratio of the two normalized features to the total score. Because... and All dimensions have been eliminated. and These are dimensionless pure numbers. These two coefficients can be adaptively learned through the backpropagation algorithm during model training, or their initial values ​​can be preset based on expert experience (e.g., both initial values ​​are set to 0.5).

[0047] After obtaining the raw attention scores, they need to be converted into normalized attention weights, and then boosting or suppressing them based on preset thresholds. These preset thresholds are not arbitrarily assigned but dynamically generated based on the statistical characteristics of historical data. For example, the 75th percentile of the historical attention score sequence from the past heating season or the most recent 30 days can be selected as the high significance threshold, and the 25th percentile as the low significance threshold. Based on this, an improved Softmax function or a piecewise linear mapping function is used to generate the final attention weights. Taking the piecewise linear function as an example, when the raw score of a time-series node is higher than the high significance threshold, its weight is mapped to a high-weight range of 0.8 to 1.0 to strengthen the feature expression of that node; when the score is lower than the low significance threshold, its weight is compressed to a low-weight range of 0 to 0.2 to suppress the interference of redundant information; nodes in between maintain a linear mapping. This mechanism allows the model to autonomously focus on key moments such as cold waves and temperature drops, while automatically filtering out invalid noise during stable operation periods, significantly improving the signal-to-noise ratio of key information in long-term data.

[0048] Furthermore, the multi-scale time-series features include a first-scale hidden feature vector and a second-scale hidden feature vector; attention weights are used to weight and fuse the first-scale and second-scale hidden feature vectors to generate a global time-series feature matrix that takes into account both short-term fluctuations and long-term trends over multiple days. Specifically, combined with... Figure 1 The temporal feature weighted fusion module 7 receives the feature vectors weighted by the temporal attention weight adaptive allocation module 6. The fusion operation is not a simple numerical superposition, but rather employs an element-wise multiplication and concatenation strategy. First, the calculated attention weight vector is multiplied element-wise with the first-scale hidden feature vector and the second-scale hidden feature vector, ensuring that each scale's features embed the same importance distribution information. Then, the two weighted feature vectors are concatenated or weighted summed along their feature dimensions to form a new global temporal feature matrix. This matrix retains the microscopic details of the network's transient response and users' immediate heat consumption behavior in the first-scale sequence, while also incorporating the macroscopic trends of building heat storage and release and meteorological cycle evolution in the second-scale sequence. This provides a semantically rich and structurally balanced input representation for the subsequent multi-day load forecasting solution module 8.

[0049] Based on the aforementioned method for determining preset thresholds, this application also proposes a dynamic threshold adaptive adjustment strategy based on information entropy to address the challenge of significant differences in data distribution under different seasonal operating conditions in heating systems. Traditional fixed quantile thresholds may fail during transitional seasons such as the early or late cold season, as data fluctuations are generally smaller during these periods. A fixed threshold might lead to all nodes being classified as low significance, resulting in the loss of crucial information, or conversely, all nodes being classified as high significance during severe cold seasons, thus losing the ability to filter data. The information entropy-based strategy measures the disorder or uncertainty of data by calculating the information entropy value of the feature sequence within the current sliding window in real time: when the information entropy is high, it indicates that the system is in a complex and volatile state. In this case, the high significance threshold is automatically lowered and the low significance threshold is raised, expanding the range of the intermediate linear mapping interval to more finely distinguish the differences in importance between different nodes; when the information entropy is low, it indicates that the system is in a relatively stable state. In this case, the threshold interval is automatically tightened to enhance sensitivity to a very small number of abnormally mutated nodes. Compared to a fixed threshold, this information entropy-based adaptive strategy enables the attention mechanism to maintain optimal feature selection performance during non-stationary processes such as seasonal changes and operating condition switching, significantly improving the robustness and generalization ability of the model during the entire heating season.

[0050] This application chooses to execute the attention mechanism in the hidden feature space rather than the original input space, based on the profound consideration of improving the accuracy of weight allocation through deep semantic representation. Original input data (such as temperature and load readings) often contains a large amount of measurement noise, sensor drift, and irrelevant high-frequency interference. Directly calculating attention on this data can easily lead to the model being misled by false correlations, such as misjudging instantaneous sensor jumps as critical meteorological changes. However, the hidden feature vectors processed by the LSTM feature extraction branch have already undergone denoising, smoothing, and nonlinear transformation through gating mechanisms, containing abstract semantic information closer to the physical essence of the heating system, such as the cumulative effect of thermal inertia, periodic patterns, and trend turning points. Calculating the degree of feature change in this high-level semantic space is actually assessing the "intensity of system state evolution" rather than the "fluctuation amplitude of the original signal." This allows the attention weights to more accurately reflect the true causal contribution of each historical moment to the future heat load, avoiding interference from shallow noise in weight allocation, thereby fundamentally improving the accuracy and stability of multi-day predictions.

[0051] Furthermore, the weight parameters of the temporal attention mechanism are adjusted online based on the cumulative error of multi-day continuous prediction, including: calculating the cumulative error of multi-day continuous prediction within the rolling prediction period; and updating the weight parameters of the temporal attention mechanism and the network parameters of the feature extraction branch through the backpropagation algorithm based on the cumulative error of multi-day continuous prediction.

[0052] Specifically, this online rolling correction mechanism constitutes the core closed loop of the adaptive evolution of the technical solution in this application. Unlike traditional offline full retraining, online rolling correction is an incremental parameter fine-tuning performed during model deployment and operation using real-time transmitted measured load data. Within the rolling prediction period, the system uses a sliding window approach to calculate accumulated errors, such as calculating the cumulative value of the mean absolute error (MAE) or root mean square error (RMSE) between predicted and measured values ​​over the most recent N prediction time steps (e.g., the next 72 hours). Compared to single-point instantaneous errors, this method of accumulating errors can more sensitively capture the gradually diverging long-term trend deviations in multi-day predictions, rather than merely reflecting short-term random fluctuations. A loss function is constructed based on this accumulated error. The model then uses backpropagation to calculate the gradient of the loss function relative to the weight parameters in the temporal attention weight adaptive allocation module 6 and the network parameters in the LSTM long and short-term temporal feature extraction unit 5, and then performs parameter updates. This process ensures that the model can continuously adapt to system characteristic drift caused by pipeline aging, changes in user behavior, and seasonal changes without interrupting the heating scheduling service, effectively solving the engineering pain point of static models where errors accumulate and amplify day by day in multi-day rolling predictions.

[0053] Furthermore, to support the feasibility and stability of the above online correction, this embodiment provides a specific gradient descent update formula. The parameter update follows the expression below:

[0054] in, This represents the updated model parameters, including the weight matrix of the temporal attention mechanism and the gate weights and bias terms of the LSTM feature extraction branch; This represents the parameter value at the current moment. Represents the loss function For parameters The gradient vector is obtained by backpropagating from the cumulative error output to the parameters of each layer using the chain rule; The learning rate controls the step size of parameter updates. In this embodiment, an adaptive decay strategy is adopted, with the initial value set to 0.001. The learning rate decays exponentially with the number of corrections to prevent oscillations and divergence during the online update process. This represents the momentum factor, used to smooth the gradient update direction and suppress parameter jitter caused by noise in online data. Its value is typically between 0.8 and 0.95. The loss function is constructed based on the cumulative error within the rolling window, such as the weighted mean squared error function, where higher weights are given to the errors in the later stages of the predicted sequence (e.g., from day 3 to day 7) to force the model to prioritize correcting long-term trend biases. By introducing a momentum term and an adaptive learning rate, this application effectively avoids model performance degradation caused by sparse or abnormal real-time data while ensuring fast online correction response.

[0055] Furthermore, the method may also include: when detecting extreme weather features over multiple consecutive days, adaptively increasing the attention weights corresponding to the weather features and historical multi-day time series data; updating the weight parameters of the time series attention mechanism and the network parameters of the feature extraction branch through the backpropagation algorithm, including: updating the weight parameters of the time series attention mechanism in reverse through the gradient descent algorithm.

[0056] Specifically, extreme weather characteristics refer to meteorological conditions that cause significant nonlinear impacts on heating load. The detection logic does not rely on threshold judgments at a single moment, but rather on continuous verification over time. For example, when the outdoor temperature is below a preset low-temperature threshold (e.g., -15℃) for N consecutive days (e.g., 3 days), or when the wind speed fluctuation exceeds twice the historical standard deviation for the same period within M consecutive hours, the system determines that an extreme weather state has been entered. Once this state is detected, the measured error statistics and feedback correction module 10 sends a reinforcement signal to the time-series attention weight adaptive allocation module 6, adaptively increasing the attention weight of the corresponding meteorological characteristics and associated historical load data. The specific weight increase operation can be achieved by superimposing a learnable bias term onto the original attention score. Or multiply by a scaling factor To achieve this, that is ,in and This explicit weight enhancement mechanism enables the model to automatically focus on the most valuable key historical samples (such as load response patterns during similar cold waves in the past) under extreme conditions, overcoming the attention dispersion problem that may occur when conventional attention mechanisms extrapolate data distribution. Subsequently, the weight parameters of the temporal attention mechanism are updated in reverse using the gradient descent algorithm, enabling the model to quickly learn the special mapping relationship under extreme conditions, significantly improving the multi-day prediction generalization ability for severe weather such as sudden temperature drops and continuous rain and snow.

[0057] Building upon the aforementioned online rolling correction mechanism, this application proposes a differentiated parameter update strategy based on error contribution analysis to further optimize correction efficiency and prevent overcorrection. Traditional online update strategies typically apply uniform gradient updates to the parameters of all time-series nodes. However, in multi-day prediction scenarios, the contribution of different historical moments to future cumulative errors varies significantly. For example, recent heat source regulation actions or meteorological abrupt changes often bear greater responsibility for current prediction bias than long-term stable operating data. Based on this, this strategy, when performing backpropagation, first calculates the gradient contribution score of each time-series node to the cumulative error, i.e., the sensitivity of the node's feature changes to the decrease in the loss function. Subsequently, it dynamically allocates parameter update priorities and learning rate gains according to the contribution magnitude: the attention weights and LSTM hidden layer parameters corresponding to the top 20% of key time-series nodes are given a base learning rate of 1.5 to 2.0 times for focused updates; while redundant nodes with low contribution are frozen or fine-tuned with only 0.1 times the base learning rate. The physical mechanism of this differentiated update strategy lies in simulating the cognitive focus process of human experts when reviewing prediction biases, prioritizing the correction of the core causes of errors rather than blindly adjusting all related factors. Compared to uniform updates, this strategy not only improves the convergence speed of online correction by about 30%, but more importantly, it effectively avoids the model forgetting problem caused by overfitting to low-contribution noise nodes. This ensures that the model can quickly adapt to new operating conditions while maintaining a solid memory of the basic thermal inertia law during long-term online operation.

[0058] It is important to note that the online rolling calibration and offline full retraining in this embodiment are clearly distinguished in terms of triggering conditions and execution frequency. Online rolling calibration is a lightweight parameter fine-tuning that is automatically triggered on an hourly or daily basis. It only utilizes incremental data within the most recent rolling window, has low computational overhead, and does not consume main business resources. Its aim is to maintain the model's real-time tracking capability for time-varying operating conditions. On the other hand, offline full retraining is usually manually triggered at the beginning or end of the heating season, after major equipment maintenance, or when the accumulated error of online calibration exceeds a safety threshold. It uses historical data from the entire heating season for global optimization, aiming to reset the model baseline and correct potential structural biases. The two complement each other and together constitute a multi-level model maintenance system that adapts to the entire life cycle of the heating system, fully demonstrating the practicality and robustness of this solution in actual engineering applications.

[0059] like Figure 3 As shown, this embodiment provides a multi-day heating load prediction device based on a temporal attention network. This device adopts a modular architecture, and the technical solution of the aforementioned method embodiment is achieved through logical cooperation between modules. The device includes: The feature extraction module 310 is used to acquire historical multi-day time-series data, split it into multi-scale time-series sequences according to time granularity, and extract multi-scale time-series features through corresponding feature extraction branches. Specifically, it combines... Figure 1 The system architecture diagram shows that the feature extraction module logically encompasses a functional set including a multi-source time-series data acquisition unit 1, a multi-day time-series dataset construction module 2, a time-series data preprocessing and normalization module 3, a multi-scale time-series feature decomposition module 4, and an LSTM long-short-term time-series feature extraction unit 5. This module is not a single hardware circuit, but rather a logical entity that executes step S100 and the dual-branch feature extraction algorithm. During operation, the feature extraction module first acquires raw data containing heat load, meteorological, and operating condition information through the multi-source time-series data acquisition unit 1. After dataset construction and preprocessing, the multi-scale time-series feature decomposition module 4 decouples the data into a first-scale time-series sequence and a second-scale time-series sequence. Subsequently, the LSTM long-short-term time-series feature extraction unit 5 within the module acts as the core processing unit, processing the two scale sequences in parallel or sequentially through the first and second extraction branches, respectively, ultimately outputting first-scale hidden feature vectors and second-scale hidden feature vectors. These feature vectors, as the module's output signals, are passed to the downstream attention-weighted fusion module, thus completing the transformation from raw physical quantities to high-level semantic features.

[0060] The weighted fusion module 320 is used to dynamically allocate weights based on the degree of feature change according to a temporal attention mechanism, obtain attention weights, and then fuse them based on these attention weights to obtain global temporal features. Specifically, it combines... Figure 1 This module corresponds to the combination of the temporal attention weight adaptive allocation module 6 and the temporal feature weighted fusion module 7. Internally, it performs attention score calculation, threshold adaptive adjustment, and weighted fusion algorithms. The attention weighted fusion module receives the first-scale hidden feature vector and the second-scale hidden feature vector from the feature extraction module. It does not directly process the original input data but operates within the hidden feature space. The module first calculates the original attention score for each time-series node based on the degree of meteorological abrupt change and load fluctuation, and generates normalized attention weights through a preset threshold or a dynamic strategy based on information entropy. Then, it uses these weights to perform element-wise weighted fusion and concatenation of the hidden feature vectors at the two scales, generating a global temporal feature matrix that takes into account both short-term fluctuation details and long-term trends over multiple days. This modular design makes the feature selection and fusion process independent of the feature extraction process, facilitating the separate optimization of the attention mechanism parameters without affecting the stability of the underlying feature extraction.

[0061] The prediction and correction module 330 is used to output multi-day heating load prediction results based on global time-series characteristics, and to perform online rolling correction on the weight parameters of the time-series attention mechanism based on the cumulative error of multi-day continuous predictions. Specifically, it combines... Figure 1 This module integrates the functions of a multi-day load forecasting solution module 8, a multi-duration forecast result output unit 9, and a measured error statistics and feedback correction module 10. The forecasting and correction module receives the global time-series feature matrix, outputs a continuous heating load forecast sequence for the next several days through regression analysis, and is then distributed to the scheduling system in stages by the output unit 9. More importantly, this module constructs a closed-loop feedback path: the measured error statistics and feedback correction module 10 collects measured load data in real time, calculates the cumulative error within the rolling window, and triggers the backpropagation algorithm accordingly. It is important to emphasize that... Figure 1 The dashed arrow pointing from module 10 to the upper-level module represents the logical flow of the parameter update signal, not a physical electrical connection. This signal flow drives the online fine-tuning of the weight parameters of the temporal attention mechanism and the network parameters of the feature extraction branch, realizing adaptive correction. This design, which integrates prediction output and parameter correction within the same module, ensures that the correction action closely follows the prediction execution flow, avoiding the time lag problem caused by offline training.

[0062] The implementation methods of the above modules are highly open. In this embodiment, they can be implemented as software program code stored in memory and executed by a processor; they can also be embedded as firmware or hardware logic units in application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other digital signal processors; or they can be a hybrid implementation of software and hardware. Regardless of the physical carrier used, as long as it can perform the logical functions defined above and realize the corresponding data flow, it falls within the protection scope of this application.

[0063] This application also provides an electronic device, such as... Figure 4 As shown, it includes a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440.

[0064] Memory 430 is used to store computer programs; When the processor 410 executes the program stored in the memory 430, it performs the following steps: Acquire historical multi-day time series data, split it into multi-scale time series according to time granularity, and extract multi-scale time series features through the corresponding feature extraction branches; Based on the temporal attention mechanism, dynamic weight allocation is performed according to the feature change degree of the multi-scale temporal features to obtain attention weights, and the global temporal features are obtained by fusion based on the attention weights. Based on the global time-series characteristics, multi-day heating load prediction results are output, and the weight parameters of the time-series attention mechanism are adjusted online based on the cumulative error of multi-day continuous prediction.

[0065] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0066] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0067] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0068] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be 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, or discrete hardware components.

[0069] The implementation methods and beneficial effects of the various components of the electronic device in the above embodiments for solving the problem can be found in [reference needed]. Figure 2 The steps in the illustrated embodiments are used to implement the electronic device. Therefore, the specific working process and beneficial effects of the electronic device provided in this application will not be repeated here.

[0070] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the multi-day heating load prediction method based on temporal attention networks described in any of the above embodiments.

[0071] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the multi-day heating load prediction methods based on temporal attention networks described in the above embodiments.

[0072] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0073] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0074] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0075] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0076] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.

[0077] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims in this application and their equivalents, then this application also intends to include these modifications and variations.

Claims

1. A multi-day heating load prediction method based on temporal attention networks, characterized in that, include: Acquire historical multi-day time series data, split it into multi-scale time series according to time granularity, and extract multi-scale time series features through the corresponding feature extraction branches; Based on the temporal attention mechanism, dynamic weight allocation is performed according to the feature change degree of the multi-scale temporal features to obtain attention weights, and the global temporal features are obtained by fusion based on the attention weights. Based on the global time-series characteristics, multi-day heating load prediction results are output, and the weight parameters of the time-series attention mechanism are adjusted online based on the cumulative error of multi-day continuous prediction.

2. The method according to claim 1, characterized in that, The multi-scale time series includes a first-scale time series characterizing short-term fluctuations and a second-scale time series characterizing long-term trends over multiple days. The step of extracting multi-scale temporal features through corresponding feature extraction branches includes: Feature extraction is performed on the first-scale time series sequence through the first extraction branch, and feature extraction is performed on the second-scale time series sequence through the second extraction branch.

3. The method according to claim 2, characterized in that, Both the first extraction branch and the second extraction branch use a long short-term memory network; The step of extracting features from the first-scale time series through the first extraction branch includes: outputting a first-scale hidden feature vector through the first extraction branch; The step of extracting features from the second-scale time series through the second extraction branch includes: outputting a second-scale hidden feature vector through the second extraction branch.

4. The method according to claim 1, characterized in that, The degree of characteristic change includes the degree of meteorological abrupt change and the degree of load fluctuation; The step of dynamically allocating attention weights based on the degree of feature change of the multi-scale temporal features includes: The attention weight is calculated based on the degree of change of the features. The attention weight is increased for time-series nodes that are greater than a preset threshold, and the attention weight is suppressed for time-series nodes that are less than the preset threshold.

5. The method according to claim 3, characterized in that, Multi-scale temporal features include first-scale hidden feature vectors and second-scale hidden feature vectors; The process of fusing based on the attention weights to obtain global temporal features includes: The attention weights are used to weight and fuse the first-scale hidden feature vector and the second-scale hidden feature vector to generate a global time-series feature matrix that takes into account both short-term fluctuations and long-term trends over multiple days.

6. The method according to claim 1, characterized in that, The weight parameters of the time-series attention mechanism are adjusted online based on the cumulative error of multi-day continuous prediction, including: The cumulative error of the multi-day continuous forecast is calculated within the rolling forecast period; Based on the cumulative error of the multi-day continuous prediction, the weight parameters of the temporal attention mechanism and the network parameters of the feature extraction branch are updated through the backpropagation algorithm.

7. The method according to claim 6, characterized in that, The method further includes: When extreme weather features are detected over several consecutive days, the attention weights corresponding to the weather features and the historical multi-day time series data are adaptively increased. The step of updating the weight parameters of the temporal attention mechanism and the network parameters of the feature extraction branch through backpropagation includes: The weight parameters of the temporal attention mechanism are updated in reverse using the gradient descent algorithm.

8. A multi-day heating load prediction device based on a temporal attention network, characterized in that, The device includes: The feature extraction module is used to acquire historical multi-day time series data, split it into multi-scale time series sequences according to time granularity, and extract multi-scale time series features through the corresponding feature extraction branches; The weighted fusion module is used to dynamically allocate weights based on the degree of feature change according to the temporal attention mechanism, obtain attention weights, and fuse them based on the attention weights to obtain global temporal features; The prediction and correction module is used to output multi-day heating load prediction results based on the global time-series characteristics, and to perform online rolling correction on the weight parameters of the time-series attention mechanism based on the cumulative error of the multi-day continuous prediction.

9. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.