有效的空气质量监测和预报对保障公众健康至关重要,保护环境,促进智慧城市的可持续发展。传统的系统是基于云的,产生高昂的成本,缺乏用于多步预测的准确的深度学习(DL)模型,并且无法优化雾节点的DL模型。为了应对这些挑战,本文通过集成物联网(IoT),提出了一种基于雾的空气质量监测和预测(FAQMP)系统,雾计算(FC),低功耗广域网(LPWAN),和深度学习(DL),以提高监测和预测空气质量水平的准确性和效率。三层FAQMP系统包括一个低成本的空气质量监测(AQM)节点,该节点通过LoRa将数据传输到雾计算层,然后再到云层进行复杂处理。FC层中的智能雾环境网关(SFEG)通过采用优化的轻量级基于DL的序列到序列(Seq2Seq)门控递归单元(GRU)注意力模型,引入了有效的雾智能,实现实时处理,准确的预测,并在优化雾资源使用的同时及时警告危险的AQI水平。最初,Seq2SeqGRU注意力模型,验证了多步预测,优于最先进的DL方法,平均RMSE为5.5576,MAE为3.4975,MAPE为19.1991%,R2为0.6926,泰尔的U1为0.1325。然后使用训练后量化(PTQ)使该模型轻量化并进行优化,特别是动态范围量化,将模型尺寸缩小到原来的不到四分之一,在保持预测准确性的同时,将执行时间提高了81.53%。这种优化通过平衡性能和计算效率,实现了在SFEG等资源受限的雾节点上的高效部署。从而通过高效的雾情报提高FAQMP系统的有效性。FAQMP系统,由EnviroWeb应用程序支持,提供实时AQI更新,预测,和警报,协助政府积极解决污染问题,维持空气质量标准,培养更健康、更可持续的环境。
Effective air quality monitoring and forecasting are essential for safeguarding public health, protecting the environment, and promoting sustainable development in smart cities. Conventional systems are cloud-based, incur high costs, lack accurate Deep Learning (DL)models for multi-step forecasting, and fail to optimize DL models for fog nodes. To address these challenges, this paper proposes a Fog-enabled Air Quality Monitoring and Prediction (FAQMP) system by integrating the Internet of Things (IoT), Fog Computing (FC), Low-Power Wide-Area Networks (LPWANs), and Deep Learning (DL) for improved accuracy and efficiency in monitoring and forecasting air quality levels. The three-layered FAQMP system includes a low-cost Air Quality Monitoring (AQM) node transmitting data via LoRa to the Fog Computing layer and then the cloud layer for complex processing. The Smart Fog Environmental Gateway (SFEG) in the FC layer introduces efficient Fog Intelligence by employing an optimized lightweight DL-based Sequence-to-Sequence (Seq2Seq) Gated Recurrent Unit (GRU) attention model, enabling real-time processing, accurate forecasting, and timely warnings of dangerous AQI levels while optimizing fog resource usage. Initially, the Seq2Seq GRU Attention model, validated for multi-step forecasting, outperformed the state-of-the-art DL methods with an average RMSE of 5.5576, MAE of 3.4975, MAPE of 19.1991%, R2 of 0.6926, and Theil\'s U1 of 0.1325. This model is then made lightweight and optimized using post-training quantization (PTQ), specifically dynamic range quantization, which reduced the model size to less than a quarter of the original, improved execution time by 81.53% while maintaining forecast accuracy. This optimization enables efficient deployment on resource-constrained fog nodes like SFEG by balancing performance and computational efficiency, thereby enhancing the effectiveness of the FAQMP system through efficient Fog Intelligence. The FAQMP system, supported by the EnviroWeb application, provides real-time AQI updates, forecasts, and alerts, aiding the government in proactively addressing pollution concerns, maintaining air quality standards, and fostering a healthier and more sustainable environment.