Research on a Smart Fire Monitoring System for University Dormitories Based on Edge-Cloud Collaboration and Digital Twin Technology

Authors

  • Xin Wang
  • Lei Ma
  • Junjie Xiong

DOI:

https://doi.org/10.54097/7kjjak38

Keywords:

Smart Fire Protection, Digital Twin, STM32, MQTT Protocol, Unity3D, Fire Prediction Model

Abstract

In response to significant fire hazards arising from high population density and complex electricity consumption in university dormitories, as well as industry pain points such as the "information silos" of traditional standalone smoke alarms and the spatial localization difficulties of 2D planar monitoring systems, this paper comprehensively utilizes embedded development, Internet of Things (IoT) communication, and digital twin technologies to design and implement an edge-cloud collaborative visual monitoring system for smart fire protection. Addressing the limitations of existing fire monitoring systems, the primary innovations and research outcomes of this paper include: the design of a network self-healing mechanism against process blocking based on a kernel-level soft reset; the construction of an early fire prediction model based on multi-dimensional environmental feature fusion; and the development of a 3D digital twin interactive architecture featuring an intelligent viewpoint scheduling algorithm. For environmental data extraction at the underlying hardware level, the system employs an STM32F103 microcontroller as the core computing engine, integrating an MQ-9 combustible gas sensor, a DHT11 temperature and humidity sensor, and a far-infrared flame detector. This enables the multi-dimensional, high-frequency capture of environmental fire factors in dormitories alongside local sound and light coordinated alarms. Regarding the network communication link design, the system utilizes an ESP8266 wireless module in coordination with an Alibaba Cloud EMQX message broker server. It adopts the lightweight MQTT protocol instead of the traditional HTTP protocol and achieves the efficient packaging of heterogeneous data via JSON serialization. To solve the engineering problem of frequent device freezing ("pseudo-death") in the complex and weak network environments typical of university dormitories, this paper innovatively introduces a network error counter and a kernel-level soft reset self-healing mechanism to prevent process blocking. Testing indicates that this mechanism can complete a full-link self-recovery within an average of 7.79 seconds following a network disconnection, ensuring stable, 24/7 unattended terminal operation. In terms of algorithmic models and upper-level visualization applications, this project breaks through traditional rigid alarm thresholds by introducing a multi-dimensional environmental feature spatial fusion prediction model based on logistic regression. By calculating the joint posterior probability of fire occurrence through weighted bias, this algorithm significantly advances the time window for fire early warning, transitioning the system from passive response to active prevention. Furthermore, a high-fidelity digital twin monitoring platform was developed using the Unity3D engine, constructing a 3D virtual mirror of the physical dormitory. Leveraging a self-developed asynchronous MQTT client middleware and cross-platform feature tag mapping technology, the platform achieves high-frame-rate, lossless parsing of massive data. Combined with a quaternion spherical linear interpolation camera movement algorithm, the system not only triggers global audio-visual effects upon detecting a fire but also automatically and smoothly navigates the monitoring perspective to lock onto the affected room. This creates an immersive interactive experience where "alarm equals localization, and localization equals visual confirmation." Comprehensive testing demonstrates that this system successfully integrates the full-stack technical pipeline, spanning underlying hardware data acquisition and cloud-based data transmission to upper-computer 3D simulation. All functional metrics meet the anticipated design requirements, validating the high feasibility and advanced nature of integrating digital twin technology with the IoT in the smart fire protection sector.

Downloads

Download data is not yet available.

References

[1] Xilong Q, Shengzong L, Sha F, et al. Design and implementation of wireless environment monitoring system based on STM32[J]. Scientific programming, 2021, 2021(1): 6070664.

[2] Kwon O H, Cho S M, Hwang S M. Design and implementation of fire detection system[C]. 2008 Advanced Software Engineering and Its Applications. IEEE, 2008: 233-236.

[3] Wang B, Zhu R, Luo H. Design and Implementation of STM32-based Intelligent Fire Response System for Fire Protection[J]. International Core Journal of Engineering, 2025, 11(7): 57-63.

[4] Baek J, Alhindi T J, Jeong Y S, et al. Intelligent multi-sensor detection system for monitoring indoor building fires[J]. IEEE Sensors Journal, 2021, 21(24): 27982-27992.

[5] Liu Z, Zhang A, Wang W. A framework for an indoor safety management system based on digital twin[J]. Sensors, 2020, 20(20): 5771.

[6] Handosa M, Gračanin D, Elmongui H G. Performance evaluation of MQTT-based internet of things systems[C]. 2017 Winter simulation conference (WSC). IEEE, 2017: 4544-4545.

[7] Longo E, Redondi A E C. Design and implementation of an advanced MQTT broker for distributed pub/sub scenarios[J]. Computer Networks, 2023, 224: 109601.

[8] Wang J, Ke T, Hou M, et al. The design of home fire monitoring system based on NB-IoT[J]. International Journal of Advanced Computer Science and Applications, 2022, 13(5).

[9] Zhang X, Jiang Y, Wu X, et al. AIoT-enabled digital twin system for smart tunnel fire safety management[J]. Developments in the Built Environment, 2024, 18: 100381.

[10] Moshood T D, Rotimi J O B, Shahzad W, et al. Infrastructure digital twin technology: A new paradigm for future construction industry[J]. Technology in Society, 2024, 77: 102519.

[11] Xie W, Zeng Y, Zhang X, et al. AIoT-powered building digital twin for smart firefighting and super real-time fire forecast[J]. Advanced Engineering Informatics, 2025, 65: 103117.

[12] Almatared M, Liu H, Abudayyeh O, et al. Digital-twin-based fire safety management framework for smart buildings[J]. Buildings, 2023, 14(1): 4.

[13] Chakravarthy R. An experimental study of IoT-Based topologies on MQTT protocol for agriculture intrusion detection[J]. Measurement: Sensors, 2022, 24: 100470.

[14] Udurume M, Hwang T, Uddin R, et al. Developing a fire monitoring system based on mqtt, esp-now, and a rem in industrial environments[J]. Applied Sciences, 2025, 15(2): 500.

[15] Gupta P K, Singh M K. AN IOT-ENABLED MULTI-SENSOR FRAMEWORK FOR FIRE DETECTION AND ALARM SYSTEMS: ENHANCING SAFETY THROUGH SECURE DATA ANALYTICS[J]. Scientific and practical cyber security journal, 2025.

[16] Jiang L, Shi J, Wang C, et al. Intelligent control of building fire protection system using digital twins and semantic web technologies[J]. Automation in construction, 2023, 147: 104728.

[17] Tao F, Qi Q, Wang L, et al. Digital twins and cyber–physical systems toward smart manufacturing and industry 4.0: Correlation and comparison[J]. Engineering, 2019, 5(4): 653-661.

[18] Abdullahi U I, Zhang W, Cao Y, et al. Integrating IoT technology for fire risk monitoring and assessment in residential building design[J]. Buildings, 2025, 15(8): 1346.

[19] Hua S U N. Internet of Things-Driven Safety and Efficiency in High-Risk Environments: Challenges, Applications, and Future Directions[J]. International Journal of Advanced Computer Science & Applications, 2025, 16(5).

[20] Abdullahi U I, Zhang W, Cao Y, et al. Integrating IoT technology for fire risk monitoring and assessment in residential building design[J]. Buildings, 2025, 15(8): 1346.

[21] Grieves M. Digital twin: manufacturing excellence through virtual factory replication[J]. White paper, 2014, 1(2014): 1-7.

[22] Saha N, Paul P, Ji K, et al. Performance evaluation framework of MQTT client libraries for IoT applications in manufacturing[J]. Manufacturing Letters, 2024, 41: 1237-1245.

[23] Mishra B, Mishra B, Kertesz A. Stress-testing MQTT brokers: A comparative analysis of performance measurements[J]. Energies, 2021, 14(18): 5817.

[24] Sun Q, Turkan Y. A BIM-based simulation framework for fire safety management and investigation of the critical factors affecting human evacuation performance[J]. Advanced Engineering Informatics, 2020, 44: 101093.

[25] Korhonen T, Hostikka S. Fire Dynamics Simulator with Evacuation: FDS+ Evac Technical Reference Guide and User's Guide[R]. VTT Working Papers 119, VTT Technical Research Center of Finland, 2009.

[26] Eastman C M. BIM handbook: A guide to building information modeling for owners, managers, designers, engineers and contractors[M]. John Wiley & Sons, 2011.

[27] McGrattan K, Hostikka S, McDermott R, et al. Fire dynamics simulator user’s guide[J]. NIST special publication, 2013, 1019(6): 1-339.

[28] Dimyadi J A W, Spearpoint M, Amor R. Generating fire dynamics simulator geometrical input using an IFC-based building information model[J]. J. Inf. Technol. Constr., 2007, 12: 443-457.

[29] Guo Jr H, Magid E, Hsia K H, et al. Development of IoT module with AI function using STM32 chip[J]. Journal of Robotics, Networking and Artificial Life, 2021, 7(4): 253-257.

[30] Gourlis G, Kovacic I. A holistic digital twin simulation framework for industrial facilities: BIM-based data acquisition for building energy modeling[J]. Frontiers in Built Environment, 2022, 8: 918821.

Downloads

Published

27-03-2026

Issue

Section

Articles

How to Cite

Wang, X., Ma, L., & Xiong, J. (2026). Research on a Smart Fire Monitoring System for University Dormitories Based on Edge-Cloud Collaboration and Digital Twin Technology. Frontiers in Computing and Intelligent Systems, 15(3), 147-160. https://doi.org/10.54097/7kjjak38