A method and device for predicting the comprehensive quality of surface water in a river basin

CN123014807APending Publication Date: 2026-10-30SICHUAN CHENGCHAI TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611410909.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

传统地表水评价方案通常依赖单项指标达标判断或人工综合判别,难以同时反映多项污染指标对整体水质状态的共同影响

Benefits of technology

[0015]也就是说,本申请先对流域内多个地表水监测点位在不同采样期次的多源环境监测数据进行预处理得到结构化样本数据表;之后,构建地表水综合质量评价指标体系,确定体系中不同类型的各水质指标的单项污染指数;然后,利用预设组合赋权机制和单项污染指数确定各水质指标的主观权重和客观权重并融合,得到各水质指标的组合权重;之后,利用单项污染指数和组合权重确定结构化样本数据表中各监测样本的地表水综合质量指数,并进行水质等级划分;之后,将地表水综合质量指数作为监督学习标签,利用监测样本训练预设表格预测模型学习多源环境因子与地表水综合质量状态之间的非线性关系,以确定目标表格预测模型;之后,基于目标地表水监测点位的待处理监测样本、目标表格预测模型、等级划分结果以及预设指标敏感性分析策略确定目标预测结果,并确定是否触发预警。这样一来,能够解决现有相关方案中存在的问题,从而实现了面向流域地表水低频小样本监测数据的综合水质预测,并提高了地表水的综合水质预测的可解释性、效率、可靠性、精确性以及泛化能力,进而为流域水环境监测布点优化与污染防控提供了技术支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014807A_ABST
    Figure CN123014807A_ABST
Patent Text Reader

Abstract

The application discloses a kind of basin surface water comprehensive quality prediction method and device, it is related to computer technology field, comprising: obtaining and processing the multi-source environmental monitoring data of multiple surface water monitoring points in basin in different sampling period, obtain sample data table;Surface water comprehensive quality evaluation index system is constructed and the single pollution index of different types of index in system is determined;Based on the subjective, objective weight of each index determined by preset combination weighting mechanism and single pollution index, the quality index of each sample in sample data table is analyzed using the combined weight obtained by fusion and grade division;Quality index is used as supervision learning label, and a predetermined table is used to train a prediction model.Sample prediction model is based on the trained target table, the monitoring sample to be processed, grade division result is predicted, and whether to trigger early warning is determined according to the prediction result.The application can realize the comprehensive water quality prediction for low-frequency small sample monitoring data, improve the explainability and generalization ability of prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for predicting the comprehensive quality of surface water in a watershed. Background Technology

[0002] Watershed surface water monitoring data are typically characterized by low frequency, small sample size, and discontinuous time series, and the water quality of watershed surface water exhibits obvious spatial heterogeneity and stage-specific changes. Traditional surface water assessment schemes usually rely on single indicator compliance judgments or manual comprehensive assessments, which are difficult to simultaneously reflect the combined impact of multiple pollution indicators on the overall water quality status.

[0003] Furthermore, existing solutions have the following problems: 1) The weighting of water quality indices is either subjective or based on a single objective factor; 2) Some solutions directly predict individual indicators such as COD (Chemical Oxygen Demand), ammonia nitrogen, and total phosphorus, failing to reflect the overall water quality status; 3) Some solutions use traditional machine learning to directly predict water quality levels, lacking interpretable comprehensive evaluation labels; 4) Although some solutions calculate water quality indices, they do not consider the characteristics of surface water monitoring data in the watershed, resulting in insufficient model applicability; 5) Under limited monitoring locations, it is difficult to achieve comprehensive water quality prediction for unmonitored locations or unknown samples. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a method and apparatus for predicting the comprehensive quality of surface water in a watershed, which can solve the problems existing in existing related solutions. This enables comprehensive water quality prediction based on low-frequency, small-sample monitoring data of surface water in a watershed, and improves the interpretability, efficiency, reliability, accuracy, and generalization ability of comprehensive surface water quality prediction. Furthermore, it provides technical support for optimizing the layout of watershed water environment monitoring stations and pollution prevention and control. The specific solution is as follows: Firstly, this application provides a method for predicting the comprehensive quality of surface water in a watershed, including: Multi-source environmental monitoring data from multiple surface water monitoring points within the watershed at different sampling periods were acquired, and the multi-source environmental monitoring data were preprocessed to obtain a structured sample data table; the multi-source environmental monitoring data included water quality monitoring data, spatial location data, sampling period data, and river attribute data; Based on the characteristics of surface water pollution in the watershed and the pre-set water environment assessment requirements, a comprehensive surface water quality assessment index system is constructed, and the individual pollution indices of each type of water quality indicator in the assessment index system are determined. The subjective and objective weights of each water quality indicator are determined based on a preset combined weighting mechanism and the single pollution index, and the subjective and objective weights are fused to obtain the combined weights of each water quality indicator. The surface water comprehensive quality index of each monitoring sample in the structured sample data table is determined using the individual pollution index and the combined weight, and the grading result is determined based on the surface water comprehensive quality index; the grading result includes several water quality grades and / or pollution risk grades; The surface water comprehensive quality index is used as a supervised learning label, and the monitoring samples are used to train a preset table prediction model to learn the nonlinear relationship between multi-source environmental factors and surface water comprehensive quality status, so as to determine the trained target table prediction model; the preset table prediction model is a prediction model for small sample table data. The target prediction result is determined based on the monitoring samples to be processed at the target surface water monitoring points, the target table prediction model, the level classification results, and the preset index sensitivity analysis strategy, and whether to trigger an early warning is determined based on the target prediction result.

[0005] Optionally, the preprocessing of the multi-source environmental monitoring data to obtain a structured sample data table includes: The multi-source environmental monitoring data is subjected to complete empty sample deletion to determine the monitoring data after the first processing; The target fields in the first processed monitoring data are filled down to determine the second processed monitoring data; the target fields include river name and cross-sectional attributes. The numerical water quality indicators in the second-treated monitoring data are converted to numerical values ​​to determine the third-treated monitoring data. Missing values ​​are processed in the third-processed monitoring data to determine the fourth-processed monitoring data; The categorical variables in the fourth-processed monitoring data are encoded to determine the fifth-processed monitoring data; The spatial location data and sampling period data in the fifth processed monitoring data are formatted uniformly to determine the sixth processed monitoring data. A structured sample data table is constructed based on the sixth processed monitoring data.

[0006] Optionally, the step of constructing a comprehensive surface water quality evaluation index system based on the characteristics of surface water pollution in the watershed and the preset water environment assessment requirements, and determining the individual pollution indices of each type of water quality indicator in the evaluation index system, includes: A comprehensive surface water quality evaluation index system is constructed based on the characteristics of surface water pollution in the watershed and the pre-set water environment assessment requirements. This system includes basic physicochemical state indicators, organic pollution indicators, nitrogen pollution indicators, and phosphorus pollution indicators. The basic physicochemical state indicators include pH and dissolved oxygen. The organic pollution indicators include chemical oxygen demand, permanganate index, and five-day biochemical oxygen demand. The nitrogen pollution indicators include ammonia nitrogen and total nitrogen. The phosphorus pollution indicators include total phosphorus. Based on the attributes of each water quality indicator in the comprehensive surface water quality evaluation index system, the water quality indicators are divided into pollution-type indicators, positive indicators, and interval-type indicators. For the pollution-type indicators, the corresponding first single pollution index is determined based on the ratio between the indicator monitoring value in the structured sample data table and the preset evaluation standard threshold. For the positive indicator, the corresponding second single pollution index is determined based on the relationship between the indicator monitoring value and the preset evaluation lower limit threshold. For the interval-type indicator, the corresponding third single-item pollution index is determined based on the degree of deviation between the indicator monitoring value, the preset ideal value, and the boundary value of the evaluation interval.

[0007] Optionally, the step of determining the subjective and objective weights of each water quality indicator based on a preset combined weighting mechanism and the individual pollution index, and fusing the subjective and objective weights to obtain the combined weights of each water quality indicator, includes: The analytic hierarchy process (AHP) was used to analyze the degree of pollution impact of each water quality indicator on surface water, and a judgment matrix was constructed based on the corresponding analysis results; the analysis results include importance scores. The subjective weights of each water quality indicator are determined based on the judgment matrix, eigenvalue method, and preset consistency verification rules. Each of the individual pollution indices is normalized to obtain a standardized matrix; Based on the standardized matrix and entropy weight method, the degree of information difference of each water quality indicator in different monitoring samples is analyzed to determine the objective weight of each water quality indicator. The subjective weights and objective weights are linearly fused according to a preset weight fusion coefficient, and the corresponding fused weights are normalized to determine the combined weights of each water quality indicator.

[0008] Optionally, the step of determining the comprehensive surface water quality index of each monitoring sample in the structured sample data table using the individual pollution index and the combined weight, and determining the grade classification result based on the comprehensive surface water quality index, includes: For any monitoring sample in the structured sample data table, the weighting result is determined by weighting the individual pollution index of each water quality indicator corresponding to the current monitoring sample with the combined weight. The surface water comprehensive quality index of the current monitoring sample is determined based on the weighted results of each of the aforementioned water quality indicators; wherein, the surface water comprehensive quality index is used to characterize the comprehensive pollution degree of the corresponding monitoring sample relative to the preset water environment assessment target; The comprehensive quality of surface water is classified into grades based on the numerical range of the comprehensive surface water quality index to determine the classification results.

[0009] Optionally, the step of using the surface water comprehensive quality index as a supervised learning label and training a preset table prediction model using the monitoring samples to learn the nonlinear relationship between multi-source environmental factors and the surface water comprehensive quality status includes: The monitoring samples in the structured sample data table are divided into training and test sets by grouping the data according to the monitoring points. The water quality indicators, spatial location, sampling period, and river attributes in the training set are used as input features of the preset table prediction model, and the surface water comprehensive quality index corresponding to the training set is used as a supervision label to train the preset table prediction model. During model training, the model parameters are adjusted according to the nonlinear mapping relationship between the input features and the supervision labels to complete the model training and obtain the trained table prediction model. The trained table prediction model is validated based on the test set and preset evaluation metrics, and the trained table prediction model is determined as the target table prediction model when the validation is successful; the preset evaluation metrics include the coefficient of determination, root mean square error, and mean absolute error.

[0010] Optionally, the step of determining the target prediction result based on the monitoring samples to be processed from the target surface water monitoring points, the target table prediction model, the level classification results, and the preset index sensitivity analysis strategy, and determining whether to trigger an early warning based on the target prediction result, includes: After determining the target table prediction model, the water quality index changes before and after deletion of any of the water quality indicators by using the target table prediction model to determine the sensitivity analysis results of the watershed; the sensitivity analysis results include the average relative change rate of each water quality indicator. The target surface water comprehensive quality index is obtained by inputting the monitoring samples to be treated from the target surface water monitoring points into the target table prediction model; The target level is determined based on the target surface water comprehensive quality index and the grading results; the target level includes the target water quality level and / or the target pollution risk level. The target prediction results are determined based on the sensitivity analysis results of the indicators, the target surface water comprehensive quality index, and the target level. The target level in the target prediction result is used to determine whether the preset early warning triggering conditions are met, so as to determine the early warning triggering judgment result.

[0011] Secondly, this application provides a comprehensive surface water quality prediction device for a watershed, comprising: The sample data table acquisition module is used to acquire multi-source environmental monitoring data from multiple surface water monitoring points within the watershed at different sampling periods, and to preprocess the multi-source environmental monitoring data to obtain a structured sample data table; the multi-source environmental monitoring data includes water quality monitoring data, spatial location data, sampling period data, and river attribute data; The indicator system construction module is used to construct a comprehensive surface water quality evaluation indicator system based on the characteristics of surface water pollution in the watershed and the preset water environment assessment requirements, and to determine the individual pollution index of each type of water quality indicator in the evaluation indicator system. The combined weighting module is used to determine the subjective weight and objective weight of each water quality indicator based on a preset combined weighting mechanism and the single pollution index, and to fuse the subjective weight and the objective weight to obtain the combined weight of each water quality indicator. The grading module is used to determine the comprehensive surface water quality index of each monitoring sample in the structured sample data table using the individual pollution index and the combined weight, and to determine the grading result based on the comprehensive surface water quality index; the grading result includes several water quality levels and / or pollution risk levels; The model training module is used to use the surface water comprehensive quality index as a supervised learning label and to train a preset table prediction model using the monitoring samples to learn the nonlinear relationship between multi-source environmental factors and the surface water comprehensive quality status, so as to determine the trained target table prediction model; the preset table prediction model is a prediction model for small sample table data. The prediction module is used to determine the target prediction result based on the monitoring samples to be processed at the target surface water monitoring point, the target table prediction model, the level classification result, and the preset index sensitivity analysis strategy, and to determine whether to trigger an early warning based on the target prediction result.

[0012] Optionally, the sample data table acquisition module includes: The first data processing unit is used to perform full empty sample deletion on the multi-source environmental monitoring data to determine the monitoring data after the first processing. The second data processing unit is used to fill down the target fields in the first processed monitoring data to determine the second processed monitoring data; the target fields include river name and cross-sectional attributes. The third data processing unit is used to perform numerical conversion on the numerical water quality indicators in the second processed monitoring data in order to determine the third processed monitoring data. The fourth data processing unit is used to process the missing values ​​in the third processed monitoring data to determine the fourth processed monitoring data. The fifth data processing unit is used to encode the categorical variables in the fourth processed monitoring data to determine the fifth processed monitoring data; The sixth data processing unit is used to unify the format of the spatial location data and the sampling period data in the fifth processed monitoring data in order to determine the sixth processed monitoring data. The data table determination unit is used to construct a structured sample data table based on the sixth processed monitoring data.

[0013] Optionally, the indicator system construction module includes: The system construction unit is used to construct a comprehensive surface water quality evaluation index system based on the characteristics of surface water pollution in the watershed and the preset water environment assessment requirements. The comprehensive surface water quality evaluation index system includes basic physicochemical state indicators, organic pollution indicators, nitrogen pollution indicators, and phosphorus pollution indicators. The basic physicochemical state indicators include pH and dissolved oxygen. The organic pollution indicators include chemical oxygen demand, permanganate index, and five-day biochemical oxygen demand. The nitrogen pollution indicators include ammonia nitrogen and total nitrogen. The phosphorus pollution indicator includes total phosphorus. The indicator classification unit is used to classify the water quality indicators into pollution-type indicators, positive indicators, and interval-type indicators according to the attributes of each water quality indicator in the comprehensive surface water quality evaluation indicator system. The first coefficient determination unit is used to determine the corresponding first single pollution index for the pollution type index based on the ratio between the index monitoring value in the structured sample data table and the preset evaluation standard threshold. The second coefficient determination unit is used to determine the corresponding second single pollution index for the positive index based on the relationship between the index monitoring value and the preset evaluation lower limit threshold. The third coefficient determination unit is used to determine the corresponding third single pollution index for the interval-type index based on the degree of deviation between the index monitoring value, the preset ideal value and the evaluation interval boundary value.

[0014] As can be seen, in this application, multi-source environmental monitoring data from multiple surface water monitoring points within a watershed at different sampling periods are obtained, and the multi-source environmental monitoring data is preprocessed to obtain a structured sample data table; the multi-source environmental monitoring data includes water quality monitoring data, spatial location data, sampling period data, and river attribute data; a comprehensive surface water quality evaluation index system is constructed based on the watershed surface water pollution characteristics and preset water environment assessment requirements, and the individual pollution indices of different types of water quality indicators in the evaluation index system are determined; the subjective weight and objective weight of each water quality indicator are determined based on a preset combined weighting mechanism and the individual pollution indices, and the subjective weight and objective weight are fused to obtain the combined weight of each water quality indicator; the individual pollution indices and the combined weights are used to determine... The comprehensive surface water quality index of each monitoring sample in the structured sample data table is used to determine the grading results based on the comprehensive surface water quality index. The grading results include several water quality grades and / or pollution risk grades. The comprehensive surface water quality index is used as a supervised learning label, and the monitoring samples are used to train a preset table prediction model to learn the nonlinear relationship between multi-source environmental factors and the comprehensive surface water quality status, so as to determine the trained target table prediction model. The preset table prediction model is a prediction model for small sample table data. The target prediction result is determined based on the monitoring samples to be treated at the target surface water monitoring point, the target table prediction model, the grading results, and the preset index sensitivity analysis strategy. The triggering of an early warning is determined based on the target prediction result.

[0015] In other words, this application first preprocesses multi-source environmental monitoring data from multiple surface water monitoring points within the watershed at different sampling periods to obtain a structured sample data table. Then, it constructs a comprehensive surface water quality evaluation index system and determines the individual pollution indices for different types of water quality indicators within the system. Next, it uses a pre-set combination weighting mechanism and individual pollution indices to determine and integrate the subjective and objective weights of each water quality indicator, obtaining a combined weight for each indicator. Then, it uses the individual pollution indices and combined weights to determine the comprehensive surface water quality index for each monitoring sample in the structured sample data table and classifies the water quality levels. Next, it uses the comprehensive surface water quality index as a supervised learning label and trains a pre-set table prediction model using monitoring samples to learn the nonlinear relationship between multi-source environmental factors and the comprehensive surface water quality status, thereby determining the target table prediction model. Finally, based on the unprocessed monitoring samples from the target surface water monitoring points, the target table prediction model, the level classification results, and the pre-set indicator sensitivity analysis strategy, it determines the target prediction results and whether an early warning is triggered. This approach addresses the problems existing in current solutions, enabling comprehensive water quality prediction based on low-frequency, small-sample monitoring data of surface water in watersheds. It also improves the interpretability, efficiency, reliability, accuracy, and generalization ability of comprehensive surface water quality prediction, thereby providing technical support for optimizing the layout of watershed water environment monitoring sites and pollution prevention and control. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0017] Figure 1 A flowchart of a method for predicting the comprehensive quality of surface water in a watershed, provided in this application; Figure 2 A flowchart of a specific method for predicting the comprehensive quality of surface water in a watershed, provided in this application; Figure 3 This application provides a schematic diagram of the construction of multi-source surface water data for a watershed. Figure 4 A box plot of watershed surface water chemical indicators provided for this application; Figure 5 A schematic diagram of a comprehensive surface water quality evaluation index system provided in this application; Figure 6 A flowchart illustrating a combined weighting process provided in this application; Figure 7A schematic diagram illustrating the weight distribution of various water quality indicators provided in this application; Figure 8 A schematic diagram illustrating the training and prediction process of a prediction model provided in this application; Figure 9 A schematic diagram showing the comparison between the calculated and predicted values ​​of the comprehensive surface water quality index provided in this application; Figure 10(a) is a schematic diagram of a comprehensive surface water quality index classification provided in this application; Figure 10(b) is a schematic diagram of the sensitivity analysis results of an indicator provided in this application; Figure 11 A schematic diagram of a watershed surface water comprehensive quality prediction device provided in this application. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] The existing solutions have the following problems: 1) The weighting of water quality indices is either subjective or based on a single objective; 2) Some solutions directly predict individual indicators such as COD (Chemical Oxygen Demand), ammonia nitrogen, and total phosphorus, which cannot reflect the overall water quality status; 3) Some solutions use traditional machine learning to directly predict water quality levels, lacking interpretable comprehensive evaluation labels; 4) Although some solutions calculate water quality indices, they do not consider the characteristics of surface water monitoring data in the watershed, resulting in insufficient model applicability; 5) Under the condition of limited monitoring points, it is difficult to achieve comprehensive water quality prediction for unmonitored points or unknown samples.

[0020] To address this, this application provides a comprehensive water quality prediction scheme for watershed surface water, which can solve the problems existing in the existing related schemes. This enables comprehensive water quality prediction based on low-frequency, small-sample monitoring data of watershed surface water, and improves the interpretability, efficiency, reliability, accuracy, and generalization ability of comprehensive water quality prediction for surface water. In turn, it provides technical support for optimizing the layout of watershed water environment monitoring points and pollution prevention and control.

[0021] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for predicting the comprehensive quality of surface water in a watershed, including: Step S11: Obtain multi-source environmental monitoring data from multiple surface water monitoring points within the watershed at different sampling periods, and preprocess the multi-source environmental monitoring data to obtain a structured sample data table; the multi-source environmental monitoring data includes water quality monitoring data, spatial location data, sampling period data, and river attribute data.

[0022] In this embodiment, combined with Figure 2 As shown, surface water monitoring data from a certain watershed was selected as the implementation object. Multiple surface water monitoring points were set up in this watershed, and water quality samples were collected in multiple sampling periods to obtain multi-source monitoring data. Specifically: empty samples were deleted from the multi-source environmental monitoring data to determine the first processed monitoring data; target fields in the first processed monitoring data were filled down to determine the second processed monitoring data; the target fields included river name and cross-sectional attributes; numerical water quality indicators in the second processed monitoring data were numerically converted to determine the third processed monitoring data; missing values ​​were processed in the third processed monitoring data to determine the fourth processed monitoring data; categorical variables in the fourth processed monitoring data were encoded to determine the fifth processed monitoring data; the spatial location data and sampling period data in the fifth processed monitoring data were formatted to determine the sixth processed monitoring data; and a structured sample data table was constructed based on the sixth processed monitoring data.

[0023] It should be pointed out that, in combination Figure 3 As shown, the collected multi-source data, namely multi-source environmental monitoring data, includes water quality monitoring data, spatial location data, sampling period data, and river attribute data. Water quality monitoring data includes one or more of the following: pH (potential of hydrogen), dissolved oxygen, water temperature, conductivity, suspended solids, chemical oxygen demand, permanganate index, five-day biochemical oxygen demand, ammonia nitrogen, nitrate, nitrite, total nitrogen, total phosphorus, phosphate, potassium, sodium, calcium, magnesium, chloride ions, sulfate, and bicarbonate. Spatial location data includes longitude and latitude; sampling period data is used to characterize different sampling stages; river attribute data includes river name, main stream / tributary type, or cross-sectional attributes. In one specific embodiment, the monitoring status of each indicator in the water quality monitoring data can be as follows: Figure 4 As shown, in Figure 4 In (a), pH is a dimensionless quantity; in (d), conductivity is measured in mS / cm; and in (b, c, e, f, g, h, i, j, k, l), chemical oxygen demand, total nitrogen, total phosphorus, permanganate index, dissolved oxygen, nitrate ions, five-day biochemical oxygen demand, suspended solids, nitrite ammonia, and ammonium ions in ammonia nitrogen are all measured in mg / L.

[0024] Understandably, the aforementioned multi-source data can be presented in Excel format to form a table. The multi-source data in the table is then preprocessed: all blank rows are deleted; for fields with empty values ​​due to merged cells, such as river attributes and river names, downfill is used to fill in the missing values; and the numerical types of fields such as pH, dissolved oxygen, suspended solids, conductivity, total nitrogen, ammonia nitrogen, nitrate, nitrite, total phosphorus, chemical oxygen demand, permanganate index, five-day biochemical oxygen demand, longitude, latitude, and sampling period are converted. Furthermore, during the preprocessing stage, the following can be performed: missing values ​​are imputed with the median or their inclusion in the calculation is determined based on the missing value rate; categorical variables are coded; and the spatial location and sampling period data are formatted uniformly. After preprocessing, a watershed surface water sample dataset with a monitoring point-sampling period structure is formed. Each sample in this sample data table includes the point name, sampling period, latitude and longitude, river name, cross-sectional attributes, and multiple water quality indicators.

[0025] Furthermore, in one specific implementation, the multi-source data in the monitoring sample may further include land use data, rainfall data, population density data, pollution source distribution data, DEM (Digital Elevation Model) topographic data, river network distance data, and remote sensing index data. When the aforementioned external spatial environment data is available, a buffer zone can be constructed around each monitoring point to extract the proportion of cultivated land, construction land, forest land, distance to residential areas, distance to sewage outlets, cumulative rainfall before sampling, and topographic factors, which will then be used as extended input features for the prediction model.

[0026] Step S12: Construct a comprehensive surface water quality evaluation index system based on the characteristics of surface water pollution in the watershed and the preset water environment assessment requirements, and determine the individual pollution index of each type of water quality index in the evaluation index system.

[0027] Combination Figure 2As shown, this embodiment will also construct a comprehensive surface water quality evaluation index system based on the characteristics of surface water environmental quality and the availability of monitoring indicators, and calculate its pollution index according to the attributes of each water quality indicator. That is: a comprehensive surface water quality evaluation index system will be constructed based on the surface water pollution characteristics of the watershed and the preset water environment evaluation requirements. The comprehensive surface water quality evaluation index system includes basic physicochemical state indicators, organic pollution indicators, nitrogen pollution indicators, and phosphorus pollution indicators. The basic physicochemical state indicators include pH and dissolved oxygen. The organic pollution indicators include chemical oxygen demand, permanganate index, and five-day biochemical oxygen demand. The nitrogen pollution indicators include ammonia nitrogen and total nitrogen. The phosphorus pollution indicators include... The standard includes total phosphorus; based on the attributes of each water quality indicator in the comprehensive surface water quality evaluation index system, the water quality indicators are divided into pollution-type indicators, positive indicators, and interval-type indicators; for the pollution-type indicators, the corresponding first single pollution index is determined according to the ratio between the indicator monitoring value in the structured sample data table and the preset evaluation standard threshold; for the positive indicators, the corresponding second single pollution index is determined according to the relationship between the indicator monitoring value and the preset evaluation lower limit threshold; for the interval-type indicators, the corresponding third single pollution index is determined according to the degree of deviation between the indicator monitoring value, the preset ideal value, and the evaluation interval boundary value.

[0028] It is important to understand that, in combination Figure 5 As shown, the constructed comprehensive surface water quality evaluation index system includes: 1) basic physicochemical state indicators: pH, dissolved oxygen (DO); 2) organic pollution indicators: chemical oxygen demand (COD), permanganate index (COD). Mn , Chemical Oxygen Demand of Potassium Permanganate, 5-day Biochemical Oxygen Demand (BOD5); 3) Nitrogen pollution indicators: ammonia nitrogen (NH4, which is the concentration of free ammonia (NH3-N) and ammonium ions (NH4+) in water bodies. + -N) The sum of nitrogen in both forms, total nitrogen (TN); 4) Phosphorus pollution indicators: total phosphorus (TP). Furthermore, in specific implementation, if the missing rate of a certain indicator is higher than a preset threshold, that indicator will be considered an optional indicator and will not be included in the current surface water comprehensive quality evaluation indicator system for SWQI (Surface Water Quality Index) prediction; if subsequent monitoring data is complete, it can be reinstated into the evaluation system.

[0029] Furthermore, for each indicator in the system, evaluation standard thresholds are set according to the surface water evaluation targets. In one specific implementation, taking the Class III surface water quality target as an example, the evaluation standard threshold for pH is 6–9, the evaluation standard threshold for dissolved oxygen is 5 mg / L, the evaluation standard threshold for chemical oxygen demand is 20 mg / L, the evaluation standard threshold for permanganate index is 6 mg / L, the evaluation standard threshold for five-day biochemical oxygen demand is 4 mg / L, the evaluation standard threshold for ammonia nitrogen is 1 mg / L, the evaluation standard threshold for total nitrogen is 1 mg / L, and the evaluation standard threshold for total phosphorus is 0.2 mg / L.

[0030] Furthermore, in this embodiment, after classifying the indicator types, the individual pollution indices for different types of indicators are calculated separately according to pollution-type, positive-type, and interval-type indicators. For pollution-type indicators, including chemical oxygen demand (COD), permanganate index, five-day biochemical oxygen demand (BOD5), ammonia nitrogen, total nitrogen, and total phosphorus, their individual pollution indices are as follows: ; in, For the sample data table, the first In the nth sample Individual pollution indices of each indicator, For the first In the nth sample The measured values ​​of each indicator For the first The evaluation criteria threshold for each indicator.

[0031] For dissolved oxygen, a positive indicator, its individual pollution index is: ; in, This is the lower limit of the threshold values ​​in the evaluation criteria for dissolved oxygen. This is the measured value of dissolved oxygen.

[0032] For the interval-type index pH, the degree of deviation from the ideal value is calculated using the ideal value and upper and lower thresholds as constraints: ; ; in, For the ideal pH value, This is the lower limit of the pH evaluation standard threshold. This is the upper limit of the pH evaluation standard threshold.

[0033] Step S13: Determine the subjective weight and objective weight of each water quality indicator based on the preset combined weighting mechanism and the single pollution index, and fuse the subjective weight and the objective weight to obtain the combined weight of each water quality indicator.

[0034] In this embodiment, combined with Figure 2 As shown, after constructing the system, a combined weighting process will be performed, including subjective importance scores and objective importance scores. Specifically: the analytic hierarchy process (AHP) will be used to analyze the degree of pollution impact of each water quality indicator on surface water, and a judgment matrix will be constructed based on the corresponding analysis results; the analysis results include importance scores; the subjective weights of each water quality indicator will be determined according to the judgment matrix, eigenvalue method, and preset consistency verification rules; each individual pollution index will be normalized to obtain a standardized matrix; the degree of information difference of each water quality indicator in different monitoring samples will be analyzed based on the standardized matrix and entropy weight method to determine the objective weights of each water quality indicator; the subjective weights and objective weights will be linearly fused according to a preset weight fusion coefficient, and the corresponding fused weights will be normalized to determine the combined weights of each water quality indicator.

[0035] It is important to understand that, in combination Figure 6 As shown, in this embodiment, the Analytic Hierarchy Process (AHP) can be used for subjective weight analysis. Based on the surface water pollution control targets, nitrogen, phosphorus, and nutrient pollution indicators and organic pollution indicators are assigned higher importance, while basic physicochemical indicators such as pH are assigned lower importance. In a specific implementation, total nitrogen, total phosphorus, and ammonia nitrogen are set as high-importance indicators, dissolved oxygen and chemical oxygen demand are set as relatively high-importance indicators, permanganate index and five-day biochemical oxygen demand are set as moderate-importance indicators, and pH is set as a relatively low-importance indicator. A judgment matrix is ​​constructed based on the above importance scores, and the AHP weights are calculated using the eigenvalue method. A consistency check is then performed to obtain the [number of weights]. Subjective weights of each indicator .

[0036] Meanwhile, based on the single-item pollution index matrix, the objective weight of each indicator is calculated using the entropy weight method. The greater the difference between indicators among samples, the higher the amount of information they provide, and the greater the corresponding entropy weight. Specifically, the objective weight of each indicator is calculated using the entropy weight method. First, the single-item pollution index matrix is ​​normalized to obtain a standardized matrix; then, the information entropy of each indicator is calculated: ; in, For the first Information entropy of each indicator For the first In the nth sample The normalization ratio of each indicator, This represents the number of samples.

[0037] Calculate the first Coefficient of difference of each indicator : ; And obtained the first Entropy weighting of each indicator : ; Where m represents the number of indicators.

[0038] Then, the AHP weights and entropy weights are combined using a linear fusion method to obtain the combined weights for each sample. : ; in, This is the fusion coefficient. In one implementation, =0.5 indicates that subjective and objective weights contribute equally. The combined weights can then be further normalized to satisfy: In one specific implementation, the following can be obtained: Figure 7 The diagram shows the distribution of indicator weights.

[0039] Step S14: Determine the comprehensive surface water quality index of each monitoring sample in the structured sample data table using the individual pollution index and the combined weight, and determine the classification result based on the comprehensive surface water quality index; the classification result includes several water quality levels and / or pollution risk levels.

[0040] In this embodiment, combined with Figure 2 As shown, the SWQI of the samples is calculated and classified into levels. That is, for any monitoring sample in the structured sample data table, the individual pollution index of each water quality indicator corresponding to the current monitoring sample is weighted according to the combined weight to determine the weighting result; the surface water comprehensive quality index of the current monitoring sample is determined according to the weighting result of each water quality indicator; wherein, the surface water comprehensive quality index is used to characterize the comprehensive pollution degree of the corresponding monitoring sample relative to the preset water environment assessment target; the surface water comprehensive quality is classified into levels based on the numerical range of the surface water comprehensive quality index to determine the level classification result.

[0041] It should be understood that this embodiment calculates the SWQI for each sample based on individual pollution indices and combined weights: ; in, For the first The SWQI is the surface water comprehensive quality index for each sample. The higher the SWQI, the higher the overall pollution risk; the lower the SWQI, the better the overall water quality.

[0042] Furthermore, this embodiment classifies the overall surface water quality based on SWQI values. In one specific implementation, SWQI is a comprehensive pollution index constructed using the Class III water quality limit as the standard value for each evaluation indicator. Therefore, SWQI=1 indicates that the overall evaluation indicators meet the Class III water quality target requirements; SWQI less than 1 indicates that the overall water quality is better than the target water quality, and SWQI greater than 1 indicates that the overall water quality deviates from the target water quality. The larger the SWQI value, the higher the overall pollution level and the greater the water quality risk. For example: SWQI less than or equal to 0.5 is classified as Excellent; SWQI greater than 0.5 and less than or equal to 1.0 is classified as Good; SWQI greater than 1.0 and less than or equal to 2.0 is classified as Medium; SWQI greater than 2.0 and less than or equal to 3.0 is classified as Poor; and SWQI greater than 3.0 is classified as Extremely Poor. The classification rules are shown in Table 1 below.

[0043] Table 1 SWQI Classification Range .

[0044] The aforementioned thresholds can be adjusted based on watershed water function objectives, surface water assessment categories, or regional management needs. Furthermore, the above grading method is based on the degree of deviation of the SWQI from the target water quality standard and is primarily used for comprehensive water quality assessment, risk level identification, and early warning management; it does not correspond to water quality categories I through V.

[0045] Step S15: Use the surface water comprehensive quality index as a supervised learning label, and use the monitoring samples to train a preset table prediction model to learn the nonlinear relationship between multi-source environmental factors and surface water comprehensive quality status, so as to determine the trained target table prediction model; the preset table prediction model is a prediction model for small sample table data.

[0046] In this embodiment, the surface water comprehensive quality index of the samples is then used as a supervised learning label for predictive model training. The preset table prediction model can be a TabPFN model (Tabular Prior-data Fitted Network, also often simply referred to as the table basic model). Specifically: the monitoring samples in the structured sample data table are divided into training and test sets by grouping data according to monitoring points; the water quality indicators, spatial locations, sampling periods, and river attributes in the training set are used as input features of the preset table prediction model, and the surface water comprehensive quality index corresponding to the training set is used as a supervised label to train the preset table prediction model; during the model training process, the model parameters are adjusted according to the nonlinear mapping relationship between the input features and the supervised label to complete the model training and obtain the trained table prediction model; the trained table prediction model is validated based on the test set and preset evaluation indicators, and when the validation is successful, the trained table prediction model is determined as the target table prediction model; the preset evaluation indicators include the coefficient of determination, root mean square error, and mean absolute error.

[0047] It should be understood that in this embodiment, the SWQI calculated in the aforementioned steps is used as a supervised learning label, and the on-site rapid monitoring indicators, nitrogen speciation indicators, spatial location, sampling period, and river attributes are used as input features of the model to construct training samples for the TabPFN model. The model learns the nonlinear mapping relationship between water quality monitoring indicators and the comprehensive water quality index through historical monitoring samples. In unknown monitoring samples, it can quickly obtain the predicted SWQI value and its water quality level without re-performing the combined weighting calculation. Since a large number of samples to be evaluated in watershed monitoring work have not yet completed comprehensive evaluation, the prediction model established by this invention can directly and quickly obtain the predicted SWQI value based on the monitoring indicators without re-performing the calculation of individual pollution indices, combined weighting, and comprehensive index calculation, thereby improving the efficiency of comprehensive water quality evaluation. In one specific embodiment, the first... i Model input features for each sample This includes pH, water temperature, dissolved oxygen, conductivity, suspended solids, nitrate, nitrite, longitude, latitude, sampling period, river attributes, and river name. Its expression is shown below: ; in, Water temperature For dissolved oxygen, For electrical conductivity, As suspended matter, It is nitrate. It is nitrite. and They are longitude and latitude, respectively. For sampling periods, For cross-sectional attributes, It is the name of a river.

[0048] Categorical features are encoded using one-hot encoding, and missing values ​​are imputed for numerical features. Then, the TabPFNRegressor model (a regression model within the TabPFN framework specifically designed for continuous value prediction tasks) is used to construct a model for SWQI regression prediction, i.e., a pre-defined tabular prediction model. ; in, For the predicted SWQI value, This is a pre-defined table prediction model.

[0049] During the model evaluation phase, a site-based grouping method is adopted, with a portion of the monitoring sites used as the training set and the remaining monitoring sites used as the test set. This partitioning method ensures that different sampling periods of the same monitoring site do not appear in both the training and test sets simultaneously, thus avoiding information leakage caused by the same site's information appearing in both sets. This allows for testing the model's predictive ability for sites not included in the training set. Furthermore, during the model application phase, the final model can be refitted using all historical monitoring samples to predict the SWQI of new sites, new sampling periods, or samples to be predicted.

[0050] Specifically, regarding model evaluation, this embodiment uses the coefficient of determination R0. 2 The Coefficient of Determination, Root Mean Squared Error (RMSE), and Mean Absolute Error (MAE) are used to evaluate the predictive ability of the tabular prediction model for SWQI. 2 The closer the value is to 1, the stronger the model's fit; the smaller the RMSE and MAE, the lower the prediction error. Among these, the coefficient of determination R... 2 The expressions for the root mean square error (RMSE) and the mean absolute error (MAE) are as follows: ; ; ; in, For the calculated SWQI, Let denoted as SWQI, and n be the number of samples. Furthermore, considering the small sample size of the watershed surface water data, the model's stability can be tested through repeated K-fold cross-validation. For example, 5-fold cross-validation can be used and repeated 5 times to obtain the mean and standard deviation of multiple evaluation results to examine its stability.

[0051] Step S16: Determine the target prediction result based on the monitoring samples to be processed at the target surface water monitoring point, the target table prediction model, the level classification result, and the preset index sensitivity analysis strategy, and determine whether to trigger an early warning based on the target prediction result.

[0052] In this embodiment, combined with Figure 8 As shown, the trained target table prediction model can be used to process monitoring samples from known or unknown monitoring points. It utilizes these samples to predict the comprehensive water quality of surface water and determine whether an early warning is needed. Specifically: after determining the target table prediction model, any water quality indicator is deleted, and the target table prediction model is used to analyze the change in the comprehensive surface water quality index before and after the deletion, to determine the indicator sensitivity analysis results for the watershed. The indicator sensitivity analysis results include the average relative change rate of each water quality indicator. The monitoring samples to be processed from the target surface water monitoring points are input into the target table prediction model to obtain the target comprehensive surface water quality index. The target level is determined based on the target comprehensive surface water quality index and the level classification results. The target level includes the target water quality level and / or the target pollution risk level. The target prediction result is determined based on the indicator sensitivity analysis results, the target comprehensive surface water quality index, and the target level. The target level in the target prediction result is used to determine whether the preset early warning triggering conditions are met, thus determining the early warning triggering judgment result.

[0053] It is understandable that this embodiment employs an indicator omission sensitivity analysis method to identify key water quality indicators affecting the SWQI. The specific steps are as follows: 1) Calculate the original SWQI including all indicators; 2) Delete one water quality indicator at a time; 3) Renormalize the weights of the remaining indicators; 4) Recalculate the SWQI after deleting the indicator; 5) Calculate the average relative rate of change between the original SWQI and the SWQI after deleting the indicator; 6) Use the average relative rate of change as the sensitivity index of the indicator. That is, by deleting one indicator at a time and recalculating the SWQI, and calculating the average relative rate of change of the SWQI before and after deletion, the larger the sensitivity index, the more significant the influence of the indicator on the SWQI. Furthermore, key input features affecting the TabPFN prediction results can be identified by combining model feature importance analysis. Comparing the SWQI sensitivity analysis results with the model feature importance results can be used to identify priority indicators for surface water pollution control in the watershed.

[0054] It should be understood that after obtaining the continuous SWQI predicted value output by the model in this embodiment, the surface water quality level or pollution risk level will be further classified based on the continuous SWQI predicted value. Specifically, the SWQI predicted value output by the TabPFN model is input into an SWQI classification function with the aforementioned classification rules to obtain the predicted water quality level: ; in, For the first Predicted water quality grade for each sample This is the SWQI threshold grading function.

[0055] It should be noted that the final output includes: 1) AHP weights, entropy weights, and combined weights for each water quality indicator; 2) Individual pollution indices for each sample; 3) Calculated SWQI values ​​for each sample; 4) SWQI levels for each sample; 5) TabPFN predicted SWQI; 6) Predicted water quality levels; 7) Model evaluation indicators; 8) Cross-validation results; 9) Sensitivity analysis results for indicators; 10) Water quality parameter distribution maps, weighted bar charts, SWQI level charts, sensitivity analysis charts, measured-predicted SWQI scatter plots, feature importance charts, and level confusion matrices. In one specific implementation, the following can be obtained: Figure 9 The diagram shows a comparison between the calculated and predicted values ​​of the surface water comprehensive quality index, Figure 10(a) shows the SWQI classification diagram, and Figure 10(b) shows the indicator sensitivity analysis results.

[0056] In summary, this embodiment provides a comprehensive watershed surface water quality prediction scheme based on a combined weighting and tabular prediction model. This scheme is suitable for low-frequency, small-sample, and discontinuous time-series watershed surface water monitoring data, and has the following beneficial effects: 1) A SWQI index system suitable for watershed surface water was constructed, which can comprehensively reflect the combined impact of basic physicochemical state, organic pollution, nitrogen pollution, and phosphorus pollution on surface water quality; 2) A combination of AHP and entropy weighting method was adopted for weighting, which takes into account the differences in surface water pollution control targets and sample data, and avoids the shortcomings of purely subjective or purely objective weighting; 3) This invention uses SWQI as an interpretable supervised learning label, so that the machine learning prediction results have clear water quality evaluation significance. 4) The TabPFN model is used for prediction of small sample tabular data, which is suitable for low-frequency and discontinuous monitoring data of surface water in watersheds, avoiding the dependence of traditional time-series deep models on long-term series data; 5) The data partitioning method of grouping by monitoring point can more rigorously test the model's prediction ability for points not involved in training, and reduce the risk of over-evaluation caused by information leakage at the same point; 6) It can realize water quality level identification and pollution risk early warning based on the predicted SWQI, providing technical support for watershed water environment management, monitoring point optimization and pollution source control; 7) By combining sensitivity analysis and model feature importance analysis, key pollution factors affecting the comprehensive quality of surface water can be identified, providing a basis for precise governance.

[0057] Therefore, in this embodiment, the multi-source environmental monitoring data from multiple surface water monitoring points in different sampling periods within the watershed are first preprocessed to obtain a structured sample data table. Then, a comprehensive surface water quality evaluation index system is constructed, and the individual pollution indices of different types of water quality indicators in the system are determined. Next, a preset combined weighting mechanism and individual pollution indices are used to determine and integrate the subjective and objective weights of each water quality indicator to obtain the combined weights of each water quality indicator. Then, the individual pollution indices and combined weights are used to determine the comprehensive surface water quality index of each monitoring sample in the structured sample data table, and water quality levels are classified. Next, the comprehensive surface water quality index is used as a supervised learning label, and a preset table prediction model is trained using monitoring samples to learn the nonlinear relationship between multi-source environmental factors and the comprehensive surface water quality status, in order to determine the target table prediction model. Finally, based on the unprocessed monitoring samples of the target surface water monitoring points, the target table prediction model, the level classification results, and the preset indicator sensitivity analysis strategy, the target prediction result is determined, and it is determined whether an early warning is triggered. This approach addresses the problems existing in current solutions, enabling comprehensive water quality prediction based on low-frequency, small-sample monitoring data of surface water in watersheds. It also improves the interpretability, efficiency, reliability, accuracy, and generalization ability of comprehensive surface water quality prediction, thereby providing technical support for optimizing the layout of watershed water environment monitoring sites and pollution prevention and control.

[0058] See Figure 11 As shown in the figure, this application also discloses a watershed surface water comprehensive quality prediction device, including: The sample data table acquisition module 11 is used to acquire multi-source environmental monitoring data from multiple surface water monitoring points within the watershed at different sampling periods, and to preprocess the multi-source environmental monitoring data to obtain a structured sample data table; the multi-source environmental monitoring data includes water quality monitoring data, spatial location data, sampling period data, and river attribute data; The indicator system construction module 12 is used to construct a comprehensive surface water quality evaluation indicator system based on the characteristics of surface water pollution in the watershed and the preset water environment evaluation requirements, and to determine the individual pollution index of each type of water quality indicator in the evaluation indicator system. The combined weighting module 13 is used to determine the subjective weight and objective weight of each water quality indicator based on the preset combined weighting mechanism and the single pollution index, and to fuse the subjective weight and the objective weight to obtain the combined weight of each water quality indicator. The grading module 14 is used to determine the surface water comprehensive quality index of each monitoring sample in the structured sample data table using the single pollution index and the combined weight, and to determine the grading result based on the surface water comprehensive quality index; the grading result includes several water quality levels and / or pollution risk levels; The model training module 15 is used to use the surface water comprehensive quality index as a supervised learning label and to train a preset table prediction model using the monitoring samples to learn the nonlinear relationship between multi-source environmental factors and the surface water comprehensive quality status, so as to determine the trained target table prediction model; the preset table prediction model is a prediction model for small sample table data. The prediction module 16 is used to determine the target prediction result based on the monitoring samples to be processed at the target surface water monitoring point, the target table prediction model, the level classification result, and the preset index sensitivity analysis strategy, and to determine whether to trigger an early warning based on the target prediction result.

[0059] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0060] Furthermore, the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0061] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0062] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for predicting the comprehensive quality of surface water in a watershed, characterized in that, include: Multi-source environmental monitoring data from multiple surface water monitoring points within the watershed at different sampling periods were acquired, and the multi-source environmental monitoring data were preprocessed to obtain a structured sample data table; the multi-source environmental monitoring data included water quality monitoring data, spatial location data, sampling period data, and river attribute data; Based on the characteristics of surface water pollution in the watershed and the pre-set water environment assessment requirements, a comprehensive surface water quality assessment index system is constructed, and the individual pollution indices of each type of water quality indicator in the assessment index system are determined. The subjective and objective weights of each water quality indicator are determined based on a preset combined weighting mechanism and the single pollution index, and the subjective and objective weights are fused to obtain the combined weights of each water quality indicator. The surface water comprehensive quality index of each monitoring sample in the structured sample data table is determined using the individual pollution index and the combined weight, and the grading result is determined based on the surface water comprehensive quality index; the grading result includes several water quality grades and / or pollution risk grades; The surface water comprehensive quality index is used as a supervised learning label, and the monitoring samples are used to train a preset table prediction model to learn the nonlinear relationship between multi-source environmental factors and surface water comprehensive quality status, so as to determine the trained target table prediction model; the preset table prediction model is a prediction model for small sample table data. The target prediction result is determined based on the monitoring samples to be processed at the target surface water monitoring points, the target table prediction model, the level classification results, and the preset index sensitivity analysis strategy, and whether to trigger an early warning is determined based on the target prediction result.

2. The method for predicting the comprehensive quality of surface water in a watershed according to claim 1, characterized in that, The preprocessing of the multi-source environmental monitoring data to obtain a structured sample data table includes: The multi-source environmental monitoring data is subjected to complete empty sample deletion to determine the monitoring data after the first processing; The target fields in the first processed monitoring data are filled down to determine the second processed monitoring data; the target fields include river name and cross-sectional attributes. The numerical water quality indicators in the second-treated monitoring data are converted to numerical values ​​to determine the third-treated monitoring data. Missing values ​​are processed in the third-processed monitoring data to determine the fourth-processed monitoring data; The categorical variables in the fourth-processed monitoring data are encoded to determine the fifth-processed monitoring data; The spatial location data and sampling period data in the fifth processed monitoring data are formatted uniformly to determine the sixth processed monitoring data. A structured sample data table is constructed based on the sixth processed monitoring data.

3. The method for predicting the comprehensive quality of surface water in a watershed according to claim 1, characterized in that, The process involves constructing a comprehensive surface water quality evaluation index system based on the characteristics of surface water pollution in the watershed and pre-set water environment assessment requirements, and determining the individual pollution indices of various water quality indicators of different types within the evaluation index system, including: A comprehensive surface water quality evaluation index system is constructed based on the characteristics of surface water pollution in the watershed and the pre-set water environment assessment requirements. This system includes basic physicochemical state indicators, organic pollution indicators, nitrogen pollution indicators, and phosphorus pollution indicators. The basic physicochemical state indicators include pH and dissolved oxygen. The organic pollution indicators include chemical oxygen demand, permanganate index, and five-day biochemical oxygen demand. The nitrogen pollution indicators include ammonia nitrogen and total nitrogen. The phosphorus pollution indicators include total phosphorus. Based on the attributes of each water quality indicator in the comprehensive surface water quality evaluation index system, the water quality indicators are divided into pollution-type indicators, positive indicators, and interval-type indicators. For the pollution-type indicators, the corresponding first single pollution index is determined based on the ratio between the indicator monitoring value in the structured sample data table and the preset evaluation standard threshold. For the positive indicator, the corresponding second single pollution index is determined based on the relationship between the indicator monitoring value and the preset evaluation lower limit threshold. For the interval-type indicator, the corresponding third single-item pollution index is determined based on the degree of deviation between the indicator monitoring value, the preset ideal value, and the boundary value of the evaluation interval.

4. The method for predicting the comprehensive quality of surface water in a watershed according to claim 1, characterized in that, The process of determining the subjective and objective weights of each water quality indicator based on a preset combined weighting mechanism and the individual pollution index, and then fusing the subjective and objective weights to obtain the combined weights of each water quality indicator, includes: The analytic hierarchy process (AHP) was used to analyze the degree of pollution impact of each water quality indicator on surface water, and a judgment matrix was constructed based on the corresponding analysis results; the analysis results include importance scores. The subjective weights of each water quality indicator are determined based on the judgment matrix, eigenvalue method, and preset consistency verification rules. Each of the individual pollution indices is normalized to obtain a standardized matrix; Based on the standardized matrix and entropy weight method, the degree of information difference of each water quality indicator in different monitoring samples is analyzed to determine the objective weight of each water quality indicator. The subjective weights and objective weights are linearly fused according to a preset weight fusion coefficient, and the corresponding fused weights are normalized to determine the combined weights of each water quality indicator.

5. The method for predicting the comprehensive quality of surface water in a watershed according to claim 1, characterized in that, The process of determining the comprehensive surface water quality index for each monitoring sample in the structured sample data table using the individual pollution index and the combined weight, and determining the grade classification result based on the comprehensive surface water quality index, includes: For any monitoring sample in the structured sample data table, the weighting result is determined by weighting the individual pollution index of each water quality indicator corresponding to the current monitoring sample with the combined weight. The surface water comprehensive quality index of the current monitoring sample is determined based on the weighted results of each of the aforementioned water quality indicators; wherein, the surface water comprehensive quality index is used to characterize the comprehensive pollution degree of the corresponding monitoring sample relative to the preset water environment assessment target; The comprehensive quality of surface water is classified into grades based on the numerical range of the comprehensive surface water quality index to determine the classification results.

6. The method for predicting the comprehensive quality of surface water in a watershed according to claim 1, characterized in that, The step of using the surface water comprehensive quality index as a supervised learning label and training a pre-defined table prediction model using the monitoring samples to learn the nonlinear relationship between multi-source environmental factors and the surface water comprehensive quality status includes: The monitoring samples in the structured sample data table are divided into training and test sets by grouping the data according to the monitoring points. The water quality indicators, spatial location, sampling period, and river attributes in the training set are used as input features of the preset table prediction model, and the surface water comprehensive quality index corresponding to the training set is used as a supervision label to train the preset table prediction model. During model training, the model parameters are adjusted according to the nonlinear mapping relationship between the input features and the supervision labels to complete the model training and obtain the trained table prediction model. The trained table prediction model is validated based on the test set and preset evaluation metrics, and the trained table prediction model is determined as the target table prediction model when the validation is successful; the preset evaluation metrics include the coefficient of determination, root mean square error, and mean absolute error.

7. The method for predicting the comprehensive quality of surface water in a watershed according to any one of claims 1 to 6, characterized in that, The process involves determining the target prediction result based on the monitoring samples to be processed from the target surface water monitoring points, the target table prediction model, the classification results, and a preset index sensitivity analysis strategy, and determining whether to trigger an early warning based on the target prediction result, including: After determining the target table prediction model, the water quality index changes before and after deletion of any of the water quality indicators by using the target table prediction model to determine the sensitivity analysis results of the watershed; the sensitivity analysis results include the average relative change rate of each water quality indicator. The target surface water comprehensive quality index is obtained by inputting the monitoring samples to be treated from the target surface water monitoring points into the target table prediction model; The target level is determined based on the target surface water comprehensive quality index and the grading results; the target level includes the target water quality level and / or the target pollution risk level. The target prediction results are determined based on the sensitivity analysis results of the indicators, the target surface water comprehensive quality index, and the target level. The target level in the target prediction result is used to determine whether the preset early warning triggering conditions are met, so as to determine the early warning triggering judgment result.

8. A comprehensive surface water quality prediction device for a watershed, characterized in that, include: The sample data table acquisition module is used to acquire multi-source environmental monitoring data from multiple surface water monitoring points within the watershed at different sampling periods, and to preprocess the multi-source environmental monitoring data to obtain a structured sample data table; the multi-source environmental monitoring data includes water quality monitoring data, spatial location data, sampling period data, and river attribute data; The indicator system construction module is used to construct a comprehensive surface water quality evaluation indicator system based on the characteristics of surface water pollution in the watershed and the preset water environment assessment requirements, and to determine the individual pollution index of each type of water quality indicator in the evaluation indicator system. The combined weighting module is used to determine the subjective weight and objective weight of each water quality indicator based on a preset combined weighting mechanism and the single pollution index, and to fuse the subjective weight and the objective weight to obtain the combined weight of each water quality indicator. The grading module is used to determine the comprehensive surface water quality index of each monitoring sample in the structured sample data table using the individual pollution index and the combined weight, and to determine the grading result based on the comprehensive surface water quality index; the grading result includes several water quality levels and / or pollution risk levels; The model training module is used to use the surface water comprehensive quality index as a supervised learning label and to train a preset table prediction model using the monitoring samples to learn the nonlinear relationship between multi-source environmental factors and the surface water comprehensive quality status, so as to determine the trained target table prediction model; the preset table prediction model is a prediction model for small sample table data. The prediction module is used to determine the target prediction result based on the monitoring samples to be processed at the target surface water monitoring point, the target table prediction model, the level classification result, and the preset index sensitivity analysis strategy, and to determine whether to trigger an early warning based on the target prediction result.

9. The watershed surface water comprehensive quality prediction device according to claim 8, characterized in that, The sample data table acquisition module includes: The first data processing unit is used to perform full empty sample deletion on the multi-source environmental monitoring data to determine the monitoring data after the first processing. The second data processing unit is used to fill down the target fields in the first processed monitoring data to determine the second processed monitoring data; the target fields include river name and cross-sectional attributes. The third data processing unit is used to perform numerical conversion on the numerical water quality indicators in the second processed monitoring data in order to determine the third processed monitoring data. The fourth data processing unit is used to process the missing values ​​in the third processed monitoring data to determine the fourth processed monitoring data. The fifth data processing unit is used to encode the categorical variables in the fourth processed monitoring data to determine the fifth processed monitoring data; The sixth data processing unit is used to unify the format of the spatial location data and the sampling period data in the fifth processed monitoring data in order to determine the sixth processed monitoring data. The data table determination unit is used to construct a structured sample data table based on the sixth processed monitoring data.

10. The watershed surface water comprehensive quality prediction device according to claim 8, characterized in that, The indicator system construction module includes: The system construction unit is used to construct a comprehensive surface water quality evaluation index system based on the characteristics of surface water pollution in the watershed and the preset water environment assessment requirements. The comprehensive surface water quality evaluation index system includes basic physicochemical state indicators, organic pollution indicators, nitrogen pollution indicators, and phosphorus pollution indicators. The basic physicochemical state indicators include pH and dissolved oxygen. The organic pollution indicators include chemical oxygen demand, permanganate index, and five-day biochemical oxygen demand. The nitrogen pollution indicators include ammonia nitrogen and total nitrogen. The phosphorus pollution indicator includes total phosphorus. The indicator classification unit is used to classify the water quality indicators into pollution-type indicators, positive indicators, and interval-type indicators according to the attributes of each water quality indicator in the comprehensive surface water quality evaluation indicator system. The first coefficient determination unit is used to determine the corresponding first single pollution index for the pollution type index based on the ratio between the index monitoring value in the structured sample data table and the preset evaluation standard threshold. The second coefficient determination unit is used to determine the corresponding second single pollution index for the positive index based on the relationship between the index monitoring value and the preset evaluation lower limit threshold. The third coefficient determination unit is used to determine the corresponding third single pollution index for the interval-type index based on the degree of deviation between the index monitoring value, the preset ideal value and the evaluation interval boundary value.