: In the sewage treatment process, one of the important steps is to predict the sewage quality, so that we can understand the
changes of the sewage quality. In order to obtain more accurate water quality prediction results, the collected historical sewage data
of a sewage treatment plant is first normalized and missing values is filled, etc., and select seven indicators such as ORP (OxidationReduction Potential), DO (Dissolved Oxygen), pH as input variables; then use the DBSCAN(Density-Based Spatial Clustering of
Applications with Noise) algorithm to obtain the clustered sewage data, thus the similar sewage data are grouped into one category;
finally, the LSTM neural network model is used to predict the values of the Chemical Oxygen Demand (COD), Ammonia Nitrogen
(NH4N) and Total Phosphorus (TP), so as to know the changes of water quality. The experimental results show that the Root Mean
Square Error (RMSE) value and Mean Absolute Error (MAE) value of the prediction results are both small, and the predicted values
are close to the actual values, the prediction results are more accurate.