| Air is indispensable for human survival.In 2021,China has entered the "14th five year plan" stage,and the construction of ecological civilization has begun a new agenda.Air pollution control is an important part of it.Therefore,it is very important to predict the value of air pollution for improving people’s well-being and environmental protection.In this paper,the first step is to use cluster analysis to classify 16 cities in Shandong Province according to the air pollution value,select the typical cities,and use LSTM model to predict the central cities in the three sub categories.The second step is to optimize and adjust the number of neurons in the LSTM model based on the data of Jinan,the capital city of Shandong Province.The third step uses GRU neural network time series prediction model and LSTM advanced model,such as bidirectional LSTM,multidimensional LSTM and other models to predict the three central cities again,and finally analyzes the model by calculating and analyzing the prediction error,model matching degree and running speed.The data in this paper is based on the daily air pollution values of 16 cities in Shandong Province in recent 82 months.Different neural networks are implemented by Python,and the time series data of air pollution values are predicted.The empirical results show that it is reasonable to divide Shandong Province into three clusters,which is consistent with the distribution of air pollution value in Shandong Province;When LSTM model is used to analyze the data in this paper,softsign is more suitable for activation function,and the number of neurons should not be too many.At the same time,Adam is the best optimizer.In the analysis of the results,the accuracy of LSTM neural network prediction model for air quality in three cities is better,especially the multi-dimensional LSTM considering meteorological data has higher accuracy,but the running speed is slightly slow,and the performance of bidirectional LSTM in processing the data in this paper is slightly poor;However,the prediction model error and model matching degree of GRU neural network are slightly worse,but the running speed is faster.Through the specific analysis of the actual situation,it is found that the overall pollution situation in Shandong Province is light in summer,and serious in winter heating stage,while the pollution in inland cities such as Jinan in summer fluctuates greatly under the influence of strong wind and other factors,while that in coastal cities fluctuates less.At the same time,it is also found that some policy factors have a greater impact on the pollution situation in a certain stage. |