Abstract:Due to the complexity of the water system, it is difficult to establish an ideal nonlinear system with traditional water quality prediction methods. In order to improve the accuracy of water quality prediction, this paper proposes a water quality prediction model that uses the fruit fly algorithm (fruit fly optimization algorithm (FOA) to improve the generalized neural network (general regression neural network (GRNN). Using the global optimization feature of the fruit fly optimization algorithm that can optimize the key parameters, combined with the highprecision approximation ability of the generalized neural network, the FOAGRNN water quality prediction model is established. Four items of data including oxygen content, temperature, total nitrogen, and total phosphorus collected from observation station No.0 in Taihu Lake are selected, and the data are preprocessed and simulated by linear interpolation and normalization. The simulation results show that, compared with the GRNN model and the BP model, the prediction results of FOAGRNN are closer to the true value. The root mean square errors of the four prediction indicators are 0164 83, 0250 39, 0126 59, and 0111 19, respectively, which are all lower than the GRNN model and the BP model have the advantages of strong stability and high accuracy, and have great practical application value in water quality prediction.