## 6 Conclusions
The fog layer handles tasks that require quick responses and low latency and can be solved locally (e.g., real-time lighting control, emergency alerts), while the cloud layer handles more extensive tasks such as comprehensive analytics, training machine learning models, and long-term data storage. This division of labor enhances the overall performance and efficiency of the system. Energy efficiency: Local data processing reduces unnecessary data transmission and central server load, optimizing energy consumption. This contributes to the sustainability goals of smart campus projects. Modularity and flexibility: The fog architecture can be customized according to the needs of different departments and easily integrated with new technologies. As new sensors or services are added, the system can be easily scaled. Maintenance and operational ease: Due to local processing and the distributed structure, system failures do not affect the entire campus but are limited to the affected area. This makes maintenance processes easier and more cost-effective. _Future Work: Towards a Smarter and More Adaptive Campus Environment_  
While this study provides a robust foundation for understanding the impact of environmental factors on user productivity in university libraries, it also opens new avenues for future research and system improvements. The integration of the IoT, machine learning, and fog-cloud computing in smart campus environments is still evolving, and several key areas deserve further exploration to maximize efficiency, accuracy, and user experience:  
1. Advancing crowding analysis through multi-modal data fusion. The relatively lower performance in crowding analysis (F1 = 40.46%) suggests that additional contextual data and more sophisticated modeling techniques could enhance accuracy. Future research could explore the following:  
* Multi-modal sensor integration: combining camera-based occupancy tracking, Wi-Fi access logs, and motion sensors with existing environmental data could offer a more comprehensive understanding of space utilization. * Deep learning-based scene recognition: leveraging Convolutional Neural Networks (CNNs) and Transformer-based models could enable automated crowd density estimation from real-time visual data, improving prediction robustness. 2. Implementation of deep learning for dynamic environmental adaptation. Current machine learning models provide accurate predictions, but they lack the ability to dynamically adapt to real-time changes. Future work could investigate the following:  
* Reinforcement learning-based optimization: implementing self-learning AI systems that continuously adjust environmental conditions (e.g., lighting, ventilation) in response to user behavior, improving both efficiency and user comfort. * Deep learning-based scene recognition: leveraging Convolutional Neural Networks (CNNs) and Transformer-based models could enable automated crowd density estimation from real-time visual data, improving prediction robustness. * Temporal analysis with LSTMs and Transformer models: using time-series deep learning models to predict future environmental trends based on historical data, enabling proactive adjustments in smart campus systems. 3. Expanding the smart campus concept beyond libraries. The proposed system can be extended to other university spaces to create a fully interconnected, intelligent campus infrastructure. Key expansion areas include the following:  
* Smart classrooms: automated adjustments in lighting, temperature, and sound based on real-time lecture dynamics and student concentration levels. * Smart dormitories: personalized environmental settings based on student preferences and biometric data to enhance comfort and well-being. * Energy-efficient smart buildings: integrating machine learning-driven climate control to optimize energy consumption across campus buildings, aligning with sustainability goals.