Abstract:Water quality is a core element related to human health and food security. To address the issue of agricultural water pollution caused by agricultural practices,it is urgent to establish a systematic evaluation of agricultural water quality and reveal its spatiotemporal differentiation characteristics and driving mechanisms. Using the wild horse optimizer-random forest (WHO-RF) model to evaluate the surface water and groundwater quality of 15 farms under the jurisdiction of Jiansanjiang Branch of Heilongjiang Beidahuang Agricultural Reclamation Group Co. ,Ltd. , their spatiotemporal evolution laws were analyzed,and the causes of water quality changes were explored. The results indicated that the water quality of Jiansanjiang Branch met the requirements for agricultural water use. From 2018 to 2020,the surface water quality firstly decreased and then increased,while the groundwater quality firstly increased and then decreased. In 2020,the difference in water quality between the two was the largest. From 2021 to 2022, the surface water and groundwater quality both increased, and the agricultural water quality showed a significant improvement trend. Compared with the central farms, the surface water and groundwater quality of farms near the riverbank underwent significant changes while the spatial heterogeneity of regional water quality was weakened. The OOB index was used to determine the content of TP and NH3-N in surface water,as well as the content of Cl - ,CODMn,and NH3-N in groundwater, which were five key indicators affecting regional agricultural water quality. The average nitrogen fertilizer application rate had the most significant impact on regional agricultural water quality. To test the comprehensive performance of the WHO-RF model,traditional random forest (RF) model and dragonfly algorith-random forest (DA-RF) model were selected for comparative analysis. By comparing four evaluation indicators based on mean absolute percentage error, coefficient of determination, root mean square error,and mean square error,the superiority and reliability of the model in regional water quality evaluation were verified. The results can provide an approach for water quality evaluation, and also provide guidance for regional water quality risk response.