A Microservices-based Framework for Real-time Carbon Emission Monitoring and Visualization of Large-scale Building Clusters
DOI:
https://doi.org/10.4108/eetsis.10994Keywords:
Real-time carbon monitoring, Microservices architecture, CO₂-equivalent forecasting, CityGHG, Building clustersAbstract
Although being one of the largest operational CO₂ contributors, current monitoring systems rely largely either on top-down inventories or sparse bottom-up sensor measurements, leading to coarse temporal visibility and reduced real-time responsiveness. Classic methods, like ARIMA and basic rule-based aggregation, cannot handle nonlinear variations, high-frequency fluctuations and cross-domain inconsistency; hence, their suitability is considerably limited for city-scale tracking of building cluster emissions. This paper attempts to fill some of the gaps by proposing a microservices-based real-time carbon emission monitoring and visualization framework, which fuses heterogeneous macro-scale CityGHG inventories with micro-scale UCI smart-meter datasets. It discusses data collection from the sectoral CO₂ records of CityGHG in 2015-2020 and high-resolution streams of household energy consumption from the UCI repository. After preprocessing, emissions were normalized using sector-specific emission factors and converted into fine-grained CO₂eq series. Subsequently, an LSTM-based forecasting module was employed due to its superiority in modeling nonlinear seasonality and long-term dependencies. Strong performance in forecasting was recorded, with Proposed returning the minimum MAE, MAPE, and RMSE as 0.0269, 0.3644, and 0.0113, respectively, and ARIMA and MLP results being moderate at 0.0898 and 0.0395 for MAE and 0.4150 and 0.7241 for MAPE, respectively. Cross-domain validation revealed distributional consistency across cities by showing an overall KL divergence of 0.0561, while DTW distances of 2.78 to 4.38M reflected temporal similarity between micro-domain and macro-domain sequences. Proposed framework has scalable real-time estimation, increased interpretability and multi-resolution visualization of results as required for operational decision-making. Altogether, this work proposes a deployable, auditable and adaptable architecture for the next generation of carbon monitoring over large-scale building clusters.
References
[1] Yu Y, et al. City-level building operation and end-use carbon emissions dataset from China for 2015–2020. Sci Data. 2024;11(1):138.
[2] Zhang Y, Zhao H, Long Y. CMAB: A Multi-Attribute Building Dataset of China. Sci Data. 2025;12(1):430.
[3] Meng F, et al. Full-scope carbon dioxide emission dataset for Chinese cities in 2023. Sci Data. 2025;12(1):1672.
[4] Wang Y, Guo J, Yue Q, Chen W-Q, Du T, Wang H. Total CO2 emissions associated with buildings in 266 Chinese cities: characteristics and influencing factors. Resour Conserv Recycl. 2023;188:106692.
[5] Luo N, et al. A three-year dataset supporting research on building energy management and occupancy analytics. Sci Data. 2022;9(1):156.
[6] Zhang C, Ma L, Luo Z, Han X, Zhao T. Forecasting building plug load electricity consumption employing occupant-building interaction input features and bidirectional LSTM with improved swarm intelligent algorithms. Energy. 2024;288:129651.
[7] Shrestha R, et al. Anomaly detection based on LSTM and autoencoders using federated learning in smart electric grid. J Parallel Distrib Comput. 2024;193:104951.
[8] Poyyamozhi M, Murugesan B, Rajamanickam N, Shorfuzzaman M, Aboelmagd Y. IoT—A promising solution to energy management in smart buildings: A systematic review, applications, barriers, and future scope. Buildings. 2024;14(11):3446.
[9] Blanco L, Alhamwi A, Schiricke B, Hoffschmidt B. Data-driven classification of urban energy units for district-level heating and electricity demand analysis. Sustain Cities Soc. 2024;101:105075.
[10] Liu G, Chen R, Xu P, Fu Y, Mao C, Hong J. Real-time carbon emission monitoring in prefabricated construction. Autom Constr. 2020;110:102945.
[11] Wan H, Huang G, Huang Y, Ghadimi N. Energy consumption prediction in buildings using LSTM and SVR modified by developed Henry gas solubility optimization. Sci Rep. 2025;15(1):38037.
[12] Fan T, Chapman A. Clarifying the levers of carbon emission reduction in compact cities in China: A multi-sectoral approach. Sustain Futures. 2024;7:100200.
[13] Chodakowska E, Nazarko J, Nazarko Ł. ARIMA models in electrical load forecasting and their robustness to noise. Energies. 2021;14(23):7952.
[14] Lu Y, Sheng B, Fu G, Luo R, Chen G, Huang Y. Proposed-EEMD-LSTM based method for predicting energy consumption in the paint workshop. Appl Soft Comput. 2023;143:110447.
[15] Yepmo V, Smits G, Lesot M-J, Pivert O. Leveraging an isolation forest to anomaly detection and data clustering. Data Knowl Eng. 2024;151:102302.
[16] El Akhdar A, et al. Exploring the potential of microservices in Internet of Things: A systematic review of security and prospects. Sensors. 2024;24(20):6771.
[17] Ortiz G, et al. A microservice architecture for real-time IoT data processing: A reusable Web of Things approach for smart ports. Comput Stand Interfaces. 2022;81:103604.
[18] Nuñez I, Rovetto C, Cruz E, Smolarz A, Concepcion D, Cano EE. Design of a microservices-based architecture for residential energy efficiency monitoring. Int J Electron Telecommun. 2024;70(4):1089.
[19] Gheorghe SD. A review of reference architectures for the next-generation Internet of Things systems. EAI Endorsed Trans Scalable Inf Syst. 2026;12(7).
[20] Ratra KK, Seth DK, Uppuluri S. Energy-efficient microservices architecture for large-scale e-commerce platforms. In: 2025 IEEE Conference on Technologies for Sustainability (SusTech); 2025 Apr. p. 1–8.
[21] Wang R, Zhang Y, Zhao S, Wang X. Open-data-based city-scale gridded carbon dioxide emission inventory: supporting urban carbon monitoring in Chengdu, China. Carbon Footprints. 2024;3(3).
[22] Kaginalkar A, Kumar S, Gargava P, Kharkar N, Niyogi D. SmartAirQ: A big data governance framework for urban air quality management in smart cities. Front Environ Sci. 2022;10.
[23] Popović I, Radovanovic I, Vajs I, Drajic D, Gligorić N. Building low-cost sensing infrastructure for air quality monitoring in urban areas based on fog computing. Sensors. 2022;22(3):1026.
[24] Araújo G, Barbosa V, Lima LN, Sabino A, Brito C, Fé I, et al. Energy consumption in microservices architectures: a systematic literature review. IEEE Access. 2024;12:186710–186729.
[25] Xiong Z, Zhu D, Liu D, He S, Zhao L. Anomaly detection of metallurgical energy data based on iForest-AE. Appl Sci. 2022;12(19):9977.
[26] Nayak GHH, et al. Transformer-based deep learning architecture for time series forecasting. Software Impacts. 2024;22:100716.
[27] Feng Z, Zhang M, Wei N, Zhao J, Zhang T, He X. An office building energy consumption forecasting model with dynamically combined residual error correction based on the optimal model. Energy Rep. 2022;8:12442–12455.
[28] Alharkan H, Habib S, Islam M. Solar power prediction using dual stream CNN-LSTM architecture. Sensors. 2023;23(2):945.
[29] Pan H, Wu C. Bayesian optimization + XGBoost based life cycle carbon emission prediction for residential buildings—An example from Chengdu, China. Build Simul. 2023;16(8):1451–1466.
[30] City Greenhouse Gas. Accessed November 17, 2025.Available from: https://lca.cityghg.com/.
[31] Georges Hebrail A.B. Individual household electric power consumption. UCI Machine Learning Repository. 2006.
[32] Zhao N, Li C. Carbon emission forecast based on multilayer perceptron network and STIRPAT model. EAI Endorsed Trans Energy Web. 2024;11(1):1.
[33] Zhang J. Time series analysis of greenhouse gas emission based on ARIMA and LSTM. Highlights Sci Eng Technol. 2023;76(1):378–384.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Raoying Lv, Cheng Zhu

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
This is an open access article distributed under the terms of the CC BY-NC-SA 4.0, which permits copying, redistributing, remixing, transformation, and building upon the material in any medium so long as the original work is properly cited.