Heating load prediction method, system and computer program product

CN123018770APending Publication Date: 2026-10-30NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511089901.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

随着“双碳”目标推进,电采暖设备大规模接入配电网,导致负荷峰谷差率显著增大,叠加光伏消纳与蓄热装置协同运行带来的源荷互动不确定性,现有技术因缺乏精准负荷预测手段,易引发台区变压器过载、电压越限等安全隐患,同时导致需求响应策略失准和能源浪费

Benefits of technology

[0053]本申请通过密度聚类算法识别数据异常点,结合k近邻算法与长短期记忆网络融合填充缺失值以提升数据质量;构建气象数据与负荷关联性分析模型,借助长短期记忆网络捕捉长期时序模式,利用注意力机制聚焦关键时段特征,精准反映气象突变对负荷的影响;通过聚类算法划分用户用电行为群体,为每类用户行为构建专属负荷预测模型,实现用户行为差异的精细化分析,形成完整的综合数据分析与处理流程,显著增强负荷预测的准确性与效率,可提前预判负荷波动趋势,为配电网调度、多能互补及分时电价优化提供可靠支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123018770A_ABST
    Figure CN123018770A_ABST
Patent Text Reader

Abstract

The application discloses a kind of heating load prediction method, system and computer program product, belong to heating load prediction technical field, including, to the data collected are outlier detection and missing value filling, obtain preprocessed data;Effective data screening and data enhancement are carried out to preprocessed data, obtain effective data;According to effective data, meteorological data and load correlation analysis model are constructed, meteorological data and load correlation analysis are carried out, obtain the influence of meteorological mutation on load;According to the difference analysis of user electricity behavior of effective data, the load prediction model of each user behavior is constructed in combination with the influence of meteorological mutation on load, and load prediction result is obtained.The application forms complete comprehensive data analysis and processing procedure, and the accuracy and efficiency of load prediction are significantly enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of heating load forecasting, and more particularly to a heating load forecasting method, system, and computer program product. Background Technology

[0002] Under the new power system architecture, clean heating load forecasting is a core component in ensuring the safe and economical operation of the power grid. With the advancement of "dual-carbon" goals, the large-scale integration of electric heating equipment into the distribution network has led to a significant increase in the peak-valley load difference. Coupled with the uncertainty of source-load interaction brought about by the coordinated operation of photovoltaic power generation and thermal storage devices, existing technologies, lacking accurate load forecasting methods, are prone to safety hazards such as transformer overload and voltage exceeding limits, while also resulting in inaccurate demand response strategies and energy waste. Although existing solutions attempt to improve forecasting capabilities through data processing and model analysis, they still have shortcomings in areas such as the robustness of data anomaly detection and missing value filling, the depth of analysis on the correlation between meteorological data and load, and the refinement of user behavior difference analysis. This limits the accuracy of multi-dimensional forecasts and makes it difficult to meet the accuracy and timeliness requirements of the new power system for load forecasting.

[0003] Therefore, how to solve the problem of decreased accuracy of multi-attribute data prediction caused by incomplete data processing, insufficient correlation analysis, and rough analysis of user behavior differences in clean heating load forecasting has become a technical bottleneck that urgently needs to be overcome. Summary of the Invention

[0004] This application aims to provide a heating load forecasting method, system, and computer program product that improves the accuracy of multi-attribute data load forecasting.

[0005] To achieve the above objectives, the technical solution of this application is as follows:

[0006] A heating load prediction method includes,

[0007] The collected data is subjected to outlier detection and missing value imputation to obtain preprocessed data;

[0008] Effective data is obtained by filtering and augmenting the preprocessed data.

[0009] Based on valid data, a correlation analysis model between meteorological data and load is constructed, and the correlation analysis between meteorological data and load is carried out to obtain the impact of meteorological changes on load.

[0010] Based on valid data, we analyze the differences in user electricity consumption behavior and construct a load prediction model for each type of user behavior by combining the impact of meteorological changes on the load, thus obtaining the load prediction results.

[0011] Optionally, the step of performing outlier detection and missing value imputation on the collected data to obtain preprocessed data includes:

[0012] A density clustering algorithm is used to detect outliers by taking the input dataset, neighborhood radius, and minimum number of points, and marking isolated points in low-density areas as outliers.

[0013] Iterate through all data points to identify outliers;

[0014] The k-nearest neighbor algorithm is used to calculate the missing values ​​based on the weighted average of the neighboring samples;

[0015] Long Short-Term Memory (LSTM) networks are used to mine long-term dependencies in dynamic time-series data to predict missing values.

[0016] Decision fusion is used to merge the imputed missing values ​​with the predicted missing values ​​to generate the final missing value imputation result, thus obtaining the preprocessed data.

[0017] Optionally, before performing outlier detection and missing value imputation on the collected data to obtain preprocessed data, the method further includes: aligning the data using dynamic time warping.

[0018] Optional, effective data filtering includes:

[0019] Filtration to achieve room temperature compliance rate;

[0020] Weather controllability labeling.

[0021] Optionally, the step of constructing a meteorological data-load correlation analysis model based on valid data, and performing meteorological data-load correlation analysis on valid data to obtain the impact of meteorological abrupt changes on the load, includes:

[0022] Long-term time-series patterns of weather and load were obtained based on long short-term memory networks;

[0023] Key time periods are identified using an attention mechanism, and these key time periods are then weighted.

[0024] Visualized graphical analysis of weather-sensitive periods is used based on attention weights;

[0025] Key periods include extreme weather.

[0026] Optionally, the step of analyzing differences in user electricity consumption behavior based on valid data, and constructing a load forecasting model for each type of user behavior in conjunction with the impact of sudden weather changes on the load, to obtain load forecasting results, includes:

[0027] Clustering algorithms are used to classify user behavior into groups with significantly different load patterns at different levels based on user behavior data;

[0028] Build a dedicated load prediction model for each type of user behavior to obtain load prediction results for each type of user behavior.

[0029] Optionally, the step of using a clustering algorithm to divide user behavior into groups with significantly different load patterns at different levels based on user behavior data includes:

[0030] The user behavior feature vector is set as follows:

[0031] f t =[f1,f2,...f d ] T

[0032] Among them, f t For user behavior feature vectors; [f1, f2, ... f d ] T The user behavior feature vectors for each group include: daily load rate, temperature sensitivity coefficient, holiday load fluctuation rate, and peak-valley difference rate.

[0033] Data standardization involves inputting the standardized data into the K-means clustering algorithm, as shown below:

[0034]

[0035] Among them, f ik For the k-th feature of the i-th sample, μ k Let σ be the mean of the k-th feature. k Let z be the standard deviation of the k-th feature. ik Let W(K) be the standardized value of the k-th feature of the i-th sample, W(K) be the function value of the K-means clustering algorithm, K be the total number of categories in the K-means clustering algorithm, and C be the value of the k-th feature of the i-th sample. j Let c be the sample set of the j-th cluster. j f is the center of the j-th cluster. i The features of the i-th sample;

[0036] Based on user behavior data, users are categorized into groups with significantly different load patterns at different levels, including:

[0037] Initialize cluster centers by randomly selecting K sample points as initial cluster centers, as shown below:

[0038]

[0039] in, The center of the j-th cluster in the 0th iteration. f is the set of all feature vectors of the r-th sample randomly selected from the dataset. rK Let K be the feature of the r-th sample;

[0040] Sample allocation involves calculating the Euclidean distance from each sample to the cluster center, as shown below:

[0041]

[0042] in, Let i be the allocation result of the i-th sample in the t-th iteration. It is the center of the j-th cluster in the t-th iteration;

[0043] The center of each cluster is updated as follows:

[0044]

[0045] in, That is, the sample set of the j-th cluster in the t-th iteration; It is the center of the j-th cluster in the (t+1)-th iteration;

[0046] The convergence criterion is expressed as follows:

[0047] ||C (t+1) -C (t) || F <ε

[0048] Among them, C (t+1) Let C be the sample set in the (t+1)th iteration. (t) Let F be the sample set in the t-th iteration; the update stops when the cluster center moves less than the threshold ε.

[0049] The inflection point where the downward trend of the function value of the K-means clustering algorithm slows down is selected to initially screen the range of the best split values. The silhouette coefficient of the pre-selected samples within the range and the performance index of the K-means clustering algorithm are calculated. The comprehensive optimal solution is compared and selected as the best split value, and user behavior is divided into groups with significantly different load patterns at different levels.

[0050] Optionally, after analyzing the differences in user electricity consumption behavior based on valid data, constructing a load prediction model for each type of user behavior, and obtaining the load prediction results, the method further includes: optimizing the load prediction model to achieve an optimization method that combines the load prediction results with actual clean heating.

[0051] A heating load forecasting system includes: one or more processors; and a storage device for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the heating load forecasting method as described above, and to perform heating load forecasting according to the heating load forecasting method.

[0052] A computer program product includes a computer program that, when executed by a processor, implements a heating load prediction method as described in any one of the above statements.

[0053] This application identifies data outliers using density clustering algorithms and combines k-nearest neighbor algorithms with long short-term memory networks to fill in missing values, thereby improving data quality. It constructs a model for analyzing the correlation between meteorological data and load, using long short-term memory networks to capture long-term time-series patterns and employing attention mechanisms to focus on key period characteristics, accurately reflecting the impact of sudden meteorological changes on load. Furthermore, it uses clustering algorithms to segment user electricity consumption behavior groups, constructing a dedicated load forecasting model for each user behavior group. This enables refined analysis of user behavior differences, forming a complete integrated data analysis and processing workflow. This significantly enhances the accuracy and efficiency of load forecasting, allowing for early prediction of load fluctuation trends and providing reliable support for distribution network scheduling, multi-energy complementarity, and time-of-use pricing optimization.

[0054] To make the above-mentioned features and advantages of the application more apparent and understandable, specific embodiments are provided below, and detailed descriptions are given in conjunction with the accompanying drawings. Attached Figure Description

[0055] Figure 1 This is a flowchart of the heating load prediction method of this application.

[0056] Figure 2 This is a flowchart of step S1 of this application.

[0057] Figure 3 This is a flowchart of step S3 of this application. Detailed Implementation

[0058] To make the objectives and technical solutions of the embodiments of this application clearer, 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 some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the described embodiments of this application without creative effort are within the scope of protection of this application.

[0059] This application proposes a heating load forecasting method, applicable to heating load forecasting for clean energy sources. Please refer to [link / reference]. Figure 1 The heating load prediction method proposed in this application includes steps S1 to S4.

[0060] Step S1: Perform outlier detection and missing value imputation on the collected data to obtain preprocessed data;

[0061] Step S2: Perform effective data filtering and data augmentation on the preprocessed data to obtain effective data;

[0062] Step S3: Construct a correlation analysis model between meteorological data and load based on valid data, conduct correlation analysis between meteorological data and load, and obtain the impact of meteorological changes on load;

[0063] Step S4: Analyze the differences in user electricity consumption behavior based on valid data, and construct a load prediction model for each type of user behavior by combining the impact of meteorological changes on the load, and obtain the load prediction results.

[0064] In step S1, please refer to Figure 1 In step S1, outlier detection and missing value imputation are performed on the collected data to obtain preprocessed data.

[0065] As an example, the data collected in this application includes: clean heating system operation data, meteorological data, user behavior data, and clean energy access data; among which, clean heating system operation data includes: instantaneous heating capacity, equipment start-up and shutdown status, abnormal event markers, etc., where abnormal event markers include equipment failure and human intervention; meteorological data includes: temperature, relative humidity, wind speed, solar irradiance, weather forecast data, and historical records and real-time warnings of meteorological events such as cold waves, blizzards, and sustained low temperatures; user behavior data includes: user temperature control settings, distribution of heating periods, etc.; clean energy access data includes: photovoltaic and wind power output curves, and the status of thermal storage devices.

[0066] As an example, before performing outlier detection and missing value imputation on the collected data, the data alignment is also included.

[0067] As an example, Dynamic Time Warping (DTW) is used to align the timestamps of multi-source data to solve the problem of clock skew in data acquisition sensors; furthermore, for high-frequency data, such as minute-level heating data, it is aggregated into hourly averages to match the frequency of meteorological data.

[0068] Furthermore, the density clustering algorithm (DBSCAN) is used to identify outliers in the data that deviate from the main distribution. The density clustering algorithm is based on neighborhood density, such as minimum sample size and radius threshold, to divide the high-density areas of the aligned data into clusters and mark isolated points in low-density areas as outliers, thereby realizing outlier detection.

[0069] Specifically, please refer to Figure 2 Outlier detection includes the following steps:

[0070] Step S11: Using a density clustering algorithm, input the dataset, neighborhood radius, and minimum number of points, perform outlier detection, and mark isolated points in low-density areas as outliers.

[0071] As an example, the dataset includes the data collected in this application.

[0072] As an example, for a data point x in the dataset, the ε-neighborhood of data point x is defined as:

[0073] N ε(x)={y∈D|dist(x,y)≤ε}

[0074] Where, N ε (x) represents the data point x. i The ε-neighborhood is defined as follows: dist(x,y) is the distance between data point x and data point y, i.e., the Euclidean distance; D is the dataset; and ε is the maximum radius of the neighborhood. If data point x and its ε-neighborhood contain at least MinPts points (including itself), then data point x is considered a core object, as shown below:

[0075] |N ε (x)|≥MinPts

[0076] Where MinPts is the minimum number of points in the ε-neighborhood. If data point x is in the ε-neighborhood of data point y, and data point x is a core object, then data point y is said to be directly density-reachable from data point x; if there exists a series of data points x1, x2, ... x... n , where x1 = x, x n = y, and each data point x i+1 Direct density is achievable at data point x i If the density of data point y is equal to that of data point x, then it is said that the density of data point y is equal to that of data point x.

[0077] As an example, the value of MinPts needs to comprehensively consider the data scale, domain characteristics, and model objectives. MinPts represents the minimum number of neighborhood samples required to identify core objects. A larger MinPts value results in more conservative anomaly detection, while a smaller MinPts value results in more sensitive anomaly detection. Analysis of the collected heating data shows that heating season loads are densely distributed in the low-temperature, high-load range. Normal high loads caused by extreme weather such as cold waves naturally cluster, while true anomalies such as equipment failures often manifest as isolated points. Therefore, an initial MinPts value is set based on historical experience. Then, the inflection point of the k-th nearest neighbor distance after sorting is observed through a k-distance plot. The distance near the inflection point is used as a reference value for the neighborhood radius ε. While ensuring that MinPts is sufficiently large, the value can be appropriately reduced for detecting isolated anomalies such as sensor failures. Subsequently, MinPts and ε parameters are adjusted in tandem to ensure that the anomaly labeling results neither excessively exclude normal extreme loads nor miss key fault points. Furthermore, a balance is achieved through manual verification or performance optimization of the prediction model, efficiently filtering noise while preserving the characteristics of meteorologically sensitive loads.

[0078] Step S12: Traverse all data points to identify outliers.

[0079] As an example, traverse all data points. If data point x is unvisited and is a core object, expand its neighborhood to form a cluster, which is the set of all density-reachable core objects and their neighboring points; if the number of neighboring points of data point x is |N εIf (x)|<MinPts and does not belong to any cluster, it is marked as an outlier, that is, a point that does not meet the core object condition and cannot be contained in the neighborhood of any core object.

[0080] Furthermore, a subset of data is extracted from the dataset as a set of samples. Each set of samples is a combination of values ​​for multiple features, which represent data attributes, such as instantaneous heating volume and equipment start / stop status. The k-nearest neighbor (KNN) algorithm is used to calculate the distance between samples, and values ​​are taken from the K nearest complete samples to fill in missing values. Further, a long short-term memory (LSTM) network is used to mine long-term dependencies in the time series to predict missing values. Finally, a decision fusion approach is used to generate the final missing value filling result.

[0081] Missing value imputation includes the following steps:

[0082] Step S13: Use the k-nearest neighbor algorithm to calculate the missing values ​​based on the weighted average of neighboring samples.

[0083] As an example, the k-nearest neighbor algorithm is used to calculate the distance between samples, including Euclidean distance and Manhattan distance.

[0084] In one embodiment of this application, the Euclidean distance between samples is calculated. For sample x i and x j The feature distance outside the attribute containing the missing value is represented as:

[0085]

[0086] Where, dist(x) i ,x j ) is the sample x i and x j The distance between features other than the attribute containing the missing value; k is the feature attribute index, i.e., the k-th feature; valid_f represents the feature attribute that was not marked as a missing value; x i,k x j,k They represent samples x respectively i and x j The value taken on the k-th feature.

[0087] As an example, values ​​are taken from the K nearest complete samples, including: mean, median, or weighted average.

[0088] In one embodiment of this application, missing values ​​are filled by taking a weighted average from the K nearest neighbor complete samples. The weights of the nearest neighbor samples are represented as follows:

[0089]

[0090] Where δ is the smoothing coefficient, w jThis represents the weight of the j-th nearest neighbor sample; the closer the sample, the greater its weight.

[0091] Furthermore, missing values ​​are filled in using a weighted approach based on the weights of nearest neighbor samples, as shown below:

[0092]

[0093] Where, x i,miss The location of the original missing value, i.e., sample x. i The location of missing values ​​to be filled; K is the nearest neighbor number, set directly by the user; x j,miss This represents the value of the j-th nearest neighbor sample on the same missing feature, which is a known value.

[0094] Step S14: Use a long short-term memory network to mine long-term dependencies in dynamic time series data to predict missing values.

[0095] As an example, the dynamic time-series data collected in this application includes: instantaneous heating capacity, equipment start-up and shutdown status, abnormal event markers, temperature, relative humidity, wind speed, solar irradiance, weather forecast data, historical meteorological event records and real-time early warnings, photovoltaic and wind power output curves, and thermal storage device status, etc.

[0096] The forgetting gate in Long Short-Term Memory (LSTM) networks is used to represent the retention of historical data, as shown below:

[0097] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0098] Among them, f t The output of the forget gate controls the proportion of data state retained from the previous time step; σ is the sigmoid activation function; W f h is the weight matrix of the forget gate; t-1 This is the output from the previous time step; x t b is the input feature vector at the current time step; f This is the bias term for the forget gate.

[0099] The candidate states of a Long Short-Term Memory (LSTM) network are used to update data and generate new data for the current time step, as shown below:

[0100]

[0101] in, Candidate data state; W C b is the weight matrix for the candidate states; C The bias term for the candidate state is used for gating offset.

[0102] The input gates of a Long Short-Term Memory (LSTM) network control the update ratio of candidate states, determining how much new information is updated, as shown below:

[0103] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0104] Among them, i t For input gate output; W i b is the weight matrix of the input gate; i This is the bias term for the input gate, used for gate offset.

[0105] The data update state of a Long Short-Term Memory (LSTM) network is represented as follows:

[0106]

[0107] Among them, C t The updated data state is represented by t, where t represents the current time and t-1 represents the previous time; ⊙ represents element-wise multiplication.

[0108] The output gate of the Long Short-Term Memory (LSTM) network is used to generate the hidden state at the current time step, as shown below:

[0109] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0110] Among them, o t For output gate; W o h is the output gate weight matrix; t-1 Indicates the hidden state at the previous time step; b o This is the bias term for the input gate, used for gate offset.

[0111] The current hidden state is represented as follows:

[0112] h t =o t ⊙tanh(C t )

[0113] Among them, h t This indicates the hidden state at the current moment.

[0114] Furthermore, the output layer of the Long Short-Term Memory network outputs predicted values ​​based on the hidden states, thus obtaining the predicted missing values, as shown below:

[0115]

[0116] in, This is the predicted value at the current moment, which is also a prediction of the heating load at future moments; W y b is the weight matrix of the output layer; y This is the bias term for the output layer.

[0117] Step S15: Use decision fusion to fuse the imputed missing values ​​with the predicted missing values ​​to generate the final missing value imputation result.

[0118] As an example, the decision fusion formula is expressed as follows:

[0119]

[0120] Where α is the weight coefficient, α∈[0,1]. If the data noise is large, α is increased, indicating greater trust in the local consistency of the k-nearest neighbor algorithm. If the temporal sequence is strong, α is decreased, indicating greater trust in the long short-term memory network's long-term prediction. This represents the result of filling missing values ​​using the k-nearest neighbor algorithm; This indicates how the Long Short-Term Memory network fills in missing values ​​at the current or historical time points, i.e., predicts the results of missing value predictions; Fill in the missing values ​​in the final result.

[0121] As an example, after outlier detection and missing value imputation through the above steps, preprocessed data is obtained.

[0122] In step S2, please refer to Figure 1 The S2 step involves filtering and augmenting the preprocessed data to obtain effective data.

[0123] Specifically, effective data screening includes the following steps:

[0124] Step S21: Room temperature compliance rate filtering. In the preprocessed data, only the data of the time period when the room temperature meets the heating requirements are retained to ensure that the heating amount matches the actual user needs.

[0125] Step S22: Meteorological controllability labeling. All weather data are processed uniformly, and the attention mechanism is used to distinguish between predictable mutations and uncontrollable anomalies.

[0126] As an example, synthetic samples are generated for low-frequency extreme weather events, while adversarial samples are also generated to simulate low-frequency extreme weather scenarios such as sudden drops in temperature or continuous rain, in order to enhance the generalization ability of the prediction model.

[0127] In step S3, please refer to Figure 1In step S3, a correlation analysis model between meteorological data and load is constructed based on valid data, and the correlation analysis between meteorological data and load is performed to obtain the impact of meteorological changes on load.

[0128] As an example, a model for analyzing the correlation between meteorological data and load is constructed by combining a long short-term memory network with an attention mechanism to obtain the impact of meteorological abrupt changes on load. In step S14, the long short-term memory network is used to mine the long-term dependencies of the time series of dynamic time series data to obtain the long-term time series patterns of meteorology and load. Furthermore, an attention mechanism is used to identify key periods and assign higher weights to key periods, thereby more accurately reflecting the impact of meteorological abrupt changes on load.

[0129] Specifically, please refer to Figure 3 Step S3 includes the following steps:

[0130] Step S31: Obtain long-term time-series patterns of weather and load based on the Long Short-Term Memory Network.

[0131] As an example, Long Short-Term Memory (LSTM) networks initially filter noise through gating mechanisms. In the forget gate, the noise filtered includes long-term invalid historical data and sudden historical data caused by data sensor anomalies. By discarding noise from the previous data state, reliance on that historical data is reduced. In the input gate, the noise filtered includes short-term random fluctuation data and meteorological disturbance data unrelated to the load. This is achieved by filtering candidate data states. Each feature in the data is weighted to suppress low-relevance features; in the output gate, the noise filtered by the output gate includes: incompletely filtered confounding information in the data state, which is suppressed by reducing the weights of low-relevance features. The specific steps are as follows:

[0132] Step S311: Input feature fusion, let the input vector at time t be:

[0133]

[0134] in Historical load characteristics, These represent temperature, humidity, and radiation meteorological factors, respectively.

[0135] Step S312: Weather-load coupled update, filtering historical states based on current weather change signals, as shown below:

[0136] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0137] Among them, f tThe forget gate output determines how many long-term load patterns relevant to the current weather conditions are retained; σ is the activation function for the sigmoid growth curve; W f h is the weight matrix of the forget gate; t-1 This is the output from the previous time step; x t b is the input feature vector at the current time step; f This is the bias term for the forget gate.

[0138] Furthermore, by integrating sudden meteorological events and load response, it can be represented as follows:

[0139]

[0140] in, Candidate data state, new load patterns under abrupt weather changes; W C b is the weight matrix for the candidate states; C The bias term for the candidate state is used for gating offset.

[0141] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0142] Among them, i t For input gate output; W i b is the weight matrix of the input gate; i This is the bias term for the input gate, used for gate offset.

[0143] Furthermore, the meteorological-load coupling effect is obtained, expressed as follows:

[0144]

[0145] Among them, C t The updated data state is represented by t, where t represents the current time and t-1 represents the previous time; ⊙ represents element-wise multiplication.

[0146] Furthermore, a load representation of the current meteorological scenario is generated, as follows:

[0147] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0148] Among them, o t For output gate; W o h is the output gate weight matrix; t-1 Indicates the hidden state at the previous time step; b oThis is the bias term for the input gate, used for gate offset.

[0149] The current hidden state is represented as follows:

[0150] h t =o t ⊙tanh(C t )

[0151] s t =v Τ tanh(W h h t +W m m t )

[0152] m t =[ΔT t I h (t), ▽(t)]

[0153] Among them, h t This represents the hidden state at the current moment, implying the transient characteristics of the load triggered by sudden weather changes;

[0154] Step S313: Meteorological memory is transferred across step lengths to obtain long-term time-series models of meteorological conditions and loads, and the updated data state C is used. t Iterative updates enable the Long Short-Term Memory (LSTM) network to memorize long-term weather patterns and reduce weather abrupt changes. Output i through the input gate t and the output f of the forget gate t This triggers rapid reconstruction of cell states, enabling modeling of the delayed response of loads to extreme weather.

[0155] Step S314: Output the predicted values ​​for weather and load, as shown below:

[0156]

[0157] in, W is the predicted value at the current moment. y b is the weight matrix of the output layer; y This is the bias term for the output layer.

[0158] Step S32: Use an attention mechanism to identify key time periods and weight them.

[0159] As an example, key periods include extreme weather events such as extreme high or low temperatures and continuous rainfall. The gating mechanism of the Long Short-Term Memory (LSTM) network performs initial noise reduction on the effective data, and then stores the noise-reduced hidden state h. tThe input attention mechanism is optimized to avoid noise interference in its weight calculations, allowing it to focus more on critical periods and more accurately reflect the impact of sudden weather changes on the load. The specific steps are as follows:

[0160] Step S321: Input the hidden state after noise reduction.

[0161] In one embodiment of this application, the temporal hidden state output by the Long Short-Term Memory network is assumed to be... Taking extreme high temperature as an example, the duration of high temperature is t∈[t1,t2], the high temperature starts at t1 and ends at t2;

[0162] Step 322: Design an attention scoring function, introducing the intensity of meteorological abrupt change as prior knowledge, and calculate the importance score at time t, as shown below:

[0163] s t =v Τ tanh(W h h t +W m m t )

[0164] m t =[ΔT t I h (t), ▽(t)]

[0165] Among them, s t The importance score at time t, ΔT t I represents the change in current temperature compared to the previous 24 hours. h (t) represents the high temperature warning signal (represented by 0 / 1), ▽(t) represents the solar irradiance, W m The meteorological feature weight matrix maps meteorological abrupt changes to the latent space, W. h Let h be the hidden state weight matrix. t For the denoised Long Short-Term Memory network hidden state, m t is the feature vector of meteorological abrupt changes, and v is the attention weight vector.

[0166] Step S323: Generate the weights for key time periods and normalize the scores for key time periods.

[0167] In one embodiment of this application, the scores for each time point within the high-temperature time period [t1, t2] are normalized, as shown below:

[0168]

[0169] Among them, a t Let τ be the attention weight at position t; τ is a temperature control parameter that controls the weight distribution, decreasing as the weight increases at high temperatures; t eThis indicates the end of the index.

[0170] Step S324: The attention mechanism outputs a context vector that is weighted and synthesized for key time periods.

[0171] In one embodiment of this application, the synthesis context vector is represented as follows:

[0172]

[0173] Among them, c h This represents the context vector obtained by weighting the key time periods.

[0174] Furthermore, the predicted output correction is expressed as follows:

[0175]

[0176] in, is the predicted value at the current moment; U is the gain from learning meteorological changes to load transfer.

[0177] Step S33: Use visual graph analysis to analyze weather-sensitive periods based on attention weights.

[0178] As examples, visualizations include heat maps, line graphs, bar charts, etc. By transforming abstract weight values ​​into visualizations, the results of the output meteorological data and load correlation analysis model become observable. By analyzing meteorologically sensitive periods through visualizations, it is easy to see which meteorological data have the greatest impact on the load during which time periods.

[0179] In step S4, please refer to Figure 1 In step S4, user electricity consumption behavior differences are analyzed based on valid data, and load prediction models for each type of user behavior are constructed by combining the impact of meteorological changes on load, thus obtaining load prediction results.

[0180] Specifically, step S4 includes the following steps:

[0181] Step S41: Use a clustering algorithm to divide user behavior into groups with significantly different load patterns at different levels based on user behavior data.

[0182] As an example, the core step of step S4 is to use the K-means clustering algorithm to divide user behavior into groups with significantly different load patterns based on user behavior data. The specific steps are as follows:

[0183] Step S411: Set the user behavior feature vector, as follows:

[0184] f t =[f1,f2,...f d ]T

[0185] Among them, f t For user behavior feature vectors; [f1, f2, ... f d ] T The user behavior feature vectors for each group include: daily load rate, temperature sensitivity coefficient, holiday load fluctuation rate, and peak-valley difference rate.

[0186] Step S412: Data standardization. Input the standardized data into the K-means clustering algorithm, as shown below:

[0187]

[0188] Among them, f ik For the k-th feature of the i-th sample, μ k Let σ be the mean of the k-th feature. k Let z be the standard deviation of the k-th feature. ik Let W(K) be the standardized value of the k-th feature of the i-th sample, W(K) be the function value of the K-means clustering algorithm, K be the total number of categories in the K-means clustering algorithm, and C be the value of the k-th feature of the i-th sample. j Let c be the sample set of the j-th cluster. j f is the center of the j-th cluster. i Let be the features of the i-th sample.

[0189] Step S413: Based on user behavior data, classify user behavior into groups with significantly different load patterns at different levels.

[0190] As an example, to initialize cluster centers, we randomly select K sample points as initial cluster centers, as shown below:

[0191]

[0192] in, The center of the j-th cluster in the 0th iteration. f is the set of all feature vectors of the r-th sample randomly selected from the dataset. rK Let be the j-th feature of the r-th sample.

[0193] Further, sample allocation is performed, and the Euclidean distance from each sample to the cluster center is calculated, as follows:

[0194]

[0195] in, Let i be the allocation result of the i-th sample in the t-th iteration. It is the center of the j-th cluster in the t-th iteration.

[0196] Furthermore, the center of each cluster is updated, as shown below:

[0197]

[0198] in, That is, the sample set of the j-th cluster in the t-th iteration; It is the center of the j-th cluster in the (t+1)-th iteration.

[0199] Furthermore, a convergence check is performed, as shown below:

[0200] ||C (t+1) -C (t) || F <ε

[0201] Among them, C (t+1) Let C be the sample set in the (t+1)th iteration. (t) Let F be the sample set in the t-th iteration; when the distance the cluster center moves is less than the threshold ε, the update stops; otherwise, return to the sample allocation step.

[0202] Step S414: Cluster quality assessment:

[0203]

[0204] Among them, s i For clustering quality, a i Let b be the average distance from sample i to other samples in the same cluster. i Let be the average distance from sample i to the nearest heterogeneous sample.

[0205] Step S415: Determine the optimal partitioning parameters, as shown below:

[0206]

[0207] Specifically, the inflection point where the downward trend of the function value W(K) of the K-means clustering algorithm slows down is selected as the initial screening of the range of optimal partition values. The silhouette coefficient and the K-means clustering algorithm performance index (CH index) of the pre-selected samples within the range are calculated. The comprehensive optimal solution is selected by comparison and the comprehensive optimal solution is used as the best partition value to classify user behavior into groups with significantly different load patterns at different levels.

[0208] The contour coefficients are expressed as follows:

[0209]

[0210] Where s(i) is the silhouette coefficient of sample i. The closer its value is to 1, the more reasonable the clustering is. When it is equal to 1, it means that the sample is far away from other clusters. It is used to verify the rationality of the user group division. max{a(i),b(i)} is the normalization factor. b(i) is the average distance of sample i to the nearest heterogeneous sample, that is, the inter-cluster separation. a(i) is the average distance of sample i to other samples in the same cluster, as shown below.

[0211]

[0212] Among them, Cn i dist(x) represents the number of samples in the cluster to which sample i belongs; i ,x j ) represents the distance between samples i and j;

[0213]

[0214] Among them, Cn k Other clusters that do not belong to sample i.

[0215] The CH index is used to represent the quality of clustering, that is, the quality of user group segmentation, and is expressed as follows:

[0216]

[0217] Where B is the sum of squared distances between all cluster centers and the global center, which is calculated from the mean vector of all sample points; W is the sum of squared distances between samples within each cluster and the cluster center; N is the number of samples; and K is the number of groups.

[0218] Step S42: Combine the impact of meteorological changes on load to construct a dedicated load forecasting model for each type of user behavior, and obtain the load forecasting results for each type of user behavior.

[0219] As an example, user behavior is divided into residential users, commercial users, and industrial users based on load patterns. Taking into account the impact of meteorological changes on load, load forecasting models for residential users, commercial users, and industrial users are constructed respectively.

[0220] As an example, when constructing a residential user load forecasting model, the focus is on characterizing the nonlinear response to temperature abrupt changes (such as extremely cold or hot weather). The model quantifies the variation of the "U-shaped" curve in extreme ranges by segmenting the temperature-sensitive characteristics, using the perceived temperature index and the rate of change. Temperature abrupt change features and perceived temperature change indicators are added to the input layer. The core of the residential user load forecasting model adopts a long short-term memory network with a meteorological attention mechanism. The long short-term memory network automatically enhances the weights of hidden states during periods of low-temperature abrupt changes, and the impact of meteorological abrupt changes is quantified through a temperature-sensitive correction module.

[0221] Specifically, the residential user load forecasting model takes into account historical hourly clean heating system operation data, refined meteorological data, time characteristics (hourly and holiday markings), and early warnings for key periods (such as extreme cold and high temperature weather), and outputs hourly load curves for the next 24 hours and load peak predictions under extreme temperatures.

[0222] As an example, when constructing a commercial user load forecasting model, we focus on the lagged impact of severe weather on passenger flow (such as heavy rain and snow suppressing travel), and establish a multiple regression model by combining precipitation intensity indicators and customer travel intention data. At the same time, we strengthen the sensitivity weights of business formats such as transportation hubs and open-air commercial areas. The commercial user load forecasting model focuses on integrating the impact of sudden precipitation changes, adopts a dual-flow network structure, learns the regular load pattern in the time series branch, and uses convolution to extract the feature spectrum of rainstorm events in the meteorological sudden change branch.

[0223] Specifically, the commercial user load forecasting model takes into account minute-level clean heating system operation data, passenger flow monitoring data, precipitation, visibility, and commercial activity calendar, and outputs ultra-short-term load forecasts for the next 4 hours and conformity attenuation forecasts for key periods.

[0224] As an example, when constructing industrial user load forecasting models, weather corrections are introduced into the load framework dominated by the main production plan—establishing appropriate mechanisms to mitigate production schedules during sudden changes in temperature and humidity. By incorporating a real-time weather forecast bias feedback mechanism, forecast robustness is ensured during periods of abrupt weather changes.

[0225] Specifically, the industrial user load forecasting model takes into account production planning schedules, process-level energy consumption data, meteorological data, and policy control signals, and outputs future medium-term load forecasts and load baselines under different production scenarios.

[0226] As an example, in step S4, user electricity consumption behavior differences are analyzed based on valid data, and a load forecasting model for each type of user behavior is constructed by combining the impact of meteorological changes on the load. After obtaining the load forecasting results, the following steps are also included:

[0227] Step S5: Optimize the load forecasting model to achieve an optimized method that combines the load forecasting results with actual clean heating.

[0228] Specifically, step S5 includes the following steps:

[0229] Step S51: Optimization and reliability assurance of load forecasting model.

[0230] As an example, the Shapley Additive Explanations (SHAP) method is integrated to visualize the contribution of key features to load forecasting results, assisting operations and maintenance personnel in decision-making.

[0231] As an example, key features include: a sudden drop in temperature and human intervention.

[0232] As an example, by visualizing the contribution of key features to the load forecasting results, operations and maintenance personnel can make decisions including: quickly locating abnormal features, such as features that rank highly in terms of contribution but have no physical meaning, and verifying whether the load forecasting model conforms to physical laws; for features with high contribution, increasing their weight in the attention mechanism; and for features with low contribution, considering removing them from the input of the load forecasting model to reduce computational complexity.

[0233] Step S52: Edge and cloud collaborative computing.

[0234] As an example, a lightweight load prediction model is deployed at the network edge close to the user side or the device site to process local data in real time and generate load prediction results. The cloud is responsible for global model training and complex calculations in a centralized global data center for each type of user behavior. After training on global data, the cloud generates incremental update packets, which only transmit the differences in long short-term memory network weights to reduce the amount of data transmission. The edge load prediction model is updated through incremental learning.

[0235] Step S53: User needs are responded to by corresponding strategies.

[0236] As an example, the load forecast results for each type of user behavior are linked with the time-of-use electricity price in the electricity market to generate an optimal electricity consumption plan and guide users to use electricity during off-peak hours.

[0237] Furthermore, by combining the status data of the thermal storage device and the load forecast results of each type of user behavior, the heating strategy of the thermal storage device is scheduled. During the execution of the charging and discharging instructions of the thermal storage device, real-time feedback control is carried out to optimize the heating strategy of the thermal storage device. The thermal storage device is used to smooth load fluctuations and realize an optimized system that combines load forecasting and actual heating by optimizing the "prediction-scheduling-control" closed loop.

[0238] A heating load forecasting system includes: one or more processors; and a storage device for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the heating load forecasting method described above and to perform heating load forecasting according to the heating load forecasting method.

[0239] A computer program product includes a computer program that, when executed by a processor, implements a heating load prediction method as described above.

[0240] This application identifies data outliers using density clustering algorithms and combines k-nearest neighbor algorithms with long short-term memory networks to fill in missing values, thereby improving data quality. It constructs a model for analyzing the correlation between meteorological data and load, using long short-term memory networks to capture long-term time-series patterns and employing attention mechanisms to focus on key period characteristics, accurately reflecting the impact of sudden meteorological changes on load. Furthermore, it uses clustering algorithms to segment user electricity consumption behavior groups, constructing a dedicated load forecasting model for each user behavior group. This enables refined analysis of user behavior differences, forming a complete integrated data analysis and processing workflow. This significantly enhances the accuracy and efficiency of load forecasting, allowing for early prediction of load fluctuation trends and providing reliable support for distribution network scheduling, multi-energy complementarity, and time-of-use pricing optimization.

[0241] Although this application has been disclosed above with reference to embodiments, it is not intended to limit this application. Anyone skilled in the art may make some modifications and refinements without departing from the spirit and scope of this application. Therefore, the scope of protection of this application shall be determined by the appended claims.

Claims

1. A method for predicting heating load, characterized in that, include, The collected data is subjected to outlier detection and missing value imputation to obtain preprocessed data; Effective data is obtained by filtering and augmenting the preprocessed data. Based on valid data, a correlation analysis model between meteorological data and load is constructed, and the correlation analysis between meteorological data and load is carried out to obtain the impact of meteorological changes on load. Based on valid data, we analyze the differences in user electricity consumption behavior and construct a load prediction model for each type of user behavior by combining the impact of meteorological changes on the load, thus obtaining the load prediction results.

2. The heating load prediction method as described in claim 1, characterized in that, The process of detecting outliers and filling missing values ​​in the collected data to obtain preprocessed data includes: A density clustering algorithm is used to detect outliers by taking the input dataset, neighborhood radius, and minimum number of points, and marking isolated points in low-density areas as outliers. Iterate through all data points to identify outliers; The k-nearest neighbor algorithm is used to calculate the missing values ​​based on the weighted average of the neighboring samples; Long Short-Term Memory (LSTM) networks are used to mine long-term dependencies in dynamic time-series data to predict missing values. Decision fusion is used to merge the imputed missing values ​​with the predicted missing values ​​to generate the final missing value imputation result, thus obtaining the preprocessed data.

3. The heating load prediction method as described in claim 1, characterized in that, Before performing outlier detection and missing value filling on the collected data to obtain preprocessed data, the method further includes: aligning the data using dynamic time warping.

4. The heating load prediction method as described in claim 2, characterized in that, Effective data filtering includes: Filtration to achieve room temperature compliance rate; Weather controllability labeling.

5. The heating load prediction method as described in claim 4, characterized in that, The process involves constructing a meteorological data-load correlation analysis model based on valid data, performing meteorological data-load correlation analysis on the valid data, and obtaining the impact of meteorological abrupt changes on the load, including: Long-term time-series patterns of weather and load were obtained based on long short-term memory networks; Key time periods are identified using an attention mechanism, and these key time periods are then weighted. Visualized graphical analysis of weather-sensitive periods is used based on attention weights; Key periods include extreme weather.

6. The heating load prediction method as described in claim 4, characterized in that, The process involves analyzing differences in user electricity consumption behavior based on valid data, and constructing a load forecasting model for each type of user behavior by combining the impact of sudden weather changes on the load. The resulting load forecasting results include: Clustering algorithms are used to classify user behavior into groups with significantly different load patterns at different levels based on user behavior data; Build a dedicated load prediction model for each type of user behavior to obtain load prediction results for each type of user behavior.

7. The heating load prediction method as described in claim 4, characterized in that, The method employs a clustering algorithm to divide user behavior into groups with significantly different load patterns at different levels based on user behavior data, including: The user behavior feature vector is set as follows: f t =[f1,f2,...f d ] T Among them, f t For user behavior feature vectors; [f1, f2, ... f d ] T The user behavior feature vectors for each group include: daily load rate, temperature sensitivity coefficient, holiday load fluctuation rate, and peak-valley difference rate. Data standardization involves inputting the standardized data into the K-means clustering algorithm, as shown below: Among them, f ik For the k-th feature of the i-th sample, μ k Let σ be the mean of the k-th feature. k Let z be the standard deviation of the k-th feature. ik Let W(K) be the standardized value of the k-th feature of the i-th sample, W(K) be the function value of the K-means clustering algorithm, K be the total number of categories in the K-means clustering algorithm, and C be the value of the k-th feature of the i-th sample. j Let c be the sample set of the j-th cluster. j f is the center of the j-th cluster. i The features of the i-th sample; Based on user behavior data, users are categorized into groups with significantly different load patterns at different levels, including: Initialize cluster centers by randomly selecting K sample points as initial cluster centers, as shown below: in, X is the center of the j-th cluster in the 0th iteration. rj f is the set of all feature vectors of the r-th sample randomly selected from the dataset. rK Let K be the feature of the r-th sample; Sample allocation involves calculating the Euclidean distance from each sample to the cluster center, as shown below: Where, r i (t) Let i be the allocation result of the i-th sample in the t-th iteration. It is the center of the j-th cluster in the t-th iteration. The center of each cluster is updated as follows: in, That is, the sample set of the j-th cluster in the t-th iteration; It is the center of the j-th cluster in the (t+1)-th iteration. Convergence is determined as follows: ||C (t+1) -C (t) || F <e Among them, C (t+1) Let C be the sample set in the (t+1)th iteration. (t) Let F be the sample set in the t-th iteration; the update stops when the cluster center moves less than the threshold ε. The inflection point where the downward trend of the function value of the K-means clustering algorithm slows down is selected to initially screen the range of the best split values. The silhouette coefficient of the pre-selected samples within the range and the performance index of the K-means clustering algorithm are calculated. The comprehensive optimal solution is compared and selected as the best split value, and user behavior is divided into groups with significantly different load patterns at different levels.

8. The heating load prediction method as described in claim 7, characterized in that, The process of analyzing user electricity consumption behavior differences based on valid data, constructing a load prediction model for each type of user behavior, and obtaining load prediction results also includes: optimizing the load prediction model to achieve an optimization method that combines the load prediction results with actual clean heating.

9. A heating load prediction system, characterized in that, include: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the heating load prediction method as described in any one of claims 1-8, and to perform heating load prediction according to the heating load prediction method.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements a heating load prediction method as described in any one of claims 1-8.