A study on water quality prediction by a hybrid dual channel CNN-LSTM model with attention mechanism

Water resources are the primary condition to maintain the ecological balance and sustainable development of the earth. Accurate prediction of water quality has high socio-economic value and ecological environmental protection value. However, it is difficult to achieve accurate prediction of river water quality data due to the characteristics of time series, seasonality, nonlinearity and excessive influencing factors. According to the characteristics of water quality data, this paper proposes a water quality prediction method based on attention mechanism of dual channel convolutional neural network ( CNN ) and long short-term memory ( LSTM ). Firstly, the river water quality data are cleaned and inputted into two parallel convolutional neural networks ( CNN ) for feature extraction. Then after the fusion level, the data are sent to the long short-term memory network ( LSTM ) for model training. Finally, the attention mechanism is used to optimize the model. The model combines powerful feature extraction ability of CNN , long-term memory ability of LSTM and the ability to highlight key features of attention mechanism ,achieving accurate prediction of river water quality data. Finally, based on the water quality data of the Guangli River, the results show that the Mean Absolute Error ( MAE ) of the proposed method is 2.04, and the Root Mean Square Guangli River Error ( RMSE ) is 2.77.