Building energy consumption investigation method based on dynamic weight and hierarchical clustering

Through dynamic weighting and hierarchical clustering methods combined with Davies-Bouldin index and random forest algorithm, the problems of insufficient representation and low accuracy of traditional building energy consumption sampling methods are solved, and more efficient and accurate hierarchical sampling of building energy consumption data is achieved. , providing more representative sampling results.

CN119006213APending Publication Date: 2024-11-22GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411024400.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Traditional building energy consumption sampling methods are insufficiently representative, inefficient and insufficient accuracy, making it difficult to take into account the representation and accuracy of sampling, especially when dealing with complex building energy consumption data, there are subjective, nonlinear and coupling problems.

Method used

Using a method based on dynamic weights and hierarchical clustering, combined with the Davies-Bouldin index to determine the optimal cluster number, initial hierarchy is used to perform initial hierarchy, random forest algorithm is used to perform attribute reduction screening, and hierarchical clustering and re-clustering. Random sampling is used to evaluate the validity of the sampling results in combination with the profile coefficient.

Benefits of technology

The representativeness and sampling accuracy of building samples are improved, the screening of building energy consumption impact factors is optimized, the dynamic and accuracy of stratified clustering is ensured, and a more accurate and objective method for building energy consumption survey is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006213A_ABST
    Figure CN119006213A_ABST
Patent Text Reader

Abstract

The invention discloses a building energy consumption investigation method based on dynamic weight and hierarchical clustering, and the method comprises the following steps: (1), determining the optimal clustering number of a hierarchical clustering algorithm through a DBI index; (2) carrying out preliminary layering on the building by adopting a hierarchical clustering algorithm; (3) performing reduction screening on the building energy consumption influence factors by using a random forest algorithm according to the preliminary layering result of the building; (4) performing re-clustering on the reduced data by using a hierarchical clustering algorithm; (5) calculating the sample size required to be extracted by each type of buildings according to a statistical method; (6) carrying out random sampling in each type of buildings according to the calculated sample size; and (7) gathering the extracted building samples and evaluating the effectiveness of building stratified sampling by using a contour coefficient to obtain a sampling result conforming to representativeness. According to the method, the problems of insufficient representativeness and accuracy of a building energy consumption investigation method in traditional building energy consumption research are solved, and a new method is provided for building energy consumption sampling research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of building energy consumption research, and in particular relates to a building energy consumption investigation method based on dynamic weight and hierarchical clustering. Technical Background

[0002] Driven by industrial development, population growth and improved living standards, the total energy consumption of buildings continues to rise. According to statistics, the energy consumption of the construction industry currently accounts for more than 36% of the world's total, and the annual carbon dioxide emissions reach about 40% of the world's total. Faced with the growing energy consumption of buildings and the energy and environmental problems it brings, the world is working hard to improve the energy efficiency of buildings, and promoting the implementation of building energy conservation has become an important means to improve the energy efficiency of buildings. In order to propose an effective building energy conservation strategy, the energy consumption survey of buildings should be carried out first.

[0003] There are various methods for investigating and studying building energy consumption, including convenient sampling, directional sampling, random sampling, systematic sampling, stratified sampling, etc. However, when dealing with complex building energy consumption data, traditional sampling methods often find it difficult to balance the representativeness and accuracy of sampling. There are mainly three existing problems: (1) Insufficient representativeness: Traditional sampling methods such as random sampling and directional sampling cannot fully reflect the diversity of building samples, resulting in a lack of representativeness in the sampling results. (2) Low efficiency: The factors affecting building energy consumption are diverse and complex. Traditional sampling methods find it difficult to accurately identify key influencing factors, affecting sampling efficiency. (3) Insufficient accuracy: Due to the nonlinearity, coupling and random disturbance of building samples, traditional sampling methods find it difficult to guarantee the accuracy of sampling data.

[0004] At the same time, the traditional stratified sampling method has great limitations. It mainly relies on manual determination of stratification factors and has a strong subjective problem. When stratifying, the clustering algorithm often ignores the relative importance of each influencing factor in the building energy consumption data. Although the RF algorithm can identify important influencing factors, it fails to effectively combine the clustering algorithm for sampling optimization. In view of this, this paper invents a building energy consumption survey method based on dynamic weights and hierarchical clustering. By integrating the hierarchical clustering algorithm with the RF algorithm, the stratified sampling of building energy consumption data is innovatively realized, solving the problems of insufficient representativeness and low accuracy of traditional stratified sampling. Summary of the invention

[0005] The present invention aims to provide a more accurate, objective, effective and practical building energy consumption survey method based on dynamic weights and hierarchical clustering, so as to solve the problems of insufficient representativeness and low accuracy of traditional building energy consumption sampling methods, and ensure that the samples of building energy consumption research are more representative and practical.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] A building energy consumption survey method based on dynamic weight and hierarchical clustering includes the following steps:

[0008] Step 1: Use the Davies-Bouldin Index (DBI) to determine the optimal number of clusters for the hierarchical clustering algorithm;

[0009] Step 2: Use hierarchical clustering algorithm to preliminarily stratify the building samples;

[0010] Step 3: Use the Random Forest (RF) algorithm to simplify and screen the factors affecting building energy consumption;

[0011] Step 4: Use the hierarchical clustering algorithm to re-cluster the simplified data;

[0012] Step 5: Calculate the sample size required for each layer based on statistical methods;

[0013] Step 6: Randomly sample in each stratum according to the calculated sample size;

[0014] Step 7: Gather the sampled buildings and use the silhouette coefficient to evaluate the effectiveness of the stratified building sampling to obtain representative sampling results.

[0015] Furthermore, in step 1, DBI is used to determine the optimal number of clusters in the hierarchical clustering algorithm.

[0016] Furthermore, the calculation formula of the DBI is as follows:

[0017]

[0018] Among them, K is the number of clusters, S i With S j is the influencing factor from cluster i and cluster j to cluster center z i and z j The average Euclidean distance of ||z i- -z j ||2 is the Euclidean distance between the i-th cluster center and the j-th cluster center.

[0019] Furthermore, the process of performing preliminary stratification of building samples by the hierarchical clustering algorithm in step 2 includes the following steps:

[0020] (1) Standardize the collected building energy consumption data to eliminate the dimensional impact of different energy consumption indicators;

[0021] (2) Use information entropy to calculate the weight of each building energy consumption influencing factor;

[0022] (3) The building sample points are assigned to different clustering categories according to the minimum distance principle through the hierarchical clustering algorithm.

[0023] Furthermore, in step 3, the RF algorithm performs attribute simplification and screening on the factors affecting building energy consumption, including the following steps:

[0024] (1) According to the building energy consumption data, the number of segmentation features mtry and the number of decision trees mtree are set;

[0025] (2) The importance score of each building energy consumption influencing factor is calculated using the RF algorithm, and the building energy consumption influencing factors with an importance score less than or equal to 0 are eliminated.

[0026] Furthermore, in step (1), mtry is set to the square root of the total number of features and rounded up. When determining the number of decision trees mtree, in order to fully explore the impact of different numbers of decision trees on the feature importance results and balance the computing time and computing performance, the search range of the number of decision trees is set to [1,500].

[0027] Furthermore, in step 4, the step of re-clustering the simplified data using the hierarchical clustering algorithm includes the following:

[0028] (1) Input the simplified building energy consumption data into the hierarchical clustering algorithm;

[0029] (2) Use DBI to verify the re-clustering effect;

[0030] (3) Obtain the final building clustering results.

[0031] Furthermore, the formula for calculating the sample size required for each layer in step 5 is:

[0032]

[0033] Where n is the number of stratified samples, N is the number of buildings extracted, and σ 2 is the data variance, Δx is the error range of the data mean, and t is the probability degree.

[0034] Furthermore, the step of performing random sampling on each layer in step six includes: randomly selecting building samples on each layer according to the sample size calculated by the statistical formula.

[0035] Furthermore, the steps in step 7 to ensure representativeness by repeated re-clustering and random sampling include:

[0036] (1) Repeat the hierarchical clustering algorithm to cluster the simplified data again to ensure accurate sample stratification;

[0037] (2) Use the silhouette coefficient to evaluate the results of building stratified sampling based on building energy consumption data to ensure the effectiveness and accuracy of building stratified sampling.

[0038] The present invention has the following beneficial effects:

[0039] 1. Compared with the prior art, the present invention adopts a combination of hierarchical clustering algorithm and RF algorithm to perform stratification and attribute simplification screening on building energy consumption influencing factors. The hierarchical clustering of the hierarchical clustering algorithm and the screening of building energy consumption influencing factors by the RF algorithm improve the representativeness of building samples and sampling accuracy.

[0040] 2. Compared with the existing technology, the optimal number of clusters and information entropy calculation weights in the hierarchical clustering algorithm are determined by using DBI, which effectively improves the problem of low efficiency in processing building energy consumption data faced by traditional clustering algorithms. The RF algorithm optimizes the sample data set and improves sampling efficiency.

[0041] 3. Optimize the screening of building energy consumption influencing factors: The present invention uses the RF algorithm to simplify and screen the attributes of building energy consumption influencing factors, comprehensively calculates the relative importance score of each energy consumption influencing factor, and eliminates factors with importance scores less than or equal to 0, thereby ensuring the representativeness of the remaining key building energy consumption influencing factors.

[0042] 4. Ensure the dynamics and accuracy of building energy consumption stratification clustering: The hierarchical clustering algorithm effectively improves the problem that the traditional stratification of buildings based on building energy consumption cannot reflect the diversity and complexity of building samples in real time through information entropy weight calculation and DBI verification, and realizes more dynamic and accurate building stratification sampling.

[0043] 5. Comprehensive integration of various building energy consumption data: This invention covers 22 factors affecting building energy consumption, including external meteorological conditions of the building, the building's own conditions, building usage and air-conditioning system factors, which can fully reflect the diversity and complexity of building samples.

[0044] 6. Improve the practical value of building energy consumption research: The present invention combines the hierarchical clustering algorithm with the RF algorithm to perform stratified building sampling, providing a more accurate, objective and practical method for building energy consumption research. It can be used for the integration of building energy consumption monitoring and building operation management systems, and has high practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 The present invention is a flowchart of a method for investigating building energy consumption based on building energy consumption data;

[0046] Figure 2 It is to determine the best cluster number graph based on DBI;

[0047] Figure 3It is the flow chart of RF algorithm;

[0048] Figure 4 It is the distribution map of power consumption after building clustering;

[0049] Figure 5 Importance score chart of factors affecting building energy consumption;

[0050] Figure 6 is the silhouette coefficient score plot. DETAILED DESCRIPTION

[0051] In order to better understand the present invention, the following examples are used to illustrate. The following examples belong to the protection scope of the present invention, but do not limit the protection scope of the present invention.

[0052] In an embodiment, Figure 1 As shown in FIG. 1 , a building energy consumption survey method based on dynamic weight and hierarchical clustering according to building energy consumption data includes the following steps:

[0053] Step 1: Use DBI to determine the optimal number of clusters for the hierarchical clustering algorithm;

[0054] Step 2: Use hierarchical clustering algorithm to preliminarily stratify the building samples;

[0055] Step 3: Use RF algorithm to simplify and screen the factors affecting building energy consumption;

[0056] Step 4: Use the hierarchical clustering algorithm to re-cluster the simplified data;

[0057] Step 5: Calculate the sample size required for each layer based on statistical methods;

[0058] Step 6: Randomly sample in each stratum according to the calculated sample size;

[0059] Step 7: Gather the sampled buildings and use the silhouette coefficient to evaluate the effectiveness of the stratified building sampling to obtain representative sampling results.

[0060] In order to more clearly show the specific content and advantages of the present invention, the actual specific implementation scheme of the invention patent is described in detail.

[0061] In step one:

[0062] DBI principle:

[0063] The present invention uses DBI to determine the optimal values ​​of the number of clusters K and the weight coefficient λ of the influencing factor in the hierarchical clustering algorithm. DBI evaluates the clustering effect by calculating the ratio of the distance between different clusters to the distance within different clusters. The smaller the DBI value, the better the clustering effect. The calculation formula of DBI is as follows:

[0064]

[0065] Among them, K is the number of clusters, S i With S j is the influencing factor from cluster i and cluster j to cluster center z i and z j The average Euclidean distance of ||z i- -z j ||2 is the Euclidean distance between the i-th cluster center and the j-th cluster center.

[0066] The specific implementation methods are as follows:

[0067] The present invention uses DBI to find the optimal number of clusters K in the hierarchical clustering algorithm based on the building energy consumption data. By finding the optimal parameter combination of DBI and the number of clusters K in the hierarchical clustering algorithm, the optimal number of clusters K in the hierarchical clustering algorithm is determined, thereby avoiding subjective bias in the division of the number of clusters and improving the accuracy of the clustering results. When determining the optimal number of clusters, the hierarchical clustering algorithm is used to analyze the standardized matrix of 22 energy consumption influencing factors of 150 public buildings in Guangdong Province, and the search range of the number of clusters K is limited to between 2 and 9. The parameter combinations of K and λ are systematically traversed to calculate the corresponding DBI value. When the DBI value is the smallest, it is the optimal parameter combination of λ and the number of clusters K. At this time, the K value corresponding to the optimal parameter combination is the optimal number of clusters. Figure 2 As shown, when the K value exceeds 4, the DBI value increases with the increase of K, indicating that the increase in the number of clusters no longer significantly improves the clustering performance. When K=4, the corresponding λ value is 2.8, and the DBI value reaches the minimum value of 3.36682. It is determined that the optimal number of clusters K in the present invention is 4.

[0068] In step 2:

[0069] Hierarchical clustering clustering algorithm principle:

[0070] Hierarchical clustering algorithm, which is a subspace clustering method suitable for high-dimensional data.

[0071] The present invention uses a hierarchical clustering algorithm to cluster buildings according to building energy consumption data. The present invention collects energy consumption influencing factors of n buildings to obtain a building data set X = {x1, ..., x i ,…,x n}, where x j =(x j1 ,…,x ji ,…,x jm ) is a dataset of m building energy consumption influencing factors of the jth building. The hierarchical clustering algorithm stratifies the energy consumption data according to the objective function F(W, Z, Λ):

[0072]

[0073] Where W is the block matrix; Z is the cluster center; Λ is the dimension weight; K is the number of clusters, 1≤k≤K; j is the number of buildings, 1≤j≤n; i is the number of energy consumption influencing factors, 1≤i≤m; ξ kj is the membership degree of the j-th influencing factor set to the k-th cluster; ki is the weight of the i-th influencing factor in the k-th cluster; z ki is the cluster center of the i-th influencing factor in the k-th cluster; x ji is the i-th influencing factor in the j-th building; the positive parameter τ is used to control the size of the weight distribution.

[0074] The specific implementation methods are as follows:

[0075] After setting the number of clusters to , the building energy consumption data is input into the hierarchical clustering algorithm to calculate the information entropy value of each building energy consumption factor as the basis for evaluating the importance of building energy consumption influencing factors. An indicator with a high information entropy value indicates that the energy consumption influencing factor has a large variability in the sample, and therefore should be given a higher weight in the cluster analysis. By calculating the information entropy of all energy consumption influencing factors, the weight of each energy consumption influencing factor is further converted. The distance from the building sample point to the cluster center is calculated according to the entropy weight distance of the energy consumption factor, and the building sample points are allocated according to the minimum distance principle to cluster the buildings, thereby obtaining the building stratification result, that is, the buildings are stratified into four categories: A, B, C, and D. Figure 4 The power consumption distribution of different types of buildings after clustering 150 public buildings in Guangdong Province using the hierarchical clustering algorithm is used to intuitively demonstrate the clustering effect of hierarchical clustering.

[0076] In step three:

[0077] RF algorithm principle:

[0078] The RF algorithm process is as follows Figure 3 As shown in the figure, the number of input factors affecting building energy consumption is reduced by feature selection. Since the RF algorithm repeatedly randomly samples some factors affecting building energy consumption when constructing the decision tree, compared with other methods of calculating feature importance, the RF algorithm can effectively avoid overfitting, thereby improving the generalization performance of the model. In the process of calculating feature importance, the OOB error is first calculated for the Z decision trees in the RF algorithm, and the OOB error of the i-th influencing factor is recorded as E i 1 Secondly, while keeping other influencing factors unchanged, randomly modify the selected influencing factor value and calculate the OOB error again, which is recorded as Finally, by comparing E i1 and The difference between the impact factor importance score VI is obtained, and the calculation formula is as follows:

[0079]

[0080] The specific implementation methods are as follows:

[0081] In the process of calculating the importance score of building energy consumption influencing factors, multiple training subsets are generated through self-service sampling, and a decision tree is built based on each subset. Then, the importance of energy consumption influencing factors is calculated by evaluating the frequency of use of each building energy consumption influencing factor in the decision tree construction process and the degree of improvement in model performance, thereby obtaining the importance score of each building energy consumption influencing factor. Building energy consumption influencing factors with importance scores equal to or less than 0 will be identified as redundant data, and the importance selection of building energy consumption factors will be implemented by removing redundant data. The RF algorithm is used to repeat the feature importance calculation of building energy consumption influencing factors ten times to reduce the impact of randomness on the results. The average importance score of the ten times is calculated as the final importance score of each building energy consumption influencing factor. Figure 5 The importance score distribution of factors affecting building energy consumption is shown.

[0082] In step 4:

[0083] The present invention uses the following formula to determine the sample size in building stratified sampling:

[0084]

[0085] Where n is the number of stratified samples. N is the number of buildings sampled. σ 2 To calculate the data variance in stratified samples, the standard deviation of the sample data is usually used instead. is the error range of the average value of the stratified sample data. t is the probability degree. The relationship between t and confidence level P(t) is shown in Table 1.

[0086] Table 1 Common relationships between probability t and confidence P(t)

[0087]

[0088] In step 5: repeat step 2 with the simplified building energy consumption data.

[0089] In step 6: random sampling is performed in different building categories based on the calculated sample size.

[0090] In step seven:

[0091] Silhouette coefficient principle:

[0092] The present invention uses the silhouette coefficient to evaluate the closeness and separation of clustering buildings according to building energy consumption, that is, to evaluate the cohesion within the building cluster and the separation between clusters. The silhouette coefficient calculation formula is as follows:

[0093]

[0094] Figure 6 The clustering results after attribute simplification showed a higher silhouette coefficient overall, and no negative values ​​appeared. Especially when the number of clusters was 4, the silhouette coefficient showed a high degree of stability, concentrated around 0.98. The superiority and accuracy of the RF algorithm simplification results and the hierarchical clustering algorithm in stratified sampling of buildings based on building energy consumption data were verified.

[0095] By observing the calculated silhouette coefficient, the present invention not only confirms the excellent clustering effect of the hierarchical clustering algorithm on buildings based on complex building energy consumption data, but also demonstrates the effectiveness of the RF algorithm in simplifying the factors affecting building energy consumption. This analysis further emphasizes the importance of selecting influencing factors in building cluster analysis and its significant improvement in the accuracy and representativeness of building sampling.

[0096] The present invention combines a hierarchical clustering algorithm with an RF algorithm and applies them to the building stratified sampling process. The combination of the hierarchical clustering algorithm and the RF algorithm realizes accurate stratification of building samples according to building energy consumption data and attribute simplification of key building energy consumption influencing factors. According to the diversity and complexity of actual building sample data, the hierarchical clustering algorithm accurately stratifies the building samples, and the RF algorithm screens out key building energy consumption influencing factors of building energy consumption, thereby improving the representativeness and accuracy of building sample energy consumption data and overcoming the problem of insufficient representativeness and low accuracy of the building stratified sampling research method based on building energy consumption data. The present invention has important theoretical significance for the research on building stratified sampling, and provides an accurate, objective and practical building energy consumption survey method for building energy consumption research. It has important theoretical significance for the development of building energy consumption research and monitoring, and has practical application value and broad application prospects in engineering applications.

[0097] The above content cannot be used to determine that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, they can make several simple deductions or substitutions without departing from the concept of the present invention, which should be regarded as belonging to the scope of patent protection of the present invention determined by the submitted claims.

Claims

1. A building energy consumption survey method based on dynamic weight and hierarchical clustering, characterized in that: The following steps are involved: Step 1: Determine the optimal number of clusters for the hierarchical clustering algorithm; Step 2: Use hierarchical clustering algorithm to preliminarily stratify the building samples; Step 3: Use RF algorithm to simplify and screen the factors affecting building energy consumption; Step 4: Use the hierarchical clustering algorithm to re-cluster the simplified data; Step 5: Calculate the sample size required for each layer based on statistical methods; Step 6: Randomly sample in each stratum according to the calculated sample size; Step 7: Gather the sampled buildings and use the silhouette coefficient to evaluate the effectiveness of the stratified building sampling to obtain representative sampling results.

2. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 1 is characterized in that: In step 1, DBI is used to determine the optimal number of clusters in the hierarchical clustering algorithm.

3. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 2 is characterized in that: The calculation formula of DBI is as follows: Among them, K is the number of clusters, S i With S j is the influencing factor from cluster i and cluster j to cluster center z i and z j The average Euclidean distance of i- -z j ∥2 is the Euclidean distance between the i-th cluster center and the j-th cluster center.

4. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 1 is characterized in that: The process of using the hierarchical clustering algorithm to initially stratify the building energy consumption samples in step 2 includes the following steps: (1) Set the distance measurement method and clustering strategy of the hierarchical clustering algorithm; (2) Perform preliminary hierarchical clustering based on the optimal number of clusters selected according to the DBI index.

5. According to the building energy consumption survey method based on dynamic weight and hierarchical clustering in claim 1, in step 3, the RF algorithm performs attribute simplification and screening on the factors affecting building energy consumption, including the following steps: (1) According to the building energy consumption data, the number of segmentation features mtry and the number of decision trees mtree are set; (2) The importance score of each building energy consumption influencing factor is calculated using the RF algorithm, and the building energy consumption influencing factors with an importance score less than or equal to 0 are eliminated.

6. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 5 is characterized in that: In step (1), mtry is set to the square root of the total number of features and rounded up. When determining the number of decision trees mtree, in order to fully explore the impact of different numbers of decision trees on the feature importance results and balance the computing time and computing performance, the search range of the number of decision trees is set to [1,500].

7. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 1 is characterized in that: In step 4, the steps of clustering the simplified data by the hierarchical clustering algorithm include the following: (1) Input the simplified building energy consumption data into the hierarchical clustering algorithm; (2) Use DBI to verify the re-clustering effect; (3) Obtain the final building clustering results.

8. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 1 is characterized in that: The formula for calculating the required sample size for each layer in step 5 is: Among them, n is the number of stratified samples, N is the number of buildings extracted, σ2 is the data variance, Δx is the error range of the data mean, and t is the probability degree.

9. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 1 is characterized in that: The steps for random sampling in each stratum in step 6 include: Building samples were randomly selected in each layer according to the sample size calculated by the statistical formula.

10. The building energy consumption survey method based on dynamic weight and hierarchical clustering according to claim 1 is characterized in that: The steps in step 7 to ensure representativeness by repeated re-clustering and random sampling include: (1) Repeat the hierarchical clustering algorithm to cluster the simplified data again to ensure accurate sample stratification; (2) Use the silhouette coefficient to evaluate the results of building stratified sampling based on building energy consumption data to ensure the effectiveness and accuracy of building stratified sampling.

Citation Information

Cited By

  • Earth surface and underground water interactive simulation method and system based on aquifer analysis

    CN120409029A