A heat load prediction method and system for district heating

By combining random forest split gain and mutual information for feature clustering screening, diffusion graph convolution and multi-head attention mechanisms are used to generate a gated adaptive adjacency matrix, the problem of high-dimensional features and nonlinear coupling relationship of regional heating data is solved, and more accurate and fast thermal load prediction is achieved.

CN120317455BActive Publication Date: 2025-08-26BEIJING KINGFORE HV & ENERGY CONSERVATION TECH CORP

Patent Information

Application Number
CN202510797020.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-08-26
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

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.

Method used

The random forest split gain and mutual information are combined to calculate the global significance of the feature and cluster it to screen key features; the gated adaptive adjacency matrix is ​​generated through diffusion graph convolution and multi-head attention mechanism, and the spatiotemporal features are extracted, and the adjacency weight is dynamically adjusted to adapt to different heating scenarios.

Benefits of technology

It improves the accuracy and speed of thermal load prediction, reduces noise interference, enhances adaptability to complex heating scenarios, and reduces prediction deviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120317455B_ABST
    Figure CN120317455B_ABST
Patent Text Reader

Abstract

The present invention discloses a heat load prediction method and system for district heating, belonging to the field of data processing technology. The method includes: data collection, data preprocessing, district heating data optimization, construction of a heat load prediction model, and intelligent prediction. This solution combines random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, fuse Euclidean distance and mutual information, calculate weighted distance and perform clustering, calculate association purity based on mutual information and information entropy, and filter and delete redundant features based on redundancy conditions; 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, and extract temporal features based on spatiotemporal embedding and multi-head attention mechanism, thereby reducing prediction bias and improving the heat load prediction speed while ensuring accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, and specifically relates to a heat load prediction method and system for district heating. Background Art

[0002] The heat load forecasting method is based on artificial intelligence technology. It analyzes multi-dimensional information of historical regional heating, explores the dynamic change patterns in heating data, identifies key factors affecting heat load, and realizes accurate heat load forecasting, providing scientific decision-making basis for heating companies and realizing refined management and control of smart heating and energy.

[0003] However, the existing heat load forecasting methods have the problem that regional heating data has high-dimensional characteristics, and there is a nonlinear coupling relationship between the characteristics, which is susceptible to noise interference, increasing the complexity of data processing and making it difficult to accurately capture the law of heat load changes, resulting in large deviations in the heat load forecast results; the existing heat load forecasting methods have the problem that the correlation patterns between regional heating data features are complex and have spatiotemporal dynamics. Traditional methods have poor adaptability to complex heating scenarios and it is difficult to balance the synergistic influence of spatial dependence and temporal dynamics, resulting in delayed heat load forecasting or serious disconnection between the results and reality. Summary of the Invention

[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a method and system for heat load prediction for regional heating. In view of the problem in the existing heat load prediction method that regional heating data has high-dimensional features and there is a nonlinear coupling relationship between features, which is susceptible to noise interference, increases the complexity of data processing, and is difficult to accurately capture the law of heat load changes, resulting in a large deviation in the heat load prediction results, this solution combines random forest split gain and mutual information to obtain the global significance of the features and select the initial centroid; integrates Euclidean distance and mutual information, and reduces the computational complexity of subsequent feature screening by clustering; calculates correlation purity based on mutual information and information entropy, and quickly identifies the features that have the greatest impact on the heat load in each cluster; screens and deletes redundant features according to redundant conditions, and retains only a few key features in each cluster; Existing heat load forecasting methods have complex correlation patterns between regional heating data features and are spatiotemporal dynamics. Traditional methods have poor adaptability to complex heating scenarios and find it difficult to balance the synergistic effects of spatial dependence and temporal dynamics, resulting in delayed heat load forecasts or serious disconnection between the results and actual results. This scheme calculates the similarity scores and correlation coefficients between nodes, generates a bimodal base adjacency matrix through a gating mechanism, and uses diffuse 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 associations. The two adjacency matrices are fused to generate a gated adaptive adjacency matrix to reduce prediction lag. Spatial features are extracted based on diffuse graph convolution, and temporal features are extracted based on spatiotemporal embedding and multi-head attention mechanisms, enhancing adaptability to different heating systems and improving the speed of heat load forecasting while ensuring accuracy.

[0005] The technical solution adopted by the present invention is as follows: The present invention provides a heat load prediction method for district heating, the method comprising the following steps:

[0006] Step S1: data collection;

[0007] Step S2: data preprocessing;

[0008] Step S3: district heating data optimization;

[0009] Step S4: constructing a heat load prediction model;

[0010] Step S5: Intelligent prediction.

[0011] Furthermore, in step S1, the data collection is to collect historical district heating data; the historical district heating data includes a timestamp, heating system data, building data, meteorological data and heat load value, and the heat load value is used as a data label.

[0012] Furthermore, in step S2, the data preprocessing is to perform data cleaning, data encoding and data normalization on the data.

[0013] Furthermore, in step S3, the district heating data optimization specifically includes the following steps:

[0014] Step S31: Calculate the global significance of the feature; use the random forest model to obtain the importance score based on 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 mutual information weightedly to obtain the global significance of each feature in the district heating data;

[0015] Step S32: Feature clustering optimization; all features of the district heating data are arranged in descending order according to the size of the global significance, and the first A features are selected as the initial centroids; the Euclidean distance and mutual information are weighted to calculate the weighted distance between the feature and each centroid, and each feature is assigned to the cluster with the nearest centroid to obtain A clusters; the features are weighted by the global significance to generate new A centroids; the centroid movement threshold γ, cluster purity threshold ε and maximum number of iterations P are pre-set, and the features are clustered again based on the new centroids until the movement distance of each cluster centroid is less than the centroid movement threshold in each iteration , or the average mutual information of all features and centroids in each cluster is greater than the cluster purity threshold , or when the maximum number of iterations is reached, stop iterative clustering and get the final feature clustering set ;in, and m a are the new centroid and original centroid of the a-th cluster respectively, is the average mutual information of all features and centroids in cluster a, b1, b2 and b A are the 1st, 2nd and Ath 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 in the cluster based on mutual information and information entropy; arrange all features in each cluster in descending order of association purity to obtain an ordered feature set for each cluster; the formula used is as follows:

[0017] ;

[0018] Where, is the kth feature in the ath cluster, is the true data label of the centroid in the a-th cluster, yes and The purity of the correlation between yes and The mutual information between and They are and Information entropy of

[0019] Step S34: Feature screening; construct an empty set F, an ordered feature set E for each cluster a , select E a The feature with the highest correlation purity is taken as the main feature ,Will From E a Delete and add to F; check E a Each remaining feature in Whether Satisfy redundancy conditions ,like If the redundancy condition is met, As redundant features from E a Delete it and get the updated E a ; From the updated E a Select the feature with the highest correlation purity as the new main feature, and then add the new main feature from E a Delete and add to F, and then remove from E again according to the new main feature a Filter redundant features and delete them until E a is empty; when the ordered feature sets of all clusters are empty, the valid feature set is obtained; where E a is the ordered feature set of the a-th cluster, is the main feature of the a-th cluster, is the gth remaining feature in the ath cluster, yes and The purity of the correlation between yes and purity of the association between

[0020] Step S35: Data optimization; retain only the features in the valid feature set from the district heating data, remove 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 dataset as a node; use the Gaussian kernel function to calculate the similarity score between each two nodes and construct the similarity adjacency matrix G sim ; Use the Pearson correlation coefficient to calculate the correlation coefficient between each two nodes and construct the related adjacency matrix G cor; The similar adjacency matrix and the related adjacency matrix are fused through the gating mechanism to generate a bimodal base adjacency matrix ;

[0023] Step S42: Construct a dynamic propagation adjacency matrix; use 1×1 convolution to perform feature compression on the original time series of the training dataset to generate the initial feature matrix L 0 ; The input feature matrix L of the qth spatiotemporal layer q and The input is fed into a diffusion-based graph convolutional network. Through an S-order diffusion graph convolution operation, multi-order neighborhood information is aggregated to obtain a hidden feature matrix. The hidden feature matrix is ​​used to calculate the spatial similarity between nodes. 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 the gating mechanism to generate a gated adaptive adjacency matrix ;

[0025] Step S44: Extract spatial features; q and Input to the diffusion graph convolution network, through the S-order diffusion graph convolution operation, aggregate the node multi-hop neighborhood information and generate a spatial feature matrix ;

[0026] Step S45: extracting time series features; Combined with the learned time position matrix M to generate the spatiotemporal embedding matrix ; Through linear transformation They are mapped to query matrix Q, key matrix K and value matrix V respectively, and the scaled dot product of Q and K transpose is calculated. After softmax normalization, the weighted sum is obtained with V to obtain the attention value. The multi-head attention mechanism is used to learn different representations through multiple attention heads, splice the outputs of multiple attention heads, and integrate them through the fully connected layer to obtain the time series feature matrix , using a two-layer feedforward neural network from Further extract the time series features and generate the enhanced time series feature matrix ;

[0027] Step S46: Prediction; and Generate spatiotemporal feature matrix through residual connection fusion ; The spatiotemporal feature matrix extracted from the last spatiotemporal layer Input to the prediction layer to get the predicted data label.

[0028] Furthermore, in step S5, the intelligent prediction is to collect real-time district heating data; the real-time district heating data includes timestamp, heating system data, building data and meteorological data. After preprocessing the real-time district heating data, the real-time district heating data is 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 the heat load value corresponding to the real-time district heating data is obtained according to the output data label.

[0029] The present invention provides a heat load prediction system for district heating, comprising a data acquisition module, a data preprocessing module, a district heating data optimization module, a heat load prediction model building module and an intelligent prediction module;

[0030] The data acquisition 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 random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, integrates Euclidean distance and mutual information, calculates weighted distance and performs clustering, combines centroid movement threshold, cluster purity threshold and maximum number of iterations to complete clustering optimization, calculates association purity based on mutual information and information entropy, filters and deletes redundant features according to redundancy conditions, and sends the data to the heat load prediction model construction module;

[0033] The heat load prediction model module calculates the similarity scores and correlation coefficients 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 spatiotemporal embedding and multi-head attention mechanism, fuses the spatiotemporal features and performs prediction, and sends the data to the intelligent prediction module;

[0034] The intelligent prediction module performs analysis through a heat load prediction model to obtain a 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 problem in existing heat load prediction methods that district heating data has high-dimensional features and nonlinear coupling relationships between features, it is easy to be interfered by noise, which increases the complexity of data processing and makes it difficult to accurately capture the law of heat load changes, resulting in large deviations in heat load prediction results, this scheme combines random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, integrate nonlinear relationships and statistical dependencies, and more comprehensively characterize the impact of features on heat load; integrate Euclidean distance and mutual information, calculate weighted distance and perform clustering, and optimize clustering based on centroid movement threshold, cluster purity threshold and maximum number of iterations. Clustering reduces the computational complexity of subsequent feature screening while retaining the intrinsic structure between features to avoid overfitting or underfitting; calculates correlation 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 redundant conditions to complete data optimization, retaining only a few key features in each cluster, reducing noise interference, improving data processing efficiency, and being able to more accurately capture the law of heat load changes and improve heat load prediction accuracy.

[0037] (2) In view of the fact that the correlation patterns between regional heating data features in existing heat load forecasting methods are complex and have spatiotemporal dynamics, 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 delayed heat load forecasting or serious disconnection between the results and the actual situation, this scheme calculates the similarity scores and correlation coefficients between nodes, generates a bimodal base adjacency matrix through a gating mechanism, captures the nonlinear and linear correlations between features respectively, sets a threshold to filter low signal-to-noise ratio connections, and uses a 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 hidden feature vectors. The feature matrix and the dynamic propagation adjacency matrix reflect real-time spatial correlation and weaken the influence of irrelevant connections; the two adjacency matrices are fused to generate a gated adaptive adjacency matrix to avoid a single matrix dominating the prediction results, adaptively adjust the adjacency weights, and reduce prediction lag; spatial features are extracted based on diffuse graph convolution, and dynamic weight allocation is used to enhance the feature extraction of important spatial factors; temporal features are extracted based on spatiotemporal embedding and multi-head attention mechanism, temporal dependencies of different scales are learned, and a more comprehensive temporal representation is obtained after splicing; the spatiotemporal features are fused and predicted to enhance adaptability to different heating systems, reduce prediction deviation, and improve the speed of heat load prediction while ensuring accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic flow chart of a heat load prediction method for district heating provided by the present invention;

[0039] Figure 2 A schematic diagram of a heat load forecasting system for district heating provided by the present invention;

[0040] Figure 3 Schematic diagram of the process of step S3;

[0041] Figure 4 Schematic diagram of the process of step S4.

[0042] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0044] In the description of the present invention, it should be understood that terms such as "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the present invention.

[0045] Example 1, see Figure 1 The present invention provides a method for predicting heat load for district heating, the method comprising the following steps:

[0046] Step S1: Data collection: Collect historical district heating data;

[0047] Step S2: Data preprocessing: data cleaning, data encoding and data normalization;

[0048] Step S3: District heating data optimization: Combine the random forest split gain and mutual information to obtain the global significance of the feature 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. 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 spatiotemporal embedding and multi-head attention mechanism, fuse the spatiotemporal features and perform prediction;

[0050] Step S5: Intelligent prediction: Analyze the heat load prediction model to obtain the heat load value corresponding to the real-time district heating data.

[0051] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, 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;

[0052] The heating system data includes pipe network parameters and equipment status. The pipe network parameters include water supply 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 3, see Figure 1 ,This embodiment is based on the above embodiment.,In step S2, data preprocessing is to perform data cleaning, data encoding and data normalization on the data;

[0056] The data cleaning is to remove the error values, missing values ​​and abnormal values ​​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 the numerical data into the same range using the maximum-minimum scaling method.

[0059] Example 4, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S3, the district heating data optimization specifically includes the following contents:

[0060] Step S31: Calculate the global significance of the features. Heat load prediction involves multi-dimensional features. Different features have different effects on the load and may contain redundancy or noise. Traditional methods find it difficult to quantify the comprehensive importance of features. The random forest split gain captures the nonlinear relationship between features and heat load, the mutual information measures the statistical dependence of features and heat load, and the redundancy penalty term avoids repeated contributions 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. Using the random forest model, the importance score is obtained based on the average split gain of each feature in all decision trees. The mutual information between each feature and the data label is calculated. The importance score and mutual information are weighted and combined to obtain the global significance 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 kth and lth features in the district heating data, k and l are feature indices, I k is x k The importance score, N trees is the total number of decision trees in the random forest, is x k The split gain in the t-th decision tree, t is the decision tree index, X k is x k The sample space of all possible values ​​of is, and Y is the label space of all possible values ​​of y. is x k The mutual information with label y, is x k with x l The mutual information of is x k The joint probability distribution with the label y, and They are x k and the marginal probability distribution of label y, Z k is x k The global significance of , α is the first weight coefficient in the range of [0.3, 0.7], and β is the second weight coefficient in the range of [0.1, 0.5];

[0065] Step S32: Feature clustering optimization; there may be natural groupings of heat load features. Traditional clustering methods rely only on Euclidean distance and cannot capture the semantic associations between features. Euclidean distance ensures that features with similar values ​​are grouped together, and mutual information brings together statistically related features. Even if the numerical scales are different, the centroid is weighted by global significance, so that the cluster center is more biased towards high-importance features, and the termination condition is flexible. The cluster purity threshold ensures the consistency of the correlation between features and heat load within the cluster, and the centroid movement threshold avoids overfitting. All features of the district heating data are arranged in descending order of global significance, and the first A features are selected as the initial centroids. The Euclidean distance and mutual information are weighted and combined to calculate the weighted distance between the feature and each centroid. Each feature is assigned to the cluster with the nearest centroid to obtain A clusters. The features are weighted by global significance to generate new A centroids. The centroid movement threshold γ, cluster purity threshold ε and maximum number of iterations P are pre-set, and the features are clustered again based on the new centroids until the movement distance of the centroid of each cluster is less than the centroid movement threshold in each iteration. , or the average mutual information of all features and centroids in each cluster is greater than the cluster purity threshold , or when the maximum number of iterations is reached, stop iterative clustering and get the final feature clustering set ; The formula used is as follows:

[0066] ;

[0067] ;

[0068] Where, and m a are the new centroid and original centroid of the a-th cluster respectively, is the average mutual information of all features and centroids in cluster a, b1, b2, b a and b A They are the 1st, 2nd, ath and Ath clusters respectively, where a is the cluster index. is the Euclidean distance, γ is [10 -4 , 10 -2 ], ε is the centroid moving threshold in the range of [0.6, 0.9], P is the maximum number of iterations in the range of [50, 150], λ is the balance coefficient in the range of [0.2, 0.8], is x k and m a The weighted distance between is x k With m a The mutual information of is the maximum mutual information between all features and the centroid;

[0069] Step S33: Construct an ordered feature set; the contributions of features within the same cluster to the heat load may vary significantly, and it is necessary to further distinguish between core features and auxiliary features; the correlation purity combines mutual information and information entropy to quantify the explanatory efficiency of features and heat load, and the cluster sorting ensures that each cluster prioritizes features directly related to the load; for each cluster, the correlation purity between each feature and the data label within the cluster is calculated based on the mutual information and information entropy; all features in each cluster are sorted in descending order according to the size of the correlation purity to obtain an ordered feature set for each cluster; the formula used is as follows:

[0070] ;

[0071] Where, is the kth feature in the ath cluster, is the true data label of the centroid in the a-th cluster, yes and The purity of the correlation between yes and The mutual information between and They are and Information entropy of

[0072] Step S34: Feature screening; In heat load prediction, features of the same cluster may be highly redundant. Directly retaining all features will lead to overfitting of the model. Main feature selection is used to retain the most representative features of each cluster; an empty set F is constructed, and for each cluster, an ordered feature set E is constructed. a , select E a The feature with the highest correlation purity is taken as the main feature ,Will From E a Delete and add to F; check E a Each remaining feature in Whether Satisfy redundancy conditions ,like If the redundancy condition is met, As redundant features from E a Delete it and get the updated E a ; From the updated E a Select the feature with the highest correlation purity as the new main feature, and then add the new main feature from E a Delete and add to F, and then remove from E again according to the new main feature a Filter redundant features and delete them until E a is empty; when the ordered feature sets of all clusters are empty, the valid feature set is obtained; where E ais the ordered feature set of the a-th cluster, is the main feature of the a-th cluster, is the gth remaining feature in the ath cluster, yes and The purity of the correlation between yes and purity of the association between

[0073] Step S35: Data optimization; the original district heating data often contains a large number of low-value or repeated features. Direct modeling will reduce efficiency and introduce noise. Only valid features are retained, redundancy is eliminated, and a high-quality data set is constructed; only features in the valid feature set are retained from the district heating data, all redundant features are eliminated, the district heating data is optimized, and a training data set and a test data set are constructed.

[0074] By performing the above operations, we address the problem in existing heat load forecasting methods that district heating data has high-dimensional features and nonlinear coupling relationships between features, which makes it susceptible to noise interference, increases the complexity of data processing, makes it difficult to accurately capture the variation patterns of heat load, and leads to large deviations in heat load forecasting results. This solution combines random forest split gain and mutual information to obtain the global significance of features and select initial centroids, integrating nonlinear relationships with statistical dependencies to more comprehensively characterize the impact of features on heat load. Euclidean distance and mutual information are combined to calculate weighted distances and perform clustering. Clustering optimization is performed based on centroid movement threshold, cluster purity threshold, and maximum number of iterations. Clustering reduces the computational complexity of subsequent feature screening while preserving the intrinsic structure between features to avoid overfitting or underfitting. Correlation purity is calculated based on mutual information and information entropy to quickly identify the features with the greatest impact on heat load in each cluster. Redundant features are filtered and deleted based on redundancy conditions to complete data optimization, retaining only a few key features in each cluster. This reduces noise interference, improves data processing efficiency, and can more accurately capture the variation patterns of heat load, thereby improving heat load forecasting accuracy.

[0075] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In step S4, building a heat load prediction model specifically includes the following steps:

[0076] Step S41: Construct a bimodal base adjacency matrix; the district heating data contains multiple types of features, and the correlation patterns between different features are complex. The traditional single matrix cannot fully characterize the complex relationship between features; the nonlinear similarity between features is captured by the Gaussian kernel function, the linear correlation between features is quantified by the Pearson coefficient, the low signal-to-noise ratio connection is filtered by the threshold to reduce noise interference, and the weights of the two modes are dynamically balanced by the gating mechanism to more comprehensively characterize the node relationship and avoid the deviation of a single mode; each feature of the district heating data in the training data set is regarded as a node; the Gaussian kernel function is used to calculate the similarity score between each two nodes to construct the similarity adjacency matrix G sim ; Use the Pearson correlation coefficient to calculate the correlation coefficient between each two nodes and construct the related adjacency matrix G cor ; The similar adjacency matrix and the related adjacency matrix are fused through the gating mechanism to generate a bimodal base adjacency matrix ; The formula used is 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 the node indices, σ is the bandwidth parameter of the Gaussian kernel function, δ is the threshold of the similarity score in the range of [0.3, 0.7], It is c i and c j The similarity score between It is c i and c j The Pearson correlation coefficient between is the threshold value of the correlation coefficient in the range [0.4, 0.8], It is c i and c j The correlation coefficient between and are the normalized similarity adjacency matrix and correlation adjacency matrix, and is a linear transformation function, is the Sigmoid activation function, f1 is the first gating weight;

[0082] Step S42: Construct a dynamic propagation adjacency matrix; the regional heating load is spatiotemporal dynamic, and traditional static graphs cannot capture the spatial dependencies that evolve over time; aggregate multi-order neighborhood information through S-order diffusion operations to model spatial propagation paths, calculate node spatial similarity based on the inner product of hidden features, and generate dynamic weights through softmax to reflect real-time spatial associations; use 1×1 convolution to compress the original time series of the training dataset to generate the initial feature matrix L 0 ; The input feature matrix L of the qth spatiotemporal layer q and The input is fed into a diffusion-based graph convolutional network. Through an S-order diffusion graph convolution operation, multi-order neighborhood information is aggregated to obtain a hidden feature matrix. The hidden feature matrix is ​​used to calculate the spatial similarity between nodes. The dynamic propagation adjacency matrix is ​​generated through matrix inner product and softmax normalization operations. The formula used is as follows:

[0083] ;

[0084] ;

[0085] Where, is the hidden feature matrix after the qth layer diffusion graph convolution, L q is the input feature matrix of the qth spatiotemporal layer, S is the diffusion order, s is the number of diffusion steps, yes The sth power, W1 is the first weight matrix, is the dynamic propagation adjacency matrix generated by the qth spatiotemporal layer, and T is the transpose operation;

[0086] Step S43: Construct a gated adaptive adjacency matrix; there may be a conflict between the bimodal base adjacency matrix and the dynamic propagation adjacency matrix, and it is necessary to dynamically balance the two to adapt to changes in working conditions; adjust through the gating mechanism to avoid the failure of a single matrix under extreme working conditions; fuse the bimodal base adjacency matrix and the dynamic propagation adjacency matrix through the gating mechanism to generate a gated adaptive adjacency matrix ; The formula used is as follows:

[0087] ;

[0088] ;

[0089] Where, and is the linear transformation function, f2 is the second gating weight;

[0090] Step S44: Extract spatial features; the spatial distribution of regional heating load is affected by multiple factors, and it is necessary to model the multi-hop dependency relationship between nodes. Through diffusion graph convolution, multi-hop neighborhood information is aggregated to capture the hierarchical effect of spatial propagation, dynamically adjust the weights of different neighborhoods, and highlight the key spatial influencing factors; L q and Input to the diffusion graph convolution network, through the S-order diffusion graph convolution operation, aggregate the node multi-hop neighborhood information and generate a spatial feature matrix ; The formula used is as follows:

[0091] ;

[0092] Where, is the spatial feature matrix extracted by the qth spatiotemporal layer, W2 is the second weight matrix, yes s to the power of;

[0093] Step S45: Extracting time series features; heat load has strong time series periodicity and trend, and traditional methods are difficult to capture multi-scale time patterns simultaneously; modeling the spatiotemporal coupling relationship, splicing and integrating multi-scale time series features, and further extracting nonlinear time series dependencies to enhance the expression ability of time series features; Combined with the learned time position matrix M to generate the spatiotemporal embedding matrix ; Through linear transformation They are mapped to query matrix Q, key matrix K and value matrix V respectively, and the scaled dot product of Q and K transpose is calculated. After softmax normalization, the weighted sum is obtained with V to obtain the attention value. The multi-head attention mechanism is used to learn different representations through multiple attention heads, splice the outputs of multiple attention heads, and integrate them through the fully connected layer to obtain the time series feature matrix , using a two-layer feedforward neural network from Further extract the time series features and generate the enhanced time series feature matrix ; The formula used is as follows:

[0094] ;

[0095] ;

[0096] in, is the spatiotemporal embedding matrix of the qth spatiotemporal layer, is the temporal feature matrix extracted by the qth spatiotemporal layer, is a fully connected layer, It is a splicing operation, head1 and head U are the outputs of the 1st and Uth attention heads respectively, where U is the number of attention heads, is the enhanced temporal feature matrix extracted by the qth spatiotemporal layer;

[0097] Step S46: Prediction; Regional heating load prediction requires the integration of spatiotemporal 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. and Generate spatiotemporal feature matrix through residual connection fusion ; The spatiotemporal feature matrix extracted from the last spatiotemporal layer Input to the prediction layer to get the predicted data label; the formula used is as follows:

[0098] ;

[0099] in, is the predicted data label, Conv 1×1 is a 1×1 convolution, is the spatiotemporal feature matrix extracted by the qth spatiotemporal layer, q max is the number of space-time layers, It is the spatiotemporal feature matrix extracted by the last spatiotemporal layer.

[0100] By performing the above operations, in view of the fact that the correlation patterns between regional heating data features in existing heat load forecasting methods are complex and have spatiotemporal dynamics, traditional methods have poor adaptability to complex heating scenarios, and it is difficult to balance the synergistic effects of spatial dependence and temporal dynamics, resulting in delayed heat load forecasting or serious disconnection between results and reality, this scheme calculates the similarity scores and correlation coefficients between nodes, generates a bimodal basis adjacency matrix through a gating mechanism, captures the nonlinear and linear correlations between features respectively, sets a threshold to filter low signal-to-noise ratio connections, and uses a 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 The hidden feature matrix and the dynamic propagation adjacency matrix reflect real-time spatial correlation and weaken the influence of irrelevant connections; the two adjacency matrices are fused to generate a gated adaptive adjacency matrix to avoid a single matrix dominating the prediction results, adaptively adjust the adjacency weights, and reduce prediction lag; spatial features are extracted based on diffuse graph convolution, and dynamic weight allocation is used to enhance the feature extraction of important spatial factors; temporal features are extracted based on spatiotemporal embedding and multi-head attention mechanisms, temporal dependencies at different scales are learned, and a more comprehensive temporal representation is obtained after splicing; the spatiotemporal features are fused and predicted to enhance adaptability to different heating systems, reduce prediction deviation, and improve the speed of heat load prediction while ensuring accuracy.

[0101] Example 6, see Figure 1This embodiment is based on the above embodiment. In step S5, intelligent prediction collects real-time district heating data; the real-time district heating data includes timestamp, heating system data, building data and meteorological data. After preprocessing the real-time district heating data, the real-time district heating data is 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 the heat load value corresponding to the real-time district heating data is obtained according to the output data label.

[0102] Example 7, see Figure 2 This embodiment is based on the above embodiment. The present invention provides a heat load prediction system for district heating, including a data acquisition module, a data preprocessing module, a district heating data optimization module, a heat load prediction model building module and an intelligent prediction module;

[0103] The data acquisition module collects historical district heating data and sends the data to the data preprocessing module;

[0104] 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;

[0105] The district heating data optimization module combines random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, integrates Euclidean distance and mutual information, calculates weighted distance and performs clustering, combines centroid movement threshold, cluster purity threshold and maximum number of iterations to complete clustering optimization, calculates association purity based on mutual information and information entropy, filters and deletes redundant features according to redundancy conditions, and sends the data to the heat load prediction model construction module;

[0106] The heat load prediction model module calculates the similarity scores and correlation coefficients 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 spatiotemporal embedding and multi-head attention mechanism, fuses the spatiotemporal features and performs prediction, and sends the data to the intelligent prediction module;

[0107] The intelligent prediction module performs analysis through a heat load prediction model to obtain a heat load value corresponding to the real-time district heating data.

[0108] It should be noted that, in this document, relational terms such as first and second, etc., are used only 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 terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0109] While the embodiments of the present invention have been shown and described, it will be apparent to those skilled in the art that various changes, modifications, substitutions, and alterations can be made to the embodiments without departing from the principles and spirit of the invention.

[0110] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.

Claims

1. A heat load prediction method for district heating, characterized by: The method comprises the following steps: Step S1: data collection; Step S2: data preprocessing; Step S3: District heating data optimization: Combine the random forest split gain and mutual information to obtain the global significance of the feature 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. Screen and delete redundant features according to the redundancy condition. 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 bimodal base adjacency matrix and the dynamic propagation adjacency matrix to generate a gated adaptive adjacency matrix, extract spatial features based on diffusion graph convolution, extract temporal features based on spatiotemporal embedding and multi-head attention mechanism, fuse the spatiotemporal features and perform prediction; Step S5: intelligent prediction; Step S3 includes step S31: calculating the global significance of the feature; using a random forest model to obtain an importance score based on the average split gain of each feature in all decision trees; calculating the mutual information between each feature and the data label; and combining the importance score and the mutual information weightedly to obtain the global significance of each feature in the district heating data; In step S1, the data collection is to collect historical district heating data; the historical district heating data includes a timestamp, heating system data, building data, meteorological data and heat load value, and the heat load value is used as a data label.

2. A heat load prediction method for district heating according to claim 1, characterized in that: In step S3, the district heating data optimization specifically includes the following steps: Step S31: Calculate the global saliency of the feature; Step S32: Feature clustering optimization; all features of the district heating data are arranged in descending order according to the size of the global significance, and the first A features are selected as the initial centroids; the Euclidean distance and mutual information are weighted to calculate the weighted distance between the feature and each centroid, and each feature is assigned to the cluster with the nearest centroid to obtain A clusters; the features are weighted by the global significance to generate new A centroids; the centroid movement threshold γ, cluster purity threshold ε and maximum number of iterations P are pre-set, and the features are clustered again based on the new centroids until the movement distance of each cluster centroid is less than the centroid movement threshold in each iteration , or the average mutual information of all features and centroids in each cluster is greater than the cluster purity threshold , or when the maximum number of iterations is reached, stop iterative clustering and get the final feature clustering set ;in, and m a are the new centroid and original centroid of the a-th cluster respectively, is the average mutual information of all features and centroids in cluster a, b1, b2 and b A are the 1st, 2nd and Ath 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; retain only the features in the valid feature set from the district heating data, remove all redundant features, complete the optimization of the district heating data, and construct 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, the feature screening is performed; an empty set F is constructed, and the ordered feature set E of each cluster is a , select E a The feature with the highest correlation purity is taken as the main feature ,Will From E a Delete and add to F; check E a Each remaining feature in Whether Satisfy redundancy conditions ,like If the redundancy condition is met, As redundant features from E a Delete it and get the updated E a ; From the updated E a Select the feature with the highest correlation purity as the new main feature, and then add the new main feature from E a Delete and add to F, and then remove from E again according to the new main feature a Filter redundant features and delete them until E a is empty; when the ordered feature sets of all clusters are empty, the valid feature set is obtained; where E a is the ordered feature set of the a-th cluster, is the main feature of the a-th cluster, is the gth remaining feature in the ath cluster, is the true data label of the centroid in the a-th cluster, yes and The purity of the correlation between yes and The purity of the correlation.

4. A heat load prediction method for district heating according to claim 2, characterized in that: In step S33, the ordered feature set is constructed; For each cluster, the association purity between each feature and the data label in the cluster is calculated based on mutual information and information entropy; all features in each cluster are arranged in descending order according to the size of the association purity to obtain an ordered feature set for each cluster; The formula used is as follows: ; Where, is the kth feature in the ath cluster, yes and The purity of the correlation between yes and The mutual information between and They are and The information entropy of is the true data label of the centroid in the a-th cluster.

5. The heat load prediction method for district heating according to claim 1, characterized in that: In step S4, the construction of the heat load prediction model specifically includes the following steps: Step S41: construct a bimodal base adjacency matrix; take 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 each two nodes and construct the similarity adjacency matrix G sim ; Use the Pearson correlation coefficient to calculate the correlation coefficient between each two nodes and construct the related adjacency matrix G cor ; The similar adjacency matrix and the related adjacency matrix are fused through the gating mechanism to generate a bimodal base adjacency matrix ; Step S42: Construct a dynamic propagation adjacency matrix; use 1×1 convolution to perform feature compression on the original time series of the training dataset to generate the initial feature matrix L 0 ; The input feature matrix L of the qth spatiotemporal layer q and The input is fed into a diffusion-based graph convolutional network. Through an S-order diffusion graph convolution operation, multi-order neighborhood information is aggregated to obtain a hidden feature matrix. The hidden feature matrix is ​​used to calculate the spatial similarity between nodes. Through matrix inner product and softmax normalization operations, a dynamic propagation adjacency matrix is ​​generated. 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; q and Input to the diffusion graph convolution network, through the S-order diffusion graph convolution operation, aggregate the node multi-hop neighborhood information and generate a spatial feature matrix ;in, is the spatial feature matrix extracted by the qth spatiotemporal layer; Step S45: extracting time series features; Step S46: Prediction; and Generate spatiotemporal feature matrix through residual connection fusion ; The spatiotemporal feature matrix extracted from the last spatiotemporal layer Input to the prediction layer to get the predicted data label; among them, is the enhanced temporal feature matrix extracted by the qth spatiotemporal layer, is the spatiotemporal feature matrix extracted by the qth spatiotemporal layer, q max is the number of space-time layers, It is the spatiotemporal feature matrix extracted by the last spatiotemporal layer.

6. A heat load prediction method for district heating according to claim 5, characterized in that: In step S45, the time series features are extracted; Combined with the learned time position matrix M to generate the spatiotemporal embedding matrix ; Through linear transformation They are mapped to query matrix Q, key matrix K and value matrix V respectively, and the scaled dot product of Q and K transpose is calculated. After softmax normalization, the weighted sum is obtained with V to obtain the attention value. The multi-head attention mechanism is used to learn different representations through multiple attention heads, splice the outputs of multiple attention heads, and integrate them through the fully connected layer to obtain the time series feature matrix , using a two-layer feedforward neural network from Further extract the time series features and generate the enhanced time series feature matrix ;in, is the spatiotemporal embedding matrix of the qth spatiotemporal layer, It is the temporal feature matrix extracted by the qth spatiotemporal layer.

7. The heat load prediction method for district heating according to claim 1, characterized in that: In step S2, the data preprocessing is to perform data cleaning, data encoding and data normalization on the data.

8. The 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 timestamp, heating system data, building data and meteorological data. After preprocessing the real-time district heating data, the real-time district heating data is 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 the heat load value corresponding to the real-time district heating data is obtained according to the output data label.

9. A heat load prediction system for district heating, configured to implement a heat load prediction method for district heating according to any one of claims 1 to 8, characterized in that: It includes data acquisition module, data preprocessing module, district heating data optimization module, heat load forecasting model building module and intelligent forecasting module; The data acquisition module collects 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 random forest split gain and mutual information to obtain the global significance of features and select the initial centroid, integrates Euclidean distance and mutual information, calculates weighted distance and performs clustering, combines centroid movement threshold, cluster purity threshold and maximum number of iterations to complete clustering optimization, calculates association purity based on mutual information and information entropy, filters and deletes redundant features according to redundancy conditions, and sends the data to the heat load prediction model construction module; The heat load prediction model module calculates the similarity scores and correlation coefficients 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 bimodal base adjacency matrix and the dynamic propagation adjacency matrix to generate a gated adaptive adjacency matrix, extracts spatial features based on diffusion graph convolution, extracts temporal features based on spatiotemporal embedding and multi-head attention mechanism, fuses the spatiotemporal features and performs prediction, and sends the data to the intelligent prediction module; The intelligent prediction module performs analysis through a heat load prediction model to obtain a heat load value corresponding to the real-time district heating data.

Citation Information

Patent Citations

  • Inspection system based on edge device gateway

    CN120146411A

  • Energy supply system

    JP2015185025A

Cited By

  • Regional heating distribution prediction method based on multi-source data fusion

    CN122595238A