Water quality prediction (WQP) is a basic and advanced aspect of water resource management and water pollution prevention and control. Dissolved oxygen serves as a crucial indicator for assessing the quality of river water. Therefore, precise estimation of dissolved oxygen levels can enable timely evaluation of the state of river water quality, facilitating improved river management. so as to improve the performance and generalization ability of the LSTM water quality prediction model, this study focuses on the periodic and nonlinear characteristics of water quality changes. Specifically, the dissolved oxygen (DO) content of Xincheng Bridge in Lanzhou is selected as the research subject. To achieve this, a prediction model called CNN-LSTM is developed by integrating the convolution neural network (CNN) and the long short-term memory network (LSTM). This model demonstrates efficient extraction of water quality characteristic information and enables accurate time series prediction. The prediction error of the model is lower compared to that of the LSTM model. Additionally, the mean absolute error (MAE) and root mean square error (RMSE) of the predicted value (PV) are 13.05% and 4.905% lower than those of the LSTM model, respectively. The accuracy of predicting larger and smaller values is higher, resulting in improved generalization performance.