Thermal load prediction method and system for regional heat supply
By employing random forest gain and mutual information for feature selection and graph convolutional networks to generate adaptive adjacency matrices, the method addresses the challenges of high-dimensional, nonlinearly coupled region heating data, enhancing prediction accuracy and adaptability.
Patent Information
- Application Number
- CN202510797020.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-06-16
AI Technical Summary
In the existing thermal load prediction methods, the regional heating data has high-dimensional characteristics and nonlinear coupling relationships between the features, which are susceptible to noise interference, resulting in increased data processing complexity and difficulty in accurately capturing the changes in thermal loads. In addition, traditional methods have poor adaptability to complex heating scenarios, resulting in large deviations or lags in prediction results.
The random forest split gain and mutual information are combined to calculate the global significance of the feature and cluster optimization are performed. The spatial and temporal features are extracted through diffusion graph convolution and multi-head attention mechanism, and the gated adaptive adjacency matrix is generated, and the spatiotemporal features are fused for prediction.
It improves the accuracy and speed of thermal load prediction, enhances the adaptability to different heating systems, and reduces noise interference and prediction deviation.
Smart Images

Figure CN120317455A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and specifically refers to a heat load prediction method and system for district heating. Background Art
[0002] The heat load prediction method is a method based on artificial intelligence technology. By analyzing multi-dimensional information of historical district heating, it mines the dynamic change rules in heating data, identifies the key factors affecting the heat load, and realizes accurate heat load prediction, providing a scientific decision-making basis for heating enterprises, and realizing intelligent heating and refined control of energy.
[0003] However, in the existing heat load prediction methods, there are problems that district heating data has high-dimensional characteristics, and there are non-linear coupling relationships between the characteristics, which are easily affected by noise interference, increasing the complexity of data processing, making it difficult to accurately capture the change rules of heat load, resulting in a large deviation in the heat load prediction results; in the existing heat load prediction methods, the correlation patterns between the characteristics of district heating data are complex and have spatio-temporal dynamics, and traditional methods have poor adaptability to complex heating scenarios, making it difficult to balance the synergistic effects of spatial dependence and time dynamics, resulting in a lag in heat load prediction or a serious disconnection between the results and the actual situation. Summary of the Invention
[0004] In view of the above situation, to overcome the defects of the existing technology, the present invention provides a heat load prediction method and system for district heating. In the existing heat load prediction methods, the district heating data has high-dimensional characteristics, and there are non-linear coupling relationships between the characteristics, which are easily affected by noise, increasing the complexity of data processing and making it difficult to accurately capture the change law of the heat load, resulting in a large deviation in the heat load prediction result. This solution combines the splitting gain of the random forest and mutual information to obtain the global significance of the features and select the initial centroids; fuses the Euclidean distance and mutual information to reduce the computational complexity of subsequent feature screening through clustering; calculates the association purity based on mutual information and information entropy to quickly identify the features with the greatest impact on the heat load in each cluster; screens and deletes redundant features according to the redundancy condition, and only retains a few key features in each cluster; in view of the problem that in the existing heat load prediction methods, the association patterns between the district heating data features are complex and have spatio-temporal dynamics, and the traditional methods have poor adaptability to complex heating scenarios and are difficult to balance the synergistic effects of spatial dependence and temporal dynamics, resulting in heat load prediction lag or the result being seriously out of touch with the actual situation, this solution calculates the similarity score and correlation coefficient between nodes, generates a bimodal base adjacency matrix through a gating mechanism, and uses diffusion graph convolution to aggregate multi-order neighborhood information to generate a hidden feature matrix and a dynamic propagation adjacency matrix to reflect the real-time spatial association; fuses the two adjacency matrices to generate a gating adaptive adjacency matrix to reduce prediction lag; extracts spatial features based on diffusion graph convolution, extracts temporal features based on spatio-temporal embedding and multi-head attention mechanism, enhances the adaptability to different heating systems, and improves the heat load prediction speed while ensuring accuracy.
[0005] The technical solution adopted by the present invention is as follows: A heat load prediction method for district heating provided by the present invention includes the following steps:
[0006] Step S1: Data collection;
[0007] Step S2: Data preprocessing;
[0008] Step S3: Optimization of district heating data;
[0009] Step S4: Construction of a heat load prediction model;
[0010] Step S5: Intelligent prediction.
[0011] Further, in step S1, the data collection is to collect historical district heating data; the historical district heating data includes timestamps, heating system data, building data, meteorological data, and heat load values, and the heat load values are used as data labels.
[0012] Further, in step S2, the data preprocessing is to perform data cleaning, data encoding, and data normalization on the data.
[0013] Further, in step S3, the optimization of the district heating data specifically includes the following steps:
[0014] Step S31: Calculate the global saliency of features; use a random forest model to obtain the importance score according to the average split gain of each feature in all decision trees; calculate the mutual information between each feature and the data label; combine the importance score and the mutual information with weights to obtain the global saliency of each feature in the district heating data.
[0015] Step S32: Feature clustering optimization; sort all the features of the district heating data in descending order of global saliency, and select the top A features as the initial centroids; combine the Euclidean distance and the mutual information with weights to calculate the weighted distance between each feature and each centroid, and assign each feature to the cluster where the nearest centroid is located to obtain A clusters; weight the features with the global saliency to generate A new centroids; preset the centroid movement threshold γ, the cluster purity threshold ε, and the maximum number of iterations P, and re-cluster the features based on the new centroids until the movement distance of each cluster centroid is less than the centroid movement threshold or the average mutual information between all the features and the centroid in each cluster is greater than the cluster purity threshold or when the maximum number of iterations is reached, stop the iterative clustering to obtain the final feature clustering set ; where and m a are the new centroid and the original centroid of the a-th cluster respectively, is the average mutual information between all the features and the centroid in the a-th cluster, b1, b2, and b A are the 1st, 2nd, and A-th clusters respectively, a is the cluster index, is the Euclidean distance;
[0016] Step S33: Construct an ordered feature set; for each cluster, calculate the association purity between each feature and the data label within the cluster according to the mutual information and the information entropy; sort all the features in each cluster in descending order of association purity to obtain the ordered feature set of each cluster; the formula used is as follows:
[0017] ;
[0018] In the formula, is the k-th feature in the a-th cluster, is the true data label of the centroid in the a-th cluster, is and the association purity between, is and the mutual information between, and They are respectively and the information entropy of;
[0019] Step S34: Feature screening; construct an empty set F, for the ordered feature set E of each cluster a , select a the feature with the highest association purity in E as the main feature , and add from E a delete it and add it to F; check each remaining feature in E a whether it satisfies the redundancy condition with . If satisfies the redundancy condition, then is deleted from E as a redundant feature to obtain the updated E a ; select the feature with the highest association purity from the updated E a as the new main feature, then delete the new main feature from E a and add it to F, and screen and delete redundant features from E again according to the new main feature a until E a is empty; after the ordered feature sets of all clusters are empty, an effective feature set is obtained; where E a is the ordered feature set of the a-th cluster, a is the main feature of the a-th cluster, is the g-th remaining feature in the a-th cluster, is is and the association purity between is and the association purity between;
[0020] Step S35: Data optimization; only retain the features in the effective feature set from the district heating data, eliminate all redundant features, complete the optimization of the district heating data, and construct a training data set and a test data set.
[0021] Furthermore, in step S4, the construction of the heat load prediction model specifically includes the following steps:
[0022] Step S41: Construct a bimodal base adjacency matrix; take each feature of the district heating data in the training data set as a node; use the Gaussian kernel function to calculate the similarity score between every two nodes to construct a similarity adjacency matrix G sim ; use the Pearson correlation coefficient to calculate the correlation coefficient between every two nodes to construct a correlation adjacency matrix G cor; Fuse the similar adjacency matrix and the relevant adjacency matrix through a gating mechanism to generate a bimodal base adjacency matrix ;
[0023] Step S42: Construct a dynamic propagation adjacency matrix; Use 1×1 convolution to compress the features of the original time series of the training dataset to generate an initial feature matrix L 0 ; The input feature matrix L of the q-th spatio-temporal layer q and are input into a diffusion-based graph convolutional network. Through S-order diffusion graph convolutional operations, multi-order neighborhood information is aggregated to obtain a hidden feature matrix. The spatial similarity between nodes is calculated using the hidden feature matrix, and through matrix inner product and softmax normalization operations, a dynamic propagation adjacency matrix is generated;
[0024] Step S43: Construct a gated adaptive adjacency matrix; Fuse the bimodal base adjacency matrix and the dynamic propagation adjacency matrix through a gating mechanism to generate a gated adaptive adjacency matrix ;
[0025] Step S44: Extract spatial features; Input L q and into a diffusion graph convolutional network. Through S-order diffusion graph convolutional operations, multi-hop neighborhood information of nodes is aggregated to generate a spatial feature matrix ;
[0026] Step S45: Extract temporal features; Combine with the learned time position matrix M to generate a spatio-temporal embedding matrix ; Through linear transformation, are respectively mapped into a query matrix Q, a key matrix K, and a value matrix V. Calculate the scaled dot product of Q and the transpose of K, and after softmax normalization, weight and sum with V to obtain an attention value. Use the multi-head attention mechanism to learn different representations through multiple attention heads, splice the outputs of multiple attention heads, and integrate through a fully connected layer to obtain a temporal feature matrix , and use a two-layer feed-forward neural network to further extract temporal features from to generate an enhanced temporal feature matrix ;
[0027] Step S46: Prediction; Fuse and through a residual connection to generate a spatio-temporal feature matrix ; Input the spatio-temporal feature matrix extracted by the last spatio-temporal layer into the prediction layer to obtain the predicted data label.
[0028] Further, in step S5, the intelligent prediction is to collect real-time district heating data; the real-time district heating data includes timestamps, heating system data, building data, and meteorological data. After preprocessing the real-time district heating data, it is then optimized based on the effective feature set; the optimized real-time district heating data is input into the heat load prediction model for analysis, and according to the output data label, the heat load value corresponding to the real-time district heating data is obtained.
[0029] A heat load prediction system for district heating provided by the present invention includes a data collection module, a data preprocessing module, a district heating data optimization module, a heat load prediction model construction module, and an intelligent prediction module;
[0030] The data collection module collects historical district heating data and sends the data to the data preprocessing module;
[0031] The data preprocessing module performs data cleaning, data encoding, and data normalization on the data and sends the data to the district heating data optimization module;
[0032] The district heating data optimization module combines the random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, fuses the Euclidean distance and mutual information, calculates the weighted distance and clusters, combines the centroid movement threshold, cluster purity threshold, and maximum number of iterations to complete cluster optimization, calculates the association purity based on mutual information and information entropy, filters and deletes redundant features according to the redundancy condition, and sends the data to the heat load prediction model construction module;
[0033] The heat load prediction model construction module calculates the similarity score and correlation coefficient between nodes, generates a bimodal base adjacency matrix through a gating mechanism, generates a hidden feature matrix and a dynamic propagation adjacency matrix based on diffusion graph convolution, fuses the two adjacency matrices to generate a gating adaptive adjacency matrix, extracts spatial features based on diffusion graph convolution, extracts temporal features based on spatio-temporal embedding and multi-head attention mechanism, fuses to obtain spatio-temporal features and makes a prediction, and sends the data to the intelligent prediction module;
[0034] The intelligent prediction module analyzes through the heat load prediction model to obtain the heat load value corresponding to the real-time district heating data.
[0035] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0036] (1) In view of the problems existing in the existing heat load prediction methods, such as the regional heating data having high-dimensional features, non-linear coupling relationships between features, being vulnerable to noise interference, increasing the complexity of data processing, being difficult to accurately capture the change law of heat load, and resulting in large deviations in heat load prediction results, this solution combines the splitting gain of random forest and mutual information to obtain the global significance of features and select the initial centroid, fuses non-linear relationships and statistical dependencies to more comprehensively characterize the influence of features on heat load; fuses Euclidean distance and mutual information, calculates the weighted distance and clusters, optimizes the clustering based on the centroid movement threshold, cluster purity threshold and maximum number of iterations, reduces the computational complexity of subsequent feature screening through clustering, while retaining the internal structure between features and avoiding overfitting or underfitting; calculates the correlation purity based on mutual information and information entropy, quickly identifies the features with the greatest influence on heat load in each cluster; screens and deletes redundant features according to the redundancy condition to complete data optimization, only retains a few key features in each cluster, reduces noise interference, improves data processing efficiency, can more accurately capture the change law of heat load, and improves the accuracy of heat load prediction.
[0037] (2) In view of the problems existing in the existing heat load prediction methods, such as the complex correlation patterns between the features of regional heating data and their spatio-temporal dynamics, the poor adaptability of traditional methods to complex heating scenarios, and the difficulty in balancing the combined effects of spatial dependence and time dynamics, resulting in heat load prediction lag or the results being seriously out of touch with the actual situation, this solution calculates the similarity score and correlation coefficient between nodes, generates a bimodal base adjacency matrix through a gating mechanism to capture non-linear and linear correlations between features respectively, sets a threshold to filter low signal-to-noise ratio connections, and uses the gating mechanism to dynamically adjust the weights of the two matrices to adapt to different heating scenarios; uses diffusion graph convolution to aggregate multi-order neighborhood information to generate a hidden feature matrix and a dynamic propagation adjacency matrix to reflect real-time spatial correlations and weaken the influence of irrelevant connections; fuses the two adjacency matrices to generate a gating adaptive adjacency matrix to avoid a single matrix dominating the prediction results, adaptively adjusts the adjacency weights, and reduces prediction lag; extracts spatial features based on diffusion graph convolution, and dynamic weight assignment strengthens the feature extraction of important spatial factors; extracts temporal features based on spatio-temporal embedding and multi-head attention mechanism, learns temporal dependencies at different scales, and obtains a more comprehensive temporal representation after splicing; fuses to obtain spatio-temporal features and makes predictions, enhances the adaptability to different heating systems, reduces prediction deviations, and improves the heat load prediction speed while ensuring accuracy. Brief Description of the Drawings
[0038] Figure 1 It is a schematic flowchart of a heat load prediction method for district heating provided by the present invention;
[0039] Figure 2 It is a schematic diagram of a heat load prediction system for district heating provided by the present invention;
[0040] Figure 3 It is a schematic flow diagram of step S3;
[0041] Figure 4 It is a schematic flow diagram of step S4.
[0042] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the description. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. Specific Embodiments
[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0044] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation to the present invention.
[0045] Embodiment 1, referring to Figure 1 , a heat load prediction method for district heating provided by the present invention, the method includes the following steps:
[0046] Step S1: Data collection; collect historical district heating data;
[0047] Step S2: Data preprocessing; perform data cleaning, data encoding, and data normalization on the data;
[0048] Step S3: Optimization of district heating data; combine the splitting gain of random forest and mutual information to obtain the global significance of features and select the initial centroid, fuse the Euclidean distance and mutual information, calculate the weighted distance and perform clustering, combine the centroid movement threshold, cluster purity threshold, and maximum number of iterations to complete clustering optimization, calculate the association purity based on mutual information and information entropy, and screen and delete redundant features according to the redundancy condition;
[0049] Step S4: Construct a heat load prediction model; calculate the similarity scores and correlation coefficients between nodes, generate a bimodal base adjacency matrix through a gating mechanism, generate a hidden feature matrix and a dynamic propagation adjacency matrix based on diffusion graph convolution, fuse the two adjacency matrices to generate a gated adaptive adjacency matrix, extract spatial features based on diffusion graph convolution, extract temporal features based on spatio-temporal embedding and multi-head attention mechanism, fuse to obtain spatio-temporal features and make predictions;
[0050] Step S5: Intelligent prediction; analyze through the heat load prediction model to obtain the heat load value corresponding to the real-time district heating data.
[0051] Example two, refer to Figure 1 , based on the above example, in step S1, the data collection is to collect historical district heating data; the historical district heating data includes timestamps, heating system data, building data, meteorological data and heat load values, and the heat load value is used as the data label;
[0052] The heating system data includes pipe network parameters and equipment status. The pipe network parameters include supply water temperature, return water temperature, pipeline pressure, pipe network aging degree and flow rate. The equipment status includes heat pump output, valve opening and water pump frequency;
[0053] The building data includes building type, building area, building insulation performance, building orientation, building height and occupancy rate;
[0054] The meteorological data includes outdoor temperature, indoor temperature, humidity, wind speed, wind direction, atmospheric pressure, cloud cover, precipitation and solar radiation intensity.
[0055] Example three, refer to Figure 1 , based on the above example, in step S2, the data preprocessing is to perform data cleaning, data encoding and data normalization on the data;
[0056] The data cleaning is to remove error values, missing values and outliers in the data;
[0057] The data encoding is to convert categorical data into numerical data using One-Hot encoding;
[0058] The data normalization is to unify numerical data into the same range using the maximum-minimum scaling method.
[0059] Example four, refer to Figure 1 and Figure 3 , based on the above example, in step S3, the optimization of district heating data specifically includes the following:
[0060] Step S31: Calculate the global saliency of features; Heat load prediction involves multi-dimensional features. The impacts of different features on the load vary greatly, and there may be redundancy or noise. Traditional methods are difficult to quantify the comprehensive importance of features. The splitting gain of the random forest captures the non-linear relationship between features and the heat load. Mutual information measures the statistical dependence between features and the heat load. The redundancy penalty term avoids the repeated contribution of highly correlated features. By adjusting the weights, the splitting ability and independence of features are balanced to adapt to the data characteristics of different heating systems. Use the random forest model to obtain the importance score according to the average splitting gain of each feature in all decision trees; Calculate the mutual information between each feature and the data label; Combine the importance score and mutual information with weights to obtain the global saliency of each feature in the district heating data; The formula used is as follows:
[0061] ;
[0062] ;
[0063] ;
[0064] where \(x k \) and \(x l \) are the \(k\)-th and \(l\)-th features in the district heating data respectively, \(k\) and \(l\) are feature indices, \(I k \) is the importance score of \(x k \), \(N trees \) is the total number of decision trees in the random forest, \) is the splitting gain of \(x k \) in the \(t\)-th decision tree, \(t\) is the decision tree index, \(X k \) is the sample space composed of all possible values of \(x k \), \(Y\) is the label space composed of all possible values of \(y\), \) is the mutual information between \(x k \) and the label \(y\), \) is the mutual information between \(x k \) and \(x l \), \) is the joint probability distribution of \(x k \) and the label \(y\), \) and \) are the marginal probability distributions of \(x k \) and the label \(y\) respectively, \(Z k \) is the global saliency of \(x k \), \(\alpha\) is the first weight coefficient in the range of \([0.3, 0.7]\), and \(\beta\) is the second weight coefficient in the range of \([0.1, 0.5]\);
[0065] Step S32: Feature clustering optimization; The heat load features may have natural groupings. Traditional clustering methods only rely on Euclidean distance and cannot capture the semantic associations between features. Euclidean distance ensures that features with similar numerical values are grouped into one cluster, and mutual information clusters statistically relevant features together. Even if the numerical scales are different, by weighting the centroid with global significance, the cluster center is more biased towards high-importance features, and the termination conditions are flexible. The cluster purity threshold ensures the consistency of the association between the features within the cluster and the heat load, and the centroid movement threshold avoids overfitting. Arrange all the features of the district heating data in descending order of global significance, and select the first A features as the initial centroids. Combine the weighted Euclidean distance and mutual information, calculate the weighted distance between each feature and each centroid, and assign each feature to the cluster where the nearest centroid is located to obtain A clusters. Weight the features with global significance to generate A new centroids. Preset the centroid movement threshold γ, the cluster purity threshold ε, and the maximum number of iterations P. Based on the new centroids, cluster the features again until the movement distance of each cluster centroid in each iteration is less than the centroid movement threshold , or the average mutual information between all the features and the centroid in each cluster is greater than the cluster purity threshold , or when the maximum number of iterations is reached, stop the iterative clustering to obtain the final feature clustering set ; The formulas used are as follows:
[0066] ;
[0067] ;
[0068] In the formula, and m a are the new centroid and the original centroid of the a-th cluster respectively, is the average mutual information between all the features and the centroid in the a-th cluster, b1, b2, b a and b A are the first, second, a-th, and A-th clusters respectively, a is the cluster index, is the Euclidean distance, γ is the centroid movement threshold within the range of [10 -4 , 10 -2 , ε is the cluster purity threshold within the range of [0.6, 0.9], P is the maximum number of iterations within the range of [50, 150], λ is the balance coefficient within the range of [0.2, 0.8], is the weighted distance between x k and m a , is the mutual information between x k and m a , is the maximum mutual information between all the features and the centroids;
[0069] Step S33: Construct an ordered feature set; within the same cluster, the contributions of features to the heat load may vary significantly, and it is necessary to further distinguish between core features and auxiliary features; the association purity combines mutual information and information entropy to quantify the explanatory efficiency of features with respect to the heat load, and the in-cluster sorting ensures that each cluster preferentially retains features directly related to the load; for each cluster, calculate the association purity between each feature and the data label within the cluster according to mutual information and information entropy; sort all the features in each cluster in descending order of association purity to obtain the ordered feature set for each cluster; the formula used is as follows:
[0070] ;
[0071] In the formula, is the k-th feature in the a-th cluster, is the true data label of the centroid in the a-th cluster, is and the association purity between them, is and the mutual information between them, and are respectively and the information entropy of;
[0072] Step S34: Feature screening; in heat load prediction, features within the same cluster may be highly redundant, and directly retaining all features will lead to model overfitting. By selecting the main features, each cluster retains the most representative features; construct an empty set F, and for the ordered feature set E a of each cluster, select the feature with the highest association purity in E a as the main feature , and add to F after deleting it from E a ; check whether each remaining feature a in E satisfies the redundancy condition with . If satisfies the redundancy condition, then take as a redundant feature and delete it from E a to obtain the updated E a ; select the feature with the highest association purity from the updated E a as the new main feature, then delete the new main feature from E a and add it to F, and screen and delete redundant features from E a again according to the new main feature until E a is empty; when the ordered feature sets of all clusters are empty, the effective feature set is obtained; among them, E ais the ordered feature set of the a-th cluster, is the main feature of the a-th cluster, is the g-th remaining feature in the a-th cluster, is and the association purity between, is and the association purity between;
[0073] Step S35: Data optimization; The original district heating data often contains a large number of low-value or duplicate features. Direct modeling will reduce efficiency and introduce noise. Only retain effective features, eliminate redundancy, and construct a high-quality data set; Only retain the features in the effective feature set from the district heating data, eliminate all redundant features, complete the optimization of the district heating data, and construct a training data set and a test data set.
[0074] By performing the above operations, for the existing heat load prediction methods, there are problems such as the district heating data having high-dimensional features, non-linear coupling relationships between features, being easily affected by noise, increasing the complexity of data processing, being difficult to accurately capture the change law of heat load, and resulting in large deviations in heat load prediction results. This solution combines the splitting gain of random forest and mutual information to obtain the global significance of features and select the initial centroid, fuses non-linear relationships and statistical dependencies, and more comprehensively represents the influence of features on heat load; Fuses Euclidean distance and mutual information, calculates the weighted distance and clusters, and optimizes the clustering based on the centroid movement threshold, cluster purity threshold, and maximum number of iterations. By clustering, it reduces the computational complexity of subsequent feature screening, while retaining the internal structure between features, avoiding overfitting or underfitting; Calculates the association purity based on mutual information and information entropy, and quickly identifies the features that have the greatest impact on heat load in each cluster; Screens and deletes redundant features according to the redundancy conditions, completes data optimization, only retains a few key features in each cluster, reduces noise interference, improves data processing efficiency, can more accurately capture the change law of heat load, and improves the accuracy of heat load prediction.
[0075] Example 5, refer to Figure 1 and Figure 4 , based on the above example, in step S4, constructing the heat load prediction model specifically includes the following steps:
[0076] Step S41: Construct a bimodal base adjacency matrix; District heating data contains multiple types of features, and the association patterns between different features are complex. Traditional single matrices cannot comprehensively depict the complex relationships between features. The Gaussian kernel function is used to capture the non-linear similarity between features, the Pearson correlation coefficient is used to quantify the linear correlation between features, low signal-to-noise ratio connections are filtered through a threshold to reduce noise interference, and a gating mechanism is used to dynamically balance the weights of the two modalities to more comprehensively represent node relationships and avoid biases in a single modality; Each feature of the district heating data in the training dataset is used as a node; The Gaussian kernel function is used to calculate the similarity score between every two nodes to construct a similarity adjacency matrix G sim ; The Pearson correlation coefficient is used to calculate the correlation coefficient between every two nodes to construct a correlation adjacency matrix G cor ; The similarity adjacency matrix and the correlation adjacency matrix are fused through a gating mechanism to generate a bimodal base adjacency matrix ; The formulas used are as follows:
[0077] ;
[0078] ;
[0079] ;
[0080] ;
[0081] where c i and c j are the feature vectors of the i-th and j-th nodes respectively, i and j are node indices, σ is the bandwidth parameter of the Gaussian kernel function, δ is the threshold of the similarity score within the range of [0.3, 0.7], is the similarity score between c i and c j , is the Pearson correlation coefficient between c i and c j , is the threshold of the correlation coefficient within the range of [0.4, 0.8], is the correlation coefficient between c i and c j , and are the normalized similarity adjacency matrix and correlation adjacency matrix respectively, and are linear transformation functions, is the Sigmoid activation function, and f1 is the first gating weight;
[0082] Step S42: Construct a dynamic propagation adjacency matrix; The district heating load has spatio-temporal dynamics, and traditional static graphs cannot capture the spatial dependence relationships that evolve over time; Aggregate multi-order neighborhood information through S-order diffusion operations, model the spatial propagation paths, calculate the node spatial similarity based on the inner product of hidden features, generate dynamic weights through softmax to reflect the real-time spatial correlation; Use 1×1 convolution to compress the features of the original time series of the training dataset to generate the initial feature matrix L 0 ; Input the input feature matrix L q and of the q-th spatio-temporal layer into the diffusion-based graph convolutional network. Through S-order diffusion graph convolutional operations, aggregate multi-order neighborhood information to obtain the hidden feature matrix. Calculate the spatial similarity between nodes using the hidden feature matrix, and generate the dynamic propagation adjacency matrix through matrix inner product and softmax normalization operations; The formula used is as follows:
[0083] ;
[0084] ;
[0085] In the formula, is the hidden feature matrix after the q-th layer of diffusion graph convolution, L q is the input feature matrix of the q-th spatio-temporal layer, S is the diffusion order, s is the diffusion step, is to the power of s, W1 is the first weight matrix, is the dynamic propagation adjacency matrix generated by the q-th spatio-temporal layer, and T is the transpose operation;
[0086] Step S43: Construct a gated adaptive adjacency matrix; There may be conflicts between the bimodal base adjacency matrix and the dynamic propagation adjacency matrix, and it is necessary to dynamically balance the two to adapt to the changes in working conditions; Adjust through a gating mechanism to avoid the failure of a single matrix under extreme working conditions; Generate a gated adaptive adjacency matrix by fusing the bimodal base adjacency matrix and the dynamic propagation adjacency matrix through a gating mechanism ; The formula used is as follows:
[0087] ;
[0088] ;
[0089] In the formula, and are linear transformation functions, and f2 is the second gating weight;
[0090] Step S44: Extract spatial features; The spatial distribution of district heating load is affected by multiple factors. It is necessary to model the multi-hop dependence relationship between nodes, aggregate multi-hop neighborhood information through diffusion graph convolution, capture the hierarchical effect of spatial propagation, dynamically adjust the weights of different neighborhoods, and highlight the key spatial influencing factors; Input L q and into the diffusion graph convolution network, and through the S-order diffusion graph convolution operation, aggregate the multi-hop neighborhood information of nodes to generate a spatial feature matrix ; The formula used is as follows:
[0091] ;
[0092] In the formula, is the spatial feature matrix extracted from the q-th spatio-temporal layer, W2 is the second weight matrix, is to the power of s;
[0093] Step S45: Extract temporal features; The heat load has strong temporal periodicity and trend. Traditional methods are difficult to capture multi-scale time patterns simultaneously; Model the spatio-temporal coupling relationship, splice and integrate multi-scale temporal features, and further extract non-linear temporal dependencies to strengthen the expression ability of temporal features; Combine with the learned time position matrix M to generate a spatio-temporal embedding matrix ; Through linear transformation, map to the query matrix Q, the key matrix K, and the value matrix V respectively, calculate the scaled dot product of Q and the transpose of K, and after softmax normalization, weighted sum with V to obtain the attention value. Use the multi-head attention mechanism, learn different representations through multiple attention heads, splice the outputs of multiple attention heads, and integrate through a fully connected layer to obtain the temporal feature matrix , and use a two-layer feed-forward neural network to further extract temporal features from to generate an enhanced temporal feature matrix ; The formula used is as follows:
[0094] ;
[0095] ;
[0096] Among them, is the spatio-temporal embedding matrix of the q-th spatio-temporal layer, is the temporal feature matrix extracted from the q-th spatio-temporal layer, is the fully connected layer, is the splicing operation, head1 and head U are the outputs of the 1st and the U-th attention heads respectively, U is the number of attention heads, is the enhanced temporal feature matrix extracted from the q-th spatio-temporal layer;
[0097] Step S46: Prediction; The prediction of district heating load needs to comprehensively consider spatio-temporal characteristics. Traditional models are difficult to balance the modeling capabilities of spatial dependence and temporal dynamics. The residual structure and multi-layer convolution enhance the adaptability of the model to different heating scenarios and reduce the risk of overfitting. Combine and through residual connection fusion to generate a spatio-temporal feature matrix ; Input the spatio-temporal feature matrix extracted from the last spatio-temporal layer into the prediction layer to obtain the predicted data label. The formula used is as follows:
[0098] ;
[0099] where, is the predicted data label, Conv 1×1 is a 1×1 convolution, is the spatio-temporal feature matrix extracted from the q-th spatio-temporal layer, q max is the number of spatio-temporal layers, is the spatio-temporal feature matrix extracted from the last spatio-temporal layer.
[0100] By performing the above operations, for the existing heat load prediction methods, there are problems such as complex correlation patterns among district heating data features and spatio-temporal dynamics. Traditional methods have poor adaptability to complex heating scenarios and are difficult to balance the combined effects of spatial dependence and temporal dynamics, resulting in lagging heat load prediction or a serious disconnect between the results and the actual situation. In this solution, the similarity score and correlation coefficient between nodes are calculated, and a dual-modal base adjacency matrix is generated through a gating mechanism to capture the non-linear and linear correlations between features respectively. A threshold is set to filter low signal-to-noise ratio connections, and the weights of the two matrices are dynamically adjusted using the gating mechanism to adapt to different heating scenarios; Diffusion graph convolution is used to aggregate multi-order neighborhood information to generate a hidden feature matrix and a dynamic propagation adjacency matrix, reflecting real-time spatial correlations and weakening the influence of irrelevant connections; The two adjacency matrices are fused to generate a gated adaptive adjacency matrix, avoiding the dominance of a single matrix in the prediction result, adaptively adjusting the adjacency weights, and reducing prediction lag; Spatial features are extracted based on diffusion graph convolution, and dynamic weight allocation strengthens the feature extraction of important spatial factors; Temporal features are extracted based on spatio-temporal embedding and the multi-head attention mechanism to learn temporal dependencies at different scales, and a more comprehensive temporal representation is obtained after splicing; The spatio-temporal features are fused and predicted to enhance the adaptability to different heating systems, reduce prediction bias, and improve the heat load prediction speed while ensuring accuracy.
[0101] Example 6, refer to Figure 1, this embodiment is based on the above - mentioned embodiment. In step S5, intelligent prediction collects real - time district heating data; the real - time district heating data includes time stamps, heating system data, building data, and meteorological data. After pre - processing the real - time district heating data, it is then optimized based on the effective feature set; the optimized real - time district heating data is input into the heat load prediction model for analysis, and according to the output data label, the heat load value corresponding to the real - time district heating data is obtained.
[0102] Embodiment Seven, refer to Figure 2 , this embodiment is based on the above - mentioned embodiment. A heat load prediction system for district heating provided by the present invention includes a data acquisition module, a data pre - processing module, a district heating data optimization module, a heat load prediction model construction module, and an intelligent prediction module;
[0103] The data acquisition module collects historical district heating data and sends the data to the data pre - processing module;
[0104] The data pre - processing module performs data cleaning, data encoding, and data normalization on the data and sends the data to the district heating data optimization module;
[0105] The district heating data optimization module combines the random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, fuses the Euclidean distance and mutual information, calculates the weighted distance and clusters, combines the centroid movement threshold, cluster purity threshold, and maximum number of iterations to complete cluster optimization, calculates the association purity based on mutual information and information entropy, screens and deletes redundant features according to the redundancy condition, and sends the data to the heat load prediction model construction module;
[0106] The heat load prediction model construction module calculates the similarity score and correlation coefficient between nodes, generates a bimodal - based adjacency matrix through a gating mechanism, generates a hidden feature matrix and a dynamic propagation adjacency matrix based on diffusion graph convolution, fuses the two adjacency matrices to generate a gated adaptive adjacency matrix, extracts spatial features based on diffusion graph convolution, extracts temporal features based on spatio - temporal embedding and multi - head attention mechanism, fuses to obtain spatio - temporal features and makes predictions, and sends the data to the intelligent prediction module;
[0107] The intelligent prediction module analyzes through the heat load prediction model to obtain the heat load value corresponding to the real - time district heating data.
[0108] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device.
[0109] Although embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention.
[0110] The above description of the present invention and its embodiments is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Generally speaking, if those of ordinary skill in the art are inspired by it and design similar structural modes and embodiments without creative efforts without departing from the purpose of the present invention, they shall fall within the protection scope of the present invention.
Claims
1. A method for predicting heat load for district heating, characterized in that: The method includes the following steps: Step S1: Data collection; Step S2: Data preprocessing; Step S3: District heating data optimization; combining the random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, fusing the Euclidean distance and mutual information, calculating the weighted distance and clustering, combining the centroid movement threshold, cluster purity threshold and maximum number of iterations to complete the clustering optimization, calculating the association purity based on mutual information and information entropy, and screening and deleting redundant features according to the redundancy condition; Step S4: Constructing a heat load prediction model; calculating the similarity score and correlation coefficient between nodes, generating a bimodal base adjacency matrix through a gating mechanism, generating a hidden feature matrix and a dynamic propagation adjacency matrix based on diffusion graph convolution, fusing the two adjacency matrices to generate a gated adaptive adjacency matrix, extracting spatial features based on diffusion graph convolution, extracting temporal features based on spatio-temporal embedding and multi-head attention mechanism, fusing to obtain spatio-temporal features and making predictions; Step S5: Intelligent prediction; In step S3, it includes step S31: Calculating the global significance of features; using a random forest model to obtain the importance score according to the average split gain of each feature in all decision trees; calculating the mutual information between each feature and the data label; combining the importance score and mutual information with weights to obtain the global significance of each feature in the district heating data.
2. The method for predicting heat load for district heating according to claim 1, wherein: In step S3, the district heating data optimization specifically includes the following steps: Step S31: Calculating the global significance of features; Step S32: Feature clustering optimization; Arrange all features of the district heating data in descending order of global significance, and select the first A features as the initial centroids; Combine the Euclidean distance and mutual information with weights, calculate the weighted distance between each feature and each centroid, and assign each feature to the cluster where the nearest centroid is located to obtain A clusters; Weight the features with global significance to generate A new centroids; Preset the centroid movement threshold γ, the cluster purity threshold ε, and the maximum number of iterations P, and perform clustering on the features again based on the new centroids until the movement distance of each cluster centroid is less than the centroid movement threshold , or the average mutual information between all features and the centroid in each cluster is greater than the cluster purity threshold , or when the maximum number of iterations is reached, stop the iterative clustering to obtain the final feature clustering set ; where and m a are the new centroid and the original centroid of the a-th cluster respectively, is the average mutual information between all features and the centroid in the a-th cluster, b1, b2, and b A are the first, second, and A-th clusters respectively, a is the cluster index, is the Euclidean distance; Step S33: Constructing an ordered feature set; Step S34: Feature screening; Step S35: Data optimization; only retaining the features in the effective feature set from the district heating data, eliminating all redundant features, completing the optimization of the district heating data, and constructing a training data set and a test data set.
3. A heat load prediction method for district heating according to claim 2, characterized in that: In step S34, for the feature screening, construct an empty set F, and for the ordered feature set E of each cluster a , select a the feature with the highest association purity in E as the main feature , delete a from E a and add it to F; check each remaining feature in E to see if it satisfies the redundancy condition . If satisfies the redundancy condition, then take a as a redundant feature and delete it from E a to obtain the updated E a ; select the feature with the highest association purity from the updated E a as the new main feature, then delete the new main feature from E a and add it to F, and then screen and delete redundant features from E a again according to the new main feature until E a is empty; after all the ordered feature sets of all clusters are empty, an effective feature set is obtained; where E is the ordered feature set of the a-th cluster, is the main feature of the a-th cluster, is the true data label of the centroid in the a-th cluster, is and the association purity between is and the association purity between 4. A heat load prediction method for district heating according to claim 2, characterized in that: In step S33, the constructing of the ordered feature set; For each cluster, calculate the association purity between each feature in the cluster and the data label according to mutual information and information entropy; arrange all the features in each cluster in descending order of association purity to obtain the ordered feature set of each cluster; The formula used is as follows: ; Wherein, is the k-th feature in the a-th cluster, is and the association purity between, is and the mutual information between, and are respectively and the information entropy of.
5. A method for predicting heat load for district heating according to claim 1, characterized in that: In step S4, the constructing of the heat load prediction model specifically includes the following steps: Step S41: Construct a bimodal base adjacency matrix; regard each feature of the district heating data in the training dataset as a node; use the Gaussian kernel function to calculate the similarity score between every two nodes and construct a similarity adjacency matrix G sim ; use the Pearson correlation coefficient to calculate the correlation coefficient between every two nodes and construct a correlation adjacency matrix G cor ; fuse the similarity adjacency matrix and the correlation adjacency matrix through a gating mechanism to generate a bimodal base adjacency matrix ; Step S42: Construct a dynamic propagation adjacency matrix; use 1×1 convolution to compress the features of the original time series of the training dataset to generate an initial feature matrix L 0 ; Input the input feature matrix L q and of the q-th spatio-temporal layer into the diffusion-based graph convolutional network. Through S-order diffusion graph convolutional operations, aggregate multi-order neighborhood information to obtain a hidden feature matrix. Calculate the spatial similarity between nodes using the hidden feature matrix, and generate a dynamic propagation adjacency matrix through matrix inner product and softmax normalization operations; Step S43: Construct a gated adaptive adjacency matrix; generate a gated adaptive adjacency matrix by fusing the bimodal base adjacency matrix and the dynamic propagation adjacency matrix through a gating mechanism ; Step S44: Extract spatial features; input L q and into the diffusion graph convolutional network. Through the S-order diffusion graph convolutional operation, aggregate the multi-hop neighborhood information of nodes to generate the spatial feature matrix ; where is the spatial feature matrix extracted by the q-th spatio-temporal layer; Step S45: Extracting temporal features; Step S46: Prediction; Combine and through residual connection to generate a spatio-temporal feature matrix ; Input the spatio-temporal feature matrix extracted from the last spatio-temporal layer into the prediction layer to obtain the predicted data label; where is the enhanced temporal feature matrix extracted from the q-th spatio-temporal layer, is the spatio-temporal feature matrix extracted from the q-th spatio-temporal layer, q max is the number of spatio-temporal layers, is the spatio-temporal feature matrix extracted from the last spatio-temporal layer.
6. A method for predicting heat load for district heating according to claim 5, characterized in that: In step S45, the timing features are extracted; and are combined with the learning time position matrix M to generate a spatio-temporal embedding matrix ; through linear transformation, are respectively mapped to a query matrix Q, a key matrix K, and a value matrix V, the scaled dot product of Q and the transpose of K is calculated, and after softmax normalization, it is weighted and summed with V to obtain an attention value. The multi-head attention mechanism is used to learn different representations through multiple attention heads, the outputs of multiple attention heads are concatenated, and after being integrated through a fully connected layer, a timing feature matrix is obtained. Using a two-layer feed-forward neural network, the timing features are further extracted from to generate an enhanced timing feature matrix ; where is the spatio-temporal embedding matrix of the q-th spatio-temporal layer, and is the timing feature matrix extracted from the q-th spatio-temporal layer.
7. A heat load prediction method for district heating according to claim 1, characterized in that: In step S1, the data collection is to collect historical district heating data; the historical district heating data includes time stamps, heating system data, building data, meteorological data and heat load values, and the heat load value is used as the data label; In step S2, the data preprocessing is to perform data cleaning, data encoding and data normalization on the data.
8. A heat load prediction method for district heating according to claim 1, characterized in that: In step S5, the intelligent prediction is to collect real-time district heating data; the real-time district heating data includes time stamps, heating system data, building data and meteorological data, preprocess the real-time district heating data, and then optimize the real-time district heating data based on the effective feature set; input the optimized real-time district heating data into the heat load prediction model for analysis, and obtain the heat load value corresponding to the real-time district heating data according to the output data label.
9. A heat load prediction system for district heating, which is used to implement a heat load prediction method for district heating according to any one of claims 1-8, characterized in that: It includes a data acquisition module, a data preprocessing module, a district heating data optimization module, a heat load prediction model construction module, and an intelligent prediction module; The data acquisition module acquires historical district heating data and sends the data to the data preprocessing module; The data preprocessing module performs data cleaning, data encoding, and data normalization on the data and sends the data to the district heating data optimization module; The district heating data optimization module combines the random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, fuses the Euclidean distance and mutual information, calculates the weighted distance and performs clustering, combines the centroid movement threshold, cluster purity threshold, and maximum number of iterations to complete clustering optimization, calculates the association purity based on mutual information and information entropy, filters and deletes redundant features according to the redundancy condition, and sends the data to the heat load prediction model construction module; The heat load prediction model construction module calculates the similarity score and correlation coefficient between nodes, generates a bimodal base adjacency matrix through a gating mechanism, generates a hidden feature matrix and a dynamic propagation adjacency matrix based on diffusion graph convolution, fuses the two adjacency matrices to generate a gated adaptive adjacency matrix, extracts spatial features based on diffusion graph convolution, extracts temporal features based on spatio-temporal embedding and multi-head attention mechanism, fuses to obtain spatio-temporal features and makes predictions, and sends the data to the intelligent prediction module; The intelligent prediction module analyzes through the heat load prediction model to obtain the heat load value corresponding to the real-time district heating data.
Citation Information
Patent Citations
A building cooling and heating load forecasting method based on stochastic forest
CN109543203A
Space-time diagram node attribute prediction method fusing adaptive graph diffusion convolutional network
CN115828990A
Path loss modeling method fusing urban spatial form
CN117478257A
Load prediction method based on fusion of attention mechanism and spatio-temporal characteristics
CN118940919A
Index recommendation method and device, electronic equipment and storage medium
CN119739922A
Cited By
Multi-element load hybrid prediction method, system and equipment of integrated energy system and medium
CN120855331A
Intelligent prediction method and system for heating load of heating station
CN120911708A
Intelligent heat supply energy load prediction method
CN122175102A
Intelligent heating energy load prediction method
CN122175102B