Abstract:this study investigated the comprehensive impacts of alternate distribution of farmland production and rural living units on the water quality of irrigation and drainage channels and the contribution rate of pollutants in the Erhai Basin. Different sections of typical irrigation and drainage ditches in the farmland of the Erhai Basin were selected for continuous sampling observation. Chemical oxygen demand (COD), total nitrogen (TN), total phosphorus (TP), NH4+-N, NO3--N, total dissolved phosphorus (TDP), and particle phosphorus (PP) concentrations of runoff in different sections of the ditch were measured for water quality evaluation. The "centralization" method was used as dimensionless treatment method of data in the gray pattern recognition model. At the same time, the correlation coefficient formula based on the point-to-interval distance was introduced into the model, and the absolute difference in the model calculation was newly defined as intervals. The comprehensive average pollution index was used to calculate the proportion and weight of pollutant pollution in the runoff water quality of the ditch, and it combined the 2 models to objectively and accurately comprehensively evaluate the changes in the water quality categories of different sections of the typical irrigation and drainage ditch in the farmland. The results showed that the TP and TDP concentrations in the runoff from different sections of the typical irrigation and drainage ditch in the farming area of the watershed were continuous increased along the direction of the ditch flow. The TN and NO3--N concentrations in the runoff form different sections of the ditch showed a pattern of increasing first and then stabilizing. The NH4+-N and COD concentrations in the runoff from the monitoring section of different farmland outlet sections in a typical irrigation and drainage ditch were reduced by 13.4%-57.9% and 2.9%-19.3%. The concentration in the runoff from irrigation and drainage ditches flowing through the monitoring sections of different village sections was increased by 22.85%-39.63% and 17.10%-42.01%, respectively. The water quality of runoff from the different sections of the ditch along the direction of the water flow were classified as III, II, IV, IV, V, and V. The calculation of water quality pollutants of the ditch by the comprehensive average pollution index method showed that TN and COD in the ditch of the basin were the main factors causing water pollution. The NO3--N was a main form of TN in water body. This study can reveal the sources and contributions of nitrogen and phosphorus pollution in the Erhai Basin. By comparing 4 water quality evaluation methods of traditional gray correlation evaluation method, single factor evaluation method, comprehensive pollution index method and Nemerow pollution index method, we foud that improved water quality evaluation methods could objectively and accurately evaluate water quality. The improved water quality evaluation method is suitable for water quality evaluation of farmland irrigation and drainage ditches, and provides technological support for clarifying the main pollution factors of non-point source pollution control.