Time series prediction of river water quality is an important method to grasp the changes of river water quality and protect the river water environment. However, due to the time series data of river water quality have strong periodicity, seasonality and nonlinearity, which seriously affects the accuracy of river water quality prediction. In this paper, a new hybrid deep neural network model is proposed for river water quality prediction, which is integrated with Savitaky-Golay (SG) filter, STL time series decomposition method, Self-attention mechanism, and Temporal Convolutional Network (TCN). The SG filter can effectively remove the noise in the time series data of river water quality, and the STL technology can decompose the time series data into trend, seasonal and residual series. The decomposed trend series and residual series are input into the model combining the Self-attention mechanism and TCN respectively for training and prediction. In order to verify the proposed model, this study uses opensource water quality data and private water quality data to conduct experiments, and compares with other water quality prediction models. The experimental results show that our method achieves the best prediction results in the water quality data of two different rivers.