Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 15, No. 2, 2025 67 Research on Energy‐Efficient Design of Chinese Building Clusters Based on Digital Twin Technology Qiaoying Zhou* School of Energy and Power Engineering, Jiangsu University, 212013, Zhenjiang, China * Corresponding author Email: silbury0313@qq.com Abstract: This paper constructs a digital twin-based framework for building energy-efficient design, using Nanjing as a case study. The framework integrates Internet of Things (IoT), Building Information Modeling (BIM), big data analytics, and artificial intelligence to enable real-time monitoring and dynamic modeling of energy consumption. Data processing is conducted with Python's GeoPandas and Numpy libraries. The XGBoost and K-Means algorithms are employed to optimize energy consumption prediction and reveal spatial heterogeneity characteristics. The research demonstrates that the model achieves rapid simulation and prediction of urban energy consumption with minimal error, providing valuable energy assessment references for urban planning and facilitating the development of urban energy systems. Keywords: Digital Twin; Energy-Efficient Building Design; Building Clusters; Energy Consumption Optimization; Machine Learning. 1. Introduction With the intensification of global climate change and energy crises, energy consumption and greenhouse gas emissions have significantly increased. The construction industry, as a major contributor to energy consumption and carbon emissions, requires technological innovation to achieve energy-saving and emission-reduction goals. Rapid urbanization has led to a continuous increase in building energy consumption, with urban areas accounting for 75% of global energy use[1]. Countries worldwide have proposed emission reduction targets, and China has committed to peaking carbon emissions by 2030 and achieving carbon neutrality by 2060. Energy conservation and emission reduction in the construction sector are crucial for meeting these "dual carbon" goals. Digital twin technology, integrated with emerging technologies such as BIM and IoT, offers new opportunities for building energy efficiency[2]. 2. Research Background and Objectives 2.1. Literature review Research in the field of digital twins and building energy efficiency has an earlier inception abroad, with the concept of digital twins first proposed by the University of Michigan[3] in 2003. Internationally, tools such as CitySim[4] developed by the Swiss Federal Institute of Technology Lausanne and UMI[5] by the Massachusetts Institute of Technology have significantly advanced urban building energy consumption simulation. Domestically, institutions like the University of Applied Sciences, Stuttgart, Germany[6] and the Lawrence Berkeley Laboratory, USA[7] have made notable progress in the application of digital twin technology, integrating Building Information Modeling (BIM) and Geographic Information Systems (GIS) to construct urban building models that support urban planning and energy-efficient design. With the introduction of China's "dual carbon" goals, a series of building energy efficiency policies have been promulgated, propelling the application and development of digital twin technology in the realm of building energy efficiency[8-9]. 2.2. Research Content and Objectives This study is based on geographic information data from Nanjing, focusing on data-driven building energy consumption simulation. It involves constructing a simulation framework, optimizing energy consumption data, applying machine learning, and analyzing and visualizing energy consumption data. The research encompasses: acquiring GIS data and utilizing machine learning to identify building types and construction years; establishing a typical building database and generating EnergyPlus models; developing a Python-based energy consumption simulation tool for data cleaning and spatial energy consumption quantification analysis; and calibrating energy consumption models to analyze the impact of climate change on energy use. The research aims to address the existing gaps in urban building energy consumption simulation in China, build a typical building database, develop energy simulation tools tailored to Chinese architectural characteristics, and provide technical support for government policies on energy conservation and emission reduction, thereby contributing to sustainable development in the building sector. 3. Building Model Establishment and Analysis 3.1. Machine learning algorithm Machine learning is a multi-field interdisciplinary subject, through the analysis and calculation methods to improve and improve its own performance. The object subject is the quantified data, the main content is to summarize the "model" algorithm in the data through the computer, apply the algorithm to the empirical data, produce the data-based algorithm model, used to judge on the new data of the same structure. MITCHELLA general definition of machine learning: supposing P is used to evaluate the performance of computer programs on the task category T. If 68 a program achieves a performance improvement in the T task by using empirical E, then we say that the program learns from E.The general process of machine learning has the following steps: raw data set, feature analysis, split data set, training, evaluation, optimization, prediction and result output. 3.2. Building of building energy consumption model 3.2.1. Initialize the data set In the GeoPandas geographic information processing library based on Python language, the building data set analysis and calculation model can be constructed. GeoPandas Integrate the advantages of Pandas in data processing and spatial analysis functions to form a unique geospatial data processing framework. Compared with traditional GIS tools (such as ArcMap), its open source features give higher operational flexibility and algorithm expansion space, and have significant advantages in terms of batch data computing efficiency. First, complete the basic environment configuration, and import Numpy and other computing libraries; then load the original geographic information data set, and build an index system including key parameters such as surface area, volume, shape coefficient and circumference area ratio; then perform data cleaning with double constraint: retain valid samples with surface area greater than 5m2 and shape coefficient less than 1.5, reduce the building data sample size of Xuanwu District in Nanjing from 20,796 to 18,980 groups; finally select 2,000 sets of test samples by random sampling method, and output the spatial data files in standardized shp format. 3.2.2. Classification of building types As the key influence factor of the energy consumption simulation, the building type directly determines the construction logic of the operating condition parameter system of the construction equipment. A binary classification system is constructed based on the building contour vectorial features (building footprint): the building types are divided into two categories: residential buildings (Residential) and non-residential buildings (Non-residential), corresponding to the differentiated energy consumption simulation parameter set. The technical implementation path consists of three progressive stages: (1) build the training sample set through expert annotation method and establish the feature engineering framework; (2) compare and evaluate the classification efficiency of SVM and random forest algorithms, and build the best prediction model; (3) apply the transfer learning strategy to infer the test set. In particular, the dual-mode modeling method is proposed: on the one hand, the vector properties such as building perimeter and layer number are extracted as structural features; on the other hand, the building plane grid is grid, and the spatial morphological features are extracted through convolutional neural network to form a deep learning model of multi-source data fusion, which significantly improves the classification accuracy to 91.2% , providing reliable type discrimination benchmark for energy consumption simulation. To build the classification model, you need to add a building type attribute column to the geoinformation data. The default value 0 represents the unlabeled state, 1 is the non-residential type building, and 2 is the residential building type. The geographic range of the marked information is the area surrounded by Beijing East Road in the north, Zhongshan East Road in the south, Zhongshan Road in the west and Longpan Middle Road in the east, as shown in Figure 2-1. Among them, category 1 represents 1036 marked data for non-residential buildings, and category 2 represents 1275 marked data for residential buildings, totaling 2311 pieces. Figure 2-1. Marks the information area 3.2.3. Technology Implementation This paper constructs a deep learning-based framework for geospatial feature extraction, which encompasses three core phases. Initially, the GeoPandas visualization module is utilized to generate vectorized maps of building contour samples. The building layer attributes are mapped to image channels through Gray-scale Encoding, with a uniform output specification of 2cm×2cm (50dpi resolution), resulting in an annotated dataset comprising 2,142 samples. Subsequently, the OpenCV computer vision library is employed to transform the image data into matrices, followed by standardized preprocessing to eliminate dimensional discrepancies. Finally, a stratified sampling strategy is applied to divide the dataset into a training set (1,598 samples) and a test set (575 samples), with a random seed parameter (random_state=1) set to ensure experimental reproducibility. The feature extraction network adopts the classic LeNet5 architecture, a foundational convolutional neural network (CNN) that established the basic architectural paradigm for CNNs. Its eight-layer topology includes: an input layer standardizing 32×32 pixels; a C1 convolutional layer generating 28×28 feature maps using six 5×5 kernels; an S2 pooling layer employing 2×2 downsampling to compress data dimensions; a C3 convolutional layer expanding to 16- channel feature extraction; an S4 pooling layer further reducing dimensions to 5×5 spatial resolution; a C5 convolutional layer abstracting 120-dimensional high-level features; an F6 fully connected layer mapping the feature space; and an output layer performing classification decisions via the Softmax function. Detailed hyperparameter configurations for each layer are provided in Tables 2-1 and 2-2. The train_test_split() function from the sklearn library is 69 used to partition the training set, with four input parameters: train_data (independent variables of the dataset), train_target (dependent variables of the training set), test_size (proportion of the test set relative to the total dataset, set at 0.25 in this model), and random_state. The training set consists of 1,598 entries, and the test set contains 575 entries. Table 2-1. LeNet5 Table of parameters of each layer Table 2-2. LeNet5 Operating parameters of the classifie This research employs a multi-dimensional evaluation system to validate the efficacy of classification models driven by heterogeneous features. For the building geographic information dataset, structured models based on morphological parameters (KNN, DT, GBDT, RF) were constructed, each demonstrating commendable performance. As indicated in Table 2-3, the RF model exhibits superior class-balanced discrimination capabilities compared to other algorithms, and its constructed feature importance evaluation system provides interpretable support for the optimization of energy consumption simulation parameters. Based on the aforementioned analysis, this study selects the RF model as the benchmark for building type classification, establishing a reliable data preprocessing framework for subsequent dynamic energy consumption simulations. Table 2-3. Classification and prediction results of the algorithm At the same time, based on the Nanjing xuanwu district building geographic information, can be more intuitively in the form of illustrated quantitative building load spatial distribution law, such as building for unit statistical unit refrigeration, unit heating and heating load distribution, as shown in figure 2-2-figure 2-5, the empirical data reveal Nanjing xuanwu district building energy consumption presents significant spatial agglomeration characteristics. 70 Figure 2-2. Spatial distribution of building Figure 2-3. Spatial distribution diagram of unit refrigeration load building unit heating load forecast Figure 2-4. Spatial distribution diagram of Figure 2-5. Spatial distribution of building Building total refrigeration load forecast total heating load forecast This paper proposes a quantitative analysis framework based on GIS raster technology, which breaks through the descriptive limitations of traditional density visualization methods. By constructing 200m 200m spatial grid system, the analysis unit with the relationship between geographical coordinates and relative space is established. Figure 2-6- Figure 2-9 is the description of the unit refrigeration and heating load of the grid grid building, to realize the multi- dimensional accurate measurement of the building energy consumption index. It can be seen from the figure that: compared with the overall load distribution, the unit load strength is in the main road, and the building load at the urban building boundary is higher than the load intensity in other areas. Figure 2-6. Grid distribution of total Figure 2-7. Grid distribution of total refrigeration space heating space Figure 2-8. Grated distribution of building Figure 2-9. Grated distribution of building unit refrigeration space unit heating space According to the spatial autocorrelation analysis, it shows that the axis of Zhongshan Road-Xuanwu Avenue-Xianlin Avenue forms a high-intensity energy consumption corridor, and the average load density increases by 58.7% -76.3% compared with the regional benchmark value. The high energy consumption characteristics of the buildings in the corridor are mainly driven by dual geographical elements: one is the flow density effect caused by the transportation hub, 71 which increases in the operation time of the air conditioning system; the other is the high floor area ratio characteristics of the buildings along the street, which aggravates the solar radiation heat and the loss of ventilation efficiency. The study further found that the spatial distribution pattern of commercial complex and transportation hub buildings constitute regional peak energy consumption units, which was significantly positively correlated with the intensity of urban heat island effect. 3.3. Return of building energy consumption 3.3.1. Regression model construction The classification model was constructed in the same way. The sample data was split by sklearn's train_test_split () function, and the 20% validation set ratio was set by the train_test_split () function of the Scikit-learn toolkit, namely 398 training set and 143 test set, and fixed random seeds (random_state=42) to ensure experimental recovery. At present, the three classical regression models applied to building energy consumption prediction are: linear regression model, fully connected layer model and XGB model (extreme gradient boosting). Analysis shows that the mean square error of MSE is 37.2% and 24.8% lower than LR and FCN, which verifies the superiority of integrated learning in the complex energy consumption relationship model. The pre-ranking algorithm and the weighted quantile sketch technique adopted in the model training process effectively solve the bottleneck problem of computational efficiency in the high-dimensional feature space. 3.3.2. Hyperparameter optimization Apply RandomizedSearchCV to tune the three hyperparameters of the XGB model-max_depth,learning_rate and n_estimators. The hyperparameter combination information see Table 2-4. A total of 2400 hyperparameter combinations, set the n _ ter as 1000, so the number of random searches is 1000, optimizing the XGB model with MSE as the evaluation coefficient. MSE is the most commonly used parameter in machine learning for evaluating regression models, and its expression is MSE y y (2-1) y and y are the predicted and label values of the model. Table 2-4. Information on the hyperparameter combinations of the XGB model The hyperparameter combination optimization program of XGB model runs 279s, shown in Table 2-5. Table 2-5. Results of the hyperparameter combination optimization for the XGB model 3.3.3. Algorithmic evaluation prediction The optimized XGBoost model based on hyperparameters shows that the mean square error (MSE = 11.34) of XGB model is significantly lower than that of the fully connected network (MSE = 41.67); in the non-residential building scenario, the linear regression model shows the optimal prediction accuracy (MSE = 9.20), which reduces the error by 74.5% compared with the fully connected network. In the heating load prediction, the XGB model for residential building prediction error (MSE = 9.16) decreased by 75.0% compared with the fully connected network, and the linear regression model still maintained advantages in the non- residential building scenario. The prediction curve of XGB and linear regression model is highly synchronous with the actual load trend, while the fully connected network has limited nonlinear mapping ability due to the gradient disappearance problem, and has a systematic prediction deviation (deviation rate> 30%). The comprehensive evaluation results confirm that the XGBoost algorithm has a significant engineering application value in the field of building load prediction. 4. Building Energy Consumption Based on Cluster Analysis Algorithm 4.1. Model building This paper discusses the clustering technology in machine learning and its application in the field of energy consumption. By identifying the intrinsic similarity characteristics of entities or abstract object sets, the clustering algorithm divides them into subset clusters with homogeneous properties, so as to realize the pattern recognition and feature extraction of data structure. In the field of energy management research, the technology has been successfully used in residential energy consumption pattern classification identification, photovoltaic power generation efficiency assessment and power load space-time heterogeneity analysis of multiple dimensions, the results show that such methods in 72 solving high dimensional data classification, similarity measurement and distribution characteristics of complex problems such as show significant technical advantages. At present, a variety of algorithm systems have been developed for cluster analysis, including: (1) K-Means algorithm based on centroid iteration; (2) spectral clustering (Spectral Clustering) based on graph theory model; (3) fuzzy C mean clustering (FCM); (4) DBSCAN and OPTICS algorithm based on density features; and (5) Gaussian mixed clustering (Gaussian Mixture) under probability distribution model. In view of the above technical characteristics, this research will build an evaluation system including contour coefficient, Calinski-Harabasz index and other quantitative indicators through a systematic algorithm evaluation framework, so as to select the optimal modeling scheme for the climate-energy consumption multivariate data set. The cluster analysis performed in this study follows the following technical route: (1) Algorithm optimization stage: the climate feature data set is imported into the multi-algorithm comparison calculation framework to build a discrete parameter space of the cluster number. The performance of each algorithm at different cluster sizes was systematically evaluated, focusing on the dual indexes of contour coefficient (3-1) and Calinski- Harabas index (3-3) . The two numerical growth is positively correlated with the efficiency of the algorithm, and the optimal modeling algorithm is selected accordingly. S , (3-1) L ∑ ∑ (3-2) s k (3-3) (2) Parameter optimization stage: use the elbow rule (Elbow Method) and contour analysis method to determine the optimal cluster number. By constructing the decay curve of the sum of error SSE (3-4) with the k value, identify the inflection point of the SSE decline rate —— When k approaches the true cluster number, the curvature of the SSE curve changes, and the marginal benefit of the further increase k value is significantly reduced, and the corresponding k value is the optimal solution. SSE ∑ ∑ |P m |∈ (3-4) (3) Feature analysis stage: Based on the determined optimal cluster structure, the multi-dimensional correlation study between climate variables and energy intensity is carried out on each cluster set. Pearson correlation coefficient Cov was introduced to quantify the linear correlation strength among variables and analyze the distribution pattern of correlation coefficient within different clusters to reveal the mechanism heterogeneity of the influence of climate elements on energy intensity. Cov X, Y E X E X X E X (3-5) Var X ∑ (3-6) r X, Y , (3-7) 4.2. Results In this paper, a four-cluster spatial classification model was constructed based on K-Means clustering algorithm, and a regional building energy demand evaluation model was constructed through geographic information visualization technology, which revealed the spatial heterogeneity characteristics of cooling and heating load intensity of different cluster units. The cluster analysis results show that the first cluster includes Inner Mongolia, Qinghai, Heilongjiang and Jilin and other provincial administrative regions. The cluster center of mass characterization value shows that the refrigeration equivalent load strength ECD is 5.12kWh/m2 (extreme 0-10.81kWh/m2), Heating equivalent load strength EHD up to 96.35kWh/m2 (extreme difference 53.10-142.11kWh/m2); The second cluster covers 10 provincial units in the Yellow River basin, Presenting the thermal characteristics of ECD=12.56kWh/m2 (extreme 0.09- 39.34kWh/m2) and EHD=51.92kWh/m2 (extreme 13.07- 84.46kWh/m2); The third cluster, centered on the 13 provinces in the Yangtze River Basin, The load intensity presents a balanced distribution of ECD=22.70kWh/m2 (extreme 0.36-32.36kWh/m2) and EHD=20.16kWh/m2 (extreme 1.09-42.36kWh/m2); The fourth cluster is concentrated in the four southeast coastal provinces, It shows the dominant characteristics of ECD=39.53kWh/m2 (22.22- 55.84kWh/m2) and EHD=3.18kWh/m2 (0-11.56kWh/m2). The first cluster is the high latitude cold pole region, and the thermal demand structure is dominated by heating (95.0%); the second cluster is the middle temperate transition zone, the heating demand accounts for 81.0%; the third cluster balances cold and heat load in subtropical regions (53% and 47%); and the fourth cluster dominates in tropical-South subtropical regions (93.0%). At the same time, several spatial heterogeneous phenomena were found (Figure 3-1): Ningxia Hui Autonomous Region showed cross-cluster transition characteristics, and the similarity of Xinjiang Uygur Autonomous Region and the second cluster province was significantly higher than that of the first cluster region at the same latitude, while Qinghai Province showed a reverse distribution pattern. As shown in Figure 3-2 and Figure 3-3, the spatial gradient variation of cold and heat load intensity per unit area further verifies the law of energy demand differentiation under latitude control. Figure 3-1. Spatial distribution of the ED clustering results 73 Figure 3-2. Spatial distribution of the ECD Figure 3-3. Spatial distribution of the EHD In this paper, through constructing the correlation model of regional energy consumption structure, the spatial differentiation characteristics of total building thermal environment demand (TCHD) and total energy consumption (TEC) are quantitatively analyzed. As shown in Table 3-1, the comparative study based on cluster partition shows that the TCHD value obtained from engineering thermodynamic simulation and the TEC value of energy statistical Yearbook are highly coupled in the spatial allocation pattern (Figure 3- 4). Specifically, the third energy zone (Zone_Three), as the leading unit of energy consumption, accounts for 51.66% and 49.31% respectively, constituting more than half of the national total load, while the first energy zone (Zone_one) presents the lowest energy consumption characteristics, with 11.04% and 8.19% respectively. It is worth noting that, as a typical high energy consumption unit, the third energy zone has a significant positive correlation between energy consumption intensity and regional population agglomeration index (r=0.87, p <0.01) and economic development level (GDP contribution rate β =0.72), which confirms the driving mechanism of human activity intensity on building energy consumption pattern. Table 3-1. The proportion of TCHD, TEC, UP and GDP Figure 3-4. Partiproportion of TEC and TCHD Figure 3-5 shows the comparison of the predicted TEC value with the actual TEC value of the regression model, which shows that the predicted value and the actual value are high. 74 Figure 3-5. Results comparing predicted TEC values versus actual TEC values 5. Summary and Outlook This study constructs a building energy consumption simulation and optimization framework based on digital twin technology, integrating GIS, machine learning, and IoT technologies to achieve dynamic energy consumption prediction from individual buildings to urban scales. The prediction accuracy is improved through algorithms such as XGBoost, and a national building energy consumption database is established, revealing spatial differentiation patterns of energy consumption and proposing energy-saving retrofit strategies. Future research should enhance the dynamic response capability of the model, deepen multi- system coupling and cross-scale integration, optimize policy coordination and public participation mechanisms, integrate low-carbon technologies, and conduct life cycle assessments to support the achievement of the "Dual Carbon" goals. References [1] United Nations Human Settlements Programme. World Cities Report 2022: Envisaging the Future of Cities. Nairobi, 2022. [2] International Energy Agency. Empowering Cities for a Net Zero Future. Paris, 2021. [3] Li Y, Wang C, Zhu S, et al. A comparison of various bottom- up urban energy simulation methods using a case study in Hangzhou, China. Energies, 2020, 13(18): 4781. [4] Robinson D, Haldi F, Kämpf J, et al. CitySim: Comprehensive micro-simulation of resource flows for sustainable urban planning. In: IBPSA 2009 - International Building Performance Simulation Association, IBPSA, 2009: 1083- 1090. [5] Reinhart C F, Dogan T, Jakubiec J A, et al. UMI - An urban simulation environment for building energy use, daylighting and walkability. In: Proceedings of BS 2013: 13th Conference of the International Building Performance Simulation Association, IBPSA, 2013: 476-483. [6] Nouvel R, Brassel K H, Bruse M, et al. SIMSTADT, a New Workflow-driven Urban Energy Simulation Platform for CityGML City Models. In: CISBAT International conference, CISBAT, 2015: 889-894. [7] Hong T, Chen Y, Lee S H, et al. CityBES: A web-based platform to support city scale building energy efficiency. In: 5th International Urban Computing Workshop, ACM, 2016. [8] Baetens R, De Coninck R, Jorissen F, et al. OpenIDEAS - An open framework for integrated district energy simulations. In: 14th International Conference of IBPSA - Building Simulation 2015, IBPSA, 2015: 347-354. [9] Quan S J, Li Q, Augenbroe G, et al. Urban Data and Building Energy Modeling: A GIS-Based Urban Building Energy Modeling System Using the Urban-EPC Engine. In: Planning Support Systems and Smart Cities. Springer International Publishing, 2015:447–469.