| In recent years,smart cities have gradually become a very important part of today’s society with the development of intelligence and technology.It uses the technologies,including Io T,sensors,5G networks,to maximize the availability and efficiency of cities and public services and to provide a smarter living environment for city residents.Accurate prediction of water demand and air quality is of great practical and economic importance.Current water and air monitoring sites already have accurate metrics through sensors,but a large amount of data is not being used wisely.With the rise of artificial intelligence,new solutions are provided for the large amount of data.In this paper,we use the large amount of data accumulated by sensors to predict future water demand and air quality using deep learning methods.The prediction results of the deep learning method are made better than the existing statistical methods,thus enhancing the monitoring of water quantity regulation and air quality and providing an effective solution for the construction of smart cities.The main research work of this thesis is as follows.The First part is predicting the urban water demand based on transfer learning method with multi-head attention mechanism.According to the characteristics of water demand data,the missing value and abnormal value are processed.We analyzed the relevant factors on the impact of water demand dimension expansion,and unified into the same granularity for integration.After completing the fusion and processing of the data,we have data that can be put into the model for training.In this part,a transfer learning prediction model is designed by combining the multi-head attention mechanism.Since our data contains water quantity data from multiple areas,each partition data quality varies.We use the area with good data quality as the source domain and the area with poor data quality as the target domain.Firstly,the attention features are extracted from the water demand of the source domain and the target domain simultaneously by the encoder,and then the maximum mean discrepancy is adopted to make the features of the source domain match the feature distribution of the target domain.Finally,the decoder infers the prediction based on the multi-head attention mechanism.Experiments show that the model has better performance for future predictions,with at least a 4.05% reduction in RMSE,achieving a more accurate prediction of water demand over a large area of the city with multiple areas.The second part is predicting the air quality based on graph attention network.According to the characteristics of air quality data,we deal with the missing and abnormal data.Based on the Spearman’s rank correlation coefficient,the factors most related to air quality were obtained and combined with air quality data.Air is diffuse in nature,so information on the geographical location of monitoring sites is important.The spatial and distance information between sites based on geographic location information is obtained as spatial data,and related time series information such as air quality is used as temporal data.In this paper,the spatial data are processed using graph attention network to obtain the impact of neighboring sites on this site.And using diffusion convolution to capture the information between sites,the prediction is then completed by processing the spatial and temporal data using a gated recurrent unit.Experiments show that the model makes more accurate predictions about the future,with at least 7.83% reduction in RMSE. |