The bottom-up simulation method of building energy consumption, which mainly focuses on individual buildings, is difficult to apply to urban and regional level building energy consumption planning. Therefore, based on data-driven research, a simulation evaluation model for extreme gradient boosting at the mesoscale and K-means energy consumption at the macro scale is proposed and validated. The experimental results show that in the mesoscale model simulation prediction, in terms of training time comparison, the support vector method and sequential model have a time of 138.69 seconds and 90.00 seconds, respectively, which is much higher than other algorithms. The random forest algorithm has the highest accuracy comparison, at 83%; In the comparison of accuracy recall rate, the gradient improvement decision tree algorithm has the highest accuracy, at 83%. The extreme gradient boosting model proposed based on it has a mean square error value of 11.45 in residential sample prediction under refrigeration load and 9.16 under heating load, both of which are better than the comparative model. Applying it to practice, it is found that the correlation between building heating and cooling load and the 8 variables of the building is clearly demonstrated. In the macro scale model simulation prediction, the overall effect of K-means model I is the best under the comparison of contour coefficients, with the highest value maintained at around 0.1 when the number of clusters is 10. By applying it in practice, the spatial distribution of load can be clearly demonstrated, and the predicted value of total energy supply in the constructed regression equation is highly consistent with the actual value. Overall, the simulation and evaluation model for urban building energy consumption proposed in the study at two scales is practical and can effectively accelerate the development and improvement of urban energy systems.In addition, the research method considers the relevant operational energy consumption throughout the entire life cycle and the dynamic energy consumption of urban transportation systems, and provides reference value for existing urban renovation, thus possessing innovation.INDEX TERMS Data-driven, Urban architecture, Energy consumption evaluation model, Simulation methods, ML